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, ,
- velocity, , and
- length scale, ,
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:
value (0 0 0);
R uniform (xx xy xz yy yz zz);
U uniform (x y z);
L uniform x;
value (0 0 0);
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 cell tend to dissipate quickly and their influence (in terms of structure) is not transported into the domain. In practice, setting the scale to to 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:
// R and U mapped, L specified
L uniform 0;
value (0 0 0);
The turbulent flow structures can be observed using the Q critereon, clearly visible in the following image:
Here, the channel height is 2 units, and length is 60 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.
- 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
- Thanks to Ruggero Poletto for useful discussions regarding the eddy intensity calculation
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: [Pa]
- constant: user-specified [Pa]
- volumetricFlowRateTable: is read from a table in the file <fileName>.
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
// deltaP = (D*mu + 0.5*rho*magUn)*magUn*length
// constant pressure drop model
// pressureDrop 8;
// volumetricFlowRateTable pressure drop model
// outOfBounds clamp;
// fileName "volFlowRateTable";
- the cellZone should describe a set of cells with a 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.
- windshieldCondensation: $FOAM_TUTORIALS/heatTransfer/chtMultiRegionFoam/windshieldCondensation/system/fvOptions
- Source code
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.
- oppositeBurningPanels: $FOAM_TUTORIALS/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties
- Source code