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/)
-   -   How to set the k and epsilon boundary condition? (https://www.cfd-online.com/Forums/openfoam-solving/171894-how-set-k-epsilon-boundary-condition.html)

qjh888 May 19, 2016 10:09

How to set the k and epsilon boundary condition?
 
Hi foamers,

I'm fresh man in OpenFOAM. Now I'm doing a simulation with quite simple geometry use the rhoSimpleFoam solver.
When i turn off the turbulence model, the solver runs normally.
But when I turn on the turbulence model, some problems came up:

--> when I use the
Code:

turbulentMixingLengthDissipationRateInlet;
as my epsilon inlet condition type, here is the error message:
Code:

  /*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:  3.0                                  |
|  \\  /    A nd          | Web:        http://www.extend-project.de      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build    : 3.0-7a7445ead09d
Exec    : rhoSimpleFoam
Date    : May 19 2016
Time    : 23:07:31
Host    : Janry
PID      : 15312
CtrlDict : /home/uqjqi/foam/foam-extend-3.0/etc/controlDict
Case    : /home/uqjqi/Desktop/Turbine_Meshing/22_Apr_2016_tutorial_mesh/Same_06
nProcs  : 1
SigFpe  : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Initializing the GGI interpolator between master/shadow patches: OF_outlet_00/OF_inlet_10
Initializing the GGI interpolator between master/shadow patches: OF_wall_00/OF_wall_01
Initializing the GGI interpolator between master/shadow patches: OF_wall_10/OF_wall_11
Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting RAS turbulence model kEpsilon

Starting time loop

Time = 5e-05

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 3.2618e-08, No Iterations 12
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 3.25243e-08, No Iterations 12
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 3.56396e-08, No Iterations 11
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.0943355, No Iterations 6
DILUPCG:  Solving for p, Initial residual = 1, Final residual = 8.86246e-08, No Iterations 96
time step continuity errors : sum local = 1.27578e-06, global = 1.92449e-07, cumulative = 1.92449e-07
rho max/min : 1.73793 1.11227


--> FOAM FATAL ERROR:

    gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type turbulentMixingLengthDissipationRateInlet)
    on patch OF_inlet_00 of field epsilon in file "/home/uqjqi/Desktop/Turbine_Meshing/22_Apr_2016_tutorial_mesh/Same_06/0/epsilon"
    You are probably trying to solve for a field with a generic boundary condition.

    From function genericFvPatchField<Type>::gradientInternalCoeffs() const
    in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 811.

FOAM exiting

I am really no idea about it.

So who can help me out ?

Thanks a lot in advance!

teuk May 19, 2016 12:28

Hi qjh888,

it seems like OpenFoam cannot handle this specific BC in your configuration.
Just try another one:

http://openfoam.github.io/Documentation-dev/html/a11045.html



regards,
teuk

qjh888 May 19, 2016 21:55

Hi Tuek,

Thanks for your reply.
I just copy the inlet boundary condition from the tutorial, and seems this condition is specified for the epsilon.

Could you give me more directions please?
Thanks a lot!
Janry

teuk May 20, 2016 08:25

Hi Janry

It's definitely an epsilon BC:
Quote:

This boundary condition provides a turbulence dissipation, http://openfoam.github.io/Documentat...l/form_115.png (epsilon) inlet condition based on a specified mixing length.
Do you really need this specific BC in your case or is there a simpler one available, f.e. fixedValue?


regards,
teuk


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