|
[Sponsors] |
February 15, 2015, 08:52 |
Coding 1D euler equation in C
|
#1 |
New Member
bram
Join Date: Jan 2015
Posts: 10
Rep Power: 11 |
Hello,
I dono the right grp to post this ques so pardon me if I'm wrong in posting it here.I've been trying to code 1D Euler equation in C language. I've used McCormack's method to solve the equation. I'm getting very large values for output parameters rho,rho*u and all others in the Euler equation .The output is of the order of e^98.we have cfl number very much less than 1.I couldn't figure out any other issues in our algorithm. Please try to help me out on wat the issue it could be. If someone had a code try to share it. Thank you, |
|
February 15, 2015, 11:44 |
|
#2 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Look for cells that have zero density. You likely have points were you calculate divisions by rho. Once you get crazy numbers in one field, it will spread to the others. That is the obvious thing to check first.
If that is not the cause, add some code check the magnitude of each variable after it is update and break the code as soon as the value goes about something sane (~10 * typical value) and see that is blowing up first. For reference, this site has 1D Euler code with McCormack's fluxes in .f90. Maybe you can refer to it to make sure you aren't missing something fundamental: http://www.cfdbooks.com/cfdcodes.html |
|
February 16, 2015, 10:58 |
|
#3 |
New Member
bram
Join Date: Jan 2015
Posts: 10
Rep Power: 11 |
Thank u I'll try out
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
why we use laplace instead of euler equation in 2D non-viscous incompressible flow. | pswpswpsw | Main CFD Forum | 2 | October 8, 2014 15:45 |
regarding coding of population balance equation | shashi@1991 | Fluent UDF and Scheme Programming | 0 | September 14, 2014 06:08 |
1D Euler Equation by Finite Difference Scheme | Catkun | Main CFD Forum | 3 | August 20, 2014 04:27 |
Euler equation with finite volume method without division | tkk88 | Main CFD Forum | 1 | July 29, 2014 02:43 |
Euler & N-S EQUATIONS from Boltzmann EQUATION | Yogesh Talekar | Main CFD Forum | 10 | September 13, 1999 10:00 |