Go to the documentation of this file.
41 fixedValueFvPatchVectorField(
p, iF),
44 cyclicPatchLabel_(-1),
51 maxOpenFractionDelta_(0),
65 fixedValueFvPatchVectorField(ptf,
p, iF, mapper),
88 fixedValueFvPatchVectorField(
p, iF),
89 pName_(
dict.lookupOrDefault<
word>(
"p",
"p")),
90 cyclicPatchName_(
dict.lookup(
"cyclicPatch")),
91 cyclicPatchLabel_(
p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
94 initCyclicSf_(
p.boundaryMesh()[cyclicPatchLabel_].Sf()),
97 refCast<const cyclicFvPatch>
99 p.boundaryMesh()[cyclicPatchLabel_]
100 ).neighbFvPatch().Sf()
104 maxOpenFractionDelta_(
readScalar(
dict.lookup(
"maxOpenFractionDelta"))),
107 fvPatchVectorField::operator=(vector::zero);
117 fixedValueFvPatchVectorField(ptf),
139 fixedValueFvPatchVectorField(ptf, iF),
161 fixedValueFvPatchVectorField::autoMap(m);
169 const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
170 initWallSf_ = patch().patchSlice(areas);
171 initCyclicSf_ = patch().boundaryMesh()
175 nbrCyclicSf_ = refCast<const cyclicFvPatch>
181 ).neighbFvPatch().patch().patchSlice(areas);
191 fixedValueFvPatchVectorField::rmap(ptf, addr);
194 const vectorField& areas = patch().boundaryMesh().mesh().faceAreas();
195 initWallSf_ = patch().patchSlice(areas);
196 initCyclicSf_ = patch().boundaryMesh()
200 nbrCyclicSf_ = refCast<const cyclicFvPatch>
206 ).neighbFvPatch().patch().patchSlice(areas);
226 const labelList& cyclicFaceCells = cyclicPatch.patch().faceCells();
227 const fvPatch& nbrPatch = refCast<const cyclicFvPatch>
233 scalar forceDiff = 0;
236 forAll(cyclicFaceCells, facei)
242 forAll(nbrFaceCells, facei)
270 Sfw[facei] = newSfw[facei];
278 mag(cyclicPatch.Sf());
288 fixedValueFvPatchVectorField::updateCoeffs();
295 writeEntryIfDifferent<word>(os,
"p",
"p", pName_);
306 writeEntryIfDifferent<word>(os,
"p",
"p", pName_);
307 writeEntry(
"value", os);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
const vectorField & Sf() const
Return face area vectors.
scalar maxOpenFractionDelta_
Maximum fractional change to the active baffle openness.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
scalar openFraction_
Current fraction of the active baffle which is open.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar sign(const dimensionedScalar &ds)
vectorField initCyclicSf_
Initial this-side cyclic patch areas.
virtual void write(Ostream &) const
Write.
label orientation_
Orientation (1 or -1) of the active baffle patch.
const fvBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Pre-declare related SubField type.
Pre-declare SubField and related Field type.
vectorField initWallSf_
Initial wall patch areas.
activeBaffleVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
word cyclicPatchName_
Name of the cyclic patch used when the active baffle is open.
scalar openingTime_
Time taken for the active baffle to open.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Macros for easy insertion into run-time selection tables.
const labelUList & faceCells() const
Return face-cell addressing.
const double e
Elementary charge.
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
vectorField nbrCyclicSf_
Initial neighbour-side cyclic patch areas.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
This velocity boundary condition simulates the opening of a baffle due to local flow conditions,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
label cyclicPatchLabel_
Index of the cyclic patch used when the active baffle is open.
label readLabel(Istream &is)
const polyPatch & patch() const
Return the polyPatch.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const scalarField & magSf() const
Return face area magnitudes.
Generic GeometricField class.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word pName_
Name of the pressure field used to calculate the force.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...