Public Member Functions | List of all members
activeBaffleVelocityFvPatchVectorField Class Reference

This velocity boundary condition simulates the opening of a baffle due to local flow conditions, by merging the behaviours of wall and cyclic conditions. The baffle joins two mesh regions, where the open fraction determines the interpolation weights applied to each cyclic- and neighbour-patch contribution. More...

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

Public Member Functions

 TypeName ("activeBaffleVelocity")
 
 activeBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 
 activeBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 
 activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 
 activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &)
 
virtual tmp< fvPatchVectorFieldclone () const
 
 activeBaffleVelocityFvPatchVectorField (const activeBaffleVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 
virtual tmp< fvPatchVectorFieldclone (const DimensionedField< vector, volMesh > &iF) const
 
virtual void autoMap (const fvPatchFieldMapper &)
 
virtual void rmap (const fvPatchVectorField &, const labelList &)
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 

Detailed Description

This velocity boundary condition simulates the opening of a baffle due to local flow conditions, by merging the behaviours of wall and cyclic conditions. The baffle joins two mesh regions, where the open fraction determines the interpolation weights applied to each cyclic- and neighbour-patch contribution.

We determine whether the baffle is opening or closing from the sign of the net force across the baffle, from which the baffle open fraction is updated using:

\[ x = x_{old} + sign(F_{net})\frac{dt}{DT} \]

where

$ x $ = baffle open fraction [0-1]
$ x_{old} $ = baffle open fraction on previous evaluation
$ dt $ = simulation time step
$ DT $ = time taken to open the baffle
$ F_{net} $ = net force across the baffle

The open fraction is then applied to scale the patch areas.

Usage
Property Description Required Default value
p pressure field name no p
cyclicPatch cylclic patch name yes
orientation 1 or -1 used to switch flow direction yes
openFraction current opatch open fraction [0-1] yes
openingTime time taken to open the baffle yes
maxOpenFractionDelta max open fraction change per timestep yes

Example of the boundary condition specification:

    <patchName>
    {
        type            activeBaffleVelocity;
        p               p;
        cyclicPatch     cyclic1;
        orientation     1;
        openFraction    0.2;
        openingTime     5.0;
        maxOpenFractionDelta 0.1;
    }
See also
Foam::fixedValueFvPatchField Foam::cyclicFvPatchField
Source files

Definition at line 158 of file activeBaffleVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ activeBaffleVelocityFvPatchVectorField() [1/5]

Definition at line 32 of file activeBaffleVelocityFvPatchVectorField.C.

Referenced by activeBaffleVelocityFvPatchVectorField::clone().

Here is the caller graph for this function:

◆ activeBaffleVelocityFvPatchVectorField() [2/5]

activeBaffleVelocityFvPatchVectorField ( const fvPatch p,
const DimensionedField< vector, volMesh > &  iF,
const dictionary dict 
)

Definition at line 78 of file activeBaffleVelocityFvPatchVectorField.C.

References Foam::Zero.

◆ activeBaffleVelocityFvPatchVectorField() [3/5]

Definition at line 54 of file activeBaffleVelocityFvPatchVectorField.C.

◆ activeBaffleVelocityFvPatchVectorField() [4/5]

Definition at line 110 of file activeBaffleVelocityFvPatchVectorField.C.

◆ activeBaffleVelocityFvPatchVectorField() [5/5]

Definition at line 131 of file activeBaffleVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "activeBaffleVelocity"  )

◆ clone() [1/2]

virtual tmp<fvPatchVectorField> clone ( ) const
inlinevirtual

Definition at line 241 of file activeBaffleVelocityFvPatchVectorField.H.

References activeBaffleVelocityFvPatchVectorField::activeBaffleVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ clone() [2/2]

virtual tmp<fvPatchVectorField> clone ( const DimensionedField< vector, volMesh > &  iF) const
inlinevirtual

Definition at line 258 of file activeBaffleVelocityFvPatchVectorField.H.

References activeBaffleVelocityFvPatchVectorField::activeBaffleVelocityFvPatchVectorField().

Here is the call graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

◆ rmap()

void rmap ( const fvPatchVectorField ptf,
const labelList addr 
)
virtual

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Definition at line 289 of file activeBaffleVelocityFvPatchVectorField.C.

References os(), fvPatchField::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

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