|
[Sponsors] |
February 17, 2013, 08:17 |
BC for compressible flows
|
#1 |
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 13 |
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, 06:54 |
|
#2 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 16 |
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, 07:03 |
|
#3 |
Senior Member
andy
Join Date: May 2009
Posts: 270
Rep Power: 17 |
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, 19:09 |
|
#4 | |
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 13 |
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 time-dependent). Also no way to have a good initial field. Thanks again for your help. Quote:
|
||
February 18, 2013, 19:15 |
|
#5 |
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 13 |
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, 01:40 |
|
#6 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 16 |
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, 02:40 |
|
#7 |
New Member
Lipo Wang
Join Date: Dec 2012
Posts: 14
Rep Power: 13 |
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, 01:56 |
|
#8 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 16 |
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, 04:00 |
|
#9 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
some time ago I worked on compressible flows using an unstructured-based code. I used to solve the continuity equation at wall on a non-symmetric FV, then the temperature and finally I computed the pressure at wall
|
|
February 21, 2013, 10:53 |
|
#10 |
Senior Member
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Q-criterion in 2D flows | Josh | Main CFD Forum | 5 | June 15, 2013 07:13 |
Derivation of the pressure-correction 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 k-e | Abhijeet Vaidya | Main CFD Forum | 10 | November 18, 2002 08:21 |