CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Wall function help! (

atareen64 February 21, 2011 15:52

Wall function help!
Dear Foamers,

Basic setup: I am passing fluid through a laval nozzle and I expect the velocity to exceeded Mach 1, so I decided to use the K-epsilon model for my simulation; my solver is sonicFoam. The thermophysical properties for my fluid are as follows:


thermoType ePsiThermo<pureMixture<polynomialTransport2<specie Thermo<eConstThermo<perfectGas>>>>>;

mixture KrHe // 20%helium-80%krypton mixture.
1 //nMoles (??)
69.04 //molecular weight [kg/kmol]
1041.8 // heat capacity [K/kgK]
0.0 //standard formation enthalpy [J/kg]
muPolynomial (1.27906e-005 4.61187e-008) //dynamic viscosity [kg/ms]
kappaPolynomial (0.0406885 0.000146747); //heat conductivity [W/mK]
(here the viscosity and heat conductivity are linear temperature-dependant polynomials)
Confusion: As you can see from the mupolynomial, I want the magnitude of the viscosity to be somewhere around the 10e-5 range. However, because I am using the k-e model there is a mut file in the 0 directory andI am afraid that this mut file is causing the viscosity to be higher than I actually want in my simulation. The value of mut is some around 10e-2. The contents of 0/mut are as follows:


version 2.0;
format ascii;
class volScalarField;
location "0";
object mut;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

type calculated;
value uniform 0;
type calculated;
value uniform 0;
type mutWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
type empty;

Need your help:
I don't quite understand what the mut file is for? Shouldn't muPolynomial in my thermophysical properties be sufficient for specifying the viscosity?

Ideally I want the viscosity to be specified by my thermoPhysical properties dictionary only and I don't want a mut file, in fact I don't even understand what it is for or what a wall function means. Can some body please please please help me or give me some advice?

Best regards,

mturcios777 February 22, 2011 13:46

Read up on law of the wall and wall models/functions on the CFD Wiki:

If you have a wall in your domain and you are running turbulent simulation, you need to specify wall functions or else your simulation isn't going to make sense.

Your simulation should be using whatever is in your thermoPhysical properties file. Calculated boundary conditions mean nothing; they simply show what the calculated value for a variable is for the particular timestep. Only boundary conditions like fixedValue, zeroGradient (basically anthing in finiteVolume/fields/fvPatchFields and similar) will affect your simulation.

Hope this helps.

atareen64 February 22, 2011 13:48

Thanks soo much!

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