1

Previous: Boundary types Up: Boundary conditions in OpenFOAM Next: Inlet Boundary Conditions

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Boundary conditions ​

  • Boundary conditions are set in solution directories (0/U, …)

     

  • The most typical case is the velocity is prescribed at the inlet and static pressure is prescribed at the outlet.
sketch general boundary conditions

Figure: Test case geometry

  • Boundary conditions in OpenFOAM are divided into two groups by – basic and derived.
  • Basic boundary conditions by OpenFOAM implementation:

Boundary conditionDescriptionVariables
fixedValueconstant value at boundaryvalue
fixedGradientconstant gradientgradient
zeroGradientzero gradient (extrapolation)
calculateddepending on other quantities
mixedmix from other boundary conditionsrefValue, refGradient,
  valueFraction, value
directionMixedanisotropic BC mixed,refValue, refGradient,
 valueFraction is tensorvalueFraction, value

 

  • OpenFOAM has many derived boundary conditions
  • Some examples follow
  • Derived boundary conditions are stored on the path:
    • $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived
    • or can be found by following command:
      # find $FOAM_SRC -name "*derivedFvPatch*"
      # find $FOAM_SOLVERS -name "*derivedFvPatch*"

 

  • Derived boundary conditions based on fixedValue

nameDescriptionVariables
totalPressuretotal pressure is constant,$ p_0$
 static pressure is computed 
pressureInletVelocityif known pressure at inletvalue
 velocity is computed from flux 
pressureDirectedInletVelocityif known pressure at inletvalue,
 velocity is computed from fluxinletDirection
 velocity direction is respected 
movingWallVelocitymoving wallvalue
surfaceNormalFixedValuevelocity magnitude is kept,value
 direction is perpendicular 
 to domain 
turbulentInletcalculates a fluctuatingreferenceField
 variable based on a scale offluctuationScale
 a mean value 

 

 

  • Derived boundary conditions based on fixedGradient/zeroGradient boundary condition

NameDescriptionVariables
fluxCorrectedVelocityNormal component is computedvalue
wallBuoyantPressureSets pressure gradient valuevalue
 according to atmospheric pressure 

 

 

  • Derived boundary conditions based on mixed boundary condition

NameDescriptionVariables
inletOutletswitching between fixedValueinletValue,
 and zeroGradientvalue
 depending on flow direction 
outletInletswitching between fixedValueoutletValue,
 and zeroGradientvalue
 depending on flow direction 
pressureInletOutletVelocitycombination of pressureInletVelocityvalue
 and inletOutlet 
pressureDirectedInletOutletVelocitycombination ofvalue,
 pressureDirectedInletVelocity 
 and inletOutlet 
pressureTransmissivetransmitting supersonic pressure wavespInf
supersonicFreeStreamtransmits shocks to surroundingspInf, TInf, UInf

 

 

  • Another derived boundary conditions

NameDescriptionVariables
slipslipping wall
partialSlipcombines slip and zeroGradientvalueFraction
 depending on valueFraction 
 (0 = slip) 
noSlipfixes the velocity to zero
 at the walls 

Mass Flow Rate - patchMassFlow Function

Function patchMassFlow is included in file controlDict. Definition of forces functions are created in file flux.fun. This function is part of libsimpleFunctionObjects.so library and can evaluate mass flow rate through selected patches:

 

 massFlowInlet
{
    type                    patchMassFlow;
    region                  spiral;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        inflow_inlet
    );
    factor                  1.;
}
massFlowMXP1_spiral
{
    type                    patchMassFlow;
    region                  spiral;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        spiral_rotor_mxp_0 spiral_rotor_mxp_1 spiral_rotor_mxp_2 spiral_rotor_mxp_3
        spiral_rotor_mxp_4 spiral_rotor_mxp_5 spiral_rotor_mxp_6 spiral_rotor_mxp_7
    );
    factor                  1.;
}
massFlowMXP1_rotor
{
    type                    patchMassFlow;
    region                  rotor;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        rotor_spiral_mxp_0 rotor_spiral_mxp_1 rotor_spiral_mxp_2 rotor_spiral_mxp_3
        rotor_spiral_mxp_4 rotor_spiral_mxp_5 rotor_spiral_mxp_6 rotor_spiral_mxp_7
    );
    factor                  1.;
}
massFlowMXP2_rotor
{
    type                    patchMassFlow;
    region                  rotor;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        rotor_drafttube_mxp_0 rotor_drafttube_mxp_1 rotor_drafttube_mxp_2 rotor_drafttube_mxp_3
        rotor_drafttube_mxp_4 rotor_drafttube_mxp_5 rotor_drafttube_mxp_6 rotor_drafttube_mxp_7
    );
    factor                  1.;
}
massFlowMXP2_drafttube
{
    type                    patchMassFlow;
    region                  drafttube;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        drafttube_rotor_mxp_0 drafttube_rotor_mxp_1 drafttube_rotor_mxp_2 drafttube_rotor_mxp_3
        drafttube_rotor_mxp_4 drafttube_rotor_mxp_5 drafttube_rotor_mxp_6 drafttube_rotor_mxp_7
    );
    factor                  1.;
}
massFlowOutlet
{
    type                    patchMassFlow;
    region                  drafttube;
    functionObjectsLibs     ( "libsimpleFunctionObjects.so" );
    verbose                 true;
    patches
    (
        outflow_outlet
    );
    factor                  1.;
}

During the computation the results are written down in directory
patchMassFlows_massFlowInlet/0/massFlow,
patchMassFlows_massFlowMXP1_spiral/0/massFlow, …

Previous: SIMPLE Algorithm Up: TCFD Solvers Next: Temporal Integration Numerical Scheme
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Spatial Integration Numerical Scheme

Space discretization scheme is limitedLinear, which is central scheme of second order accuracy. There are 55 default OpenFOAM schemes to select:

  • CoBlended
  • Gamma
  • Gamma01
  • LUST
  • MUSCL
  • MUSCL01
  • Minmod
  • OSPRE
  • QUICK
  • SFCD
  • SuperBee
  • UMIST
  • biLinearFit
  • blended
  • clippedLinear
  • cubic
  • cubicUpwindFit
  • downwind
  • filteredLinear
  • filteredLinear2
  • filteredLinear3
  • fixedBlended
  • harmonic
  • limitWith
  • limitedCubic
  • limitedCubic01
  • limitedGamma
  • limitedLimitedCubic
  • limitedLimitedLinear
  • limitedLinear
  • limitedLinear01
  • limitedMUSCL
  • limitedVanLeer
  • limiterBlended
  • linear
  • linearFit
  • linearPureUpwindFit
  • linearUpwind
  • localBlended
  • localMax
  • localMin
  • midPoint
  • outletStabilised
  • pointLinear
  • quadraticFit
  • quadraticLinearFit
  • quadraticLinearUpwindFit
  • quadraticUpwindFit
  • reverseLinear
  • skewCorrected
  • upwind
  • vanAlbada
  • vanLeer
  • vanLeer01
  • weighted

For more details see e.g. [9], [1] or [3].