41 mixedFvPatchScalarField(p, iF),
47 valueFraction() =
Zero;
58 mixedFvPatchScalarField(p, iF),
62 if (dict.
found(
"value"))
68 fvPatchScalarField::operator=(patchInternalField());
73 valueFraction() =
Zero;
85 mixedFvPatchScalarField(ptf, p, iF, mapper),
87 rhoName_(ptf.rhoName_)
96 mixedFvPatchScalarField(ptf),
98 rhoName_(ptf.rhoName_)
108 mixedFvPatchScalarField(ptf, iF),
110 rhoName_(ptf.rhoName_)
118 const scalar t = db().time().timeOutputValue();
125 waves.
height(t, patch().Cf()),
126 waves.
height(t, patch().patch().localPoints()),
127 waves.
pGas(t, patch().Cf())(),
128 waves.
pGas(t, patch().patch().localPoints())(),
129 waves.
pLiquid(t, patch().Cf())(),
130 waves.
pLiquid(t, patch().patch().localPoints())()
137 const scalar t = db().time().timeOutputValue();
140 refCast<const waveVelocityFvPatchVectorField>
170 const label fs = is + meshs.
boundary()[patchis].patch().start();
173 const label i = patch().patch().whichFace(f);
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);
204 if (Uwp.
pName() != internalField().name())
207 <<
"The corresponding condition for the velocity " 208 <<
"field " << UName_ <<
" on patch " << patch().name()
209 <<
" does not have the pressure set to " << internalField().name()
216 valueFraction() = out;
218 refGrad() = (p -
pn)*patch().deltaCoeffs();
228 mixedFvPatchScalarField::updateCoeffs();
235 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
236 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
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.
virtual tmp< scalarField > pLiquid(const scalar t, const vectorField &p) const
Get the liquid pressure at a given time and global positions.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
tmp< scalarField > p() const
Return the current modelled pressure field on the patch faces.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
virtual tmp< scalarField > pGas(const scalar t, const vectorField &p) const
Get the gas pressure at a given time and global positions.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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 dimensionSet dimPressure
const vectorField & cellCentres() const
static const waveSuperposition & New(const objectRegistry &db)
Return a reference to the wave model on the given database,.
virtual void write(Ostream &) const
Write.
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)
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,.
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...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
ListType subset(const UList< T > &select, const T &value, const ListType &)
Extract elements of List when select is a certain value.
wavePressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
tmp< scalarField > pn() const
Return the current modelled pressure field in the neighbour cell.
A class for managing temporary objects.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
This boundary condition provides a wavePressure condition. This sets the pressure to a value specifie...
tmp< vectorField > U() const
Return the current modelled velocity field on the patch faces.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.