Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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()
...
@@ -266,31 +266,21 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
scalar
valueDiff
=
0
;
scalar
valueDiff
=
0
;
if
(
fBased_
)
// Add this side (p*area)
forAll
(
cyclicFaceCells
,
facei
)
{
{
// Add this side
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
forAll
(
cyclicFaceCells
,
facei
)
{
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
// Remove other side
forAll
(
nbrFaceCells
,
facei
)
{
valueDiff
-=
p
[
nbrFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
}
}
}
else
//pressure based
// Remove other side
forAll
(
nbrFaceCells
,
facei
)
{
{
forAll
(
cyclicFaceCells
,
facei
)
valueDiff
-=
p
[
nbrFaceCells
[
facei
]]
*
mag
(
initCyclicSf_
[
facei
]);
{
}
valueDiff
+=
p
[
cyclicFaceCells
[
facei
]];
}
forAll
(
nbrFaceCells
,
facei
)
if
(
!
fBased_
)
//pressure based then weighted by area
{
{
valueDiff
-=
p
[
nbrFaceCells
[
facei
]];
valueDiff
=/
patch
().
magSf
();
}
}
}
reduce
(
valueDiff
,
sumOp
<
scalar
>
());
reduce
(
valueDiff
,
sumOp
<
scalar
>
());
...
@@ -303,7 +293,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
...
@@ -303,7 +293,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs()
}
}
else
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
...
@@ -29,21 +29,19 @@ 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 or closure of a baffle due to local pressure or force changes,
opening or closure of a baffle due to area averaged pressure or force delta,
by merging the behaviours of wall and cyclic conditions.
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 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. This means that this is boundary condition is meant to be
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
used in an extra wall beyond an existing cyclic patch pair.
for more details.
The baffle is activated when the pressure difference between master and
The baffle is activated when the area weighted pressure difference between
slave paches is positive and larger then minThresholdValue. The
master and slave paches is larger then minThresholdValue.
orientation flag is used to to calculate the pressure difference bwetween
master-slave or slave-master.
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
open or close at a fixed rate using
\f[
\f[
...
@@ -91,7 +89,7 @@ Description
...
@@ -91,7 +89,7 @@ Description
maxOpenFractionDelta 0.1;
maxOpenFractionDelta 0.1;
minThresholdValue 0.01;
minThresholdValue 0.01;
forceBased false;
forceBased false;
opening
1
;
opening
true
;
}
}
\endverbatim
\endverbatim
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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