OpenFOAM® v1912: New boundary conditions

23/12/2019

New wave modelling

This release extends the waveMaker condition introduced in OpenFOAM v1812 to generate 3-D waves by selecting the number of paddles. An example of a 3-D flap wave generator is shown below.

Source code
$FOAM_SRC/waveModels/derivedPointPatchFields/waveMaker
Examples
$FOAM_TUTORIALS/multiphase/interFoam/laminar/waves/waveMakerMultiPaddleFlap
$FOAM_TUTORIALS/multiphase/interFoam/laminar/waves/waveMakerMultiPaddlePiston
Attribution
These extensions were supplied by the Environmental Hydraulics Institute IHCantabria - see commit d0c5662172 Authors: Gabriel Barajas
Integration
The code has been integrated by OpenCFD - see merge request 317

New expressions-based boundary conditions

Where expressions meet boundary conditions: the exprFixedValue and exprMixed boundary conditions.

These boundary conditions support values, gradient and fraction as expressions. For example,

outlet1
{
    type            exprFixedValue;
    value           $internalField;

    valueExpr       "0.5*(pInlet + pOutlet2)";
    variables
    (
        "pInletinlet = weightAverage(p)"
        "pOutlet2outlet2 = p"
    );
}

Tutorials
$FOAM_TUTORIALS/compressible/rhoPimpleFoam/RAS/TJunctionAverage

New scaled boundary condition wrapper

This is a wrapper to add time- or space-varying scaling to any (fixed value) boundary condition without any coding. It adds all the functionality of uniformFixedValue - see here. In the example below it modifies a standard fixedValue boundary condition, specified using the patch entry, to apply a scale according to the scale entry, to ramp from 0 (at time 0) to 1 (at time 1 and maintained to time 100).

<patchName>
{
    type            scaledFixedValue;

    scale table
    (
        (    0   0)
        (  1.0 1.0)
        (100.0 1.0)
    );

    patch
    {
        type            fixedValue;
        value           uniform (15 0 0);
    }
}

The scale entry is a PatchFunction1 that has multiple options, including:

  • constant
  • csvFile
  • mappedFile
  • polynomial
  • sampled
  • scale
  • sine
  • square
  • table
  • tableFile
  • uniformValue

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