Skip to main content
3 of 3
added 132 characters in body

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