Public Member Functions | List of all members
waveAlphaFvPatchScalarField Class Reference

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...

Inheritance diagram for waveAlphaFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for waveAlphaFvPatchScalarField:
Collaboration graph
[legend]

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< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 waveAlphaFvPatchScalarField (const waveAlphaFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (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< scalarFieldalpha () const
 Return the current modelled phase fraction field. More...
 
tmp< scalarFieldalphan () 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...
 

Detailed Description

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.

Usage
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;
    }
Source files

Definition at line 103 of file waveAlphaFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ waveAlphaFvPatchScalarField() [1/5]

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().

Here is the caller graph for this function:

◆ waveAlphaFvPatchScalarField() [2/5]

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.

Here is the call graph for this function:

◆ waveAlphaFvPatchScalarField() [3/5]

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().

Here is the call graph for this function:

◆ waveAlphaFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 97 of file waveAlphaFvPatchScalarField.C.

References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().

Here is the call graph for this function:

◆ waveAlphaFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 108 of file waveAlphaFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "waveAlpha"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 158 of file waveAlphaFvPatchScalarField.H.

References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [2/2]

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Definition at line 175 of file waveAlphaFvPatchScalarField.H.

References waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField().

Here is the call graph for this function:

◆ liquid()

bool liquid ( ) const
inline

◆ alpha()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ alphan()

Foam::tmp< Foam::scalarField > alphan ( ) const

◆ updateCoeffs()

void 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 245 of file waveAlphaFvPatchScalarField.C.

References Foam::makePatchTypeField(), and Foam::blockMeshTools::write().

Referenced by waveAlphaFvPatchScalarField::liquid(), and waveAlphaFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: