patchInjectionBase Class Reference

Base class for patch-based injection models. More...

Inheritance diagram for patchInjectionBase:
Collaboration diagram for patchInjectionBase:

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 updateMesh (const polyMesh &mesh)
 Update patch geometry and derived info for injection locations. More...
 
virtual void setPositionAndCell (const fvMesh &mesh, Random &rnd, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
 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...
 
scalar patchArea_
 Patch area - total across all processors. More...
 
vectorList patchNormal_
 Patch face normal directions. More...
 
labelList cellOwners_
 List of cell labels corresponding to injector positions. More...
 
faceList triFace_
 Decomposed patch faces as a list of triangles. More...
 
labelList triToFace_
 Addressing from per triangle to patch face. More...
 
scalarList triCumulativeMagSf_
 Cumulative triangle area per triangle face. More...
 
scalarList sumTriMagSf_
 Cumulative area fractions per processor. More...
 

Detailed Description

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.

Source files

Definition at line 62 of file patchInjectionBase.H.

Constructor & Destructor Documentation

◆ patchInjectionBase() [1/2]

patchInjectionBase ( const polyMesh mesh,
const word patchName 
)

Construct from mesh and patch name.

Definition at line 37 of file patchInjectionBase.C.

References polyMesh::boundaryMesh(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::names(), and Foam::nl.

Here is the call graph for this function:

◆ patchInjectionBase() [2/2]

Copy constructor.

Definition at line 64 of file patchInjectionBase.C.

◆ ~patchInjectionBase()

~patchInjectionBase ( )
virtual

Destructor.

Definition at line 80 of file patchInjectionBase.C.

Member Function Documentation

◆ updateMesh()

◆ setPositionAndCell()

Member Data Documentation

◆ patchName_

const word patchName_
protected

Patch name.

Definition at line 69 of file patchInjectionBase.H.

◆ patchId_

const label patchId_
protected

Patch ID.

Definition at line 72 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ patchArea_

scalar patchArea_
protected

Patch area - total across all processors.

Definition at line 75 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ patchNormal_

vectorList patchNormal_
protected

Patch face normal directions.

Definition at line 78 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ cellOwners_

labelList cellOwners_
protected

List of cell labels corresponding to injector positions.

Definition at line 81 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ triFace_

faceList triFace_
protected

Decomposed patch faces as a list of triangles.

Definition at line 84 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ triToFace_

labelList triToFace_
protected

Addressing from per triangle to patch face.

Definition at line 87 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ triCumulativeMagSf_

scalarList triCumulativeMagSf_
protected

Cumulative triangle area per triangle face.

Definition at line 90 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().

◆ sumTriMagSf_

scalarList sumTriMagSf_
protected

Cumulative area fractions per processor.

Definition at line 93 of file patchInjectionBase.H.

Referenced by patchInjectionBase::setPositionAndCell(), and patchInjectionBase::updateMesh().


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