All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MRFZone Class Reference

MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed from the given stream. More...

Public Member Functions

 ClassName ("MRFZone")
 
 MRFZone (const word &name, const fvMesh &mesh, const dictionary &dict, const word &cellZoneName=word::null)
 Construct from fvMesh. More...
 
 MRFZone (const MRFZone &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< MRFZoneclone () const
 Return clone. More...
 
const wordname () const
 Return const access to the MRF region name. More...
 
bool active () const
 Return const access to the MRF active flag. More...
 
vector Omega () const
 Return the current Omega vector. More...
 
void updateMesh (const mapPolyMesh &mpm)
 Update the mesh corresponding to given map. More...
 
void addCoriolis (const volVectorField &U, volVectorField &ddtU) const
 Add the Coriolis force contribution to the acceleration field. More...
 
void addCoriolis (fvVectorMatrix &UEqn, const bool rhs=false) const
 Add the Coriolis force contribution to the momentum equation. More...
 
void addCoriolis (const volScalarField &rho, fvVectorMatrix &UEqn, const bool rhs=false) const
 Add the Coriolis force contribution to the momentum equation. More...
 
void makeRelative (volVectorField &U) const
 Make the given absolute velocity relative within the MRF region. More...
 
void makeRelative (surfaceScalarField &phi) const
 Make the given absolute flux relative within the MRF region. More...
 
void makeRelative (FieldField< fvsPatchField, scalar > &phi) const
 Make the given absolute boundary flux relative. More...
 
void makeRelative (Field< scalar > &phi, const label patchi) const
 Make the given absolute patch flux relative. More...
 
void makeRelative (const surfaceScalarField &rho, surfaceScalarField &phi) const
 Make the given absolute mass-flux relative within the MRF region. More...
 
void makeAbsolute (volVectorField &U) const
 Make the given relative velocity absolute within the MRF region. More...
 
void makeAbsolute (surfaceScalarField &phi) const
 Make the given relative flux absolute within the MRF region. More...
 
void makeAbsolute (const surfaceScalarField &rho, surfaceScalarField &phi) const
 Make the given relative mass-flux absolute within the MRF region. More...
 
void correctBoundaryVelocity (volVectorField &U) const
 Correct the boundary velocity for the rotation of the MRF region. More...
 
template<class Type >
void zero (GeometricField< Type, fvsPatchField, surfaceMesh > &phi) const
 Zero the MRF region of the given field. More...
 
void update ()
 Update MRFZone faces if the mesh topology changes. More...
 
void writeData (Ostream &os) const
 Write. More...
 
bool read (const dictionary &dict)
 Read MRF dictionary. More...
 
void operator= (const MRFZone &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed from the given stream.

The rotation of the MRF region is defined by an origin and axis of rotation and an angular speed.

Source files

Definition at line 65 of file MRFZone.H.

Constructor & Destructor Documentation

◆ MRFZone() [1/2]

MRFZone ( const word name,
const fvMesh mesh,
const dictionary dict,
const word cellZoneName = word::null 
)

Construct from fvMesh.

Definition at line 237 of file MRFZone.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAllConstIter(), Foam::mag(), word::null, and Foam::reduce().

Here is the call graph for this function:

◆ MRFZone() [2/2]

MRFZone ( const MRFZone )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "MRFZone"  )

◆ clone()

autoPtr<MRFZone> clone ( ) const
inline

Return clone.

Definition at line 170 of file MRFZone.H.

References MRFZone::active(), MRFZone::name(), NotImplemented, and MRFZone::Omega().

Here is the call graph for this function:

◆ name()

const Foam::word & name ( ) const
inline

Return const access to the MRF region name.

Definition at line 26 of file MRFZoneI.H.

Referenced by MRFZone::clone(), and MRFZoneList::read().

Here is the caller graph for this function:

◆ active()

bool active ( ) const
inline

Return const access to the MRF active flag.

Definition at line 32 of file MRFZoneI.H.

Referenced by MRFZone::clone().

Here is the caller graph for this function:

◆ Omega()

Foam::vector Omega ( ) const

Return the current Omega vector.

Definition at line 304 of file MRFZone.C.

References MRFZone::addCoriolis().

Referenced by MRFZone::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
inline

Update the mesh corresponding to given map.

Definition at line 189 of file MRFZone.H.

References MRFZone::addCoriolis(), MRFZone::correctBoundaryVelocity(), MRFZone::makeAbsolute(), MRFZone::makeRelative(), MRFZone::operator=(), MRFZone::read(), U, UEqn, MRFZone::update(), MRFZone::writeData(), and MRFZone::zero().

Here is the call graph for this function:

◆ addCoriolis() [1/3]

void addCoriolis ( const volVectorField U,
volVectorField ddtU 
) const

Add the Coriolis force contribution to the acceleration field.

Definition at line 311 of file MRFZone.C.

References cells, forAll, GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), and U.

Referenced by MRFZone::addCoriolis(), MRFZone::Omega(), and MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCoriolis() [2/3]

void addCoriolis ( fvVectorMatrix UEqn,
const bool  rhs = false 
) const

Add the Coriolis force contribution to the momentum equation.

Adds to the lhs of the equation; optionally add to rhs

Definition at line 335 of file MRFZone.C.

References MRFZone::addCoriolis(), cells, forAll, fvMatrix< Type >::psi(), and fvMatrix< Type >::source().

Here is the call graph for this function:

◆ addCoriolis() [3/3]

void addCoriolis ( const volScalarField rho,
fvVectorMatrix UEqn,
const bool  rhs = false 
) const

Add the Coriolis force contribution to the momentum equation.

Adds to the lhs of the equation; optionally add to rhs

Definition at line 369 of file MRFZone.C.

References cells, forAll, fvMatrix< Type >::psi(), and fvMatrix< Type >::source().

Here is the call graph for this function:

◆ makeRelative() [1/5]

void makeRelative ( volVectorField U) const

Make the given absolute velocity relative within the MRF region.

Definition at line 406 of file MRFZone.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), C::C(), cells, forAll, patchi, and Foam::Zero.

Referenced by MRFZone::makeRelative(), and MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeRelative() [2/5]

void makeRelative ( surfaceScalarField phi) const

Make the given absolute flux relative within the MRF region.

Definition at line 452 of file MRFZone.C.

◆ makeRelative() [3/5]

void makeRelative ( FieldField< fvsPatchField, scalar > &  phi) const

Make the given absolute boundary flux relative.

within the MRF region

Definition at line 458 of file MRFZone.C.

◆ makeRelative() [4/5]

void makeRelative ( Field< scalar > &  phi,
const label  patchi 
) const

Make the given absolute patch flux relative.

within the MRF region

Definition at line 464 of file MRFZone.C.

References MRFZone::makeRelative().

Here is the call graph for this function:

◆ makeRelative() [5/5]

void makeRelative ( const surfaceScalarField rho,
surfaceScalarField phi 
) const

Make the given absolute mass-flux relative within the MRF region.

Definition at line 471 of file MRFZone.C.

◆ makeAbsolute() [1/3]

void makeAbsolute ( volVectorField U) const

Make the given relative velocity absolute within the MRF region.

Definition at line 480 of file MRFZone.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), C::C(), cells, forAll, and patchi.

Referenced by MRFZone::makeAbsolute(), and MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeAbsolute() [2/3]

void makeAbsolute ( surfaceScalarField phi) const

Make the given relative flux absolute within the MRF region.

Definition at line 525 of file MRFZone.C.

References MRFZone::makeAbsolute().

Here is the call graph for this function:

◆ makeAbsolute() [3/3]

void makeAbsolute ( const surfaceScalarField rho,
surfaceScalarField phi 
) const

Make the given relative mass-flux absolute within the MRF region.

Definition at line 532 of file MRFZone.C.

◆ correctBoundaryVelocity()

void correctBoundaryVelocity ( volVectorField U) const

Correct the boundary velocity for the rotation of the MRF region.

Definition at line 541 of file MRFZone.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, and patchi.

Referenced by MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zero()

void zero ( GeometricField< Type, fvsPatchField, surfaceMesh > &  phi) const

Zero the MRF region of the given field.

Definition at line 212 of file MRFZoneTemplates.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, patchi, GeometricField< Type, PatchField, GeoMesh >::primitiveFieldRef(), and Foam::Zero.

Referenced by MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void update ( )

Update MRFZone faces if the mesh topology changes.

Definition at line 603 of file MRFZone.C.

Referenced by MRFZone::updateMesh().

Here is the caller graph for this function:

◆ writeData()

void writeData ( Ostream os) const

Write.

Definition at line 571 of file MRFZone.C.

References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, Foam::incrIndent(), Foam::nl, Ostream::write(), and Foam::writeEntry().

Referenced by MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

bool read ( const dictionary dict)

Read MRF dictionary.

Definition at line 591 of file MRFZone.C.

References dict, and dictionary::lookupOrDefault().

Referenced by MRFZoneList::read(), and MRFZone::updateMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const MRFZone )
delete

Disallow default bitwise assignment.

Referenced by MRFZone::updateMesh().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: