CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

BC -> k e simpleFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   March 23, 2012, 07:47
Default BC -> k e simpleFoam
  #1
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Hello!

I tried to simulate a simple airflow with the kEpsilon model, solver simpleFoam. a totalPressureInlet with 0.44 pa is given. Velocity has to be calculated. The residuals and the continuity looks good but the velocity much to small about 1e-06. the Solution should be about 0.35 m/s.

BC:

U:
internalField uniform (0 0 0);

outlet: type zeroGradient;

inlet: type pressureInletVelocity;
value uniform (0 0 0);

wall: type fixedValue;
value uniform (0 0 0);
------------------------------------------------------------
p:
internalField uniform (0 0 0);

outlet: type zeroGradient;

inlet: type totalPressure;
p0 uniform 0.44;
value uniform 0.44;
gamma 1;

wall: type zeroGradient
------------------------------------------------------------
epsilon:

internalField 0.02247;
outlet: type zeroGradient;

inlet: type turbulentIntensityKineticEnergyInlet;
intensity 0.001;
value uniform 0.02247;

wall: type epsilonWallFunction;
value uniform 0.02247;
---------------------------------------------------------------------------------------
k
internalField uniform (0 0 0);

outlet: type zeroGradient;

inlet: type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.01;
value uniform 1.356e-03;

wall: type kqRWallFunction;
value uniform 1.356e-03;

Has anyone a hint for me ?
klio is offline   Reply With Quote

Old   March 23, 2012, 09:32
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 285
Rep Power: 9
kmooney is on a distinguished road
I'm guessing it is an issue with your p and U boundary conditions. Neither of them actually drive a flow. You'd need something like a fixed value U or a fixed pressure gradient to get some momentum into the domain.
kmooney is offline   Reply With Quote

Old   March 27, 2012, 03:53
Default
  #3
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Hi!
Thanks for your quick reply!
With fixedGradent instead of fixedValue in my pressure inlet BC i got a flow in my flow simulation .
klio is offline   Reply With Quote

Old   March 28, 2012, 02:37
Default
  #4
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Ok but now i got the problem that the pressure decreases at the inlet. i thought fixed Gradient is NOT variable.
Do you have an idea what goes wrong there?
klio is offline   Reply With Quote

Old   March 28, 2012, 12:50
Default
  #5
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
Perhaps nothing is wrong. You fixed the gradient, not the value.
soonic is offline   Reply With Quote

Old   March 29, 2012, 06:56
Default
  #6
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
hmmm... Thanks!

But I have the Problem that I just know the fix pressure value at the inlet and if I only fix the Value there, there is nothing which drives my Flow.
so should I fix the value and the gradient at the inlet and how does it works ?
klio is offline   Reply With Quote

Old   March 29, 2012, 08:47
Default
  #7
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
what is the dimension of the p variable you have prediscribed ?
check if it is not p/rho. And you have maybe correct solution for the wrong task.
soonic is offline   Reply With Quote

Old   March 29, 2012, 08:57
Default
  #8
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
yes it is p/rho!
My pressure is about 0.5 pa, rho is 1.225 so my PressureValue is about 0.44
an the solution is about 2000 times smaller!
I also tried to set initial conditions with potentialFoam but either my velocities are much to small or much to high!
klio is offline   Reply With Quote

Old   March 29, 2012, 09:16
Default
  #9
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
I think I can't really imagine how the BC at inlet and outlet of U and P should be set correctly.
When I take a look at the examples I can only find BC where the velocity is known. Not so in my case!
klio is offline   Reply With Quote

Old   March 29, 2012, 09:43
Default
  #10
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
try attached case with simpleFoam. It seems fine with your values on D=1cm pipe.

(it is based on case_pipe_viscous_heating for mySimpleFoam solver found on that forum)

edit: it is only laminar case.
Attached Files
File Type: gz pipe_pressure.tar.gz (3.4 KB, 33 views)

Last edited by soonic; March 29, 2012 at 09:50. Reason: typo
soonic is offline   Reply With Quote

Old   March 29, 2012, 09:49
Default
  #11
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Ok I'll try it thank you very much. Hope that even works in k e model
klio is offline   Reply With Quote

Old   March 29, 2012, 11:33
Default
  #12
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
yes, it do. Tried with 10Pa on inlet to have Re in turbulent zone.
soonic is offline   Reply With Quote

Old   March 30, 2012, 02:24
Default
  #13
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Thank you very much for this nice example. I took same BC for k-e-Model and it didn't worked!
klio is offline   Reply With Quote

Old   March 30, 2012, 07:41
Default
  #14
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Hi at all!

now the Laminar model works!

But if I take the same BC as in the laminar model for the kE-Modell it doesn't work!

My BC are:

k & epsilon

interiorField: 1
pressure_inlet: 1
pressure_outlet: 1
wall: WllFunktion 1

p

interiorField: 0
pressure_inlet: 0.44
pressure_outlet: 0
wall: zeroGradient

U

interiorField: (0 0 0)
pressure_inlet: zeroGradient
pressure_outlet: zeroGradient
wall: (0 0 0)

Can anyone help me?
klio is offline   Reply With Quote

Old   April 2, 2012, 07:24
Default
  #15
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
what is not working? descrbie more.
Is your Re in turbulent zone ? Try initialize the case with higher eps values and add approximate/correct values for k and eps at your BCs.

the test case with values of one "does not work" too. Correct values will make it.
soonic is offline   Reply With Quote

Old   April 3, 2012, 01:52
Default
  #16
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
Thinks for your help!

In my case i have to compare fluent with openFoam! So i got a simulation from my college with given BC. And to compare it correctly I have do set the same initial condition as he did. Which is k & epsilon is 1 the pressure is 0.5 (in my case 0.44 because of dimensions) and velocity is not known. so its not possible to change the values.

If I set the BC like shown before the simulation crashes with errors! I think because of the bounding variables (up to inf) -> velocities higher than 1e+20. I also tried to set BC of k eps at the walls to zeroGradient it also didn't work. Its also diverging
klio is offline   Reply With Quote

Old   April 3, 2012, 03:22
Default
  #17
New Member
 
soonic's Avatar
 
Peter
Join Date: Apr 2010
Location: Brno, Czech Republic
Posts: 24
Rep Power: 7
soonic is on a distinguished road
Send a message via ICQ to soonic Send a message via AIM to soonic Send a message via Skype™ to soonic
I tryed to set correct values for pressure to have turbulent flow and set calculated values for k and eps and there is the case again.
I still do not know, how big is your pipe. I just bet, that correct values for k and epsilon are thousand times smaller than one.
Attached Files
File Type: gz pipe_pressure_turb.tar.gz (3.9 KB, 18 views)
soonic is offline   Reply With Quote

Old   April 3, 2012, 04:47
Default
  #18
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
Hi kilo, I'm having the exact same problem as you. I'm also trying to do a comparison between fluent and openfoam using a turbulent flow. I've also tried using simplefoam and the k-e model. I haven't been able to get the simulation to work using a set pressure drop and having velocity calculated, but used my results from the fluent to set the boundary conditions and I'm also getting velocities of 1e20. I haven't been able to get soonic's suggestions to work for me. Have you had any luck?
lobstar is offline   Reply With Quote

Old   April 3, 2012, 09:56
Default
  #19
Member
 
Klio
Join Date: Mar 2012
Location: Austria
Posts: 45
Rep Power: 5
klio is on a distinguished road
hi!

@soonic:
hmm ... my Model is a cube with a 0.006 m thick pipe (0.06 m long ) at the inlet and same at the outlet.
I also have calculated the k and epsilon for the model but it must work somehow with the same input parameter a fluent gets. ive tried now :

k & epsilon

interiorField: 0
pressure_inlet: 1
pressure_outlet: 1
wall: zeroGradient

p

interiorField: 0
pressure_inlet: 0.44
pressure_outlet: 0
wall: zeroGradient

U

interiorField: (0 0 0)
pressure_inlet: zeroGradient
pressure_outlet: zeroGradient
wall: (0 0 0)

-----> IT WAS MUCH BETTER! but now the velocity is to small!! 0.002 instead of 0.35

@lobstar:

no i had no luck!!!

but i found out that k & epsilon & nut File should have same type of wall BC! and don't let OpenFoam generate your nut file or others automatically!
if you found out anything please tell me - i'll do the same!
you should also set the internal Field of k an epsilon 0, because i fond out that fluent also does so! and if you don't know what fluent does you can tell fluent to write out bc and then you get an acci file (terrible to read but lots information in it!)
lobstar likes this.
klio is offline   Reply With Quote

Old   April 3, 2012, 10:15
Default
  #20
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 285
Rep Power: 9
kmooney is on a distinguished road
You might want to take a second swing at your k & E boundary/internal conditions. I'm not too familiar with setting up these kinds of models but those values look like they might be pretty off after looking at this setup: [tutorials/incompressible/simpleFoam/pitzDaily]. Perhaps try reading up on the models' best practices or looking at some of the other tutorials with k&E turbulence modeling already set up.
kmooney is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 10:07
simpleFoam crash -> How to solve tH3f0rC3 OpenFOAM 4 May 12, 2011 07:07
1.7.x -> buoyantPimpleFoam -> hRhoThermo -> incompressible and icoPoly3ThermoPhysics? will.logie OpenFOAM 0 December 16, 2010 08:08
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 03:08


All times are GMT -4. The time now is 14:39.