mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
activePressureForceBaffleVelocityFvPatchVectorField: Corrected implementation and documentation
Updated files provided by Bruno Santos Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1793
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -296,13 +296,13 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
Info<< "Pressure difference = " << valueDiff << endl;
|
Info<< "Pressure difference = " << valueDiff << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_))
|
if ((mag(valueDiff) > mag(minThresholdValue_)) || baffleActivated_)
|
||||||
{
|
{
|
||||||
openFraction_ =
|
openFraction_ =
|
||||||
max(
|
max(
|
||||||
min(
|
min(
|
||||||
openFraction_
|
openFraction_
|
||||||
+ max
|
+ min
|
||||||
(
|
(
|
||||||
this->db().time().deltaT().value()/openingTime_,
|
this->db().time().deltaT().value()/openingTime_,
|
||||||
maxOpenFractionDelta_
|
maxOpenFractionDelta_
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,17 +29,20 @@ Group
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
This boundary condition is applied to the flow velocity, to simulate the
|
This boundary condition is applied to the flow velocity, to simulate the
|
||||||
opening of a baffle due to local flow conditions, by merging the behaviours
|
opening or closure of a baffle due to local pressure or force changes,
|
||||||
of wall and cyclic conditions.
|
by merging the behaviours of wall and cyclic conditions.
|
||||||
|
|
||||||
The baffle joins two mesh regions, where the open fraction determines
|
The baffle joins two mesh regions, where the open fraction determines
|
||||||
the interpolation weights applied to each cyclic- and neighbour-patch
|
the interpolation weights applied to each cyclic- and neighbour-patch
|
||||||
contribution.
|
contribution. This means that this is boundary condition is meant to be
|
||||||
|
used in an extra wall beyond an existing cyclic patch pair. See PDRMesh
|
||||||
|
for more details.
|
||||||
|
|
||||||
Once opened the baffle continues to open at a fixed rate using
|
Once the threshold is crossed, this condition activated and continues to
|
||||||
|
open or close at a fixed rate using
|
||||||
|
|
||||||
\f[
|
\f[
|
||||||
x = x_{old} + \frac{dt}{DT}
|
x = x_{old} + s \times \frac{dt}{DT}
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
where
|
where
|
||||||
@ -47,6 +50,7 @@ Description
|
|||||||
\vartable
|
\vartable
|
||||||
x | baffle open fraction [0-1]
|
x | baffle open fraction [0-1]
|
||||||
x_{old} | baffle open fraction on previous evaluation
|
x_{old} | baffle open fraction on previous evaluation
|
||||||
|
s | sign for orientation: 1 to open or -1 to close
|
||||||
dt | simulation time step
|
dt | simulation time step
|
||||||
DT | time taken to open the baffle
|
DT | time taken to open the baffle
|
||||||
\endvartable
|
\endvartable
|
||||||
@ -58,12 +62,13 @@ Description
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
p | pressure field name | no | p
|
p | pressure field name | no | p
|
||||||
cyclicPatch | cylclic patch name | yes |
|
cyclicPatch | cyclic patch name | yes |
|
||||||
orientation | 1 or -1 used to switch flow direction | yes|
|
orientation | 1 to open or -1 to close | yes|
|
||||||
openFraction | current opatch open fraction [0-1]| yes |
|
openFraction | current open fraction [0-1] | yes |
|
||||||
openingTime | time taken to open the baffle | yes |
|
openingTime | time taken to open or close the baffle | yes |
|
||||||
maxOpenFractionDelta | max open fraction change per timestep | yes |
|
maxOpenFractionDelta | max fraction change per timestep | yes |
|
||||||
minThresholdValue | minimum open fraction for activation | yes |
|
minThresholdValue | minimum absolute pressure or
|
||||||
|
force difference for activation | yes |
|
||||||
forceBased | force (true) or pressure-based (false) activation | yes |
|
forceBased | force (true) or pressure-based (false) activation | yes |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
@ -119,9 +124,8 @@ class activePressureForceBaffleVelocityFvPatchVectorField
|
|||||||
//- Index of the cyclic patch used when the active baffle is open
|
//- Index of the cyclic patch used when the active baffle is open
|
||||||
label cyclicPatchLabel_;
|
label cyclicPatchLabel_;
|
||||||
|
|
||||||
//- Orientation (1 or -1) of the active baffle patch.
|
//- Orientation (1 or -1) of the active baffle mode
|
||||||
// Used to change the direction of opening without the need for
|
// Used to change the direction of opening or closing the baffle
|
||||||
// reordering the patch faces
|
|
||||||
label orientation_;
|
label orientation_;
|
||||||
|
|
||||||
//- Initial wall patch areas
|
//- Initial wall patch areas
|
||||||
|
|||||||
Reference in New Issue
Block a user