This boundary condition provides a waveAlpha condition. This sets the phase fraction to that specified by a superposition of wave models. All the parameters are looked up from the corresponding velocity condition. More...
Public Member Functions | |
TypeName ("waveAlpha") | |
Runtime type information. More... | |
waveAlphaFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
Construct from patch and internal field. More... | |
waveAlphaFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
waveAlphaFvPatchScalarField (const waveAlphaFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given mixedTypeFvPatchField onto a new patch. More... | |
waveAlphaFvPatchScalarField (const waveAlphaFvPatchScalarField &) | |
Construct as copy. More... | |
virtual tmp< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
waveAlphaFvPatchScalarField (const waveAlphaFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy 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... | |
bool | liquid () const |
Access the liquid flag. More... | |
tmp< scalarField > | alpha () const |
Return the current modelled phase fraction field. More... | |
tmp< scalarField > | alphan () const |
Return the current modelled phase fraction field in the. 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 waveAlpha condition. This sets the phase fraction to that specified by a superposition of wave models. All the parameters are looked up from the corresponding velocity condition.
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, the inletOutlet switches between a fixedValue and an inletOutlet condition, with the value given by the wave model. If fixedValue, the result may be more accurate, but it might also be unstable.
If a wave pressure condition is being used, then the normal phase fraction 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.
Property | Description | Req'd? | Default |
---|---|---|---|
U | name of the velocity field | no | U |
liquid | is the alpha field that of the liquid | no | true |
inletOutlet | does the condition behave like inletOutlet | no | true |
Example of the boundary condition specification:
<patchName> { type waveAlpha; U U; inletOutlet true; }
Definition at line 103 of file waveAlphaFvPatchScalarField.H.
waveAlphaFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 38 of file waveAlphaFvPatchScalarField.C.
References Foam::Zero.
Referenced by waveAlphaFvPatchScalarField::clone(), and waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().
waveAlphaFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 55 of file waveAlphaFvPatchScalarField.C.
References dictionary::found(), scalarField(), fvPatch::size(), waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField(), and Foam::Zero.
waveAlphaFvPatchScalarField | ( | const waveAlphaFvPatchScalarField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< scalar, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given mixedTypeFvPatchField onto a new patch.
Definition at line 82 of file waveAlphaFvPatchScalarField.C.
References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().
waveAlphaFvPatchScalarField | ( | const waveAlphaFvPatchScalarField & | ptf | ) |
Construct as copy.
Definition at line 97 of file waveAlphaFvPatchScalarField.C.
References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().
waveAlphaFvPatchScalarField | ( | const waveAlphaFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 108 of file waveAlphaFvPatchScalarField.C.
TypeName | ( | "waveAlpha" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 158 of file waveAlphaFvPatchScalarField.H.
References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 175 of file waveAlphaFvPatchScalarField.H.
References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().
|
inline |
Access the liquid flag.
Definition at line 191 of file waveAlphaFvPatchScalarField.H.
References waveAlphaFvPatchScalarField::alpha(), waveAlphaFvPatchScalarField::alphan(), waveAlphaFvPatchScalarField::updateCoeffs(), and waveAlphaFvPatchScalarField::write().
Foam::tmp< Foam::scalarField > alpha | ( | ) | const |
Return the current modelled phase fraction field.
Definition at line 122 of file waveAlphaFvPatchScalarField.C.
References waveSuperposition::height(), Foam::levelSetFraction(), and waveVelocityFvPatchVectorField::waves().
Referenced by waveAlphaFvPatchScalarField::liquid(), and waveAlphaFvPatchScalarField::updateCoeffs().
Foam::tmp< Foam::scalarField > alphan | ( | ) | const |
Return the current modelled phase fraction field in the.
neighbour cell
Definition at line 144 of file waveAlphaFvPatchScalarField.C.
References fvMesh::boundary(), primitiveMesh::cellCentres(), f(), waveVelocityFvPatchVectorField::faceCellSubset(), fvMeshSubset::faceMap(), Foam::findIndex(), forAll, waveSuperposition::height(), Foam::levelSetFraction(), fvMeshSubset::patchMap(), polyMesh::points(), tmp< T >::ref(), fvMeshSubset::subMesh(), Foam::subset(), and waveVelocityFvPatchVectorField::waves().
Referenced by waveAlphaFvPatchScalarField::liquid(), and waveAlphaFvPatchScalarField::updateCoeffs().
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 188 of file waveAlphaFvPatchScalarField.C.
References waveAlphaFvPatchScalarField::alpha(), waveAlphaFvPatchScalarField::alphan(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, waveVelocityFvPatchVectorField::pName(), Foam::pos0(), waveVelocityFvPatchVectorField::U(), and waveAlphaFvPatchScalarField::write().
Referenced by waveAlphaFvPatchScalarField::liquid().
|
virtual |
Write.
Definition at line 245 of file waveAlphaFvPatchScalarField.C.
References Foam::makePatchTypeField(), and Foam::blockMeshTools::write().
Referenced by waveAlphaFvPatchScalarField::liquid(), and waveAlphaFvPatchScalarField::updateCoeffs().