Public Member Functions | List of all members
semiPermeableBaffleMassFractionFvPatchScalarField Class Reference

This is a mass-fraction boundary condition for a semi-permeable baffle. More...

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

Public Member Functions

 TypeName ("semiPermeableBaffleMassFraction")
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
tmp< scalarFieldphiY () const
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 
- Public Member Functions inherited from mappedPatchBase
 TypeName ("mappedPatchBase")
 
 mappedPatchBase (const polyPatch &)
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vectorField &offsets)
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vector &uniformOffset)
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const scalar normalDistance)
 
 mappedPatchBase (const polyPatch &, const dictionary &)
 
 mappedPatchBase (const polyPatch &, const sampleMode, const dictionary &)
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &)
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &, const labelUList &mapAddressing)
 
virtual ~mappedPatchBase ()
 
void clearOut ()
 
void setOffset (const scalar normalDist)
 
void setOffset (const vector &uniformOffset)
 
void setOffset (const vectorField &offsets)
 
sampleMode mode () const noexcept
 
const wordsampleWorld () const noexcept
 
const wordsampleRegion () const
 
const wordsamplePatch () const
 
const wordcoupleGroup () const
 
label sampleSize () const
 
const vectoroffset () const noexcept
 
const vectorFieldoffsets () const noexcept
 
label getCommunicator () const
 
label comm () const
 
bool sameWorld () const
 
bool masterWorld () const
 
bool sameRegion () const noexcept
 
const mapDistributemap () const
 
const AMIPatchToPatchInterpolationAMI (const bool forceUpdate=false) const
 
bool owner () const
 
const autoPtr< Foam::searchableSurface > & surfPtr () const
 
const polyMeshsampleMesh () const
 
const polyPatchsamplePolyPatch () const
 
tmp< pointFieldsamplePoints () const
 
const fileNamesampleDatabasePath () const
 
bool sampleDatabase () const
 
virtual fileName sendPath (const label proci) const
 
virtual fileName receivePath (const label proci) const
 
template<class Type >
void distribute (List< Type > &lst) const
 
template<class Type , class CombineOp >
void distribute (List< Type > &lst, const CombineOp &cop) const
 
template<class Type >
void reverseDistribute (List< Type > &lst) const
 
template<class Type , class CombineOp >
void reverseDistribute (List< Type > &lst, const CombineOp &cop) const
 

Additional Inherited Members

- Public Types inherited from mappedPatchBase
enum  sampleMode {
  NEARESTCELL, NEARESTPATCHFACE, NEARESTPATCHFACEAMI, NEARESTPATCHPOINT,
  NEARESTFACE, NEARESTONLYCELL
}
 
enum  offsetMode { UNIFORM, NONUNIFORM, NORMAL }
 
typedef Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
 
typedef Tuple2< nearInfo, label > nearInfoWorld
 
- Static Public Member Functions inherited from mappedPatchBase
static pointIndexHit facePoint (const polyMesh &, const label facei, const polyMesh::cellDecomposition)
 
static fileName sendPath (const fileName &root, const label proci)
 
static fileName receivePath (const fileName &root, const label proci)
 
static const objectRegistrysubRegistry (const objectRegistry &obr, const fileName &path)
 
template<class Type >
static void storeField (objectRegistry &obr, const word &fieldName, const Field< Type > &values)
 
static void writeDict (const objectRegistry &obr, dictionary &dict)
 
static void readDict (const dictionary &d, objectRegistry &obr)
 
- Static Public Attributes inherited from mappedPatchBase
static const Enum< sampleModesampleModeNames_
 
static const Enum< offsetModeoffsetModeNames_
 
- Protected Member Functions inherited from mappedPatchBase
bool addWorldConnection ()
 
label getWorldCommunicator () const
 
const polyMeshlookupMesh (const word &region) const
 
const polyPatchlookupPatch (const word &sampleRegion, const word &samplePatch) const
 
tmp< pointFieldfacePoints (const polyPatch &) const
 
void collectSamples (const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
 
void findLocalSamples (const sampleMode mode, const label sampleWorld, const word &sampleRegion, const word &samplePatch, const pointField &samplePoints, List< nearInfoWorld > &nearest) const
 
void findSamples (const sampleMode mode, const label myWorldIndex, const pointField &, const labelList &wantedWorlds, const labelList &origProcs, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
 
tmp< pointFieldsamplePoints (const pointField &) const
 
void calcMapping () const
 
void calcAMI () const
 
- Static Protected Member Functions inherited from mappedPatchBase
static autoPtr< fileNamereadDatabase (const dictionary &dict)
 
static const objectRegistrysubRegistry (const objectRegistry &obr, const wordList &names, const label index)
 
template<class Type >
static bool writeIOField (const regIOobject &obj, dictionary &dict)
 
template<class Type >
static bool constructIOField (const word &name, token &tok, Istream &is, objectRegistry &obr)
 
- Protected Attributes inherited from mappedPatchBase
const polyPatchpatch_
 
word sampleWorld_
 
word sampleRegion_
 
const sampleMode mode_
 
word samplePatch_
 
const coupleGroupIdentifier coupleGroup_
 
const autoPtr< fileNamesampleDatabasePtr_
 
offsetMode offsetMode_
 
vector offset_
 
vectorField offsets_
 
scalar distance_
 
label communicator_
 
bool sameRegion_
 
autoPtr< mapDistributemapPtr_
 
const bool AMIReverse_
 
autoPtr< AMIPatchToPatchInterpolationAMIPtr_
 
autoPtr< searchableSurfacesurfPtr_
 
dictionary surfDict_
 

Detailed Description

This is a mass-fraction boundary condition for a semi-permeable baffle.

This condition models a baffle which is permeable to a some species and impermeable to others. It must be used in conjunction with the corresponding velocity condition, semiPermeableBaffleVelocityFvPatchVectorField.

The mass flux of a species is calculated as a coefficient multiplied by the difference in mass fraction across the baffle.

\[ \phi_{Yi} = c A (Y_i - Y_{i,n}) \]

where

$ \phi_{Yi} $ = flux of the permeable species [kg/s]
$ c $ = transfer coefficient [kg/m2/s]
$ A $ = patch face area [m2]
$ Y_i $ = mass fraction on the patch []
$ Y_{i,n} $ = mass fraction on the neighbour patch []

A species that the baffle is permable to will, therefore, have a coefficient greater than zero, whilst a species that does not transfer will have a coefficient equal to zero.

This condition calculates the species flux. The fluxes are summed up by the velocity consition to generate the net mass transfer across the baffle. This mass-fraction condition then generates a corrective diffusive flux to ensure that the correct amounts of the permeable species are transferred.

Usage
Property Description Req'd? Default
c Transfer coefficient no 0
phi Name of the flux field no phi
See also
Foam::semiPermeableBaffleVelocityFvPatchVectorField
Source files

Definition at line 123 of file semiPermeableBaffleMassFractionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [1/5]

Definition at line 33 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

References Foam::Zero.

Referenced by semiPermeableBaffleMassFractionFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [2/5]

semiPermeableBaffleMassFractionFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Definition at line 51 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

References dict, p, and Foam::Zero.

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [3/5]

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [4/5]

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [5/5]

Member Function Documentation

◆ TypeName()

TypeName ( "semiPermeableBaffleMassFraction"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

◆ clone() [2/2]

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

◆ phiY()

Foam::tmp< Foam::scalarField > phiY ( ) const

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Reimplemented from mappedPatchBase.

Definition at line 163 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

References os(), fvPatchField::write(), mappedPatchBase::write(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

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