**Next:** Model setting without an **Up:** Alternative formulation **Previous:** Alternative formulation **Contents** **Index**

## On boundary and initial conditions in general

*Boundary conditions*are extremely important. Indeed, they cause the most common errors.- OpenFOAM uses similar set-up as other solvers.
- At the inlet (flow inlet) to the computational domain total pressure and total temperature are set. The rest of variables is reconstructed.
- At the outlet the static pressure is set.
- At the rigid walls velocity is set to zero.
- Multiple Reference Frame (MRF) is used for rotational components.
- For steady-state computations the initial conditions have no influence to the results.
- For steady-state computations the initial conditions just help to make the case run.

The main variables to be set are following:

- static pressure
*p* - velocity vector
*U* - static temperature
*T* - turbulent kinetic energy
*k* - specific turbulence dissipation
*omega*

The initial and boundary conditions for all variables are set in files located in directories called by numbers. Typically directory *0* is recommended to start simulation from. Initial conditions are set in parameter *internalField* putting the values into the cell centers. At boundaries, initial conditions are set individually by parameter *value*.

Following table shows recommended model boundary conditions for computed variables:

The shortcuts from the above table have following meaning:

- tP –
*totalPressure*, constant e.g. 150 000 Pa,*gamma*= 1.4 [-] is specific heat ratio - pDIV –
*pressureDirectedInletVelocity*, velocity is computed from difference between total and static pressure,*inletDirection*is velocity vector to be specified - tT –
*totalTemperature*, constant e.g. 293 K,*gamma*= 1.4 [-] is specific heat ratio - tIKEI –
*turbulentIntensityKineticEnergyInlet*,*intensity*= 0.02, corresponds to turbulence intensity 2% - fV –
*fixedValue*, e.g. velocity at the wall (0 0 0), or omega at inlet - fMV –
*fixedMeanValue*, is the same as fixed value e.g. for pressure, but certain freedom is allowed to keep the variable average equal to*meanValue* - zG –
*zeroGradient*, the flux of the variable is zero in direction perpendicular to the surface - TWF –
*compressible::turbulentTemperatureCoupledBaffleMixed*special boundary condition for temperature enabling heat transfer from/to other regions - kWF –
*compressible::kqRWallFunction*is standard wall function for k for compressible flow - oWF –
*compressible::omegaWallFunction*is standard wall function for omega for compressible flow - mPV –
*mixingPlaneVelocity*, averaged velocity is mapped from neighbour patch - mP –
*mixingPlane*, averaged variable is mapped from neighbour patch - iO –
*inletOutlet*is by default*zeroGradient*, but change to*fixedValue*when velocity vector direction aims inside the computational domain (backward flow) - cc –
*calculated*, boundary values of a certain quantity is simply calculated, in accordance with its definiton, from values of other quantities that already have prescribed their boundary conditions

There is an example of a field that we use due to formal reasons only – pressure field inside the solid region. For this field we prescribe boundary conditions of type *calculated*.

Two other variables must be presented for postprocessing purposes: total pressure *pTot* and total temperature *TTot*. The boundary conditions for total pressure and total temperature are formal and are always the same:

boundaryField { "(.*)" { type zeroGradient; } }

**Next:** Model setting without an **Up:** Alternative formulation **Previous:** Alternative formulation **Contents** **Index**