Advective outflow boundary condition based on solving DDt(psi, U) = 0 at the boundary. More...
#include <finiteVolume/advectiveFvPatchField.H>
Advective outflow boundary condition based on solving DDt(psi, U) = 0 at the boundary.
The standard (Euler, backward, CrankNicholson) time schemes are supported. Additionally an optional mechanism to relax the value at the boundary to a specified far-field value is provided which is switched on by specifying the relaxation length-scale lInf and the far-field value fieldInf.
The flow/wave speed at the outlet is provided by the virtual function advectionSpeed() the default implementation of which requires the name of flux field a the outlet (phi) and optionally the density (rho) if the mass-flux rather than the volumetric-flux is given.
outlet { typeadvective; phi phi; // rho rho; // Not needed, phi volumetric // fieldInf 1e5; // Optional // lInf 0.1; // Optional }
The flow/wave speed at the outlet can be changed by deriving a specialised BC fron this class and overriding advectionSpeed() e.g. in waveTransmissiveFvPatchField the advectionSpeed() calculates and returns the flow-speed plus the acoustic wave speed creating an acoustic wave transmissive boundary condition.
Definition at line 78 of file advectiveFvPatchField.H.
Public Member Functions | |
TypeName ("advective") | |
Runtime type information.
| |
advectiveFvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &) | |
Construct from patch and internal field.
| |
advectiveFvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary.
| |
advectiveFvPatchField (const advectiveFvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given advectiveFvPatchField.
| |
advectiveFvPatchField (const advectiveFvPatchField &) | |
Construct as copy.
| |
virtual tmp< fvPatchField< Type > > | clone () const |
Construct and return a clone.
| |
advectiveFvPatchField (const advectiveFvPatchField &, const DimensionedField< Type, volMesh > &) | |
Construct as copy setting internal field reference.
| |
virtual tmp< fvPatchField< Type > > | clone (const DimensionedField< Type, volMesh > &iF) const |
Construct and return a clone setting internal field reference.
| |
const Type & | fieldInf () const |
Return the field at infinity.
| |
Type & | fieldInf () |
Return reference to the field at infinity to allow adjustment.
| |
scalar | lInf () const |
Return the relaxation length-scale.
| |
scalar & | lInf () |
Return reference to the relaxation length-scale.
| |
virtual tmp< scalarField > | advectionSpeed () const |
Calculate and return the advection speed at the boundary.
| |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field.
| |
virtual void | write (Ostream &) const |
Write.
| |
Protected Attributes | |
word | phiName_ |
Name of the flux transporting the field.
| |
word | rhoName_ |
Name of the density field used to normalise the mass flux.
| |
Type | fieldInf_ |
Field value of the far-field.
| |
scalar | lInf_ |
Relaxation length-scale.
|
advectiveFvPatchField | ( | const fvPatch & | p, |
const DimensionedField< Type, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 43 of file advectiveFvPatchField.C.
advectiveFvPatchField | ( | const fvPatch & | p, |
const DimensionedField< Type, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 79 of file advectiveFvPatchField.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, dictionary::found(), dictionary::lookup(), fvPatchField< Type >::operator=(), dictionary::readIfPresent(), and fvPatch::size().
advectiveFvPatchField | ( | const advectiveFvPatchField< Type > & | , |
const fvPatch & | , | ||
const DimensionedField< Type, volMesh > & | , | ||
const fvPatchFieldMapper & | |||
) |
Construct by mapping given advectiveFvPatchField.
onto a new patch
advectiveFvPatchField | ( | const advectiveFvPatchField< Type > & | ptpsf ) |
Construct as copy.
Definition at line 131 of file advectiveFvPatchField.C.
advectiveFvPatchField | ( | const advectiveFvPatchField< Type > & | ptpsf, |
const DimensionedField< Type, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 145 of file advectiveFvPatchField.C.
TypeName | ( | "advective" | ) |
Runtime type information.
virtual tmp<fvPatchField<Type> > clone | ( | ) | const [inline, virtual]
|
Construct and return a clone.
Reimplemented from mixedFvPatchField< Type >.
Reimplemented in waveTransmissiveFvPatchField< Type >.
Definition at line 140 of file advectiveFvPatchField.H.
virtual tmp<fvPatchField<Type> > clone | ( | const DimensionedField< Type, volMesh > & | iF ) | const [inline, virtual]
|
Construct and return a clone setting internal field reference.
Reimplemented from mixedFvPatchField< Type >.
Reimplemented in waveTransmissiveFvPatchField< Type >.
Definition at line 157 of file advectiveFvPatchField.H.
const Type& fieldInf | ( | ) | const [inline]
|
Return the field at infinity.
Definition at line 173 of file advectiveFvPatchField.H.
References advectiveFvPatchField< Type >::fieldInf_.
Type& fieldInf | ( | ) | [inline]
|
Return reference to the field at infinity to allow adjustment.
Definition at line 179 of file advectiveFvPatchField.H.
References advectiveFvPatchField< Type >::fieldInf_.
scalar lInf | ( | ) | const [inline]
|
Return the relaxation length-scale.
Definition at line 185 of file advectiveFvPatchField.H.
References advectiveFvPatchField< Type >::lInf_.
scalar& lInf | ( | ) | [inline]
|
Return reference to the relaxation length-scale.
to allow adjustment
Definition at line 192 of file advectiveFvPatchField.H.
References advectiveFvPatchField< Type >::lInf_.
tmp< scalarField > advectionSpeed | ( | ) | const [virtual]
|
Calculate and return the advection speed at the boundary.
Reimplemented in waveTransmissiveFvPatchField< Type >.
Definition at line 161 of file advectiveFvPatchField.C.
References Foam::dimArea, Foam::dimDensity, DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimVelocity, and phi.
void updateCoeffs | ( | ) | [virtual]
|
Update the coefficients associated with the patch field.
Reimplemented from fvPatchField< Type >.
Definition at line 192 of file advectiveFvPatchField.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), Foam::exit(), Foam::FatalError, FatalErrorIn, k(), Foam::max(), mesh, Foam::name(), GeometricField< Type, PatchField, GeoMesh >::oldTime(), and fvPatchField< Type >::updateCoeffs().
void write | ( | Ostream & | os ) | const [virtual]
|
Write.
Reimplemented from mixedFvPatchField< Type >.
Reimplemented in waveTransmissiveFvPatchField< Type >.
Definition at line 307 of file advectiveFvPatchField.C.
References token::END_STATEMENT, Foam::nl, fvPatchField< Type >::write(), and Ostream::writeKeyword().
Name of the flux transporting the field.
Definition at line 87 of file advectiveFvPatchField.H.
Name of the density field used to normalise the mass flux.
if neccessary
Definition at line 91 of file advectiveFvPatchField.H.
Type fieldInf_ [protected]
|
Field value of the far-field.
Definition at line 94 of file advectiveFvPatchField.H.
Referenced by advectiveFvPatchField< Type >::fieldInf().
scalar lInf_ [protected]
|
Relaxation length-scale.
Definition at line 97 of file advectiveFvPatchField.H.
Referenced by advectiveFvPatchField< Type >::lInf().