CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Coding 1D euler equation in C

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2015, 08:52
Default Coding 1D euler equation in C
  #1
New Member
 
bram
Join Date: Jan 2015
Posts: 10
Rep Power: 11
rambharath is on a distinguished road
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,
rambharath is offline   Reply With Quote

Old   February 15, 2015, 11:44
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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
mprinkey is offline   Reply With Quote

Old   February 16, 2015, 10:58
Default
  #3
New Member
 
bram
Join Date: Jan 2015
Posts: 10
Rep Power: 11
rambharath is on a distinguished road
Thank u I'll try out
rambharath is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 08:36.