contactAngleFvPatchScalarField Class Reference

General alpha contact angle boundary condition. More...

Inheritance diagram for contactAngleFvPatchScalarField:
Collaboration diagram for contactAngleFvPatchScalarField:

Public Types

enum  limitControls { lcNone , lcGradient , lcZeroGradient , lcAlpha }
 Alpha limit options. More...
 

Public Member Functions

 TypeName ("contactAngle")
 Runtime type information. More...
 
 contactAngleFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 contactAngleFvPatchScalarField (const contactAngleFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fieldMapper &)
 Construct by mapping given contactAngleFvPatchScalarField. More...
 
 contactAngleFvPatchScalarField (const contactAngleFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 contactAngleFvPatchScalarField (const contactAngleFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
tmp< scalarFieldcosTheta (const fvPatchVectorField &Up, const vectorField &nHat) const
 Return the cosine of the contact angle. More...
 
virtual void evaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 Evaluate the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Static Public Attributes

static const NamedEnum< limitControls, 4 > limitControlNames_
 Alpha limit option names. More...
 

Detailed Description

General alpha contact angle boundary condition.

The essential entry "limit" controls the gradient of alpha1 on the wall:

  • none - Calculate the gradient from the contact-angle without limiter
  • gradient - Limit the wall-gradient such that alpha1 remains bounded on the wall
  • alpha - Bound the calculated alpha1 on the wall
  • zeroGradient - Set the gradient of alpha1 to 0 on the wall, i.e. reproduce previous behaviour, the pressure BCs can be left as before.

Note that if any of the first three options are used the boundary condition on p_rgh must set to guarantee that the flux is corrected to be zero at the wall.

Usage
Property Description Required Default value
limit Limiting option yes
contantAngle Contact angle model settings no none

Example of the boundary condition specification for a constant angle:

    <patchName>
    {
        type            contactAngle;
        limit           none;
        contactAngle
        {
            type            constant;
            theta0          70;
        }
    }

If the contactAngle sub-dictionary is not given, a constant angle will be assumed. Example:

    <patchName>
    {
        type            contactAngle;
        limit           none;
        theta0          70;
    }
See also
Foam::contactAngleModel Foam::contactAngleModels::constant Foam::contactAngleModels::dynamic
Source files

Definition at line 113 of file contactAngleFvPatchScalarField.H.

Member Enumeration Documentation

◆ limitControls

Alpha limit options.

Enumerator
lcNone 
lcGradient 
lcZeroGradient 
lcAlpha 

Definition at line 122 of file contactAngleFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ contactAngleFvPatchScalarField() [1/4]

contactAngleFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 59 of file contactAngleFvPatchScalarField.C.

References dict, DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimLength, Foam::evaluate(), fvPatchField< Type >::operator=(), and p.

Here is the call graph for this function:

◆ contactAngleFvPatchScalarField() [2/4]

contactAngleFvPatchScalarField ( const contactAngleFvPatchScalarField acpsf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fieldMapper mapper 
)

Construct by mapping given contactAngleFvPatchScalarField.

onto a new patch

Definition at line 85 of file contactAngleFvPatchScalarField.C.

◆ contactAngleFvPatchScalarField() [3/4]

Disallow copy without setting internal field reference.

◆ contactAngleFvPatchScalarField() [4/4]

Copy constructor setting internal field reference.

Definition at line 99 of file contactAngleFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "contactAngle"  )

Runtime type information.

◆ cosTheta()

Foam::tmp< Foam::scalarField > cosTheta ( const fvPatchVectorField Up,
const vectorField nHat 
) const

Return the cosine of the contact angle.

Definition at line 113 of file contactAngleFvPatchScalarField.C.

◆ evaluate()

void evaluate ( const Pstream::commsTypes  commsType = Pstream::commsTypes::blocking)
virtual

Evaluate the patch field.

Definition at line 123 of file contactAngleFvPatchScalarField.C.

References Foam::evaluate(), Foam::max(), Foam::min(), and Field< scalar >::operator=().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 154 of file contactAngleFvPatchScalarField.C.

References Foam::vtkWriteOps::write(), and Foam::writeEntry().

Here is the call graph for this function:

Member Data Documentation

◆ limitControlNames_

Alpha limit option names.

Definition at line 131 of file contactAngleFvPatchScalarField.H.


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