This boundary condition provides a waveVelocity condition. This sets the velocity to that 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 ("waveVelocity") | |
Runtime type information. More... | |
waveVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &) | |
Construct from patch and internal field. More... | |
waveVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
waveVelocityFvPatchVectorField (const waveVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given mixedTypeFvPatchField onto a new patch. More... | |
waveVelocityFvPatchVectorField (const waveVelocityFvPatchVectorField &)=delete | |
Disallow copy without setting internal field reference. More... | |
waveVelocityFvPatchVectorField (const waveVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &) | |
Copy constructor setting internal field reference. More... | |
virtual tmp< fvPatchVectorField > | clone (const DimensionedField< vector, volMesh > &iF) const |
Construct and return a clone setting internal field reference. More... | |
const word & | pName () const |
Access the name of the pressure field. More... | |
const fvMeshSubset & | faceCellSubset () const |
Access the face-cell subset. More... | |
tmp< vectorField > | U () const |
Return the current modelled velocity field on the patch faces. More... | |
tmp< vectorField > | Un () const |
Return the current modelled velocity 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 waveVelocity condition. This sets the velocity to that specified by a superposition of wave models. All the wave modelling parameters are obtained from a centrally registered waveSuperposition class.
Flow reversal will occur in the event that the amplitude of the velocity oscillation is greater than the mean flow. This triggers special handling, the form of which depends on the inletOutlet flag and whether a wave pressure condition is being used.
If a wave pressure condition is not being used, and inletOutlet is false, then this is a standard fixed value condition, with the value supplied by the wave model. If flow reversal occurs this state may be unstable. The corresponding pressure condition should be fixedFluxPressure.
If a wave pressure condition is not being used, and inletOutlet is true or not specified then the proportion of the patch over which the flow is reversed functions in a manner similar to the flowRateOutletVelocity condition; i.e., the velocity is extrapolated and then scaled to match the required outlet flow rate. Numerically, this is still a fixedValue constraint on the normal velocity, just one which tends to avoid instability. Again, the corresponding pressure condition should be fixedFluxPressure.
If a wave pressure condition is being used, then the normal velocity condition becomes fixedGradient on outlet faces. This gradient is calculated numerically by evaluating the wave model on both the patch face and the adjacent cell. The pressure boundary in this case should be a wavePressure condition. This will do the opposite; it will fix the pressure value on outlet faces, and the gradient otherwise.
Property | Description | Req'd? | Default |
---|---|---|---|
phi | Name of the flux field | no | phi |
p | Name of the pressure field | no | p |
inletOutlet | does the condition behave like inletOutlet | no | true |
ramp | ramping function for the mean flow speed | no | None |
Example of the boundary condition specification:
<patchName> { type waveVelocity; phi phi; p p; inletOutlet yes; ramp constant 1; }
Definition at line 129 of file waveVelocityFvPatchVectorField.H.
waveVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 36 of file waveVelocityFvPatchVectorField.C.
References Foam::Zero.
Referenced by waveVelocityFvPatchVectorField::clone(), and waveVelocityFvPatchVectorField::waveVelocityFvPatchVectorField().
waveVelocityFvPatchVectorField | ( | const fvPatch & | p, |
const DimensionedField< vector, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 55 of file waveVelocityFvPatchVectorField.C.
References dictionary::found(), fvPatch::size(), vectorField(), waveVelocityFvPatchVectorField::waveVelocityFvPatchVectorField(), and Foam::Zero.
waveVelocityFvPatchVectorField | ( | const waveVelocityFvPatchVectorField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< vector, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given mixedTypeFvPatchField onto a new patch.
Definition at line 84 of file waveVelocityFvPatchVectorField.C.
References waveVelocityFvPatchVectorField::waveVelocityFvPatchVectorField().
|
delete |
Disallow copy without setting internal field reference.
waveVelocityFvPatchVectorField | ( | const waveVelocityFvPatchVectorField & | ptf, |
const DimensionedField< vector, volMesh > & | iF | ||
) |
Copy constructor setting internal field reference.
Definition at line 101 of file waveVelocityFvPatchVectorField.C.
TypeName | ( | "waveVelocity" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 198 of file waveVelocityFvPatchVectorField.H.
References waveVelocityFvPatchVectorField::waveVelocityFvPatchVectorField().
|
inline |
Access the name of the pressure field.
Definition at line 214 of file waveVelocityFvPatchVectorField.H.
References waveVelocityFvPatchVectorField::faceCellSubset(), waveVelocityFvPatchVectorField::U(), waveVelocityFvPatchVectorField::Un(), waveVelocityFvPatchVectorField::updateCoeffs(), and waveVelocityFvPatchVectorField::write().
Referenced by wavePressureFvPatchScalarField::updateCoeffs(), and waveAlphaFvPatchScalarField::updateCoeffs().
const Foam::fvMeshSubset & faceCellSubset | ( | ) | const |
Access the face-cell subset.
Definition at line 118 of file waveVelocityFvPatchVectorField.C.
References polyMesh::changing(), mesh, fvMesh::time(), timeIndex, and TimeState::timeIndex().
Referenced by waveAlphaFvPatchScalarField::alphan(), wavePressureFvPatchScalarField::pn(), waveVelocityFvPatchVectorField::pName(), and waveVelocityFvPatchVectorField::Un().
Foam::tmp< Foam::vectorField > U | ( | ) | const |
Return the current modelled velocity field on the patch faces.
Definition at line 143 of file waveVelocityFvPatchVectorField.C.
References waveSuperposition::height(), Foam::levelSetAverage(), waveSuperposition::New(), waveSuperposition::UGas(), and waveSuperposition::ULiquid().
Referenced by waveVelocityFvPatchVectorField::pName(), wavePressureFvPatchScalarField::updateCoeffs(), waveAlphaFvPatchScalarField::updateCoeffs(), and waveVelocityFvPatchVectorField::updateCoeffs().
Foam::tmp< Foam::vectorField > Un | ( | ) | const |
Return the current modelled velocity field in the neighbour cell.
Definition at line 162 of file waveVelocityFvPatchVectorField.C.
References fvMesh::boundary(), primitiveMesh::cellCentres(), f(), waveVelocityFvPatchVectorField::faceCellSubset(), fvMeshSubset::faceMap(), Foam::findIndex(), forAll, waveSuperposition::height(), Foam::levelSetAverage(), waveSuperposition::New(), fvMeshSubset::patchMap(), polyMesh::points(), tmp< T >::ref(), fvMeshSubset::subMesh(), Foam::subset(), waveSuperposition::UGas(), and waveSuperposition::ULiquid().
Referenced by waveVelocityFvPatchVectorField::pName(), and waveVelocityFvPatchVectorField::updateCoeffs().
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 204 of file waveVelocityFvPatchVectorField.C.
References Foam::evaluate(), Foam::gSum(), SymmTensor< scalar >::I, Foam::pos0(), Foam::sqr(), waveVelocityFvPatchVectorField::U(), waveVelocityFvPatchVectorField::Un(), and waveVelocityFvPatchVectorField::write().
Referenced by waveVelocityFvPatchVectorField::pName().
|
virtual |
Write.
Definition at line 271 of file waveVelocityFvPatchVectorField.C.
References Foam::makePatchTypeField(), and Foam::vtkWriteOps::write().
Referenced by waveVelocityFvPatchVectorField::pName(), and waveVelocityFvPatchVectorField::updateCoeffs().