Solving coupled differential equations for velocity and diameter

3 replies · 2K views · last reply
confused student
Messages
2
Reaction score
0

Homework Statement


Text problem statement: Assuming a, b and c are known constants, how can I use the following differential equations to generate a plot of v vs t and a plot of D vs t? I know that the initial v and initial D values are equal to the constants v0 and D0 respectively.

(It should be noted that the actual problem has specific values associated with a, b, and c. However, at this point I'm trying to find a method to solve the problem rather than a specific solution).

Homework Equations


Two coupled differential equations: dv/dt = -c * v^2 / D, and dD/dt = -a / D * (1 + b * sqrt(D v)).


The Attempt at a Solution


When I was trying to solve this initially, I didn't realize that D changed with respect to t; for that reason my solution only applies for when D is constant. I calculated dv/dt with a constant D and multiplied that slope by small increments of t in order to get values of v. I know there are more efficient methods to do numerical integration like the Runge Kutta method, but I was trying to blow through the problem without them. My excel sheet started giving non real numbers when I added in the second differential equation (dD/dt), so I'm really stuck. How should I go about solving this with the additional differential equation? Thank you in advance for any assistance!
Excel spreadsheet with columns for t, Vn, change per h and area under the curve, plus a chart titled 'v versus t' showing velocity falling steeply from 10 near t=0 toward zero.
 
Attachments
  • Two coupled differential equations: dv/dt = -c * v^2 / D and dD/dt = -a/D * (1 + b*sqrt(Dv)), with the text above stating a, b, c are known constants and initial values v0 and D0.
    upload_2019-2-24_17-9-50.png
    23.3 KB · Views: 384
  • Two coupled differential equations: dv/dt = -c * v^2 / D, and dD/dt = -a / D * (1 + b * sqrt(D v)).
    upload_2019-2-24_17-10-38.png
    6.5 KB · Views: 634
  • Text problem statement: Assuming a, b and c are known constants, how can I use the following differential equations to generate a plot of v vs t and a plot of D vs t? I know that the initial v and initial D values are equal to the constants v0 and D0 respectively.
    upload_2019-2-24_17-10-45.png
    18.9 KB · Views: 786
  • Excel spreadsheet with columns for t, Vn, change per h and area under the curve, plus a chart titled 'v versus t' showing velocity falling steeply from 10 near t=0 toward zero.
    upload_2019-2-24_17-10-56.png
    33.9 KB · Views: 646
Hello and :welcome:
confused student said:
started giving non real numbers
What does that look like, imaginary numbers ? Or just error indications ?

Can happen if D becomes negative. I would first try a smaller value for ##a## and/or a smaller step size
 
  • Like
Likes   Reactions: confused student
So I kept fiddling with it, and the problem was that D changed too quickly; I made my step size smaller and made my constants smaller. That generated actual numbers. One thing I'm still not sure of is my method to generate the plots. Does it make sense to multiply the slope by small increments of t if there is no t term in the differentials?
 
There is a ##dt## in the denominator, I should hope ?
What you do is you integrate: ##f(t+\Delta t) = f(t) + f'(t) \Delta t##