OpenFOAM® v1606+: New Boundary Conditions

OpenFOAM® v1606+: New Boundary Conditions

30/06/2016

Inflow turbulence generator

A new boundary condition to generate inflow turbulence for LES and DES cases has been implemented based on the Divergence Free Synthetic Eddy Method (DFSEM).

The new turbulentDFSEMInlet condition generates turbulent eddies that are continuously evolved across an inlet patch, based on the Reynolds stresses, velocity profile and eddy length scales. The eddies are injected to generate coherent flow structures that persist into the domain, aiding the process of establishing a fully developed turbulent flow.

The turbulentDFSEMInlet boundary condition requires patch values for the:

  • Reynolds stress tensor, R \relax \special {t4ht=,
  • velocity, U  \relax \special {t4ht=, and
  • length scale, L  \relax \special {t4ht=,

supplied as either data to be mapped, or user input. Source data for mapping should be located in the $FOAM_CASE/constant/boundaryData/<patchName>/0 directory. This takes the same form as used by the timeVaryingMappedFixedValue boundary condition, consisting of a points file containing a list of 3-D points, and field files providing a field value per point. The new surface format boundaryData, see $FOAM_SRC/sampling/sampledSurface/writers/boundaryData can be used to easily generate these files from previous simulations. If mapping data is unavailable, estimated field values can be specified directly, or generated e.g. by performing a boundaryFoam calculation to generate a fully developed 2-D inflow profile. The default behaviour assumes that each of these quantities is mapped, and requires minimal information:

inlet
{
    type        turbulentDFSEMInlet;
    delta       2;
    value       (0 0 0);
}
Here, delta represents a domain-based length scale, e.g. the overall channel height, and the value is required as an initial place holder only. Alternatively, the fields can be user input, e.g.:

inlet
{
    type        turbulentDFSEMInlet;
    delta       2;
    R           uniform (xx xy xz yy yz zz);
    U           uniform (x y z);
    L           uniform x;
    value       (0 0 0);
}
where R is a symTensorField, U is a vector and L is a scalar. Combinations of mapped and user input values are also permitted.

Ideally all three quantities would be mapped from a previous solution. However, there is some flexibility when specifying the length scale. The DFSEM approach uses this length when setting the length of the eddy principle axis; the scales in the remaining 2 dimensions are set by the model to form elliptical shapes. The length scale is limited to be larger than the mesh scale; however, eddies at the scale of 1  \relax \special {t4ht= cell tend to dissipate quickly and their influence (in terms of structure) is not transported into the domain. In practice, setting the scale to 3  \relax \special {t4ht= to 5  \relax \special {t4ht= times the mesh scale is sufficient to produce flow structures that persist throughout the domain. This set-up is accommodated by setting the length scale to zero, and the optional entry nCellsPerEddy:

inlet
{
    type        turbulentDFSEMInlet;
    delta       2;
    // R and U mapped, L specified
    L           uniform 0;
    nCellsPerEddy 3;
    value       (0 0 0);
}
The new condition has been validated using the DNS data of Kim and Moin for a channel flow at a Re τ  \relax \special {t4ht= of 395  \relax \special {t4ht=. By supplying the averaged DNS data as input, the DFSEM model should be able to recreate the behaviour of the stresses via seeding eddies. This is confirmed by the result shown below:

[Picture]

The turbulent flow structures can be observed using the Q critereon, clearly visible in the following image:

[Picture]

Here, the channel height is 2 units, and length is 60 π  \relax \special {t4ht= units, whereby the inlet is specified on the left boundary, and flow exits at the extreme right. Two values of the Q critereon are shown by the pair of upper and lower images. The break in the centre represents the exclusion of the central part of the channel, to show how the turbulent structures persist along its entire length.

Example
Channel: $FOAM_TUTORIALS/incompressible/pimpleFoam/channel395DFSEM

The following video shows the turbulent flow predicted approaching and around a side mirror, where the inlet flow is conditioned by the new turbulentDFSEMInlet boundary condition.

Source code
$FOAM_SRC/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet

Acknowledgement
Thanks to Ruggero Poletto for useful discussions regarding the eddy intensity calculation

Interface to change flow direction

A new fvOption momentum source to deflect the flow direction by imposing a variable pressure drop has been implemented. This is particularly useful for cases that include louvres, e.g. HVAC registers, whereby to resolve the louvres using the mesh can restrict the calculation time step and generate to excessive cell counts. The pressure drop across the cellZone can be evaluated according to the options:

  • DarcyForchheimer: Δp  = (D ν + 0.5ρ|Un |I)|Un|L  \relax \special {t4ht= [Pa]
  • constant: user-specified Δp  = <p >  \relax \special {t4ht= [Pa]
  • volumetricFlowRateTable: Δp  \relax \special {t4ht= is read from a table in the file <fileName>.

type            directionalPressureGradientExplicitSource;
active          true;

directionalPressureGradientExplicitSourceCoeffs
{
    selectionMode       cellZone;
    cellZone            c1Zone;

    fieldNames          (U);
    flowDir             (1 2 0);    // new flow direction in the general coordinate system
    relaxationFactor    0.3;        // relax the application of the source term

    faceZone            f1Zone;     // faceZone upstream the cellZone

    // Pressure drop model [Pa]
    model       DarcyForchheimer;   // volumetricFlowRateTable|constant

    // DarcyForchheimer
    // deltaP = (D*mu + 0.5*rho*magUn)*magUn*length
    D           5e7;
    I           0;
    length      0.01;

    // constant pressure drop model
    // pressureDrop    8;

    // volumetricFlowRateTable pressure drop model
    // outOfBounds     clamp;
    // fileName        "volFlowRateTable";
}
Note that
  • the cellZone should describe a set of cells with a 1  \relax \special {t4ht= cell thickness in the flow direction, and
  • the source also requires the set of faces upstream of the cellZone to be specified as a faceZone.

A sample result is shown below, where the effect of flow deflection across the cellZone is clearly evident.

[Picture]

Example
windshieldCondensation: $FOAM_TUTORIALS/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/fvOptions

Source code
$FOAM_SRC/fvOptions/sources/derived/directionalPressureGradientExplicitSource

Updated radiation boundary properties

In previous releases the radiation boundary properties were specified as a field located in the $FOAM_CASE/constant directory. Although convenient from a coding perspective, it resulted in the need to store the internal field (which was not used) and for parallel work-flows, required an additional flag to be set when decomposing the case.

The boundaryRadiation can operate in three modes:

  • lookup: Look at the properties in the dictionary
  • solidRadiation: Look at the radiative properties in the solid region
  • model: use a model for absorption, transmissivity, etc.

In this release, the boundary properties have been refactored and simplified to enable their specification in a dictionary format, e.g.

...
".*"
{
    mode            lookup;
    emissivity      1.0;
    absorptivity    0.0;
    transmissivity  1.0;
}

air_to_solid
{
    mode            solidRadiation;
}

air_to_floor
{
    mode            solidRadiation;
}
where the same properties are prescribed for all boundary conditions.

Example
oppositeBurningPanels: $FOAM_TUTORIALS/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties

Source code
$FOAM_SRC/thermophysicalModels/radiation/submodels/boundaryRadiationProperties