Public Member Functions | Protected Attributes | Friends | List of all members
MRFZoneList Class Reference

List container for MRF zomes. More...

Inheritance diagram for MRFZoneList:
Inheritance graph
[legend]
Collaboration diagram for MRFZoneList:
Collaboration graph
[legend]

Public Member Functions

 MRFZoneList (const fvMesh &mesh, const dictionary &dict)
 Constructor. More...
 
 ~MRFZoneList ()
 Destructor. More...
 
bool active (const bool warn=false) const
 Return active status. More...
 
void reset (const dictionary &dict)
 Reset the source list. More...
 
void addAcceleration (const volVectorField &U, volVectorField &ddtU) const
 Add the frame acceleration. More...
 
void addAcceleration (fvVectorMatrix &UEqn) const
 Add the frame acceleration contribution to the momentum equation. More...
 
void addAcceleration (const volScalarField &rho, fvVectorMatrix &UEqn) const
 Add the frame acceleration contribution to the momentum equation. More...
 
tmp< volVectorFieldDDt (const volVectorField &U) const
 Return the frame acceleration. More...
 
tmp< volVectorFieldDDt (const volScalarField &rho, const volVectorField &U) const
 Return the frame acceleration. 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...
 
tmp< surfaceScalarFieldrelative (const tmp< surfaceScalarField > &phi) const
 Return the given absolute flux relative within the MRF region. More...
 
tmp< FieldField< fvsPatchField, scalar > > relative (const tmp< FieldField< fvsPatchField, scalar >> &tphi) const
 Return the given absolute boundary flux relative within. More...
 
tmp< Field< scalar > > relative (const tmp< Field< scalar >> &tphi, const label patchi) const
 Return the given absolute patch flux relative within. 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...
 
tmp< surfaceScalarFieldabsolute (const tmp< surfaceScalarField > &phi) const
 Return 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 correctBoundaryFlux (const volVectorField &U, surfaceScalarField &phi) const
 Correct the boundary flux for the rotation of the MRF region. More...
 
template<class Type >
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > zeroFilter (const tmp< GeometricField< Type, fvsPatchField, surfaceMesh >> &tphi) const
 Filter-out the MRF region contribution from the given field. More...
 
void update ()
 Update MRFZone faces if the mesh topology changes. More...
 
bool read (const dictionary &dict)
 Read dictionary. More...
 
bool writeData (Ostream &os) const
 Write data to Ostream. More...
 
template<class Type >
Foam::tmp< Foam::GeometricField< Type, Foam::fvsPatchField, Foam::surfaceMesh > > zeroFilter (const tmp< GeometricField< Type, fvsPatchField, surfaceMesh >> &tphi) const
 
- Public Member Functions inherited from PtrList< MRFZone >
 PtrList ()
 Null Constructor. More...
 
 PtrList (const label)
 Construct with size specified. More...
 
 PtrList (const PtrList< MRFZone > &)
 Copy constructor. More...
 
 PtrList (const PtrList< MRFZone > &, const CloneArg &)
 Copy constructor with additional argument for clone. More...
 
 PtrList (const Xfer< PtrList< MRFZone >> &)
 Construct by transferring the parameter contents. More...
 
 PtrList (PtrList< MRFZone > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< MRFZone > &)
 Construct as copy of SLPtrList<T> More...
 
 PtrList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. More...
 
void setSize (const label)
 Reset size of PtrList. If extending the PtrList, new entries are. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void clear ()
 Clear the PtrList, i.e. set size to zero deleting all the. More...
 
void append (MRFZone *)
 Append an element at the end of the list. More...
 
void append (const autoPtr< MRFZone > &)
 
void append (const tmp< MRFZone > &)
 
void transfer (PtrList< MRFZone > &)
 Transfer the contents of the argument PtrList into this PtrList. More...
 
Xfer< PtrList< MRFZone > > xfer ()
 Transfer contents to the Xfer container. More...
 
bool set (const label) const
 Is element set. More...
 
autoPtr< MRFZoneset (const label, MRFZone *)
 Set element to given T* and return old element (can be nullptr) More...
 
autoPtr< MRFZoneset (const label, const autoPtr< MRFZone > &)
 Set element to given autoPtr<T> and return old element. More...
 
autoPtr< MRFZoneset (const label, const tmp< MRFZone > &)
 Set element to given tmp<T> and return old element. More...
 
void reorder (const labelUList &)
 Reorders elements. Ordering does not have to be done in. More...
 
void operator= (const PtrList< MRFZone > &)
 Assignment. More...
 
- Public Member Functions inherited from UPtrList< T >
 UPtrList ()
 Null Constructor. More...
 
 UPtrList (const label)
 Construct with size specified. More...
 
 UPtrList (const Xfer< UPtrList< T >> &)
 Construct by transferring the parameter contents. More...
 
 UPtrList (UPtrList< T > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
label size () const
 Return the number of elements in the UPtrList. More...
 
bool empty () const
 Return true if the UPtrList is empty (ie, size() is zero) More...
 
Tfirst ()
 Return reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () const
 Return reference to the last element of the list. More...
 
void setSize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void resize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void clear ()
 Clear the UPtrList, i.e. set size to zero. More...
 
void transfer (UPtrList< T > &)
 Transfer the contents of the argument UPtrList into this. More...
 
Xfer< UPtrList< T > > xfer ()
 Transfer contents to the Xfer container. More...
 
bool set (const label) const
 Is element set. More...
 
Tset (const label, T *)
 Set element. Return old element (can be nullptr). More...
 
void reorder (const labelUList &)
 Reorders elements. Ordering does not have to be done in. More...
 
const Toperator[] (const label) const
 Return element const reference. More...
 
Toperator[] (const label)
 Return element reference. More...
 
const Toperator() (const label) const
 Return element const pointer. More...
 
iterator begin ()
 Return an iterator to begin traversing the UPtrList. More...
 
iterator end ()
 Return an iterator to end traversing the UPtrList. More...
 
const_iterator cbegin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator cend () const
 Return an const_iterator to end traversing the UPtrList. More...
 
const_iterator begin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator end () const
 Return an const_iterator to end traversing the UPtrList. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh database. More...
 

Friends

Ostreamoperator<< (Ostream &os, const MRFZoneList &models)
 Ostream operator. More...
 

Additional Inherited Members

- Public Types inherited from UPtrList< T >
typedef T value_type
 Type of values the UPtrList contains. More...
 
typedef Treference
 Type that can be used for storing into UPtrList::value_type objects. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant UPtrList::value_type. More...
 
- Protected Member Functions inherited from PtrList< MRFZone >
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class. More...
 

Detailed Description

List container for MRF zomes.

Source files

Definition at line 55 of file MRFZoneList.H.

Constructor & Destructor Documentation

◆ MRFZoneList()

MRFZoneList ( const fvMesh mesh,
const dictionary dict 
)

Constructor.

Definition at line 33 of file MRFZoneList.C.

◆ ~MRFZoneList()

Destructor.

Definition at line 49 of file MRFZoneList.C.

Member Function Documentation

◆ active()

bool active ( const bool  warn = false) const

Return active status.

Definition at line 55 of file MRFZoneList.C.

References Foam::endl(), forAll, Foam::Info, UPtrList< T >::operator[](), and UPtrList< T >::size().

Here is the call graph for this function:

◆ reset()

void reset ( const dictionary dict)

Reset the source list.

Definition at line 72 of file MRFZoneList.C.

References Foam::endl(), forAllConstIter(), Foam::Info, MRFZoneList::mesh_, Foam::name(), and PtrList< MRFZone >::setSize().

Here is the call graph for this function:

◆ addAcceleration() [1/3]

void addAcceleration ( const volVectorField U,
volVectorField ddtU 
) const

Add the frame acceleration.

Definition at line 130 of file MRFZoneList.C.

References forAll, and UPtrList< T >::operator[]().

Referenced by MRFZoneList::addAcceleration(), and MRFZoneList::writeData().

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

◆ addAcceleration() [2/3]

void addAcceleration ( fvVectorMatrix UEqn) const

Add the frame acceleration contribution to the momentum equation.

Definition at line 142 of file MRFZoneList.C.

References MRFZoneList::addAcceleration(), forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ addAcceleration() [3/3]

void addAcceleration ( const volScalarField rho,
fvVectorMatrix UEqn 
) const

Add the frame acceleration contribution to the momentum equation.

Definition at line 152 of file MRFZoneList.C.

References MRFZoneList::DDt(), forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ DDt() [1/2]

Foam::tmp< Foam::volVectorField > DDt ( const volVectorField U) const

Return the frame acceleration.

Definition at line 165 of file MRFZoneList.C.

References DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimTime, forAll, DimensionedField< Type, GeoMesh >::mesh(), UPtrList< T >::operator[](), GeometricField< Type, PatchField, GeoMesh >::ref(), and Foam::Zero.

Referenced by MRFZoneList::addAcceleration(), and MRFZoneList::DDt().

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

◆ DDt() [2/2]

Foam::tmp< Foam::volVectorField > DDt ( const volScalarField rho,
const volVectorField U 
) const

Return the frame acceleration.

Definition at line 195 of file MRFZoneList.C.

References MRFZoneList::DDt().

Here is the call graph for this function:

◆ makeRelative() [1/3]

void makeRelative ( volVectorField U) const

Make the given absolute velocity relative within the MRF region.

Definition at line 204 of file MRFZoneList.C.

References forAll, and UPtrList< T >::operator[]().

Referenced by MRFZoneList::relative().

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

◆ makeRelative() [2/3]

void makeRelative ( surfaceScalarField phi) const

Make the given absolute flux relative within the MRF region.

Definition at line 213 of file MRFZoneList.C.

References forAll, UPtrList< T >::operator[](), and MRFZoneList::relative().

Here is the call graph for this function:

◆ relative() [1/3]

Foam::tmp< Foam::surfaceScalarField > relative ( const tmp< surfaceScalarField > &  phi) const

Return the given absolute flux relative within the MRF region.

Definition at line 223 of file MRFZoneList.C.

References tmp< T >::clear(), MRFZoneList::makeRelative(), Foam::name(), Foam::New(), tmp< T >::ref(), and UPtrList< T >::size().

Referenced by MRFZoneList::correctBoundaryFlux(), MRFZoneList::makeRelative(), and MRFZoneList::relative().

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

◆ relative() [2/3]

Foam::tmp< Foam::FieldField< Foam::fvsPatchField, Foam::scalar > > relative ( const tmp< FieldField< fvsPatchField, scalar >> &  tphi) const

Return the given absolute boundary flux relative within.

the MRF region

Definition at line 255 of file MRFZoneList.C.

References tmp< T >::clear(), forAll, Foam::New(), UPtrList< T >::operator[](), tmp< T >::ref(), MRFZoneList::relative(), and UPtrList< T >::size().

Here is the call graph for this function:

◆ relative() [3/3]

Foam::tmp< Foam::Field< Foam::scalar > > relative ( const tmp< Field< scalar >> &  tphi,
const label  patchi 
) const

Return the given absolute patch flux relative within.

the MRF region

Definition at line 281 of file MRFZoneList.C.

References tmp< T >::clear(), forAll, MRFZoneList::makeRelative(), Foam::New(), UPtrList< T >::operator[](), patchi, tmp< T >::ref(), and UPtrList< T >::size().

Here is the call graph for this function:

◆ makeRelative() [3/3]

void makeRelative ( const surfaceScalarField rho,
surfaceScalarField phi 
) const

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

Definition at line 307 of file MRFZoneList.C.

References forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ makeAbsolute() [1/3]

void makeAbsolute ( volVectorField U) const

Make the given relative velocity absolute within the MRF region.

Definition at line 319 of file MRFZoneList.C.

References forAll, and UPtrList< T >::operator[]().

Referenced by MRFZoneList::absolute().

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 328 of file MRFZoneList.C.

References MRFZoneList::absolute(), forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ absolute()

Foam::tmp< Foam::surfaceScalarField > absolute ( const tmp< surfaceScalarField > &  phi) const

Return the given relative flux absolute within the MRF region.

Definition at line 338 of file MRFZoneList.C.

References tmp< T >::clear(), MRFZoneList::makeAbsolute(), Foam::name(), Foam::New(), tmp< T >::ref(), and UPtrList< T >::size().

Referenced by MRFZoneList::makeAbsolute().

Here is the call graph for this function:
Here is the caller 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 369 of file MRFZoneList.C.

References forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ correctBoundaryVelocity()

void correctBoundaryVelocity ( volVectorField U) const

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

Definition at line 381 of file MRFZoneList.C.

References MRFZoneList::correctBoundaryFlux(), forAll, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ correctBoundaryFlux()

void correctBoundaryFlux ( const volVectorField U,
surfaceScalarField phi 
) const

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

Definition at line 391 of file MRFZoneList.C.

References fvMesh::boundary(), GeometricField< Type, PatchField, GeoMesh >::boundaryField(), GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, MRFZoneList::mesh_, patchi, MRFZoneList::relative(), fvMesh::Sf(), and Uf.

Referenced by MRFZoneList::correctBoundaryVelocity().

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

◆ zeroFilter() [1/2]

tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > zeroFilter ( const tmp< GeometricField< Type, fvsPatchField, surfaceMesh >> &  tphi) const

Filter-out the MRF region contribution from the given field.

setting the corresponding values to zero

◆ update()

void update ( )

Update MRFZone faces if the mesh topology changes.

Definition at line 417 of file MRFZoneList.C.

References forAll, MRFZoneList::mesh_, UPtrList< T >::operator[](), and polyMesh::topoChanging().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)

Read dictionary.

Definition at line 104 of file MRFZoneList.C.

References forAll, MRFZone::name(), UPtrList< T >::operator[](), MRFZone::read(), and dictionary::subDict().

Referenced by IOMRFZoneList::read().

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

◆ writeData()

bool writeData ( Ostream os) const

Write data to Ostream.

Definition at line 117 of file MRFZoneList.C.

References MRFZoneList::addAcceleration(), forAll, IOstream::good(), Foam::nl, and UPtrList< T >::operator[]().

Here is the call graph for this function:

◆ zeroFilter() [2/2]

Definition at line 33 of file MRFZoneListTemplates.C.

References forAll, Foam::name(), Foam::New(), and tmp< T >::ref().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const MRFZoneList models 
)
friend

Ostream operator.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh database.

Definition at line 73 of file MRFZoneList.H.

Referenced by MRFZoneList::correctBoundaryFlux(), MRFZoneList::reset(), and MRFZoneList::update().


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