Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
da667580
Commit
da667580
authored
Jun 02, 2016
by
sergio
Browse files
BUG: Fixing area weighted pressure difference calculation for pressured based mode
parent
9b0cd898
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
View file @
da667580
...
...
@@ -266,31 +266,21 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
scalar
valueDiff
=
0
;
if
(
fBased_
)
// Add this side (p*area)
forAll
(
cyclicFaceCells
,
facei
)
{
// Add this side
forAll
(
cyclicFaceCells
,
facei
)
{
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
// Remove other side
forAll
(
nbrFaceCells
,
facei
)
{
valueDiff
-=
p
[
nbrFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
else
//pressure based
// Remove other side
forAll
(
nbrFaceCells
,
facei
)
{
forAll
(
cyclicFaceCells
,
facei
)
{
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]];
}
valueDiff
-=
p
[
nbrFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
forAll
(
nbrFaceCells
,
facei
)
{
valueDiff
-=
p
[
nbrFaceCells
[
facei
]];
}
if
(
!
fBased_
)
//pressure based then weighted by area
{
valueDiff
=/
patch
().
magSf
();
}
reduce
(
valueDiff
,
sumOp
<
scalar
>
());
...
...
@@ -303,7 +293,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
}
else
{
Info
<<
"
P
ressure difference = "
<<
valueDiff
<<
endl
;
Info
<<
"
Area-averaged p
ressure difference = "
<<
valueDiff
<<
endl
;
}
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H
View file @
da667580
...
...
@@ -29,21 +29,19 @@ Group
Description
This boundary condition is applied to the flow velocity, to simulate the
opening or closure of a baffle due to local pressure or force changes,
by merging the behaviours of wall and cyclic conditions.
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. See PDRMesh
for more details.
used in an extra wall beyond an existing cyclic patch pair.
The baffle is activated when the pressure difference between master and
slave paches is positive and larger then minThresholdValue. The
orientation flag is used to to calculate the pressure difference bwetween
master-slave or slave-master.
The baffle is activated when the area weighted pressure difference between
master and slave paches is larger then minThresholdValue.
Once the threshold is crossed, th
is condition
activated and continues to
Once the threshold is crossed, th
e baffle is
activated and continues to
open or close at a fixed rate using
\f[
...
...
@@ -91,7 +89,7 @@ Description
maxOpenFractionDelta 0.1;
minThresholdValue 0.01;
forceBased false;
opening
1
;
opening
true
;
}
\endverbatim
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment