OpenFOAM® v2.2.0: fvOptions

OpenFOAM® v2.2.0: fvOptions

6th March 2013

Run-time Selectable Physics

A new framework has been introduced to allow users to select any physics that can be represented as sources or constraints on the governing equations, e.g. porous media, MRF and body forces. This new fvOptions framework enhances and supercedes the previous run-time selectable sources in version 2.1.

Current Functionality

Available fvOptions sources include:

  • new codedSource — a run-time compiled source;
  • new semiImplicitSource, described by a linear coefficient and explicit contributions;
  • updated actuationDiskSource — a momentum disk, e.g. to emulate a wind turbine;
  • new explicitPorositySource, to emulate porous regions;
  • new MRFSource, for multiple reference frame (MRF) modelling;
  • updated pressureGradientExplicitSource — general pressure gradient source based on mean flow velocity;
  • new rotorDiskSource — detailed momentum source for rotor blades, including effects of blade geometry;
  • new interRegionExplicitPorositySource — variant of the explicitPorositySource momentum source, applicable to multi-region cases, e.g. to model the effect of the heat exchanger blockage seen by the cooling air flow;
  • new interRegionHeatTransferModel — energy source with run-time selectable heat transfer coefficient model for multi-regions cases, e.g. for heat exchanger modelling.

Available fvOptions constraints include:

  • updated explicitSetValue value constraint, e.g. for igniting a combustible mixture;
  • new fixedTemperatureConstraint to fix the temperature to a given value, either as a uniform value or spatially varying field;
  • new temperatureLimitsConstraint to constrain the temperature between lower and upper limits, e.g. to stabilise the start-up phase for thermal cases.

The following images show a heat exchanger example included in the new release of OpenFOAM, in which the heat exchanger is modelled as a porous zone.

Schematic of Heat Exchanger Heat Exchanger Mesh
Air Temperature through Heat Exachanger Temperature within Heat
Exachanger

Examples
Heat Exchanger - example of interRegionExplicitPorositySource, interRegionHeatTransferModel and MRFSource
$FOAM_TUTORIALS/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger

Filter - example of semiImplicitSource and explicitPorositySource
$FOAM_TUTORIALS/lagrangian/reactingParcelFoam/filter

Angled Duct - example of explicitPorositySource
$FOAM_TUTORIALS/compressible/rhoPimpleFoam/ras/angledDuct

2D Mixer Vessel - example of MRFSource
$FOAM_TUTORIALS/incompressible/simpleFoam/mixerVessel2D

Coal Chemistry - example of fixedTemperatureConstraint
$FOAM_TUTORIALS/lagrangian/coalChemistryFoam/simplifiedSiwek

Use of fvOptions

The fvOptions are described in an fvOptions file in the system directory of a case. Example syntax for a case using porosity modelling is shown below.

porosity1
{
    type          explicitPorositySource;
    active        yes;
    selectionMode cellZone;
    cellZone      porosity;

    explicitPorositySourceCoeffs
    {
        type DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
              d    d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
              f    f [0 -1 0 0 0 0 0] (0 0 0);

              coordinateSystem
              {
                  e1    (0.70710678 0.70710678 0);
                  e2    (0 0 1);
              }
        }
    }
}

MRF1
{
    type          MRFSource;
    active        true;
    selectionMode cellZone;
    cellZone      rotor;

    MRFSourceCoeffs
    {
        origin    (0 0 0);
        axis      (0 0 1);
        omega     constant 104.72;
    }
}

Solver Consolidation

Many solvers in version 2.1 that include fvOptions, such as porous media and MRF, e.g. rhoPorousMRFPimpleFoam are consequently deprecated in favour of more general solvers, e.g. rhoPimpleFoam that can run with porous media and MRF with appropriate settings in fvOptions.