41 directionMixedFvPatchVectorField(p, iF),
46 faceCellSubset_(
nullptr),
47 faceCellSubsetTimeIndex_(-1)
51 valueFraction() =
Zero;
62 directionMixedFvPatchVectorField(p, iF),
67 faceCellSubset_(
nullptr),
68 faceCellSubsetTimeIndex_(-1)
70 if (dict.
found(
"value"))
76 fvPatchVectorField::operator=(patchInternalField());
81 valueFraction() =
Zero;
93 directionMixedFvPatchVectorField(ptf, p, iF, mapper),
94 phiName_(ptf.phiName_),
96 inletOutlet_(ptf.inletOutlet_),
98 faceCellSubset_(
nullptr),
99 faceCellSubsetTimeIndex_(-1)
108 directionMixedFvPatchVectorField(ptf),
109 phiName_(ptf.phiName_),
111 inletOutlet_(ptf.inletOutlet_),
113 faceCellSubset_(
nullptr),
114 faceCellSubsetTimeIndex_(-1)
124 directionMixedFvPatchVectorField(ptf, iF),
125 phiName_(ptf.phiName_),
127 inletOutlet_(ptf.inletOutlet_),
129 faceCellSubset_(
nullptr),
130 faceCellSubsetTimeIndex_(-1)
139 const fvMesh&
mesh = patch().boundaryMesh().mesh();
144 !faceCellSubset_.valid()
149 faceCellSubset_->setCellSubset(patch().faceCells());
155 faceCellSubset_->subMesh().tetBasePtIs();
158 return faceCellSubset_();
164 const scalar t = db().time().timeOutputValue();
170 waves_.
height(t, patch().Cf()),
171 waves_.
height(t, patch().patch().localPoints()),
172 waves_.
UGas(t, patch().Cf())(),
173 waves_.
UGas(t, patch().patch().localPoints())(),
174 waves_.
ULiquid(t, patch().Cf())(),
175 waves_.
ULiquid(t, patch().patch().localPoints())()
182 const scalar t = db().time().timeOutputValue();
209 const label fs = is + meshs.
boundary()[patchis].patch().start();
212 const label i = patch().patch().whichFace(f);
231 if (isA<wavePressureFvPatchScalarField>(pp))
241 refGrad() = (
U -
Un)*patch().deltaCoeffs();
255 refValue() = (1 - out)*U;
262 const scalar QPhip =
gSum(out*phip);
263 const scalar QWave =
gSum(out*(U & patch().Sf()));
267 refValue() += out*(QWave/QPhip)*phip*nBySf;
271 refValue() += out*QWave*nBySf;
273 valueFraction() += out*
sqr(patch().nf());
282 directionMixedFvPatchVectorField::updateCoeffs();
283 directionMixedFvPatchVectorField::evaluate();
293 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
294 writeEntryIfDifferent<word>(os,
"p",
"p", pName_);
295 writeEntryIfDifferent<Switch>(os,
"inletOutlet",
true, inletOutlet_);
bool changing() const
Is mesh changing (topology changing and/or moving)
const labelList & patchMap() const
Return patch map.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
tmp< vectorField > UGas(const scalar t, const vectorField &p) const
Get the gas velocity at a given time and global positions.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void write(Ostream &) const
Write.
waveVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
const fvMeshSubset & faceCellSubset() const
Access the face-cell subset.
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.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void write(Ostream &) const
Write.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< vectorField > ULiquid(const scalar t, const vectorField &p) const
Get the liquid velocity at a given time and global positions.
volVectorField vectorField(fieldObject, mesh)
const Time & time() const
Return the top-level database.
Macros for easy insertion into run-time selection tables.
virtual const pointField & points() const
Return raw points.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
tmp< scalarField > height(const scalar t, const vectorField &p) const
Get the height above the waves at a given time and global positions.
Type gSum(const FieldField< Field, Type > &f)
static const SymmTensor I
A class for handling words, derived from string.
Foam::fvPatchFieldMapper.
const labelList & faceMap() const
Return face map.
This boundary condition provides a waveVelocity condition. This sets the velocity to that specified b...
const vectorField & cellCentres() const
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pos0(const dimensionedScalar &ds)
tmp< Field< Type > > levelSetAverage(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const Field< Type > &positiveC, const Field< Type > &positiveP, const Field< Type > &negativeC, const Field< Type > &negativeP)
Calculate the average value of two fields, one on each side of a level set.
Post-processing mesh subset tool. Given the original mesh and the list of selected cells...
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
tmp< vectorField > Un() const
Return the current modelled velocity field in the neighbour cell.
label timeIndex() const
Return current time index.
const fvMesh & subMesh() const
Return reference to subset mesh.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
tmp< vectorField > U() const
Return the current modelled velocity field on the patch faces.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.