activePressureForceBaffleVelocityFvPatchVectorField Class Reference

This boundary condition is applied to the flow velocity, to simulate the opening or closure of a baffle due to area averaged pressure or force delta, between both sides of the baffle. This is achieved by merging the behaviours of wall and cyclic baffles. More...

Inheritance diagram for activePressureForceBaffleVelocityFvPatchVectorField:
[legend]
Collaboration diagram for activePressureForceBaffleVelocityFvPatchVectorField:
[legend]

Public Member Functions

 TypeName ("activePressureForceBaffleVelocity")
 Runtime type information. More...
 
 activePressureForceBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &)
 Construct from patch and internal field. More...
 
 activePressureForceBaffleVelocityFvPatchVectorField (const fvPatch &, const DimensionedField< vector, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &, const fvPatch &, const DimensionedField< vector, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping. More...
 
 activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &)
 Construct as copy. More...
 
virtual tmp< fvPatchVectorFieldclone () const
 Construct and return a clone. More...
 
 activePressureForceBaffleVelocityFvPatchVectorField (const activePressureForceBaffleVelocityFvPatchVectorField &, const DimensionedField< vector, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchVectorFieldclone (const DimensionedField< vector, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchVectorField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. 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 is applied to the flow velocity, to simulate the opening or closure of a baffle due to area averaged pressure or force delta, between both sides of the baffle. This is achieved by merging the behaviours of wall and cyclic baffles.

The baffle joins two mesh regions, where the open fraction determines the interpolation weights applied to each cyclic- and neighbour-patch contribution. This means that this is boundary condition is meant to be used in an extra wall beyond an existing cyclic patch pair.

The baffle is activated when the area weighted pressure difference between master and slave patches is larger then minThresholdValue.

Once the threshold is crossed, the baffle is activated and continues to open or close at a fixed rate using

\[ x = x_{old} + s \times \frac{dt}{DT} \]

where

\( x \) = baffle open fraction [0-1]
\( x_{old} \) = baffle open fraction on previous evaluation
\( s \) = sign for orientation: 1 to open or -1 to close
\( dt \) = simulation time step
\( DT \) = time taken to open the baffle

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

Usage
Property Description Required Default
p Pressure field name no p
cyclicPatch Cyclic patch name yes
openFraction Current open fraction [0-1] yes
openingTime Time taken to open or close the baffle yes
maxOpenFractionDelta max fraction change per timestep yes
minThresholdValue Min absolute pressure or force difference for activation yes
forceBased Force (true) or pressure-based (false) activation yes
opening Baffle is opening (true) or closing (false) yes

Example of the boundary condition specification:

    <patchName>
    {
        type            activePressureForceBaffleVelocity;
        p               p;
        cyclicPatch     cyclic1;
        openFraction    0.2;
        openingTime     5.0;
        maxOpenFractionDelta 0.1;
        minThresholdValue 0.01;
        forceBased      false;
        opening         true;
    }
Source files

Definition at line 179 of file activePressureForceBaffleVelocityFvPatchVectorField.H.

Constructor & Destructor Documentation

◆ activePressureForceBaffleVelocityFvPatchVectorField() [1/5]

Construct from patch and internal field.

Definition at line 37 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

◆ activePressureForceBaffleVelocityFvPatchVectorField() [2/5]

Construct from patch, internal field and dictionary.

Definition at line 89 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

References dict, fvPatchField< vector >::operator=(), p, dictionary::readIfPresent(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ activePressureForceBaffleVelocityFvPatchVectorField() [3/5]

◆ activePressureForceBaffleVelocityFvPatchVectorField() [4/5]

◆ activePressureForceBaffleVelocityFvPatchVectorField() [5/5]

Construct as copy setting internal field reference.

Definition at line 154 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "activePressureForceBaffleVelocity"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchVectorField > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 268 of file activePressureForceBaffleVelocityFvPatchVectorField.H.

◆ clone() [2/2]

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

Construct and return a clone setting internal field reference.

Definition at line 284 of file activePressureForceBaffleVelocityFvPatchVectorField.H.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

Map (and resize as needed) from self given a mapping object.

Note: cannot map field from cyclic patch anyway so just recalculate

Areas should be consistent when doing autoMap except in case of topo changes. ! Note: we don't want to use Sf here since triggers rebuilding of /*! fvMesh::S() which will give problems when mapped (since already on new mesh)

Definition at line 181 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

References Foam::endl(), forAll, Foam::Info, Foam::mag(), and mesh.

Here is the call graph for this function:

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 219 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 242 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

References e, Foam::endl(), polyPatch::faceCells(), forAll, Foam::Info, Foam::mag(), fvPatch::magSf(), splitCell::master(), Foam::max(), mesh, Foam::min(), p, fvPatch::patch(), Foam::reduce(), fvPatch::Sf(), and timeIndex.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 380 of file activePressureForceBaffleVelocityFvPatchVectorField.C.

References os(), ObukhovLength::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: