![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283787/image.png)
Solving 1D Navier-Stokes equation using ode45 MATLAB
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
2 comentarios
darova
el 11 de Abr. de 2020
If i understood you correctly: you have all initial conditions
To calculate next step you need all du,dp.... Solve 4x4 matrix to get them
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283787/image.png)
Respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!