This velocity boundary condition simulates the opening of a baffle due to local flow conditions, 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. More...
Public Member Functions | |
TypeName ("activeBaffleVelocity") | |
Runtime type information. More... | |
activeBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given activeBaffleVelocityFvPatchVectorField. More... | |
activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &)=delete | |
Disallow copy without setting internal field reference. More... | |
activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &) | |
Copy constructor 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 | map (const fvPatchVectorField &, const fvPatchFieldMapper &) |
Map the given fvPatchField onto this fvPatchField. More... | |
virtual void | reset (const fvPatchVectorField &) |
Reset the fvPatchField to the given fvPatchField. More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
This velocity boundary condition simulates the opening of a baffle due to local flow conditions, 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.
We determine whether the baffle is opening or closing from the sign of the net force across the baffle, from which the baffle open fraction is updated using:
where
= | baffle open fraction [0-1] | |
= | baffle open fraction on previous evaluation | |
= | simulation time step | |
= | time taken to open the baffle | |
= | net force across the baffle |
The open fraction is then applied to scale the patch areas.
Property | Description | Required | Default value |
---|---|---|---|
p | pressure field name | no | p |
cyclicPatch | cyclic patch name | yes | |
orientation | 1 or -1 used to switch flow direction | yes | |
openFraction | current patch open fraction [0-1] | yes | |
openingTime | time taken to open the baffle | yes | |
maxOpenFractionDelta | max open fraction change per timestep | yes |
Example of the boundary condition specification:
<patchName> { type activeBaffleVelocity; p p; cyclicPatch cyclic1; orientation 1; openFraction 0.2; openingTime 5.0; maxOpenFractionDelta 0.1; }
Definition at line 157 of file activeBaffleVelocityFvPatchVectorField.H.
activeBaffleVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 34 of file activeBaffleVelocityFvPatchVectorField.C.
References fvPatchField< Type >::operator=(), and Foam::Zero.
Referenced by activeBaffleVelocityFvPatchVectorField::clone().
activeBaffleVelocityFvPatchVectorField | ( | const activeBaffleVelocityFvPatchVectorField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< vector, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given activeBaffleVelocityFvPatchVectorField.
onto a new patch
Definition at line 65 of file activeBaffleVelocityFvPatchVectorField.C.
|
delete |
Disallow copy without setting internal field reference.
activeBaffleVelocityFvPatchVectorField | ( | const activeBaffleVelocityFvPatchVectorField & | ptf, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Copy constructor setting internal field reference.
Definition at line 89 of file activeBaffleVelocityFvPatchVectorField.C.
TypeName | ( | "activeBaffleVelocity" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 240 of file activeBaffleVelocityFvPatchVectorField.H.
References activeBaffleVelocityFvPatchVectorField::activeBaffleVelocityFvPatchVectorField().
|
virtual |
Map the given fvPatchField onto this fvPatchField.
Note: cannot map field from cyclic patch anyway so just recalculate
Areas should be consistent when doing map 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 113 of file activeBaffleVelocityFvPatchVectorField.C.
|
virtual |
Reset the fvPatchField to the given fvPatchField.
Used for mesh to mesh mapping
Definition at line 144 of file activeBaffleVelocityFvPatchVectorField.C.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 168 of file activeBaffleVelocityFvPatchVectorField.C.
References fvPatch::boundaryMesh(), Foam::e, Foam::endl(), polyPatch::faceCells(), forAll, Foam::Info, Foam::mag(), fvPatch::magSf(), Foam::max(), Foam::min(), p, fvPatch::patch(), fvPatch::Sf(), Foam::sign(), and timeIndex.
|
virtual |
Write.
Definition at line 250 of file activeBaffleVelocityFvPatchVectorField.C.
References fvPatchField< Type >::write(), and Foam::writeEntry().