Skip to content

Commit

Permalink
MRF: Further developed to replace SRF
Browse files Browse the repository at this point in the history
MRF (multiple reference frames) can now be used to simulate SRF (single
reference frame) cases by defining the MRF zone to include all the cells is the
mesh and applying appropriate boundary conditions.  The huge advantage of this
is that MRF can easily be added to any solver by the addition of forcing terms
in the momentum equation and absolute velocity to relative flux conversions in
the formulation of the pressure equation rather than having to reformulate the
momentum and pressure system based on the relative velocity as in traditional
SRF.  Also most of the OpenFOAM solver applications and all the solver modules
already support MRF.

To enable this generalisation of MRF the transformations necessary on the
velocity boundary conditions in the MRF zone can no longer be handled by the
MRFZone class itself but special adapted fvPatchFields are required.  Although
this adds to the case setup it provides much greater flexibility and now complex
inlet/outlet conditions can be applied within the MRF zone, necessary for some
SRF case and which was not possible in the original MRF implementation.  Now for
walls rotating within the MRF zone the new 'MRFnoSlip' velocity boundary
conditions must be applied, e.g. in the
tutorials/modules/incompressibleFluid/mixerVessel2DMRF/constant/MRFProperties
case:

boundaryField
{
    rotor
    {
        type            MRFnoSlip;
    }

    stator
    {
        type            noSlip;
    }

    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }
}

similarly for SRF cases, e.g. in the
tutorials/modules/incompressibleFluid/mixerSRF case:

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (0 0 -10);
    }

    outlet
    {
        type            pressureInletOutletVelocity;
        value           $internalField;
    }

    rotor
    {
        type            MRFnoSlip;
    }

    outerWall
    {
        type            noSlip;
    }

    cyclic_half0
    {
        type            cyclic;
    }

    cyclic_half1
    {
        type            cyclic;
    }
}

For SRF case all the cells should be selected in the MRFproperties dictionary
which is achieved by simply setting the optional 'selectionMode' entry to all,
e.g.:

SRF
{
    selectionMode   all;

    origin      (0 0 0);
    axis        (0 0 1);

    rpm         1000;
}

In the above the rotational speed is set in RPM rather than rad/s simply by
setting the 'rpm' entry rather than 'omega'.

The tutorials/modules/incompressibleFluid/rotor2DSRF case is more complex and
demonstrates a transient SRF simulation of a rotor requiring the free-stream
velocity to rotate around the apparently stationary rotor which is achieved
using the new 'MRFFreestreamVelocity' velocity boundary condition.  The
equivalent simulation can be achieved by simply rotating the entire mesh and
keeping the free-stream flow stationary and this is demonstrated in the
tutorials/modules/incompressibleFluid/rotor2DRotating case for comparison.

The special SRFSimpleFoam and SRFPimpleFoam solvers are now redundant and have
been replaced by redirection scripts providing details of the case migration
process.
  • Loading branch information
Henry Weller committed Aug 11, 2022
1 parent 9068d5c commit 160ee63
Show file tree
Hide file tree
Showing 123 changed files with 1,183 additions and 3,292 deletions.
2 changes: 0 additions & 2 deletions applications/solvers/combustion/XiFoam/PDRFoam/UEqn.H
@@ -1,5 +1,3 @@
MRF.correctBoundaryVelocity(U);

fvVectorMatrix UEqn
(
betav*fvm::ddt(rho, U) + fvm::div(phi, U)
Expand Down
2 changes: 0 additions & 2 deletions applications/solvers/combustion/XiFoam/UEqn.H
@@ -1,5 +1,3 @@
MRF.correctBoundaryVelocity(U);

fvVectorMatrix UEqn
(
fvm::ddt(rho, U) + fvm::div(phi, U)
Expand Down
2 changes: 0 additions & 2 deletions applications/solvers/compressible/rhoPorousSimpleFoam/UEqn.H
@@ -1,7 +1,5 @@
// Construct the Momentum equation

MRF.correctBoundaryVelocity(U);

tmp<fvVectorMatrix> tUEqn
(
fvm::div(phi, U)
Expand Down
3 changes: 0 additions & 3 deletions applications/solvers/incompressible/SRFPimpleFoam/Make/files

This file was deleted.

17 changes: 0 additions & 17 deletions applications/solvers/incompressible/SRFPimpleFoam/Make/options

This file was deleted.

110 changes: 0 additions & 110 deletions applications/solvers/incompressible/SRFPimpleFoam/SRFPimpleFoam.C

This file was deleted.

19 changes: 0 additions & 19 deletions applications/solvers/incompressible/SRFPimpleFoam/UrelEqn.H

This file was deleted.

75 changes: 0 additions & 75 deletions applications/solvers/incompressible/SRFPimpleFoam/createFields.H

This file was deleted.

62 changes: 0 additions & 62 deletions applications/solvers/incompressible/SRFPimpleFoam/pEqn.H

This file was deleted.

3 changes: 0 additions & 3 deletions applications/solvers/incompressible/SRFSimpleFoam/Make/files

This file was deleted.

17 changes: 0 additions & 17 deletions applications/solvers/incompressible/SRFSimpleFoam/Make/options

This file was deleted.

0 comments on commit 160ee63

Please sign in to comment.