Solving 1D Navier-Stokes equation using ode45 MATLAB

8 views (last 30 days)
Hello everyone!
I am trying to solve 1-dimension, inviscid and compressible Navier-Stokes equations using the ode45 function in MATLAB. I have derived the necessary governing equation and have attached them in the post. I understand that normally these are solved using FDM, FVM etc, but I wish to solve them using ode45 as it would require much lesser computational time.
The equations are coupled and every equation contains a derivative term of another variable which may not be calculated yet. For instance, as per my understanding, if I were create an ode function containing the 4 system of equations as per the order given in the attachment, then ode45 would first try to solve the energy equation (dT/dx) but it wouldn't know the value of the derivative of velocity (du/dx) as it has not been calculated yet, and so the solver would use du/dx=0, which would be incorrect.
Is their anyother way to solve these coupled odes? Kindly correct me if I am mistaken.
Neelay Doshi
Neelay Doshi on 28 Jul 2020
Turns out my equations were not correct but the method you suggested works. Thank you for your response.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!