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-plus
Commits
a3c6e30b
Commit
a3c6e30b
authored
Jun 25, 2015
by
Henry Weller
Browse files
reactingTwoPhaseEulerFoam: Change the sign of the compressibility correction field
to correspond to the phase dilatation rate.
parent
d83df30b
Changes
7
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/pU/pEqn.H
View file @
a3c6e30b
...
...
@@ -338,14 +338,14 @@ while (pimple.correct())
phi2
=
phi
-
alphaf1
*
phir
;
}
//
Compressibility correction for phase-fraction equation
s
//
Set the phase dilatation rate
s
if
(
phase1
.
compressible
())
{
phase1
.
D
(
pEqnComp1
&
p_rgh
);
phase1
.
divU
(
-
pEqnComp1
&
p_rgh
);
}
if
(
phase2
.
compressible
())
{
phase2
.
D
(
pEqnComp2
&
p_rgh
);
phase2
.
divU
(
-
pEqnComp2
&
p_rgh
);
}
// Optionally relax pressure for velocity correction
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/pUf/pEqn.H
View file @
a3c6e30b
...
...
@@ -323,14 +323,14 @@ while (pimple.correct())
U2
.
correctBoundaryConditions
();
fvOptions
.
correct
(
U2
);
//
Compressibility correction for phase-fraction equation
s
//
Set the phase dilatation rate
s
if
(
phase1
.
compressible
())
{
phase1
.
D
(
pEqnComp1
&
p_rgh
);
phase1
.
divU
(
-
pEqnComp1
&
p_rgh
);
}
if
(
phase2
.
compressible
())
{
phase2
.
D
(
pEqnComp2
&
p_rgh
);
phase2
.
divU
(
-
pEqnComp2
&
p_rgh
);
}
}
}
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C
View file @
a3c6e30b
...
...
@@ -36,16 +36,16 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel
)
:
BasePhaseModel
(
fluid
,
phaseName
),
D
_
divU
_
(
IOobject
(
IOobject
::
groupName
(
"
D
"
,
this
->
name
()),
IOobject
::
groupName
(
"
divU
"
,
this
->
name
()),
fluid
.
mesh
().
time
().
timeName
(),
fluid
.
mesh
()
),
fluid
.
mesh
(),
dimensionedScalar
(
"
D
"
,
dimless
/
dimTime
,
0
)
dimensionedScalar
(
"
divU
"
,
dimless
/
dimTime
,
0
)
),
K_
(
...
...
@@ -140,17 +140,17 @@ bool Foam::AnisothermalPhaseModel<BasePhaseModel>::compressible() const
template
<
class
BasePhaseModel
>
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
AnisothermalPhaseModel
<
BasePhaseModel
>::
D
()
const
Foam
::
AnisothermalPhaseModel
<
BasePhaseModel
>::
divU
()
const
{
return
D
_
;
return
divU
_
;
}
template
<
class
BasePhaseModel
>
void
Foam
::
AnisothermalPhaseModel
<
BasePhaseModel
>::
D
(
const
volScalarField
&
D
)
Foam
::
AnisothermalPhaseModel
<
BasePhaseModel
>::
divU
(
const
volScalarField
&
divU
)
{
D_
=
D
;
divU_
=
divU
;
}
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H
View file @
a3c6e30b
...
...
@@ -54,8 +54,8 @@ class AnisothermalPhaseModel
{
// Private data
//- Dilatation
volScalarField
D
_
;
//- Dilatation
rate
volScalarField
divU
_
;
//- Kinetic energy
volScalarField
K_
;
...
...
@@ -89,11 +89,11 @@ public:
//- Return true if the phase is compressible otherwise false
virtual
bool
compressible
()
const
;
//- Phase dilatation rate ((alpha
/rho)*Drho/Dt
)
virtual
tmp
<
volScalarField
>
D
()
const
;
//- Phase dilatation rate (
d
(alpha
)/dt + div(alpha*phi)
)
virtual
tmp
<
volScalarField
>
divU
()
const
;
//- Set phase dilatation rate ((alpha
/rho)*Drho/Dt
)
virtual
void
D
(
const
volScalarField
&
D
);
//- Set phase dilatation rate (
d
(alpha
)/dt + div(alpha*phi)
)
virtual
void
divU
(
const
volScalarField
&
divU
);
};
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C
View file @
a3c6e30b
...
...
@@ -140,15 +140,15 @@ bool Foam::phaseModel::compressible() const
}
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
phaseModel
::
D
()
const
Foam
::
tmp
<
Foam
::
volScalarField
>
Foam
::
phaseModel
::
divU
()
const
{
return
tmp
<
volScalarField
>
();
}
void
Foam
::
phaseModel
::
D
(
const
volScalarField
&
D
)
void
Foam
::
phaseModel
::
divU
(
const
volScalarField
&
divU
)
{
WarningIn
(
"phaseModel::
D
(const volScalarField&
D
)"
)
WarningIn
(
"phaseModel::
divU
(const volScalarField&
divU
)"
)
<<
"Attempt to set the dilatation rate of an incompressible phase"
<<
endl
;
}
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H
View file @
a3c6e30b
...
...
@@ -169,11 +169,11 @@ public:
//- Return true if the phase is compressible otherwise false
virtual
bool
compressible
()
const
;
//- Phase dilatation rate ((alpha
/rho)*Drho/Dt
)
virtual
tmp
<
volScalarField
>
D
()
const
;
//- Phase dilatation rate (
d
(alpha
)/dt + div(alpha*phi)
)
virtual
tmp
<
volScalarField
>
divU
()
const
;
//- Set phase dilatation rate ((alpha
/rho)*Drho/Dt
)
virtual
void
D
(
const
volScalarField
&
D
);
//- Set phase dilatation rate (
d
(alpha
)/dt + div(alpha*phi)
)
virtual
void
divU
(
const
volScalarField
&
divU
);
// Thermo
...
...
applications/solvers/multiphase/reactingTwoPhaseEulerFoam/phaseSystems/twoPhaseSystem/twoPhaseSystem.C
View file @
a3c6e30b
...
...
@@ -189,26 +189,26 @@ void Foam::twoPhaseSystem::solve()
{
tdgdt
=
(
alpha
1
.
dimensionedInternalField
()
*
phase
2
_
.
D
()().
dimensionedInternalField
()
-
alpha
2
.
dimensionedInternalField
()
*
phase
1
_
.
D
()().
dimensionedInternalField
()
alpha
2
.
dimensionedInternalField
()
*
phase
1
_
.
divU
()().
dimensionedInternalField
()
-
alpha
1
.
dimensionedInternalField
()
*
phase
2
_
.
divU
()().
dimensionedInternalField
()
);
}
else
if
(
phase1_
.
compressible
())
{
tdgdt
=
(
-
alpha2
.
dimensionedInternalField
()
*
phase1_
.
D
()().
dimensionedInternalField
()
alpha2
.
dimensionedInternalField
()
*
phase1_
.
divU
()().
dimensionedInternalField
()
);
}
else
if
(
phase2_
.
compressible
())
{
tdgdt
=
(
alpha1
.
dimensionedInternalField
()
*
phase2_
.
D
()().
dimensionedInternalField
()
-
alpha1
.
dimensionedInternalField
()
*
phase2_
.
divU
()().
dimensionedInternalField
()
);
}
...
...
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