This boundary condition provides a wavePressure condition. This sets the pressure to a value specified by a superposition of wave models. All the wave modelling parameters are obtained from a centrally registered waveSuperposition class. More...
Public Member Functions | |
TypeName ("wavePressure") | |
Runtime type information. More... | |
wavePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
Construct from patch and internal field. More... | |
wavePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given mixedTypeFvPatchField. More... | |
wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &)=delete | |
Disallow copy without setting internal field reference. More... | |
wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Copy constructor setting internal field reference. More... | |
virtual tmp< fvPatchScalarField > | clone (const DimensionedField< scalar, volMesh > &iF) const |
Construct and return a clone setting internal field reference. More... | |
tmp< scalarField > | p () const |
Return the current modelled pressure field on the patch faces. More... | |
tmp< scalarField > | pn () const |
Return the current modelled pressure field in the neighbour cell. More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
This boundary condition provides a wavePressure condition. This sets the pressure to a value specified by a superposition of wave models. All the wave modelling parameters are obtained from a centrally registered waveSuperposition class.
This functions like an outletInlet condition. Faces on which the flow is leaving the domain have a value set by the wave model. Faces on which the flow is entering the domain have the gradient set. This gradient is calculated numerically by evaluating the wave model on both the patch face and the adjacent cell.
Use of this boundary condition triggers a consistent behaviour in the corresponding velocity and phase-fraction conditions.
Property | Description | Req'd? | Default |
---|---|---|---|
U | name of the velocity field | no | U |
rho | name of the density field | no | rho |
Example of the boundary condition specification:
<patchName> { type wavePressure; U U; rho rho; }
Definition at line 95 of file wavePressureFvPatchScalarField.H.
wavePressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 36 of file wavePressureFvPatchScalarField.C.
References Foam::Zero.
Referenced by wavePressureFvPatchScalarField::clone(), and wavePressureFvPatchScalarField::wavePressureFvPatchScalarField().
wavePressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 52 of file wavePressureFvPatchScalarField.C.
References dictionary::found(), scalarField(), fvPatch::size(), wavePressureFvPatchScalarField::wavePressureFvPatchScalarField(), and Foam::Zero.
wavePressureFvPatchScalarField | ( | const wavePressureFvPatchScalarField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< scalar, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given mixedTypeFvPatchField.
onto a new patch
Definition at line 78 of file wavePressureFvPatchScalarField.C.
References wavePressureFvPatchScalarField::wavePressureFvPatchScalarField().
|
delete |
Disallow copy without setting internal field reference.
wavePressureFvPatchScalarField | ( | const wavePressureFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Copy constructor setting internal field reference.
Definition at line 92 of file wavePressureFvPatchScalarField.C.
TypeName | ( | "wavePressure" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 156 of file wavePressureFvPatchScalarField.H.
References wavePressureFvPatchScalarField::p(), wavePressureFvPatchScalarField::pn(), wavePressureFvPatchScalarField::updateCoeffs(), wavePressureFvPatchScalarField::wavePressureFvPatchScalarField(), and wavePressureFvPatchScalarField::write().
Foam::tmp< Foam::scalarField > p | ( | ) | const |
Return the current modelled pressure field on the patch faces.
Definition at line 105 of file wavePressureFvPatchScalarField.C.
References waveSuperposition::height(), Foam::levelSetAverage(), waveSuperposition::New(), waveSuperposition::pGas(), and waveSuperposition::pLiquid().
Referenced by wavePressureFvPatchScalarField::clone(), and wavePressureFvPatchScalarField::updateCoeffs().
Foam::tmp< Foam::scalarField > pn | ( | ) | const |
Return the current modelled pressure field in the neighbour cell.
Definition at line 124 of file wavePressureFvPatchScalarField.C.
References fvMesh::boundary(), primitiveMesh::cellCentres(), f(), waveVelocityFvPatchVectorField::faceCellSubset(), fvMeshSubset::faceMap(), Foam::findIndex(), forAll, waveSuperposition::height(), Foam::levelSetAverage(), waveSuperposition::New(), fvMeshSubset::patchMap(), waveSuperposition::pGas(), waveSuperposition::pLiquid(), polyMesh::points(), tmp< T >::ref(), fvMeshSubset::subMesh(), and Foam::subset().
Referenced by wavePressureFvPatchScalarField::clone(), and wavePressureFvPatchScalarField::updateCoeffs().
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 171 of file wavePressureFvPatchScalarField.C.
References Foam::dimPressure, Foam::exit(), Foam::FatalError, FatalErrorInFunction, wavePressureFvPatchScalarField::p(), wavePressureFvPatchScalarField::pn(), waveVelocityFvPatchVectorField::pName(), Foam::pos0(), and waveVelocityFvPatchVectorField::U().
Referenced by wavePressureFvPatchScalarField::clone().
|
virtual |
Write.
Definition at line 221 of file wavePressureFvPatchScalarField.C.
References Foam::makePatchTypeField(), and Foam::vtkWriteOps::write().
Referenced by wavePressureFvPatchScalarField::clone().