OpenFOAM® v1712: New and updated solvers and physics

31/12/2017

New avalanche modelling

OpenFOAM now includes avalanche modelling, based on the newly integrated finite area functionality. This contribution includes a new solver with many submodels to include the effects of:

  • deposition
  • entrainment
  • friction

Source code
$WM_PROJECT_DIR/modules - see the avalanche directory
Examples
$WM_PROJECT_DIR/modules - see the avalanche/tutorials directory

Attribution
This project is the work of Matthias Rauter and described by the reference:
  • Rauter and Tukovic (submitted to Computer & Fluids): A finite area scheme for shallow granular flows on three-dimensional surfaces
Integration
The code has been integrated into OpenFOAM by OpenCFD as a new module

New Arrhenius viscosity model

A new Arrenius laminar transport model is available for incompressible flows where the fluid viscosity is dependent on another field variable, e.g. on temperature for glass, syrup.

The viscosity is calculated using:

pict\relax \special {t4ht=

This model is provided as a wrapper for the existing viscosity models, e.g. BirdCarreau, Casson, etc.. and selected in the constant/transportProperties dictionary, e.g.:

transportModel  ArrheniusBirdCarreau;

alpha           0.1;
Talpha          300;

nu0             15e-06;
nuInf           15e-06;
k               0;
n               1;

Source code
$FOAM_SRC/transportModels/incompressible/viscosityModels/Arrhenius
Examples
$FOAM_TUTORIALS/incompressible/pimpleFoam/RAS/TJunctionArrheniusBirdCarreauTransport

New energy transport function object

The new energyTransport function object enables users to evolve a simplified energy transport equation for incompressible flows, available to all incompressible solvers.

Inertial, conduction and convection terms are included, plus a run-time selectable source term using the fvOption framework. An incompressible flow assumption is employed whereby the temperature is modelled as a passive scalar and does not influence the fluid physical properties.

Usage

  • The field name entry must represent a temperature field and its boundary conditions specified in the start time directory, e.g.0/T
  • The turbulence model should be incompressible
  • For incompressible multi-phase cases a list of thermal properties must be provided

sTransport
{
    type            energyTransport;
    libs            ("libsolverFunctionObjects.so");

    enabled         true;
    writeControl    outputTime;
    writeInterval   1;

    field           T;

    rho             rho;
    phi             rhoPhi;

    write           true;

    phaseThermos
    {
        alpha.air
        {
            Cp          1e3;
            kappa       0.0243;
        }
        alpha.mercury
        {
            Cp          140;
            kappa       8.2;
        }
    }
}

Source code
$FOAM_SRC/functionObjects/solvers/energyTransport
Examples
$FOAM_TUTORIALS/incompressible/pimpleFoam/RAS/TJunctionArrheniusBirdCarreauTransport
$FOAM_TUTORIALS/multiphase/multiphaseInterFoam/laminar/mixerVessel2D

Improved coupling to external applications

The externalCoupled function object has been extended to offer greater flexibility when coupling OpenFOAM to external applications. In previous versions, the presence of the lock file was used to identify which application should execute. The lock file now contains additional information that can be used to terminate the OpenFOAM application, acting similarly to the abort function object, i.e.

  • action=writeNow: write at next time-step and terminate
  • action=nextWrite: terminate at the next write
  • action=noWriteNow: terminate at the next time-step without writing.

Source code
$FOAM_SRC/functionObjects/field/externalCoupled
Examples
$FOAM_TUTORIALS/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater

New energy sub-looping for CHT solvers

Sub-looping has been added to the Conjugate Heat Transfer (CHT) solvers as a convergence aid for the energy solution.

The sub-looping is defined, e.g. in the SIMPLE dictionary in the $FOAM_CASE/system/fvSolution file:

SIMPLE
{
    energyCoupling
    {
        iterations      10;

        // timeStart       0;

        // timeEnd         100;

        interval        0;

        // Convergence criteria to stop looping
        convergence
        {
            h           1e-3;
        }

        // Names of function objects to fire with execute(int) when looping
        onLoop          ( );

        // Names of function objects to fire with execute(int) when converged
        onConverged     ( externalCoupled );

        // Names of function objects to fire with execute(int) when loop ends
        // without convergence
        onEnd           ( );
    }
}

Source code
$FOAM_SRC/finiteVolume/cfdTools/general/solutionControl/loopControl

New heat exchanger options

The effectivenessHeatExchangerSource fvOption has been extended to operate according to a target heat rejection. This is applicable to steady state cases whereby the user wishes to evolve, e.g. the top hose temperature to achieve the target heat rejection.

The standard entries, e.g.

type            effectivenessHeatExchangerSource;
active          yes;

selectionMode   cellZone;
cellZone        porosity;

secondaryMassFlowRate 1.02;
secondaryInletT 375.75; // Initial temperature only
faceZone        facesZoneInletOriented;
outOfBounds     clamp;
file            "$FOAM_CASE/system/effTable";

can now be extended by the optional entries:

targetQdot              18250;

// Optional controls
// targetQdotCalcInterval 5;
// targetQdotRelax      0.5;

As an example, when operating to acheieve a target heat rejection of 18250W  \relax \special {t4ht= the secondary inlet temperature converged to ≈  368K  \relax \special {t4ht=:

[Picture]

and when operating with a fixed secondary inlet temperature of 368K  \relax \special {t4ht=, the predicted heat rejection was shown to be ≈ 18250W  \relax \special {t4ht=:

[Picture]

confirming that the model operates symetrically.

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

New heat transfer coefficient calculation

The new heatTransferCoeff function object provides several methods to compute the heat transfer coefficient [W/m2/K] for a set of user-specified patches.

The methods include:

  • ReynoldsAnalogy: coefficient derived from the local skin friction
  • localReferenceTemperature: based on the temperature difference between the patch internal cells and patch faces; note: sensitive to the mesh
  • fixedReferenceTemperature: based on the temperature difference between a user-specified reference temperature (typically the inlet temperature) and patch faces

The heat transfer coefficient should be described in the functions sub-dictionary of the $FOAM_CASE/system/controlDict file, e.g. for an incompressible solver:

functions
{
    heatTransferCoeff1
    {
        type        heatTransferCoeff;
        libs        ("libfieldFunctionObjects.so");
        field       T;
        patches     ("walls.*");

        htcModel    ReynoldsAnalogy;
        UInf        (20 0 0);
        Cp          CpInf;
        CpInf       1000;
        rho         rhoInf;
        rhoInf      1.2;
    }
}

The result is stored on the mesh database, and written to disk as a volScalarField according to the usual write controls.

Source code
$FOAM_SRC/functionObjects/field/heatTransferCoeff

New turbulence decay control

The kOmega family of turbulence models has been extended to include turbulence decay control, as described in the reference:

Spalart, P. R. and Rumsey, C. L. (2007). Effective Inflow Conditions for Turbulence Models in Aerodynamic Calculations. AIAA Journal, 45(10), 2544 - 2553.

The model is particularly suited to wind-tunnel-like cases, whereby the user wishes to maintain the inlet turbulence levels upstream of any obstacles.

Decay control is inactive by default, and enabled using:

// Optional decay control
decayControl    yes;
kInf            <far-field k value>;
omegaInf        <far-field omega value>;

Source code
$FOAM_SRC/TurbulenceModels/turbulenceModels/Base/kOmegaSST

New viscous dissipation fvOption

The new viscousDissipation fvOption provides a mechanism to include viscous dissipation effects in the energy equation. It can be applied to both compressible solvers with a ‘native’ energy equation configured using the thermophysicalProperties dictionary, and incompressible solvers when combined with the new energyTransport function object.

viscousDissipation
{
    type            viscousDissipation;
    enabled         true;

    viscousDissipationCoeffs
    {
        fields          (T);
        rho             rho; //rho Field
    }
}

Source code
$FOAM_SRC/fvOptions/sources/derived/viscousDissipation
Examples
$FOAM_TUTORIALS/compressible/rhoPimpleFoam/RAS/TJunction
$FOAM_TUTORIALS/incompressible/pimpleFoam/RAS/TJunctionArrheniusBirdCarreauTransport
$FOAM_TUTORIALS/multiphase/multiphaseInterFoam/laminar/mixerVessel2D