OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

advectiveFvPatchField< Type > Class Template Reference

Advective outflow boundary condition based on solving DDt(psi, U) = 0 at the boundary. More...

Inheritance diagram for advectiveFvPatchField< Type >:
Collaboration diagram for advectiveFvPatchField< Type >:

List of all members.


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.

Detailed Description

template<class Type>
class Foam::advectiveFvPatchField< Type >

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
    {
        type            advective;
        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.

Source files

Definition at line 73 of file advectiveFvPatchField.H.


Constructor & Destructor Documentation

advectiveFvPatchField ( const fvPatch &  p,
const DimensionedField< Type, volMesh > &  iF 
) [inline]

Construct from patch and internal field.

Definition at line 35 of file advectiveFvPatchField.C.

References p.

advectiveFvPatchField ( const fvPatch &  p,
const DimensionedField< Type, volMesh > &  iF,
const dictionary &  dict 
) [inline]

Construct from patch, internal field and dictionary.

Definition at line 71 of file advectiveFvPatchField.C.

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  )  [inline]

Construct as copy.

Definition at line 123 of file advectiveFvPatchField.C.

advectiveFvPatchField ( const advectiveFvPatchField< Type > &  ptpsf,
const DimensionedField< Type, volMesh > &  iF 
) [inline]

Construct as copy setting internal field reference.

Definition at line 137 of file advectiveFvPatchField.C.


Member Function Documentation

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 139 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 156 of file advectiveFvPatchField.H.

const Type& fieldInf (  )  const [inline]

Return the field at infinity.

Definition at line 172 of file advectiveFvPatchField.H.

Type& fieldInf (  )  [inline]

Return reference to the field at infinity to allow adjustment.

Definition at line 178 of file advectiveFvPatchField.H.

scalar lInf (  )  const [inline]

Return the relaxation length-scale.

Definition at line 184 of file advectiveFvPatchField.H.

scalar& lInf (  )  [inline]

Return reference to the relaxation length-scale.

to allow adjustment

Definition at line 193 of file advectiveFvPatchField.H.

tmp< scalarField > advectionSpeed (  )  const [inline, virtual]

Calculate and return the advection speed at the boundary.

Reimplemented in waveTransmissiveFvPatchField< Type >.

Definition at line 153 of file advectiveFvPatchField.C.

void updateCoeffs (  )  [inline, virtual]

Update the coefficients associated with the patch field.

Reimplemented from fvPatchField< Type >.

Definition at line 184 of file advectiveFvPatchField.C.

void write ( Ostream &  os  )  const [inline, virtual]

Write.

Reimplemented from mixedFvPatchField< Type >.

Reimplemented in waveTransmissiveFvPatchField< Type >.

Definition at line 299 of file advectiveFvPatchField.C.


Member Data Documentation

word phiName_ [protected]

Name of the flux transporting the field.

Definition at line 82 of file advectiveFvPatchField.H.

word rhoName_ [protected]

Name of the density field used to normalise the mass flux.

if neccessary

Definition at line 88 of file advectiveFvPatchField.H.

Type fieldInf_ [protected]

Field value of the far-field.

Definition at line 91 of file advectiveFvPatchField.H.

Referenced by advectiveFvPatchField< Type >::fieldInf().

scalar lInf_ [protected]

Relaxation length-scale.

Definition at line 94 of file advectiveFvPatchField.H.

Referenced by advectiveFvPatchField< Type >::lInf().


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd