Solving 1D Navier-Stokes equation using ode45 MATLAB

11 ビュー (過去 30 日間)
Neelay Doshi
Neelay Doshi 2020 年 4 月 11 日
コメント済み: Neelay Doshi 2020 年 7 月 28 日
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 件のコメント
darova
darova 2020 年 4 月 11 日
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
Neelay Doshi
Neelay Doshi 2020 年 7 月 28 日
Turns out my equations were not correct but the method you suggested works. Thank you for your response.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by