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
4930a516
Commit
4930a516
authored
Dec 09, 2015
by
Henry Weller
Browse files
reactingMultiphaseEulerFoam: Correct and test LTS support
parent
1d893a0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
View file @
4930a516
...
...
@@ -71,6 +71,8 @@ void Foam::multiphaseSystem::calcAlphas()
void
Foam
::
multiphaseSystem
::
solveAlphas
()
{
bool
LTS
=
fv
::
localEulerDdt
::
enabled
(
mesh_
);
PtrList
<
surfaceScalarField
>
alphaPhiCorrs
(
phases
().
size
());
forAll
(
phases
(),
phasei
)
{
...
...
@@ -155,14 +157,11 @@ void Foam::multiphaseSystem::solveAlphas()
}
}
if
(
fv
::
localEulerDdt
::
enabled
(
mesh_
)
)
if
(
LTS
)
{
const
volScalarField
&
rDeltaT
=
fv
::
localEulerDdt
::
localRDeltaT
(
mesh_
);
MULES
::
limit
(
rDeltaT
,
fv
::
localEulerDdt
::
localRDeltaT
(
mesh_
)
,
geometricOneField
(),
phase
,
phi_
,
...
...
@@ -636,8 +635,6 @@ void Foam::multiphaseSystem::solve()
fv
::
localEulerDdt
::
localRSubDeltaT
(
mesh_
,
nAlphaSubCycles
);
}
dimensionedScalar
totalDeltaT
=
runTime
.
deltaT
();
PtrList
<
volScalarField
>
alpha0s
(
phases
().
size
());
PtrList
<
surfaceScalarField
>
alphaPhiSums
(
phases
().
size
());
...
...
applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C
View file @
4930a516
...
...
@@ -186,18 +186,17 @@ Foam::twoPhaseSystem::dmdt() const
void
Foam
::
twoPhaseSystem
::
solve
()
{
const
fvMesh
&
mesh
=
this
->
mesh
();
const
Time
&
runTime
=
mesh
.
time
();
const
Time
&
runTime
=
mesh_
.
time
();
volScalarField
&
alpha1
=
phase1_
;
volScalarField
&
alpha2
=
phase2_
;
const
dictionary
&
alphaControls
=
mesh
.
solverDict
(
alpha1
.
name
());
const
dictionary
&
alphaControls
=
mesh
_
.
solverDict
(
alpha1
.
name
());
label
nAlphaSubCycles
(
readLabel
(
alphaControls
.
lookup
(
"nAlphaSubCycles"
)));
label
nAlphaCorr
(
readLabel
(
alphaControls
.
lookup
(
"nAlphaCorr"
)));
bool
LTS
=
fv
::
localEulerDdt
::
enabled
(
mesh
);
bool
LTS
=
fv
::
localEulerDdt
::
enabled
(
mesh
_
);
word
alphaScheme
(
"div(phi,"
+
alpha1
.
name
()
+
')'
);
word
alpharScheme
(
"div(phir,"
+
alpha1
.
name
()
+
')'
);
...
...
@@ -264,9 +263,9 @@ void Foam::twoPhaseSystem::solve()
(
"Sp"
,
runTime
.
timeName
(),
mesh
mesh
_
),
mesh
,
mesh
_
,
dimensionedScalar
(
"Sp"
,
dimless
/
dimTime
,
0
.
0
)
);
...
...
@@ -276,7 +275,7 @@ void Foam::twoPhaseSystem::solve()
(
"Su"
,
runTime
.
timeName
(),
mesh
mesh
_
),
// Divergence term is handled explicitly to be
// consistent with the explicit transport solution
...
...
@@ -345,7 +344,7 @@ void Foam::twoPhaseSystem::solve()
if
(
LTS
)
{
trSubDeltaT
=
fv
::
localEulerDdt
::
localRSubDeltaT
(
mesh
,
nAlphaSubCycles
);
fv
::
localEulerDdt
::
localRSubDeltaT
(
mesh
_
,
nAlphaSubCycles
);
}
for
...
...
@@ -420,7 +419,7 @@ void Foam::twoPhaseSystem::solve()
fvc
::
interpolate
(
phase2_
.
rho
())
*
phase2_
.
alphaPhi
();
Info
<<
alpha1
.
name
()
<<
" volume fraction = "
<<
alpha1
.
weightedAverage
(
mesh
.
V
()).
value
()
<<
alpha1
.
weightedAverage
(
mesh
_
.
V
()).
value
()
<<
" Min(alpha1) = "
<<
min
(
alpha1
).
value
()
<<
" Max(alpha1) = "
<<
max
(
alpha1
).
value
()
<<
endl
;
...
...
src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
View file @
4930a516
...
...
@@ -89,8 +89,17 @@ void Foam::MULES::explicitSolve
)
{
const
fvMesh
&
mesh
=
psi
.
mesh
();
const
scalar
rDeltaT
=
1
.
0
/
mesh
.
time
().
deltaTValue
();
explicitSolve
(
rDeltaT
,
rho
,
psi
,
phiPsi
,
Sp
,
Su
);
if
(
fv
::
localEulerDdt
::
enabled
(
mesh
))
{
const
volScalarField
&
rDeltaT
=
fv
::
localEulerDdt
::
localRDeltaT
(
mesh
);
explicitSolve
(
rDeltaT
,
rho
,
psi
,
phiPsi
,
Sp
,
Su
);
}
else
{
const
scalar
rDeltaT
=
1
.
0
/
mesh
.
time
().
deltaTValue
();
explicitSolve
(
rDeltaT
,
rho
,
psi
,
phiPsi
,
Sp
,
Su
);
}
}
...
...
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