semiPermeableBaffleMassFractionFvPatchScalarField Class Reference

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

Inheritance diagram for semiPermeableBaffleMassFractionFvPatchScalarField:
Collaboration diagram for semiPermeableBaffleMassFractionFvPatchScalarField:

Public Member Functions

 TypeName ("semiPermeableBaffleMassFraction")
 Runtime type information. More...
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given fixedValueTypeFvPatchField. More...
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 semiPermeableBaffleMassFractionFvPatchScalarField (const semiPermeableBaffleMassFractionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual tmp< scalarFieldcalcPhiYp () const
 Return the flux of this species through the baffle. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from mappedPatchBase
 TypeName ("mappedPatchBase")
 Runtime type information. More...
 
 mappedPatchBase (const polyPatch &)
 Construct from patch. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vectorField &offsets)
 Construct with offsetMode=non-uniform. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const vector &offset)
 Construct from offsetMode=uniform. More...
 
 mappedPatchBase (const polyPatch &pp, const word &sampleRegion, const sampleMode sampleMode, const word &samplePatch, const scalar distance)
 Construct from offsetMode=normal and distance. More...
 
 mappedPatchBase (const polyPatch &, const dictionary &)
 Construct from dictionary. More...
 
 mappedPatchBase (const polyPatch &, const sampleMode, const dictionary &)
 Construct from dictionary and (collocated) sample mode. More...
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &)
 Construct as copy, resetting patch. More...
 
 mappedPatchBase (const polyPatch &, const mappedPatchBase &, const labelUList &mapAddressing)
 Construct as copy, resetting patch, map original data. More...
 
virtual ~mappedPatchBase ()
 Destructor. More...
 
void clearOut ()
 
const sampleModemode () const
 What to sample. More...
 
const wordsampleRegion () const
 Region to sample. More...
 
const wordsamplePatch () const
 Patch (only if NEARESTPATCHFACE) More...
 
const wordcoupleGroup () const
 PatchGroup (only if NEARESTPATCHFACE) More...
 
label sampleSize () const
 Return size of mapped mesh/patch/boundary. More...
 
const vectoroffset () const
 Offset vector (from patch faces to destination mesh objects) More...
 
const vectorFieldoffsets () const
 Offset vector (from patch faces to destination mesh objects) More...
 
bool sameRegion () const
 Cached sampleRegion != mesh.name() More...
 
const mapDistributemap () const
 Return reference to the parallel distribution map. More...
 
const AMIInterpolationAMI (const bool forceUpdate=false) const
 Return reference to the AMI interpolator. More...
 
const autoPtr< Foam::searchableSurface > & surfPtr () const
 Return a pointer to the AMI projection surface. More...
 
const polyMeshsampleMesh () const
 Get the region mesh. More...
 
const polyPatchsamplePolyPatch () const
 Get the patch on the region. More...
 
tmp< pointFieldsamplePoints () const
 Get the sample points. More...
 
template<class Type >
void distribute (List< Type > &lst) const
 Wrapper around map/interpolate data distribution. More...
 
template<class Type , class CombineOp >
void distribute (List< Type > &lst, const CombineOp &cop) const
 Wrapper around map/interpolate data distribution with operation. More...
 
template<class Type >
void reverseDistribute (List< Type > &lst) const
 Wrapper around map/interpolate data distribution. More...
 
template<class Type , class CombineOp >
void reverseDistribute (List< Type > &lst, const CombineOp &cop) const
 Wrapper around map/interpolate data distribution with operation. More...
 
- Public Member Functions inherited from specieTransferMassFractionFvPatchScalarField
 specieTransferMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 specieTransferMassFractionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 specieTransferMassFractionFvPatchScalarField (const specieTransferMassFractionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given fixedValueTypeFvPatchField. More...
 
 specieTransferMassFractionFvPatchScalarField (const specieTransferMassFractionFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 specieTransferMassFractionFvPatchScalarField (const specieTransferMassFractionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual const scalarFieldphiYp () const
 Return the flux of this species. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 

Additional Inherited Members

- Public Types inherited from mappedPatchBase
enum  sampleMode {
  NEARESTCELL, NEARESTPATCHFACE, NEARESTPATCHFACEAMI, NEARESTPATCHPOINT,
  NEARESTFACE, NEARESTONLYCELL
}
 Mesh items to sample. More...
 
enum  offsetMode { UNIFORM, NONUNIFORM, NORMAL }
 How to project face centres. More...
 
typedef Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
 Helper class for finding nearest. More...
 
- Public Types inherited from specieTransferMassFractionFvPatchScalarField
enum  property { massFraction, moleFraction, molarConcentration, partialPressure }
 Enumeration for the property driving the transfer. More...
 
- Static Public Member Functions inherited from mappedPatchBase
static pointIndexHit facePoint (const polyMesh &, const label facei, const polyMesh::cellDecomposition)
 Get a point on the face given a face decomposition method: More...
 
- Static Public Member Functions inherited from specieTransferMassFractionFvPatchScalarField
static const basicSpecieMixturecomposition (const objectRegistry &db)
 Access the composition for the given database. More...
 
- Static Public Attributes inherited from mappedPatchBase
static const NamedEnum< sampleMode, 6 > sampleModeNames_
 
static const NamedEnum< offsetMode, 3 > offsetModeNames_
 
- Static Public Attributes inherited from specieTransferMassFractionFvPatchScalarField
static const NamedEnum< property, 4 > propertyNames_
 Property type names. More...
 
- Protected Member Functions inherited from mappedPatchBase
tmp< pointFieldfacePoints (const polyPatch &) const
 Get the points from face-centre-decomposition face centres. More...
 
void collectSamples (const pointField &facePoints, pointField &, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
 Collect single list of samples and originating processor+face. More...
 
void findSamples (const sampleMode mode, const pointField &, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
 Find cells/faces containing samples. More...
 
tmp< pointFieldsamplePoints (const pointField &) const
 Get the sample points given the face points. More...
 
void calcMapping () const
 Calculate mapping. More...
 
void calcAMI () const
 Calculate AMI interpolator. More...
 
- Static Protected Member Functions inherited from mappedPatchBase
static tmp< pointFieldreadListOrField (const word &keyword, const dictionary &dict, const label size)
 Helper to read field or non-uniform list from dictionary. More...
 
- Protected Attributes inherited from mappedPatchBase
const polyPatchpatch_
 Patch to sample. More...
 
word sampleRegion_
 Region to sample. More...
 
const sampleMode mode_
 What to sample. More...
 
word samplePatch_
 Patch (if in sampleMode NEARESTPATCH*) More...
 
const coupleGroupIdentifier coupleGroup_
 PatchGroup (if in sampleMode NEARESTPATCH*) More...
 
offsetMode offsetMode_
 How to obtain samples. More...
 
vector offset_
 Offset vector (uniform) More...
 
vectorField offsets_
 Offset vector (nonuniform) More...
 
scalar distance_
 Offset distance (normal) More...
 
bool sameRegion_
 Same region. More...
 
autoPtr< mapDistributemapPtr_
 Communication schedule: More...
 
autoPtr< AMIInterpolationAMIPtr_
 Pointer to AMI interpolator. More...
 
const bool AMIReverse_
 Flag to indicate that slave patch should be reversed for AMI. More...
 
autoPtr< searchableSurfacesurfPtr_
 Pointer to projection surface employed by AMI interpolator. More...
 
dictionary surfDict_
 Dictionary storing projection surface description. More...
 
- Protected Attributes inherited from specieTransferMassFractionFvPatchScalarField
const scalar c_
 Transfer coefficient. More...
 
const property property_
 Property driving the transfer. More...
 

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 a specieTransferVelocityFvPatchVectorField velocity condition, and a specieTransferTemperatureFvPatchScalarField temperature condition.

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

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

where

$ \phi_{Yi} $ = Flux of the permeable specie [kg/s]
$ c $ = Transfer coefficient [kg/m^2/s/<property-dimensions>]
$ A $ = Patch face area [m^2]
$ \psi_i $ = Property on the patch [<property-dimensions>]
$ \psi_{i,n} $ = Property on the neighbour patch [<property-dimensions>]

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

Usage
Property Description Req'd? Default
c Transfer coefficient no 0
property Property used to drive the transfer; massFraction, moleFraction, molarConcentration, or partialPressure if c is non-zero
phi Name of the flux field no phi
U Name of the velocity field no U

Example of the boundary condition specification:

    <patchName>
    {
        type            semiPermeableBaffleMassFraction;
        property        molarConcentration;
        c               1e-3;
        value           $internalField;
    }
See also
Foam::specieTransferMassFractionFvPatchScalarField Foam::specieTransferVelocityFvPatchVectorField Foam::specieTransferTemperatureFvPatchScalarField
Source files

Definition at line 144 of file semiPermeableBaffleMassFractionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [1/5]

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 50 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

References semiPermeableBaffleMassFractionFvPatchScalarField::semiPermeableBaffleMassFractionFvPatchScalarField().

Here is the call graph for this function:

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [3/5]

Construct by mapping given fixedValueTypeFvPatchField.

onto a new patch

Definition at line 63 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

References semiPermeableBaffleMassFractionFvPatchScalarField::semiPermeableBaffleMassFractionFvPatchScalarField().

Here is the call graph for this function:

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [4/5]

Disallow copy without setting internal field reference.

◆ semiPermeableBaffleMassFractionFvPatchScalarField() [5/5]

Copy constructor setting internal field reference.

Definition at line 77 of file semiPermeableBaffleMassFractionFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "semiPermeableBaffleMassFraction"  )

Runtime type information.

◆ clone()

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

◆ calcPhiYp()

◆ write()

void write ( Ostream os) const
virtual

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