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/)
-   -   Free jet simulation (https://www.cfd-online.com/Forums/openfoam-solving/80121-free-jet-simulation.html)

msarkar September 16, 2010 02:35

Free jet simulation
 
2 Attachment(s)
Hello Foamers,

I am trying to simulate a heated air jet dispersion in an open area. The heated air is coming out from a pipe leak ( leak diameter 1cm) with a velocity of 135 m/s and a temperature of 100 C. In this case, the Mach-number is around 0.4 which is mildly compressible flow. So, I was using rhoSimpleFoam and rhoPImpleFoam. I tried several boundary conditions and mesh sizes but with out any success. The results do not look reasonable. As initial case I am considering a 2D rectangular geometry. Could you please suggest me which solver I should use?

The mesh and boundary file and one set of used boundary conditions are attached here. If you have any suggestions regarding boundary conditions, Please let me know. Any help would be very much appreciated.

top:
alphat: type calculated

epsilon:
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
k:
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}

mut:
type calculated;

p:
{
type fixedValue;
value uniform 100000;
}

T:
{
type zeroGradient;
value uniform 333;
}

U:
{
type pressureNormalInletOutletVelocity;
//type slip;
phi phi;
rho rho;
value uniform (0 0 0);
}

bottom:
alphat: type calculated

epsilon:
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;

k:
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}

mut:
type calculated;

p:
{
type fixedValue;
value uniform 100000;
}

T:
{
type zeroGradient;
value uniform 333;
}

U:
{
type pressureNormalInletOutletVelocity;
//type slip;
phi phi;
rho rho;
value uniform (0 0 0);
}


inlet:
alphat: type calculated

epsilon:
{
type compressible::turbulentMixingLengthDissipationRate Inlet;
mixingLength 0.0005; // 0.01*0.05
value uniform 0.01;
}

k:
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 0.1;
}

mut:
type calculated;

p:
{
type zeroGradient;
value uniform 100000;
}

T:
{
type fixedValue;
value uniform 373;
}

U:
{
type fixedValue;
value uniform (135.74 0 0);
}


outlet:
alphat: type calculated

epsilon:
{
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}

k:
{
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}

mut:
type calculated;

p:
{
type fixedValue;
value uniform 100000;
}

T:
{
type zeroGradient;
value uniform 333;
}

U:
{
type inletOutlet;
phi phi;
rho rho;
value uniform ( 0 0 0 );
inletValue uniform ( 0 0 0 );
}

lowerleft:
alphat:
type alphatWallFunction;
Prt 0.85;
value uniform 0;

epsilon:
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.01;
}

k:
{
type compressible::kqRWallFunction;
value uniform 0.1;
}

mut:
{
type mutWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}

p:
{
type fixedValue;
value uniform 100000;
}

T:
{
type zeroGradient;
value uniform 333;
}

U:
{
type fixedValue;
value uniform (0 0 0);
}


upperleft:
alphat:
type alphatWallFunction;
Prt 0.85;
value uniform 0;

epsilon:
{
type compressible::epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.01;
}

k:
{
type compressible::kqRWallFunction;
value uniform 0.1;
}

mut:
{
type mutWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}

p:
{
type fixedValue;
value uniform 100000;
}

T:
{
type zeroGradient;
value uniform 333;
}

U:
{
type fixedValue;
value uniform (0 0 0);
}


frontAndBack:

For all variables it is empty.

ni-openfoam-user August 6, 2014 12:28

Boundart conditions
 
Hi foamer,

Just wondering if you ever solved your boundary conditions problems? So you maybe please post your working "0" folder?

I am currently trying to simulate a high pressure hydrogen release into the open atmosphere and am struggling to select the correct boundary conditions.

Top / left / right / front / back faces of the domain all open to the atmosphere. Bottom surface is ground (wall).

I am using OpenFoam 2.3.0 and reactingFoam (with chemistry switched off) as my solver.

Kind regards,

James

joaofl August 11, 2014 15:47

Did you manage to solve the problem? Could you please post the solution? If possible, including the files. I'm trying to reproduce exactly the same right now, and I'm facing this beginners problems.

Appreciate it.

Joćo

ni-openfoam-user August 12, 2014 06:30

1 Attachment(s)
Dear Joao,

I'm not sure if you comment was directed at me, however I will comment.

Unfortunately I am still in the process of trying to solve my problems around the boundary condition settings (which I have learned that OpenFoam in particular is very sensitive to).

My case is a 3D simulations, essentially the domain is a rectangular box. (And is summarised in the cross-section shown below).

  • I have H2 inflow from a pipe (I am currently using only 10 m/s but I will ramp this up over time)
  • Atmospheric air (wind) inflow at 1.1 m/s coming in from the back
  • The bottom surface is ground (wall)
  • The remaining boundaries (top, left side, right side, and end) are all open (atmosphere) boundaries.
This simulation has been successfully completed using FLUENT where the boundaries were selected as:
  • Pressure inlets for the top, left and right boundaries
  • Pressure outlet for the end boundary
  • Velocity inlet for "air inflow" and "H2 inflow" boundaries
  • Wall for ground and the h2 pipe.
I do not know which boundary settings I should choose for the "open atmosphere" boundaries and looking through the forums I have found some contradicting advice.


Could someone please comment on what I should select for:
alphat, epsilon, H2, O2, N2, k, mut, p, T, U for this setup.


The difficulty here (I guess) is the boundaries cannot be considered as strictly inlets and outlets but may change due to entrainment due to the jet for example.

I am using reactingFoam with chemistry and combustion switched off (this is H2 release and dispersion only) and am currently running on OpenFoam 2.3.0


Any comments would be most appreciated.


Kind regards,


James

joaofl August 12, 2014 12:30

1 Attachment(s)
Hello James.

I believe your understanding and problem's complexity are quiet beyond mine, so I'm not sure I can help much, since I started one week ago.

But from yours and msarkar posts, I understood that you have similar objectives (somehow), from which I could maybe learn something from.

I'm basing my development in mainly two examples from OF, which are "prism", using sonicFoam, and also pitzDaily, using rhoPimpleFoam solver. I created my volume and mesh using gmsh, and I'm basically running the pitzDaily simulation on top of my mesh.

My objective is to have something like this:
http://en.wikipedia.org/wiki/Large_e...city_Field.png http://en.wikipedia.org/wiki/Large_e...city_Field.png(link)

But so far, I only managed to have this: (attached)

Attachment 32985


I appreciate any help. Practical or theoretical, on how to achieve those results. Like I said, my boundary conditions are the same from the example pitzDaily.

Best,

Joćo

tomf August 20, 2014 04:46

Hi,

For the "Open Atmosphere" boundaries I would use:

p: totalPressure
U: pressureInletOutletVelocity
k/H2/O2/epsilon/T: inletOutlet
mut/alphat/N2: calculated

Regards,
Tom

ni-openfoam-user August 20, 2014 05:53

Dear Tom,

Thank you for responding.

May I ask:

1) Why do you have N2 set as 'calculated' rather than 'inletOutlet'?

2) Have you successfully completed a simulation which is similar to the one which I previously described in the 4th post of this thread?

Kind regards,

James

tomf August 20, 2014 06:25

Dear James,

Let me answer you:

1. The reason I suggested "calculated" is due to the fact that the mass fraction of all species should not be larger than 1, using calculated makes N2=1-(O2+H2), assuming your inert species is N2. If you are prescribing it to be only air, you could also use inletOutlet, both should work, I just prefer calculated.

2. Well I have performed similar simulations in the sense that I have had multi-species simulations and simulations with an open atmosphere, but not combined in one simulation. I did however have a multi-species simulation where my outlet was close to a sharp edge, so I used "open atmosphere" boundary conditions for this outlet in order to be able to cope with backflow. The simulation ran fine.

Regards,
Tom

joaofl August 20, 2014 12:39

1 Attachment(s)
Dear Tom, thanks for your reply. It actually worked out for me. I'm able to simulate the entire time-span without a crash, and the flows is actually leaving through the outlet. But some initial waves are still reflected by the outlet, what I dont understand why (figure).

Also, what would you suggest to make the jet more turbulent? I've been playing with the inlet shape, but I still can not get a turbulent flow, like this

http://upload.wikimedia.org/wikipedi...s/f/fb/Jet.jpg


Thanks for your help.

Best,

Joćo




Attachment 33173

ni-openfoam-user August 20, 2014 12:50

Dear Joao,

I am glad that you simulation is now running without crashing.

Could you please further expand on your statement:

"But some initial waves are still reflected by the outlet, what I dont understand why (figure)".

By this statement do you mean that initially (early stages of the simulation only) there is some reflection, but then as the simulation continues these reflections die away and your boundaries (following the settings kindly supplied by Tom) then act as they should:

i.e. open and non-reflecting

or are you seeing multiple reflections from the boundary with these "open atmosphere" settings?

Kind regards,

James

ni-openfoam-user August 20, 2014 13:00

Regarding your turbulence query, I'm curious what are your boundary condition settings for k and epsilon?

If you are not already you could try:

for k = turbulenceIntensityKineticEnergyInlet
for epsilon = compressible::turbulentMixingLengthDissipationRate Inlet

I could give you an example of how to set these inlet boundaries if you require?

Kind regards,

James

joaofl August 20, 2014 13:08

Hi James, thanks for your reply.

From my understanding, what is happening is:
the flows' start generates some pressure waves, that propagates faster then the air mass, and this waves are reflected back by the outlet boundaries. This pressures waves are reflected back to the air mass, and are attenuated, until it becomes an overall background pressure fluctuation only.

In the other hand, the air mass is able to flow "through" the outlet. I seems that I had to be more specific in setting up the pressure outlets.

Figure illustrates the flows' start, where part of the pressure wave was already reflected (left half of the jet), and the other half is still propagating to the right outlet.

Let me know if there is still anything unclear.

Best,

Joćo

joaofl August 20, 2014 13:17

"I could give you an example of how to set these inlet boundaries if you require?"

Dear James, I would appreciate that. I'm not exactly sure how to do so. Here is my values:


k:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 2e-05;
}

outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

tube
{
type fixedValue;
value uniform 0;
}

lowerWall
{
type fixedValue;
value uniform 0;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

T:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inlet
{
type fixedValue;
value uniform 300;
}

outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}

tube
{
type fixedValue;
value uniform 300;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

U:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type turbulentInlet;
referenceField uniform (300 0 0);
fluctuationScale (0.02 0.01 0.01);
value uniform (300 0 0);
}

outlet
{
type pressureInletOutletVelocity;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

tube
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

alphaSgs:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type calculated;
}

tube
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}


// ************************************************** *********************** //

muTilda:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type calculated;
inletValue uniform 0;
value uniform 0;
}

tube
{
type fixedValue;
value uniform 0;
}

lowerWall
{
type fixedValue;
value uniform 0;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

muSgs:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type calculated;
}

tube
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

ni-openfoam-user August 20, 2014 13:19

You may want to look that the following papers, the simulations carried out in these seem to be applicable to you work:

V. Vuorinen et al. "Large-eddy simulation on the effect of injection pressure and density on fuel jet mixing in gas engines", Fuel, 130 (2014) 214-250

V. Vuorinen et al. "Large-eddy Simulation of Subsonic Jets", Journal of Physics: Conference Series 318 (2011) 032052.

joaofl August 20, 2014 13:24

Great papers, I would definitely take a look.

Thanks a lot.

i missed posting
p:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 1e5;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type totalPressure;
value uniform 1e5;
p0 uniform 1e5;
U U;
phi phi;
rho rho;
psi none;
gamma 1.4;
}

tube
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

ni-openfoam-user August 20, 2014 13:39

Looking at your boundary conditions, in your previous posts are you not including all you "open" boundaries. You seem to have only one outlet set following the settings from Tom. Have you only included one of them for brevity?
I am a little confused trying to relate your boundary settings to the pictures you have attached.

How many "open" boundary conditions exist in you case? Could you label them on your attached pictures?

__________________________________________________ _____

For example in my simulations I am setting k and epsilon as follows:

Say we have an inlet velocity of 10 m/s, we assume a turbulent intensity of 3 %

For k we have: k = (3/2)*(10*0.03)^2 = 0.135
For epsilon we have: epsilon = ((0.09)^(3/4))*(((0.135)^(3/2))/0.00154) = 5.2951

0.09 = turbulence model constant
0.00154 = length scale = 0.07*pipe diameter (in my case 0.022 m)

This translates into the following initial settings for k and epsilon:

k:

type = turbulentIntensityKineticEnergyIntet;
intensity = 0.03;
value = uniform 0.135;

epsilon:

type = compressible::turbulenceMixingLengthDissipationRat eInlet;
mixingLength = 0.00154;
value = uniform 5.29251;

This is following my understanding (which I hope is correct).

Kind regards,

James

joaofl August 20, 2014 13:48

I think it was more like for bravest... Actually, I'm only using:

inlet
outlet
tube
frontAndBack

which are:
__________outlet______
outlet | |
| |
inlet |==tube |
| | outlet
outlet | |
____________________

outlet

"lowerWall" is only resilient text.

Was it clear?

joaofl August 20, 2014 13:53

1 Attachment(s)
it actually remove the blank spaces.

Ill draw it.

Attachment 33184

joaofl August 21, 2014 09:47

Hello James.

I took a look at the papers you suggested. I understood that a new solver was developed to their needs, right? What they called Runge-Kutta-4... So, I'm not really sure how this could help me, since what they claim is that the actual solver can not give a proper solution to what they expect.

I did not read it fully, but more practical details would be required so I can use their work to develop mine. Right?

The main problem here is: My PhD is on embedded systems, more specifically in real time sensor networks. Because of that, I would use a CFD simulation to feed my virtual sensor network, in order to show how distributed processing can be applied to "real" data. With that I mean, fluid dynamics is not my background at all, and I'm nos supposed to spend much time with it, since its just an aside of my research.

What do you think I should go for?

Thanks again!

Cheers,

Joćo

ni-openfoam-user August 21, 2014 10:02

What I meant by providing these papers to you was more to refer to the set up of the inlet rather than the solver being used, i.e "the injection system is modeled using a simple gas injector through which the jet is accelerated using a pressure gradient".

the injector starts at z/D = -77 and the fluid exits into the chamber at z/D = 0

You mentioned before that you wished to turbulise the jet, using this method along with LES (rather than RAS) may help with this.

This was what I was referring to.

Hope that is clear.

Kind regards,

James


All times are GMT -4. The time now is 01:35.