boundary conditions for compressible flow
Hi everybody, I am writing a finite volume code for unsteady 3D turbulent compressible flow in an internal combustion engine.The boundary conditions that I use is prescribed velocity at the inlet and moving wall at the piston head.But I want to make some measurements of swirl,so I must set the piston's velocity to zero.Then it is like fluid entering the cylinder and it is very compressed,like the fluid entering a closed box.The velocity is again prescribed at the inlet.But the code does not converge.The mass residual is only 0.001 but the other residuals are just fine (0.00001).What boundary conditions should I use in order for my code to converge?Can a code converge,when there is one inflow and three walls (no outflow)?My code follows the SIMPLE method for compressible flow. Thank you

Re: boundary conditions for compressible flow
This is an unsteady problem, so you are running an unsteady code, right? What, exactly, is your inlet boundary condition? It must be more than velocity, that is prescribed. I would focus on possible problems arising from that BC, because all other boundary conditions are trivial. To simply prescribe a constant velocity may not be very realistic. Imagine you did an experiment like that. As the mass and pressure in the cylinder are increasing, it becomes more and more difficult to maintain that inlet velocity. You would have to keep increasing the pressure on the entrance side of the valve. Alternatively, the inlet velocity would decrease with time. Is that what you are doing numerically? Anyway, as a general guideline: Don't expect a realistic solution from any code, if your boundary conditions are not realistic. For internal flow the common practice is to prescribe inlet total pressure, inlet total temperature and inlet flow direction (not velocity).

Re: boundary conditions for compressible flow
Hi Mani! The code is unsteady,yes.I prescribe not only velocity at the inlet,but also total temperature, k and epsilon (turbulence model: kepsilon). I keep the inlet velocity steady, because the time step is very small (dt=0.0005 sec) and I study the swirl for only one time step. But I think you are correct. I mean about the prescribed pressure at the inlet. One difficulty that I have is prescribing the pressure at the inlet. When I have: Pressure(1,J)=1 bar , again the code does not converge. But I will work on this. One more question: when you say prescribed flow direction (not velocity), you mean prescribed: (Density*Velocity*Area) ? Thank you Mani!

Re: boundary conditions for compressible flow
Is your code Low Mach Number?

Re: boundary conditions for compressible flow
Hi Guillaume No, it is for Mach number from very small (0.2) to quite large (~1.5). Does this make any difference?

Re: boundary conditions for compressible flow
Not quite sure I am answering your question.
If you wish to validate your code for swirling flow, then you may solve a "simple" problem, e.g. vortex breakdown. I did so for the problem described in M.P. Escudier, Observations of the Flow Produced in a Cylindrical Container by a Rotating Endwall, Experiments in Fluids, v2, pp 189196, 1984. Here there is no inlet and no outlet, and the swirl is set by the endwall rotation. In spite the simple geometry, BC and fluid flow regime (laminar, incompressible) it is not trivial at all. If, on the other hand, this is not your intention, then it is not so clear to me what you actually do. First, if you keep on entering fluid and not let it out, then only a transient solution makes sense. In this case of course the total mass in your control volume is increasing with time, and so does the pressure. Second, if you wish to enter the fluid tangentially, there is no net inflow, since the inlet mass flowrate is rho*Un*A, where Un is the velocity component normal to the inlet area A, which is zero for pure tangential flow. 
Re: boundary conditions for compressible flow
Hi Rami! I think is the second case. The swirl is generated by the inflow valve and the geometry of the inflow pipe.As the fluid pass through the valve, the tangential velocity increases.The only thing that it misses me is the correct BC. bye

Re: boundary conditions for compressible flow
Getting a compressible code to work properly at low Mach numbers is difficult which is why incompressible codes are so widely adopted.
It is not clear what you are doing. SIMPLE is a scheme for incompressible, steady state simulations. There are pressure correction schemes for transient predictions and for compressible flow but they are not the SIMPLE scheme. How are you determining the thermodynamic state of the fluid? Are you solving an energyrelated solution variable? This will affect the required boundary conditions. When testing a pressure correction scheme you must solve the continuity equation into roundoff. Once you have established the code is OK then one can back off and check. However, the effects of not solving the continuity equation at low Mach numbers for pressure correction schemes tends to be global (i.e. point residual errors are not a good indicator). Where are you setting your inlet boundary conditions? At the valve exit or further upstream before the swirl has developed significantly? 
Re: boundary conditions for compressible flow
If you solve the full compressible flow (whatever the numerical method used) you cannot impose the BC "as this" but through a set of a characteristics system. This accounts for the coupling due to pressure evolution. An interesting reference for you should be:
 Thompson, 1987, Time dependent boundary conditions for hyperbolic systems, JCP, 68, 124 Or a textbook:  Hinze, Computational fluid dynamics (Tome 1) (or something like that) Those developments deal with Eulerian flows. In your case, you may have viscous terms. Usually, they are vanished on the frontier through a more or less arbitrary manner. This reference should help you for that (but there are no mathematical developments as in the references above):  Poinsot & Lele, 1992, Boundary conditions for direct simulations of compressible viscous flows, JCP, 101, 10429. Good luck 
Re: boundary conditions for compressible flow
I am using the extended form of the SIMPLE scheme for transient and compressible form,which takes into consideration the variation of the density with the pressure. I use the equation of state:P=p*R*T. I solve the energy equation and I find the tepmerature (T). I did not get what you said...: "When testing a pressure correction scheme you must solve the continuity equation into roundoff.". Can you please explain this to me? The inlet is upstream from the valve,at the manifold,but quite near the valve(about 5cm away from it). Thank you

Re: boundary conditions for compressible flow
I am still not sure exactly what you are doing with your pressure correction scheme and state but it may not be necessary to help solve your problem.
Pressure is not a transported quantity and the pressure correction equation is responsible for small perturbations being felt throughout the solution region. Although you can typically run with small mass errors (due to insufficient iterations on the pressure solver) and get reasonable solutions when you test a code you must prove the mass residuals will go into roundoff. If they do not it means something is wrong. By far the most common problem with a pressure correction equation not converging is that the sources do not sum exactly to zero. This is a requirement if the Poisson equation (which is typcially singular and from which you want only gradient information) is to converge. It is an easy check to perform. Do your sources sum to zero? If not, work out why and fix them. (I have even seen one implementation which loops to determine the global mass imbalance and injects a balancing proportion into every cell. It works but is a pretty nasty bodge.) 
Re: boundary conditions for compressible flow
The sources in the pressure correction equation are actually the continuity equation. It is zero when the code converges. The problem that I am facing is that the mass residual does not vanish, but becomes stable and equal to around 0.001. This is what I am trying to understand why, and the only thing that troubles me is the boundary conditions. Thank you all

Re: boundary conditions for compressible flow
hello, i'm verry happy to found you ,for give me answers about the boudary conditions of an compressible flow in a nozzle . thank's

All times are GMT 4. The time now is 11:19. 