mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Caching alphaPhiUn for VoF for scalarTransport FOcin mixture. #2053
This commit is contained in:
@ -161,12 +161,11 @@
|
||||
|
||||
surfaceScalarField phir(phic*mixture.nHatf());
|
||||
|
||||
tmp<surfaceScalarField> talphaPhi1Un
|
||||
(
|
||||
alphaPhiUn =
|
||||
fvc::flux
|
||||
(
|
||||
phiCN(),
|
||||
cnCoeff*alpha1 + (1.0 - cnCoeff)*alpha1.oldTime(),
|
||||
phi,
|
||||
alpha1,
|
||||
alphaScheme
|
||||
)
|
||||
+ fvc::flux
|
||||
@ -174,19 +173,18 @@
|
||||
-fvc::flux(-phir, alpha2, alpharScheme),
|
||||
alpha1,
|
||||
alpharScheme
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
if (MULESCorr)
|
||||
{
|
||||
tmp<surfaceScalarField> talphaPhi1Corr(talphaPhi1Un() - alphaPhi10);
|
||||
tmp<surfaceScalarField> talphaPhi1Corr(alphaPhiUn - alphaPhi10);
|
||||
volScalarField alpha10("alpha10", alpha1);
|
||||
|
||||
MULES::correct
|
||||
(
|
||||
geometricOneField(),
|
||||
alpha1,
|
||||
talphaPhi1Un(),
|
||||
alphaPhiUn,
|
||||
talphaPhi1Corr.ref(),
|
||||
Sp,
|
||||
(-Sp*alpha1)(),
|
||||
@ -207,7 +205,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
alphaPhi10 = talphaPhi1Un;
|
||||
alphaPhi10 = alphaPhiUn;
|
||||
|
||||
MULES::explicitSolve
|
||||
(
|
||||
|
||||
@ -24,3 +24,18 @@ surfaceScalarField alphaPhi10
|
||||
|
||||
// MULES Correction
|
||||
tmp<surfaceScalarField> talphaPhi1Corr0;
|
||||
|
||||
// MULES compressed flux is registered in case scalarTransport FO needs it.
|
||||
surfaceScalarField alphaPhiUn
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphaPhiUn",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(phi.dimensions(), Zero)
|
||||
);
|
||||
|
||||
@ -120,21 +120,6 @@ if (p_rgh.needReference())
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
// MULES compressed flux is registered in case scalarTransport FO needs it.
|
||||
surfaceScalarField alphaPhiUn
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphaPhiUn",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(phi.dimensions(), Zero)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
|
||||
@ -126,20 +126,5 @@ if (p_rgh.needReference())
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
// MULES compressed flux is registered in case scalarTransport FO needs it.
|
||||
surfaceScalarField alphaPhiUn
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphaPhiUn",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(phi.dimensions(), Zero)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
@ -147,19 +147,4 @@ if (p_rgh.needReference())
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
mesh.setFluxRequired(alpha1.name());
|
||||
|
||||
// MULES compressed flux is registered in case scalarTransport FO needs it.
|
||||
surfaceScalarField alphaPhiUn
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"alphaPhiUn",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(phi.dimensions(), Zero)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -202,7 +202,6 @@ void reactingOneDim::updateFields()
|
||||
updateqr();
|
||||
}
|
||||
|
||||
//Note: Commented out as the sensible gas energy is included in energy eq.
|
||||
updatePhiGas();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user