CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Compressible flow through an orifice (https://www.cfd-online.com/Forums/openfoam-solving/115434-compressible-flow-through-orifice.html)

callumso March 30, 2013 19:09

Compressible flow through an orifice
 
Hi folks,

I am investigating the effects of sound waves on the flow through an orifice. As a starting point, I need to set up a flow with certain pressure drop across the orifice.

The flow is fed from a plenum through the orifice into a pipe. I used total pressure, total temperature for the inlet of the plenum and fixed pressure at the outlet of the pipe. I tried rhoPimpleFoam, sonicFoam and rhoDensityFoam. Unfortunately all of them blew up and failed with the error of "floating point exception".

The flow is slow with around 30m/s at the orifice and 0.041 m/s at the plenum and 1.4m/s in the pipe. I tried different time steps from 0.002s down to 0.00001s. But none of these really worked eventually. So I believe this is not a problem related to CFL number.

I noticed one or two other threads on this forum about difficulties on orifice flows, but no real solution has been given. It seems the orifice flow is quite a challenge for OpenFoam?

Can anyone here kindly give me some hints on how to get through this? Thanks in advance.

callumso March 31, 2013 18:02

I have tried different combinations of boundary conditions:

Pressure: Inlet: totalpressure; Outlet: fixed pressure
Velocity: Inlet: pressureInletVelocity; Outlet: zero-gradient
Temperature: Inlet: totaltemperature; Outlet: zero-gradient

Pressure: Inlet: fixed pressure; Outlet: fixed pressure
Velocity: Inlet: pressureInletVelocity; Outlet: zero-gradient
Temperature: Inlet: fixed temperature; Outlet: zero-gradient

Pressure: Inlet: zero gradient; Outlet: fixed pressure
Velocity: Inlet: fixed velocity; Outlet: zero-gradient
Temperature: Inlet: fixed temperature; Outlet: zero-gradient

Unfortunately, none of them could stop the simulation from blowing up. My simulation is with the standard k-epsilon model. I use the same boundary conditions on an in-house pressure-based code and they don't work, either.

Is it because that these boundary conditions don't really work by themselves on a pressure-based compressible flow solver? I used total pressure, total temperature and fixed pressure on Fluent and I quickly obtained a transient result which only fluctuated slightly over time. But I don't really know how the actual implementation is in Fluent. I also need to have access to the source code in order to inject a sound wave or do other things, which means I can't really use Fluent for my research.

My mesh is a normal structured one and I never use a I am a bit surprised that OpenFoam has difficulties in simulating a geometry as simple as an orifice. Can anyone give me some hints on how to work this out? Thanks a lot.

doubtsincfd March 31, 2013 18:37

did you try with rhoPorousMRFSimpleFoam?

callumso March 31, 2013 20:02

Hi Omkar,

Thank you for the reply. No, I didn't use that solver. But I did try rhoSimplecFoam, even though I expected the jet flow to be an unsteady one. Unfortunately this unsteady solver broke down even quicker than the transient ones.

I tried bring down the relaxation to quite low, e.g. around 0.3, and at one stage also reduced the multigrid level to only 2. Unfortunately still no luck on that. Anyway I am more concerned about the transient solvers as my aeroacoustic study won't be a steady case.

I do realise that when p is fixed at the outlet, the zero-gradient boundary condition for velocity is not really proper as far as the characteristic waves are concerned. But somehow this is used in the tutorial. I am not sure how this manages to work. Do you have any idea on this? Thanks.

callumso April 4, 2013 16:08

:p Thanks to Pascal Doran, setting U to advective boundary condition does the trick.


All times are GMT -4. The time now is 00:51.