- **Main CFD Forum**
(*https://www.cfd-online.com/Forums/main/*)

- - **2D Euler solver using Runge-Kutta, need help/comment**
(*https://www.cfd-online.com/Forums/main/91872-2d-euler-solver-using-runge-kutta-need-help-comment.html*)

2D Euler solver using Runge-Kutta, need help/commentHello,
I am conducting a side project of coding a 2D Euler solver using 4th order Runge-Kutta with 2nd order central difference for spatial derivative. I am using NACA0012 at Mach 0.5 as the test case. I have applied slip-wall boundary condition at the wall (slip condition + no penetration + density extrapolation + pressure extrapolation). I explicitly calculate the energy at wall using the calculated velocity and extrapolated density and pressure at wall. For farfield, I apply freestream boundary condition (distance from airfoil to farfield is 50 chords). I did not include any artificial dissipation. My solution blows up almost immediately. Any comment/help would be extremely appreciated. thank you. -syoo |

Two things:
a) what kind of initial condition are you using? If the computation blows up almost immediately, sounds like your starting vortex screws you... b) I'm pretty sure that free stream all around your airfoil won't work, since you have no mechanism that allows disturbances in the flow field to vanish/dissipate (since you have a hyperbolic problem). What you should do is use sth like supersonic (extrapolation) outflow on the outflow part of your domain. From what you describe, it really sounds like that would solve your problem! Cheers! |

thank you for replying.
a) my initial condition is freestream except at the wall (k=1) and k=2 index. b) I will try 1st order extrapolation at outflow portion of the grid at farfield. This region is somewhat ambiguous since my grid is an O-grid topology. thank you. -syoo |

since your initial conditions are more or less freestream, you will get a shock wave or at least a large pressure disturbance as you start your computation. without a boundary condition suitable for hyperbolic type problems, your disturbances have nowhere to go and end up blowing your simulation to nirvana. so extrapolation BCs with most certainly help, with an O-grid, make sure that your domain boundary is far enough away from the geometry and use good sense for the outflow part of your domain...e.g. consider angle of attack and maybe cd/cl, which will give you an estimate of the angle of deflection of the flow and thus give you a pretty good estimate which part of your BC will be outflow!
cheers! |

I guess farther help is necessary...... I have implemented non-reflective far field boundary condition. My solution does not blow up immediately anymore. However, after ~10000 iterations or so, my pressure on surface goes negative then solution blows up. My CFL = 0.1 which comes makes it dt = 1e-7 or so. But the amount of time simulated is very short due to small dt, so maybe I can see this as solution still blowing immediately after start?
It seems as though, regardless of the changes I make, the solution seems to remain same / similar. I am using Runge-Kutta 4th order as described in the book "Computational Fluid Dynmics Volume 2" by Hoffmann. Is there any common mistake one can make while writing the flow solver for Euler equation for a airfoil? thank you. |

All times are GMT -4. The time now is 07:26. |