This boundary condition is applied to the flow velocity, to simulate the opening or closure of a baffle due to local pressure or force changes, by merging the behaviours of wall and cyclic conditions. More...
Public Member Functions | |
TypeName ("activePressureForceBaffleVelocity") | |
Runtime type information. More... | |
activePressureForceBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &) | |
Construct from patch and internal field. More... | |
activePressureForceBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping. More... | |
activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &) | |
Construct as copy. More... | |
virtual tmp< fvPatchVectorField > | clone () const |
Construct and return a clone. More... | |
activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchVectorField > | clone (const DimensionedField< vector, volMesh > &iF) const |
Construct and return a clone 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 fvPatchVectorField &, const labelList &) |
Reverse map the given fvPatchField onto this fvPatchField. More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
Private Attributes | |
word | pName_ |
Name of the pressure field used to calculate the force. More... | |
word | cyclicPatchName_ |
Name of the cyclic patch used when the active baffle is open. More... | |
label | cyclicPatchLabel_ |
Index of the cyclic patch used when the active baffle is open. More... | |
label | orientation_ |
Orientation (1 or -1) of the active baffle mode. More... | |
vectorField | initWallSf_ |
Initial wall patch areas. More... | |
vectorField | initCyclicSf_ |
Initial cyclic patch areas. More... | |
vectorField | nbrCyclicSf_ |
Initial neighbour-side cyclic patch areas. More... | |
scalar | openFraction_ |
Current fraction of the active baffle which is open. More... | |
scalar | openingTime_ |
Time taken for the active baffle to open. More... | |
scalar | maxOpenFractionDelta_ |
Maximum fractional change to the active baffle openness. More... | |
label | curTimeIndex_ |
scalar | minThresholdValue_ |
Minimum value for the active baffle to start opening. More... | |
bool | fBased_ |
Force based active baffle. More... | |
bool | baffleActivated_ |
Baffle is activated. More... | |
This boundary condition is applied to the flow velocity, to simulate the opening or closure of a baffle due to local pressure or force changes, by merging the behaviours of wall and cyclic conditions.
The baffle joins two mesh regions, where the open fraction determines the interpolation weights applied to each cyclic- and neighbour-patch contribution. This means that this is boundary condition is meant to be used in an extra wall beyond an existing cyclic patch pair. See PDRMesh for more details.
Once the threshold is crossed, this condition activated and continues to open or close at a fixed rate using
where
![]() | = | baffle open fraction [0-1] |
![]() | = | baffle open fraction on previous evaluation |
![]() | = | sign for orientation: 1 to open or -1 to close |
![]() | = | simulation time step |
![]() | = | time taken to open the baffle |
The open fraction is then applied to scale the patch areas.
Patch usage
Property | Description | Required | Default value |
---|---|---|---|
p | pressure field name | no | p |
cyclicPatch | cyclic patch name | yes | |
orientation | 1 to open or -1 to close | yes | |
openFraction | current open fraction [0-1] | yes | |
openingTime | time taken to open or close the baffle | yes | |
maxOpenFractionDelta | max fraction change per timestep | yes | |
minThresholdValue | minimum absolute pressure or | ||
force difference for activation | yes | ||
forceBased | force (true) or pressure-based (false) activation | yes |
Example of the boundary condition specification:
myPatch { type activePressureForceBaffleVelocity; p p; cyclicPatch cyclic1; orientation 1; openFraction 0.2; openingTime 5.0; maxOpenFractionDelta 0.1; minThresholdValue 0.01; forceBased false; }
Definition at line 177 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
activePressureForceBaffleVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 36 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::clone().
activePressureForceBaffleVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 88 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
activePressureForceBaffleVelocityFvPatchVectorField | ( | const activePressureForceBaffleVelocityFvPatchVectorField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< vector, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping.
Definition at line 61 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
activePressureForceBaffleVelocityFvPatchVectorField | ( | const activePressureForceBaffleVelocityFvPatchVectorField & | ptf | ) |
Construct as copy.
Definition at line 131 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
activePressureForceBaffleVelocityFvPatchVectorField | ( | const activePressureForceBaffleVelocityFvPatchVectorField & | ptf, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 155 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
TypeName | ( | "activePressureForceBaffleVelocity" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 267 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
References activePressureForceBaffleVelocityFvPatchVectorField::activePressureForceBaffleVelocityFvPatchVectorField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 284 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
|
virtual |
Map (and resize as needed) from self given a mapping object.
Note: cannot map field from cyclic patch anyway so just recalculate
Areas should be consistent when doing autoMap except in case of topo changes. ! Note: we don't want to use Sf here since triggers rebuilding of /*! fvMesh::S() which will give problems when mapped (since already on new mesh)
Definition at line 181 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
References Foam::endl(), forAll, Foam::Info, Foam::mag(), and mesh.
|
virtual |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 219 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 243 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
References activePressureForceBaffleVelocityFvPatchVectorField::baffleActivated_, fvPatch::boundaryMesh(), activePressureForceBaffleVelocityFvPatchVectorField::curTimeIndex_, activePressureForceBaffleVelocityFvPatchVectorField::cyclicPatchLabel_, Foam::e, Foam::endl(), polyPatch::faceCells(), activePressureForceBaffleVelocityFvPatchVectorField::fBased_, forAll, Foam::Info, activePressureForceBaffleVelocityFvPatchVectorField::initCyclicSf_, activePressureForceBaffleVelocityFvPatchVectorField::initWallSf_, Foam::mag(), fvPatch::magSf(), Foam::max(), activePressureForceBaffleVelocityFvPatchVectorField::maxOpenFractionDelta_, Foam::min(), activePressureForceBaffleVelocityFvPatchVectorField::minThresholdValue_, activePressureForceBaffleVelocityFvPatchVectorField::nbrCyclicSf_, activePressureForceBaffleVelocityFvPatchVectorField::openFraction_, activePressureForceBaffleVelocityFvPatchVectorField::openingTime_, activePressureForceBaffleVelocityFvPatchVectorField::orientation_, p, fvPatch::patch(), activePressureForceBaffleVelocityFvPatchVectorField::pName_, fvPatch::Sf(), and timeIndex.
|
virtual |
Write.
Definition at line 354 of file activePressureForceBaffleVelocityFvPatchVectorField.C.
References token::END_STATEMENT, Foam::nl, fvPatchField::write(), and Ostream::writeKeyword().
|
private |
Name of the pressure field used to calculate the force.
on the active baffle
Definition at line 185 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Name of the cyclic patch used when the active baffle is open.
Definition at line 188 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
|
private |
Index of the cyclic patch used when the active baffle is open.
Definition at line 191 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Orientation (1 or -1) of the active baffle mode.
Used to change the direction of opening or closing the baffle
Definition at line 195 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Initial wall patch areas.
Definition at line 198 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Initial cyclic patch areas.
Definition at line 201 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Initial neighbour-side cyclic patch areas.
Definition at line 204 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Current fraction of the active baffle which is open.
Definition at line 207 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Time taken for the active baffle to open.
Definition at line 210 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Maximum fractional change to the active baffle openness.
per time-step
Definition at line 214 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Definition at line 216 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Minimum value for the active baffle to start opening.
Definition at line 219 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Force based active baffle.
Definition at line 222 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
|
private |
Baffle is activated.
Definition at line 225 of file activePressureForceBaffleVelocityFvPatchVectorField.H.
Referenced by activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.