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... | |
autoPtr< MRFZone > | clone () const |
Return clone. More... | |
const word & | name () 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 (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... | |
void | writeData (Ostream &os) const |
Write. More... | |
bool | read (const dictionary &dict) |
Read MRF dictionary. More... | |
Private Member Functions | |
void | setMRFFaces () |
Divide faces in frame according to patch. More... | |
template<class RhoFieldType > | |
void | makeRelativeRhoFlux (const RhoFieldType &rho, surfaceScalarField &phi) const |
Make the given absolute mass/vol flux relative within the MRF region. More... | |
template<class RhoFieldType > | |
void | makeRelativeRhoFlux (const RhoFieldType &rho, FieldField< fvsPatchField, scalar > &phi) const |
Make the given absolute mass/vol flux relative within the MRF region. More... | |
template<class RhoFieldType > | |
void | makeAbsoluteRhoFlux (const RhoFieldType &rho, surfaceScalarField &phi) const |
Make the given relative mass/vol flux absolute within the MRF region. More... | |
MRFZone (const MRFZone &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const MRFZone &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const fvMesh & | mesh_ |
Reference to the mesh database. More... | |
const word | name_ |
Name of the MRF region. More... | |
dictionary | coeffs_ |
Coefficients dictionary. More... | |
bool | active_ |
MRF region active flag. More... | |
word | cellZoneName_ |
Name of cell zone. More... | |
label | cellZoneID_ |
Cell zone ID. More... | |
const wordReList | excludedPatchNames_ |
labelList | excludedPatchLabels_ |
labelList | internalFaces_ |
Internal faces that are part of MRF. More... | |
labelListList | includedFaces_ |
Outside faces (per patch) that move with the MRF. More... | |
labelListList | excludedFaces_ |
Excluded faces (per patch) that do not move with the MRF. More... | |
const vector | origin_ |
Origin of the axis. More... | |
vector | axis_ |
Axis vector. More... | |
autoPtr< DataEntry< scalar > > | omega_ |
Angular velocty (rad/sec) More... | |
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.
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, Foam::reduce(), and HashTable::size().
|
private |
Divide faces in frame according to patch.
Definition at line 45 of file MRFZone.C.
References polyMesh::boundaryMesh(), MRFZone::cellZoneID_, polyMesh::cellZones(), polyPatch::coupled(), Foam::endl(), MRFZone::excludedFaces_, MRFZone::excludedPatchLabels_, polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, HashTable::found(), MRFZone::includedFaces_, HashSet< Key, Hash >::insert(), MRFZone::internalFaces_, MRFZone::mesh_, IOobject::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patches, patchi, Foam::Pout, List::setSize(), HashTable::size(), polyPatch::start(), syncTools::syncFaceList(), and regIOobject::write().
Referenced by MRFZone::updateMesh().
|
private |
Make the given absolute mass/vol flux relative within the MRF region.
Definition at line 36 of file MRFZoneTemplates.C.
References forAll, GeometricField::internalField(), phi, and rho.
|
private |
Make the given absolute mass/vol flux relative within the MRF region.
Definition at line 63 of file MRFZoneTemplates.C.
References GeometricField::boundaryField(), forAll, patchi, phi, and rho.
|
private |
Make the given relative mass/vol flux absolute within the MRF region.
Definition at line 102 of file MRFZoneTemplates.C.
References GeometricField::boundaryField(), forAll, GeometricField::internalField(), patchi, phi, and rho.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "MRFZone" | ) |
|
inline |
Return const access to the MRF region name.
Definition at line 26 of file MRFZoneI.H.
References MRFZone::name_.
Referenced by MRFZoneList::read().
|
inline |
Return const access to the MRF active flag.
Definition at line 32 of file MRFZoneI.H.
Foam::vector Omega | ( | ) | const |
|
inline |
Update the mesh corresponding to given map.
Definition at line 188 of file MRFZone.H.
References MRFZone::setMRFFaces().
void addCoriolis | ( | const volVectorField & | U, |
volVectorField & | ddtU | ||
) | const |
void addCoriolis | ( | fvVectorMatrix & | UEqn, |
const bool | rhs = false |
||
) | const |
void addCoriolis | ( | const volScalarField & | rho, |
fvVectorMatrix & | UEqn, | ||
const bool | rhs = false |
||
) | const |
void makeRelative | ( | volVectorField & | U | ) | const |
void makeRelative | ( | surfaceScalarField & | phi | ) | const |
Make the given absolute flux relative within the MRF region.
void makeRelative | ( | FieldField< fvsPatchField, scalar > & | phi | ) | const |
void makeRelative | ( | const surfaceScalarField & | rho, |
surfaceScalarField & | phi | ||
) | const |
void makeAbsolute | ( | volVectorField & | U | ) | const |
void makeAbsolute | ( | surfaceScalarField & | phi | ) | const |
Make the given relative flux absolute within the MRF region.
void makeAbsolute | ( | const surfaceScalarField & | rho, |
surfaceScalarField & | phi | ||
) | const |
void correctBoundaryVelocity | ( | volVectorField & | U | ) | const |
void writeData | ( | Ostream & | os | ) | const |
Write.
Definition at line 543 of file MRFZone.C.
References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, token::END_STATEMENT, Foam::incrIndent(), Foam::nl, Ostream::write(), and Ostream::writeKeyword().
bool read | ( | const dictionary & | dict | ) |
Read MRF dictionary.
Definition at line 564 of file MRFZone.C.
References dict, and dictionary::lookupOrDefault().
Referenced by MRFZoneList::read().
|
private |
Reference to the mesh database.
Definition at line 70 of file MRFZone.H.
Referenced by MRFZone::setMRFFaces().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 89 of file MRFZone.H.
Referenced by MRFZone::setMRFFaces().
|
private |
Internal faces that are part of MRF.
Definition at line 92 of file MRFZone.H.
Referenced by MRFZone::setMRFFaces().
|
private |
Outside faces (per patch) that move with the MRF.
Definition at line 95 of file MRFZone.H.
Referenced by MRFZone::setMRFFaces().
|
private |
Excluded faces (per patch) that do not move with the MRF.
Definition at line 98 of file MRFZone.H.
Referenced by MRFZone::setMRFFaces().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.