CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   problems with k-epsilon model (http://www.cfd-online.com/Forums/openfoam/67173-problems-k-epsilon-model.html)

SimonH. August 6, 2009 09:08

problems with k-epsilon model
 
hi guys

right now im making my diploma thesis and for that reason im simulating a Pressure control valve. first i made some laminar calculations and everything was fine but now when i turn the k-epsilon model on the calculation starts good but after some time the courant number rises up infinitely high within 4 or 5 iterations and stops. i tried to change the initial value for k but only the time the calculation stops changes. could somebody please tell me some hints or how to set the initial values for k and epsilon. im looking forward to hear from you guys.

greetings Simon

Marcin August 6, 2009 09:32

Hi Simon,

have you under-relaxed your k and epsilon values?

regards

SimonH. August 6, 2009 10:22

hi marcin,

thanks for your reply. well my advisor said to set epsilon to a high value, 10000, and i calculated k by taking the velocity from a laminar case i run and than 5% of the value for u' then with the equation k=3/2*u'. meanwhile i tried many different values for k but it wont work.:confused:
can you help me somehow, please

greetings Simon

Marcin August 6, 2009 10:42

hi Simon,

what do you need these values for? Boudary conditions, initial values? What other boudaries do you have? And ones more: have you under-relaxed k and epsion values in system/fvSolutions? By the way you can find the right formulas for k and epsilon in User Guide version 1.5 on the page 41.

Regards

sven August 6, 2009 21:23

Hey Simon,

normally the problem with the courant number running out of control is caused by a time step which is too big. So the first thing you should try is to reduce the time step, that is normally enough to get rid of that error!

Zowie August 7, 2009 05:18

BC
 
Well I don't think it is a problem of the time step, sorry to disagree. Simon, if you managed to get a solution for the laminar case with a certain timestep and you switch on turbulence, you should have a higher effective viscosity and the velocities should not change that much... so that your courant number is more or less the same.

According to my experience, the problem is usually in the definition of the boundary conditions for k and epsilon. What are you using now for BC? Can you give us some info?

albcem August 7, 2009 14:26

We need a little more information on how the simulation blows up.

Are there bounding epsilon errors? Is epsilon growing? What does checkMesh return? What are your fvScheme and fvSolution settings? What is your y+ value ()?

Are you setting this high epsilon value as a boundary condition or as an initial condition? Did you try utilizing this set turbulence properties utility for initializing turbulence fields?

Did you visualize the close to blowing result or its evolution in Paraview? You can pinpoint to where the instability starts arising by looking at a contour of the high epsilon or pressure value - the higher the value the more focused the contour will be focused around a potentially problematic mesh region. Problems with the mesh might be quality as well as resolution - I doubt this if you had the laminar case run fine...

Cem

SimonH. August 10, 2009 05:00

hi guys,
im starting to believe my boundary conditions are wrong. i tried to use zero gradient for k and epsilon but it wont work so i tried fixed value, value 0 for k for walls but then the calculation gives me a error massage and wont run. for my fvSchemes i use upwind for p, U, k and epsilon. where can i change the y+ value and what does it do? how does the set turbulence properties utility for initializing turbulence fields work?
im looking forward to your replys. thanks alot to all you guys for your help.

cheers simon

SimonH. August 10, 2009 05:26

1 Attachment(s)
hi sorry i forgot here is a picture of the valve im trying to simulate. it has 4 boundary conditions: left inlet, right outlet, moving (the thing in the middle) as wall and the remaining is body also wall. i estimate a velocity of ca 12 m/s in the gap. what would be appropriate to set k and epsilon? oh and i checked the mesh once more and it seems to be ok.

cheers simon

philippose August 10, 2009 07:24

Hello Simon,

A Good Day to you!

It seems like you are trying to simulate a typical "Druckbegrenzungsventil" there :-)! So... couple of questions:

1. Which version of OpenFOAM are you using?

2. What is the target of your simulation.... do you need only the steady state pressure / velocity distribution, or are you interested in some form of transient characteristics?
---- If you are only interested in the steady state results, you dont need to use a transient solver, and I would suggest using "simpleFoam" rather than "turbFoam"

3. What does your mesh look like? Could you post the results of the "checkMesh" OpenFOAM application?
---- checkMesh gives you a lot of important / interesting data regarding the mesh and the quality of the mesh

4. Can you post a picture of the mesh you are using, preferably the same view as the initial picture you posted (the cross-section), and maybe also one zoomed into the region of the seat?

5. What boundary conditions are you working with on the inlet and the outlet sides? Are you providing a pressure at both the inlet and outlet, or are you providing a pressure at one of the two, and a flow at the other?

I think based on this information, we should be able to come up with a clearer picture regarding the problem you are facing :-)!

Have a nice day!

Philippose

SimonH. August 10, 2009 09:02

hi again,

i researched in the forum and i found something for my boundary conditions for k and epsilon. here are the files

k:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1;
boundaryField
{
BODY4
{
type zeroGradient;
}
INLET1
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value $internalField;
}
OUTLET2
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
MOVING3
{
type zeroGradient;
}
}
//************************************************** * //


epsilon:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 200;
boundaryField
{
BODY4
{
type zeroGradient;
}
INLET1
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value $internalField;
}
OUTLET2
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
MOVING3
{
type zeroGradient;
}
}
// ************************************************** * //

so now my simulation runs prober and the allocation of the velocity also seems right but the value is too low. when i try to make k smaller i have the same problems as earlier. has anybody an idea?

cheers simon

SimonH. August 10, 2009 09:31

2 Attachment(s)
hi Philippose

you are right im trying to simulate a Druckbegrenzerventil. i changed some of my boundary conditions. you may read my previous post to see what changed. besides the velocity distribution i want to know the force on the moving body and the massflow on the outlet. im using openfoam 1.5. im using a pressure boundary for inlet (2 bar) and outlet (1 bar). for my diploma thesis im supposed to make simulations for different pressure differences and different lifts to make a matrix.

here is my checkMesh result

Create time
Create polyMesh for time = constant
Time = constant
Mesh stats
points: 43622
faces: 123072
internal faces: 115392
cells: 39744
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 0
Number of cells of each type:
hexahedra: 39744
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0
Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).
Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
INLET1 624 649 ok (non-closed singly connected)
OUTLET2 912 937 ok (non-closed singly connected)
MOVING3 2688 2690 ok (closed singly connected)
BODY4 3456 3504 ok (non-closed singly connected)
Checking geometry...
Overall domain bounding box (-0.0185669 0.0132713 0.00786874) (0.00143313 0.0227712 0.0173686)
Mesh (non-empty) directions (1 1 1)
Mesh (non-empty, non-wedge) dimensions 3
Boundary openness (-7.10727e-17 2.18991e-17 -2.31194e-17) OK.
Max cell openness = 3.10249e-16 OK.
Max aspect ratio = 27.1635 OK.
Minumum face area = 1.24008e-09. Maximum face area = 5.68962e-07. Face area magnitudes OK.
Min volume = 1.72866e-13. Max volume = 1.68641e-10. Total volume = 8.87356e-07. Cell volumes OK.
Mesh non-orthogonality Max: 49.5432 average: 16.0705
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.08346 OK.
Mesh OK.
End

maybe you can work something out but thanks alot anyway

mfg Simon

Marcin August 10, 2009 10:08

Hi Simon,

try to change the boundary condition of epsilon to:

type turbulentMixingLenghtDissipationRateInlet;
mixingLength 0.005;
value $internalField;

or to:

type zeroGradient;

Best regards

SimonH. August 10, 2009 10:10

hi marcin

do you mean for the inlet, the outlet or for both boundary condition?

mfg simon

Marcin August 10, 2009 11:50

sorry, I have forgotten to meant it...

the inlet BC...

greeds

Zowie August 11, 2009 05:03

Low reynolds
 
12 m/s in the gap?
Looks like you have low reynolds number in your valve... are you sure that K-epsilon is the best choice? Maybe a low-reynolds model could offer a better performance.

And it might be a good idea to check the y+ values...

SimonH. August 12, 2009 10:37

hi guys i think i got it now. zowie was right. i changed the mesh so the y+ value is allright and i also changed the turbulence model to a better suited one for low reynold numbers. now everything works fine. thank you everyone for your help

mfg simon


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