mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
reactingMultiphaseEulerFoam, multiphaseEulerFoam: Correct flux averaging for sub-cycling
This commit is contained in:
@ -888,7 +888,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||||
|
|
||||||
PtrList<volScalarField> alpha0s(phases_.size());
|
PtrList<volScalarField> alpha0s(phases_.size());
|
||||||
PtrList<surfaceScalarField> phiSums(phases_.size());
|
PtrList<surfaceScalarField> alphaPhiSums(phases_.size());
|
||||||
|
|
||||||
int phasei = 0;
|
int phasei = 0;
|
||||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||||
@ -902,7 +902,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
new volScalarField(alpha.oldTime())
|
new volScalarField(alpha.oldTime())
|
||||||
);
|
);
|
||||||
|
|
||||||
phiSums.set
|
alphaPhiSums.set
|
||||||
(
|
(
|
||||||
phasei,
|
phasei,
|
||||||
new surfaceScalarField
|
new surfaceScalarField
|
||||||
@ -936,7 +936,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
int phasei = 0;
|
int phasei = 0;
|
||||||
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
forAllIter(PtrDictionary<phaseModel>, phases_, iter)
|
||||||
{
|
{
|
||||||
phiSums[phasei] += (runTime.deltaT()/totalDeltaT)*iter().phi();
|
alphaPhiSums[phasei] += iter().alphaPhi()/nAlphaSubCycles;
|
||||||
phasei++;
|
phasei++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -947,7 +947,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
phaseModel& phase = iter();
|
phaseModel& phase = iter();
|
||||||
volScalarField& alpha = phase;
|
volScalarField& alpha = phase;
|
||||||
|
|
||||||
phase.phi() = phiSums[phasei];
|
phase.alphaPhi() = alphaPhiSums[phasei];
|
||||||
|
|
||||||
// Correct the time index of the field
|
// Correct the time index of the field
|
||||||
// to correspond to the global time
|
// to correspond to the global time
|
||||||
|
|||||||
@ -157,7 +157,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
|||||||
|
|
||||||
MULES::limit
|
MULES::limit
|
||||||
(
|
(
|
||||||
1.0/mesh_.time().deltaT().value(),
|
1.0/mesh_.time().deltaT().value(), // ***HGW add support for LTS
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
phase,
|
phase,
|
||||||
phi_,
|
phi_,
|
||||||
@ -620,7 +620,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
dimensionedScalar totalDeltaT = runTime.deltaT();
|
||||||
|
|
||||||
PtrList<volScalarField> alpha0s(phases().size());
|
PtrList<volScalarField> alpha0s(phases().size());
|
||||||
PtrList<surfaceScalarField> phiSums(phases().size());
|
PtrList<surfaceScalarField> alphaPhiSums(phases().size());
|
||||||
|
|
||||||
forAll(phases(), phasei)
|
forAll(phases(), phasei)
|
||||||
{
|
{
|
||||||
@ -633,7 +633,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
new volScalarField(alpha.oldTime())
|
new volScalarField(alpha.oldTime())
|
||||||
);
|
);
|
||||||
|
|
||||||
phiSums.set
|
alphaPhiSums.set
|
||||||
(
|
(
|
||||||
phasei,
|
phasei,
|
||||||
new surfaceScalarField
|
new surfaceScalarField
|
||||||
@ -664,7 +664,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
|
|
||||||
forAll(phases(), phasei)
|
forAll(phases(), phasei)
|
||||||
{
|
{
|
||||||
phiSums[phasei] += phases()[phasei].phi();
|
alphaPhiSums[phasei] += phases()[phasei].alphaPhi();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,7 +673,7 @@ void Foam::multiphaseSystem::solve()
|
|||||||
phaseModel& phase = phases()[phasei];
|
phaseModel& phase = phases()[phasei];
|
||||||
volScalarField& alpha = phase;
|
volScalarField& alpha = phase;
|
||||||
|
|
||||||
phase.phi() = phiSums[phasei]/nAlphaSubCycles;
|
phase.alphaPhi() = alphaPhiSums[phasei]/nAlphaSubCycles;
|
||||||
|
|
||||||
// Correct the time index of the field
|
// Correct the time index of the field
|
||||||
// to correspond to the global time
|
// to correspond to the global time
|
||||||
|
|||||||
Reference in New Issue
Block a user