Base class for patch-based injection models. More...
Public Member Functions | |
patchInjectionBase (const polyMesh &mesh, const word &patchName) | |
Construct from mesh and patch name. More... | |
patchInjectionBase (const patchInjectionBase &pib) | |
Copy constructor. More... | |
virtual | ~patchInjectionBase () |
Destructor. More... | |
virtual void | topoChange (const polyMesh &mesh) |
Update patch geometry and derived info for injection locations. More... | |
virtual void | setPositionAndCell (const fvMesh &mesh, randomGenerator &rndGen, barycentric &coordinates, label &celli, label &tetFacei, label &tetPti, label &facei) |
Set the injection position and owner cell, tetFace and tetPt. More... | |
Protected Attributes | |
const word | patchName_ |
Patch name. More... | |
const label | patchId_ |
Patch ID. More... | |
scalarList | sumProcArea_ |
Cumulative sum of the total patch areas in each process. More... | |
scalarList | sumFaceArea_ |
Cumulative sum of the face areas in the patch. More... | |
scalarListList | sumFaceTriArea_ |
Cumulative sum of the triangle areas in each patch face. More... | |
Base class for patch-based injection models.
Class handles injecting at a random point adjacent to the patch faces to provide a more stochastic view of the injection process. Patch faces are triangulated, and area fractions accumulated. The fractional areas are then applied to determine across which face a parcel is to be injected.
Definition at line 64 of file patchInjectionBase.H.
patchInjectionBase | ( | const polyMesh & | mesh, |
const word & | patchName | ||
) |
Construct from mesh and patch name.
Definition at line 38 of file patchInjectionBase.C.
References polyMesh::boundaryMesh(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::names(), Foam::nl, patchInjectionBase::patchId_, patchInjectionBase::patchName_, and patchInjectionBase::topoChange().
patchInjectionBase | ( | const patchInjectionBase & | pib | ) |
Copy constructor.
Definition at line 62 of file patchInjectionBase.C.
|
virtual |
Destructor.
Definition at line 74 of file patchInjectionBase.C.
|
virtual |
Update patch geometry and derived info for injection locations.
Definition at line 80 of file patchInjectionBase.C.
References polyMesh::boundaryMesh(), polyPatch::faceCells(), forAll, UPstream::nProcs(), PtrList< T >::resize(), UList< T >::size(), and polyPatch::start().
Referenced by patchInjectionBase::patchInjectionBase(), PatchFlowRateInjection< CloudType >::topoChange(), and PatchInjection< CloudType >::topoChange().
|
virtual |
Set the injection position and owner cell, tetFace and tetPt.
Definition at line 133 of file patchInjectionBase.C.
References Barycentric2D< Cmpt >::a(), Barycentric2D< Cmpt >::b(), Foam::barycentric2D01(), polyMesh::boundaryMesh(), Barycentric2D< Cmpt >::c(), polyMesh::faceOwner(), injectionModel::globalScalar01(), UPstream::myProcNo(), rndGen(), UList< T >::size(), List< T >::size(), polyPatch::start(), and VectorSpace< Form, Cmpt, Ncmpts >::uniform().
Referenced by PatchFlowRateInjection< CloudType >::setPositionAndCell(), and PatchInjection< CloudType >::setPositionAndCell().
|
protected |
Patch name.
Definition at line 71 of file patchInjectionBase.H.
Referenced by patchInjectionBase::patchInjectionBase().
|
protected |
Patch ID.
Definition at line 74 of file patchInjectionBase.H.
Referenced by patchInjectionBase::patchInjectionBase().
|
protected |
Cumulative sum of the total patch areas in each process.
Definition at line 77 of file patchInjectionBase.H.
|
protected |
Cumulative sum of the face areas in the patch.
Definition at line 80 of file patchInjectionBase.H.
|
protected |
Cumulative sum of the triangle areas in each patch face.
Definition at line 83 of file patchInjectionBase.H.