
[Sponsors] 
February 17, 2013, 09:17 
BC for compressible flows

#1 
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 5 
Dear all,
A basic problem, which I thought should be quite simple, puzzles me a long time... For compressible simulations (still subsonic, Mach is about 0.7) of flow passing a square block, the mesh is Cartesian and the scheme is MacCormack. I tried different boundary conditions of the pressure on the block surface, for instance: extrapolation from two internal points (as said in Anderson's book), zero gradient pressure (i.e. p_surface=p_1), or from the continuity eq. to update pressure etc. But none of them can work satisfactorily and finally the density runs to negative around the corner. Could anybody give me suggestions? Many thanks. 

February 18, 2013, 07:54 

#2 
Senior Member
duri
Join Date: May 2010
Posts: 138
Rep Power: 8 
Just hold the pressure and density from the nearest cell on the wall surface. Make sure velocity components are rotated properly to make zero normal component on the wall (for Euler solver).


February 18, 2013, 08:03 

#3 
Senior Member
andy
Join Date: May 2009
Posts: 129
Rep Power: 9 
The exit boundary condition is usually tied to some extent to the inlet boundary condition. For example a "total pressure" condition at the inlet and a "static pressure" condition at the exit. What is your inlet condition?
Zero gradient on pressure is usually fairly stable even though physically incorrect in most situations. Are you violating a stability limit during the initial bang? 

February 18, 2013, 20:09 

#4  
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 5 
Dear Andy,
Thanks. The outlet is given static pressure and the inlet is from extrapolation of two interior points' pressure, because I specify the inlet velocity (both direction and magnitude). From the visualization I found around the corner a lot of fluctuation. I think it is mainly from the corner and solid BC, but much less relevant to inlet and outlet, because the 'wrong' region is far from them. Am I right? 'Are you violating a stability limit during the initial bang ', I am not quite clear about this point. Do you mean that the initial value still need to be reasonable? I thought even an initial field is not 'good', it will evolve toward the final solution (the problem is timedependent). Also no way to have a good initial field. Thanks again for your help. Quote:


February 18, 2013, 20:15 

#5 
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 5 
Dear Duri,
Thanks. I tried different BC, including yours (let pressure gradient =0 and the wall temperature is fixed.) But always failed. One observation may be helpful: I reduced the inlet velocity a bit, it can work. Do you have any idea about the problem? If the mesh is very coarse, is it also OK? (I found from Anderson's book that the grid Re should be <30~50, but my case is much larger ~1000) If you have a similar code to let me share? If yes, I will greatly appreciate! 

February 19, 2013, 02:40 

#6 
Senior Member
duri
Join Date: May 2010
Posts: 138
Rep Power: 8 
Are you solving Euler equations or NS equations. Whether implicit or explicit. Time stepping etc. Give more details for better understanding of the issue. And also what kind of boundary condition at inlet and exit (characteristics or physical).


February 19, 2013, 03:40 

#7 
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 5 
I am solving the NS equations, using the explicit MacCormack scheme. Time step is from the stability criterion and much smaller time step was also tried, but still diverge.
Because flow is subsonic, inlet BCs are: velocity (magnitude and direction) and temperature are given and the pressure is extrapolated; for outlet, the static pressure is given and u,v,w and T are extrapolated from two interior points along the flowing direction. For the corner points in the channel, I tried many different possibilities for pressure: like average of two adjacent surface points', equal to the diagonal cell point's pressure etc. Results are always the same. 

February 21, 2013, 02:56 

#8 
Senior Member
duri
Join Date: May 2010
Posts: 138
Rep Power: 8 
BC's and time stepping are seems to be correct. It could be the problem with code also. Please do the following to ensure there is no bug in the code.
1. Simple rectangular duct with symmetry on top and bottom should work, it will give almost zero residual make sure it doesn't blows up later. 2. Full supersonic flow like flow over ramp. (if this fails problem is with time stepping and possibly scheme). if these two are working then problem is certainly with subsonic boundary conditions. Don't extrapolate from two interior points just use the value from the nearest cell. First order bc is sufficient enough to start with. 

February 21, 2013, 05:00 

#9 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,417
Rep Power: 31 
some time ago I worked on compressible flows using an unstructuredbased code. I used to solve the continuity equation at wall on a nonsymmetric FV, then the temperature and finally I computed the pressure at wall


February 21, 2013, 11:53 

#10 
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 469
Rep Power: 11 
The flow around a square block will probably be supersonic if the freestream Mach number is Mach 0.7. I'm not sure the MacCormack scheme is stable for the corners of your block. You may need to add artificial dissipation. The fact that it works if you lower the inlet velocity seems to indicate this.
You've mentioned "square block" and "channel". If the square block is in a channel at Mach 0.7 then the flow may be choking. Lowering the inlet velocity would also help this. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Qcriterion in 2D flows  Josh  Main CFD Forum  5  June 15, 2013 07:13 
Derivation of the pressurecorrection equation for compressible flows  luftraudi  Main CFD Forum  0  July 17, 2012 06:35 
SIMPLE pressure correction in compressible flows  Maarten de Jong  Main CFD Forum  7  April 30, 2012 02:23 
y+ in high Pr flows  vishyaroon  Main CFD Forum  0  April 15, 2010 14:24 
calculating recirculating turbulent flows with ke  Abhijeet Vaidya  Main CFD Forum  10  November 18, 2002 09:21 