43 mixedFvPatchScalarField(p, iF),
61 mixedFvPatchScalarField(p, iF),
66 if (dict.
found(
"value"))
72 fvPatchScalarField::operator=(patchInternalField());
89 mixedFvPatchScalarField(ptf, p, iF, mapper),
92 inletOutlet_(ptf.inletOutlet_)
101 mixedFvPatchScalarField(ptf),
103 liquid_(ptf.liquid_),
104 inletOutlet_(ptf.inletOutlet_)
113 mixedFvPatchScalarField(ptf, iF),
115 liquid_(ptf.liquid_),
116 inletOutlet_(ptf.inletOutlet_)
124 const scalar t = db().time().timeOutputValue();
131 waves.
height(t, patch().Cf()),
132 waves.
height(t, patch().patch().localPoints()),
140 const scalar t = db().time().timeOutputValue();
143 refCast<const waveVelocityFvPatchVectorField>
170 const label fs = is + meshs.
boundary()[patchis].patch().start();
173 const label i = patch().patch().whichFace(f);
174 result[i] = alphas[cs];
192 if (!isA<waveVelocityFvPatchVectorField>(Up))
195 <<
"The corresponding condition for the velocity " 196 <<
"field " << UName_ <<
" on patch " << patch().name()
197 <<
" is not of type " << waveVelocityFvPatchVectorField::typeName
202 refCast<const waveVelocityFvPatchVectorField>(Up);
207 if (isA<wavePressureFvPatchScalarField>(pp))
212 valueFraction() = out;
214 refGrad() = (
alpha -
alphan)*patch().deltaCoeffs();
218 refValue() =
alpha();
226 valueFraction() = 1 - out;
234 mixedFvPatchScalarField::updateCoeffs();
244 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
245 writeEntryIfDifferent<Switch>(os,
"inletOutlet",
true, inletOutlet_);
246 writeEntryIfDifferent<Switch>(os,
"liquid",
true, liquid_);
A wrapper around a list of wave models. Superimposes the modelled values of elevation and velocity...
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fvMeshSubset & faceCellSubset() const
Access the face-cell subset.
tmp< scalarField > alpha() const
Return the current modelled phase fraction field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
tmp< scalarField > levelSetFraction(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const bool above)
Calculate the volume-fraction that a level set occupies. This gives the.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
This boundary condition provides a waveAlpha condition. This sets the phase fraction to that specifie...
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/any.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
virtual const pointField & points() const
Return raw points.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual tmp< scalarField > height(const scalar t, const vectorField &p) const
Get the height above the waves at a given time and global positions.
const word & pName() const
Access the name of the pressure field.
A class for handling words, derived from string.
virtual void write(Ostream &) const
Write.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
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
static const waveSuperposition & New(const objectRegistry &db)
Return a reference to the wave model on the given database,.
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
volScalarField scalarField(fieldObject, mesh)
dimensionedScalar pos0(const dimensionedScalar &ds)
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,.
waveAlphaFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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.
tmp< scalarField > alphan() const
Return the current modelled phase fraction field in the.
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.