# Solving differential equations when one of your variables is the result of a transcendental equation

I am trying to numerically solve a system of differential equations, however, one of the parameters that goes in it is the result of a transcendental equation.

NDSolve[{(v1 /.
NSolve[p*g*h1 - P == (p*v1^2*L1*64*0.00105)/(2*p*d^2*v1) +
p*v1^2*(0.7)/2, v1])*A1 == -A2*
h'[t], (v2 /.
NSolve[P - p*g*h2 == (p*v2^2*L1*64*0.00105)/(2*p*d^2*v2) +
p*v2^2*(0.7)/2,
v2]*-(v1 /.
NSolve[p*g*h1 - P == (p*v1^2*L1*64*0.00105)/(2*p*d^2*v1) +
p*v1^2*(0.7)/2, v1]))*A1 == V'[t], P = p0*v0/V[t], P[0] == 100000,h[0] == 0.5}, {h, P}, {t, 0, 100}]


Here, every letter corresponds to a predefined constant except for P, h, and V. v1 is the parameter that is the solution of the transcendental equation.

How can I make this work? Costants values:p = 1000; L1 = 5.0,L2 = 0.43,d = 0.0056,g = 9.8,h1 = 5.0,h2 = 0.43,A1 = 0.00001,A2 = 0.001,p0 = 100000,v0 = 0.001

• related: Use findroot inside NDSolve. Jun 26, 2018 at 21:21
• Could you give values for the constants? Jun 26, 2018 at 23:14
• Every NSolve-command gives 2 results, you have to decide which one to use in NDSolve. Jun 28, 2018 at 9:17