reactingTwoPhaseEulerFoam: Significantly improved handling of the particle pressure
In order to improve stability and robustness of fluidised bed cases the semi-implicit treatment of the particle pressure (pPrime) is now applied within the time-step sub-cycling along with the phase differential flux update. This allows the simulations to be performed reliably at a significantly increased maximum Courant number (up to 5 for some cases) without introducing chequerboarding patterns in regions of low particle phase fraction which occurred with the previous algorithm. The fluidisedBed tutorial has been updated to be more representative of real bubbling bed cases and to demonstrate the new pPrime functionality. Developed in collaboration with Timo Niemi, VTT.
This commit is contained in:
@ -328,7 +328,6 @@ void Foam::multiphaseSystem::solveAlphas
|
|||||||
- fvm::laplacian(alphaDbyAs[phase.index()], alpha, "bounded")
|
- fvm::laplacian(alphaDbyAs[phase.index()], alpha, "bounded")
|
||||||
);
|
);
|
||||||
|
|
||||||
alphaEqn.relax();
|
|
||||||
alphaEqn.solve();
|
alphaEqn.solve();
|
||||||
|
|
||||||
phase.alphaPhiRef() += alphaEqn.flux();
|
phase.alphaPhiRef() += alphaEqn.flux();
|
||||||
|
|||||||
@ -174,6 +174,14 @@ void Foam::twoPhaseSystem::solve
|
|||||||
|
|
||||||
surfaceScalarField phir("phir", phi1 - phi2);
|
surfaceScalarField phir("phir", phi1 - phi2);
|
||||||
|
|
||||||
|
tmp<surfaceScalarField> alphaPhiDbyA0;
|
||||||
|
if (implicitPhasePressure() && (rAUs.size() || rAUfs.size()))
|
||||||
|
{
|
||||||
|
alphaPhiDbyA0 =
|
||||||
|
this->DByAfs(rAUs, rAUfs)[phase1_.index()]
|
||||||
|
*fvc::snGrad(alpha1, "bounded")*mesh_.magSf();
|
||||||
|
}
|
||||||
|
|
||||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
||||||
{
|
{
|
||||||
volScalarField::Internal Sp
|
volScalarField::Internal Sp
|
||||||
@ -219,85 +227,46 @@ void Foam::twoPhaseSystem::solve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField alphaPhi1
|
tmp<volScalarField> trSubDeltaT;
|
||||||
(
|
|
||||||
fvc::flux
|
|
||||||
(
|
|
||||||
phi_,
|
|
||||||
alpha1,
|
|
||||||
alphaScheme
|
|
||||||
)
|
|
||||||
+ fvc::flux
|
|
||||||
(
|
|
||||||
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
|
||||||
alpha1,
|
|
||||||
alpharScheme
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
tmp<surfaceScalarField> alphaDbyA;
|
if (LTS && nAlphaSubCycles > 1)
|
||||||
if (implicitPhasePressure() && (rAUs.size() || rAUfs.size()))
|
|
||||||
{
|
{
|
||||||
const surfaceScalarField DbyA
|
trSubDeltaT =
|
||||||
|
fv::localEulerDdt::localRSubDeltaT(mesh_, nAlphaSubCycles);
|
||||||
|
}
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
||||||
|
!(++alphaSubCycle).end();
|
||||||
|
)
|
||||||
|
{
|
||||||
|
surfaceScalarField alphaPhi1
|
||||||
(
|
(
|
||||||
this->DByAfs(rAUs, rAUfs)[phase1_.index()]
|
fvc::flux
|
||||||
|
(
|
||||||
|
phi_,
|
||||||
|
alpha1,
|
||||||
|
alphaScheme
|
||||||
|
)
|
||||||
|
+ fvc::flux
|
||||||
|
(
|
||||||
|
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
|
||||||
|
alpha1,
|
||||||
|
alpharScheme
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
alphaDbyA =
|
phase1_.correctInflowOutflow(alphaPhi1);
|
||||||
fvc::interpolate(max(alpha1, scalar(0)))
|
|
||||||
*fvc::interpolate(max(alpha2, scalar(0)))
|
|
||||||
*DbyA;
|
|
||||||
|
|
||||||
alphaPhi1 +=
|
if (alphaPhiDbyA0.valid())
|
||||||
alphaDbyA()*fvc::snGrad(alpha1, "bounded")*mesh_.magSf();
|
|
||||||
}
|
|
||||||
|
|
||||||
phase1_.correctInflowOutflow(alphaPhi1);
|
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
|
||||||
{
|
|
||||||
tmp<volScalarField> trSubDeltaT;
|
|
||||||
|
|
||||||
if (LTS)
|
|
||||||
{
|
{
|
||||||
trSubDeltaT =
|
alphaPhi1 +=
|
||||||
fv::localEulerDdt::localRSubDeltaT(mesh_, nAlphaSubCycles);
|
fvc::interpolate(max(alpha1, scalar(0)))
|
||||||
|
*fvc::interpolate(max(scalar(1) - alpha1, scalar(0)))
|
||||||
|
*alphaPhiDbyA0();
|
||||||
}
|
}
|
||||||
|
|
||||||
for
|
|
||||||
(
|
|
||||||
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
||||||
!(++alphaSubCycle).end();
|
|
||||||
)
|
|
||||||
{
|
|
||||||
surfaceScalarField alphaPhi10(alphaPhi1);
|
|
||||||
|
|
||||||
MULES::explicitSolve
|
|
||||||
(
|
|
||||||
geometricOneField(),
|
|
||||||
alpha1,
|
|
||||||
phi_,
|
|
||||||
alphaPhi10,
|
|
||||||
(alphaSubCycle.index()*Sp)(),
|
|
||||||
(Su - (alphaSubCycle.index() - 1)*Sp*alpha1)(),
|
|
||||||
UniformField<scalar>(phase1_.alphaMax()),
|
|
||||||
zeroField()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (alphaSubCycle.index() == 1)
|
|
||||||
{
|
|
||||||
phase1_.alphaPhiRef() = alphaPhi10;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
phase1_.alphaPhiRef() += alphaPhi10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
phase1_.alphaPhiRef() /= nAlphaSubCycles;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
@ -310,21 +279,39 @@ void Foam::twoPhaseSystem::solve
|
|||||||
zeroField()
|
zeroField()
|
||||||
);
|
);
|
||||||
|
|
||||||
phase1_.alphaPhiRef() = alphaPhi1;
|
if (alphaSubCycle.index() == 1)
|
||||||
|
{
|
||||||
|
phase1_.alphaPhiRef() = alphaPhi1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
phase1_.alphaPhiRef() += alphaPhi1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alphaPhiDbyA0.valid())
|
||||||
|
{
|
||||||
|
const surfaceScalarField alphaDbyA
|
||||||
|
(
|
||||||
|
fvc::interpolate(max(alpha1, scalar(0)))
|
||||||
|
*fvc::interpolate(max(scalar(1) - alpha1, scalar(0)))
|
||||||
|
*this->DByAfs(rAUs, rAUfs)[phase1_.index()]
|
||||||
|
);
|
||||||
|
|
||||||
|
fvScalarMatrix alpha1Eqn
|
||||||
|
(
|
||||||
|
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
||||||
|
- fvm::laplacian(alphaDbyA, alpha1, "bounded")
|
||||||
|
);
|
||||||
|
|
||||||
|
alpha1Eqn.solve();
|
||||||
|
|
||||||
|
phase1_.alphaPhiRef() += alpha1Eqn.flux();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alphaDbyA.valid())
|
if (nAlphaSubCycles > 1)
|
||||||
{
|
{
|
||||||
fvScalarMatrix alpha1Eqn
|
phase1_.alphaPhiRef() /= nAlphaSubCycles;
|
||||||
(
|
|
||||||
fvm::ddt(alpha1) - fvc::ddt(alpha1)
|
|
||||||
- fvm::laplacian(alphaDbyA(), alpha1, "bounded")
|
|
||||||
);
|
|
||||||
|
|
||||||
alpha1Eqn.relax();
|
|
||||||
alpha1Eqn.solve();
|
|
||||||
|
|
||||||
phase1_.alphaPhiRef() += alpha1Eqn.flux();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
phase1_.alphaRhoPhiRef() =
|
phase1_.alphaRhoPhiRef() =
|
||||||
|
|||||||
@ -35,7 +35,10 @@ boundaryField
|
|||||||
|
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type JohnsonJacksonParticleTheta;
|
||||||
|
restitutionCoefficient 0.8;
|
||||||
|
specularityCoefficient 0.01;
|
||||||
|
value uniform 1e-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
frontAndBackPlanes
|
frontAndBackPlanes
|
||||||
|
|||||||
@ -22,17 +22,17 @@ boundaryField
|
|||||||
{
|
{
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type interstitialInletVelocity;
|
type interstitialInletVelocity;
|
||||||
inletVelocity uniform (0 0.25 0);
|
inletVelocity uniform (0 0.25 0);
|
||||||
alpha alpha.air;
|
alpha alpha.air;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type pressureInletOutletVelocity;
|
type pressureInletOutletVelocity;
|
||||||
phi phi.air;
|
phi phi.air;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
@ -42,7 +42,7 @@ boundaryField
|
|||||||
|
|
||||||
frontAndBackPlanes
|
frontAndBackPlanes
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,25 +22,26 @@ boundaryField
|
|||||||
{
|
{
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type JohnsonJacksonParticleSlip;
|
||||||
value uniform (0 0 0);
|
specularityCoefficient 0.01;
|
||||||
|
value uniform (0 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
frontAndBackPlanes
|
frontAndBackPlanes
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $(getApplication)
|
runApplication decomposePar
|
||||||
|
runParallel $(getApplication)
|
||||||
|
runApplication reconstructPar
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -36,16 +36,16 @@ RAS
|
|||||||
viscosityModel Gidaspow;
|
viscosityModel Gidaspow;
|
||||||
conductivityModel Gidaspow;
|
conductivityModel Gidaspow;
|
||||||
granularPressureModel Lun;
|
granularPressureModel Lun;
|
||||||
frictionalStressModel JohnsonJackson;
|
frictionalStressModel JohnsonJacksonSchaeffer;
|
||||||
radialModel SinclairJackson;
|
radialModel SinclairJackson;
|
||||||
|
|
||||||
JohnsonJacksonCoeffs
|
JohnsonJacksonSchaefferCoeffs
|
||||||
{
|
{
|
||||||
Fr 0.05;
|
Fr 0.05;
|
||||||
eta 2;
|
eta 2;
|
||||||
p 5;
|
p 5;
|
||||||
phi 28.5;
|
phi 28.5;
|
||||||
alphaDeltaMin 0.05;
|
alphaDeltaMin 0.01;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,15 +25,15 @@ stopAt endTime;
|
|||||||
|
|
||||||
endTime 2;
|
endTime 2;
|
||||||
|
|
||||||
deltaT 0.0002;
|
deltaT 2e-4;
|
||||||
|
|
||||||
writeControl runTime;
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
writeInterval 0.01;
|
writeInterval 0.01;
|
||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
writeFormat ascii;
|
writeFormat binary;
|
||||||
|
|
||||||
writePrecision 6;
|
writePrecision 6;
|
||||||
|
|
||||||
@ -45,11 +45,11 @@ timePrecision 6;
|
|||||||
|
|
||||||
runTimeModifiable on;
|
runTimeModifiable on;
|
||||||
|
|
||||||
adjustTimeStep no;
|
adjustTimeStep yes;
|
||||||
|
|
||||||
maxCo 0.9;
|
maxCo 2;
|
||||||
|
|
||||||
maxDeltaT 1e-05;
|
maxDeltaT 0.01;
|
||||||
|
|
||||||
functions
|
functions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Main methods are:
|
||||||
|
1) Geometric: "simple"; "hierarchical", with ordered sorting, e.g. xyz, yxz
|
||||||
|
2) Scotch: "scotch", when running in serial; "ptscotch", running in parallel
|
||||||
|
*/
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
|
||||||
|
simpleCoeffs
|
||||||
|
{
|
||||||
|
n (1 4 1); // total must match numberOfSubdomains
|
||||||
|
delta 0.001;
|
||||||
|
}
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n (1 4 1); // total must match numberOfSubdomains
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -20,11 +20,14 @@ solvers
|
|||||||
"alpha.*"
|
"alpha.*"
|
||||||
{
|
{
|
||||||
nAlphaCorr 1;
|
nAlphaCorr 1;
|
||||||
nAlphaSubCycles 2;
|
nAlphaSubCycles 3;
|
||||||
implicitPhasePressure yes;
|
implicitPhasePressure yes;
|
||||||
|
|
||||||
solver smoothSolver;
|
extremaCoeff 1;
|
||||||
smoother symGaussSeidel;
|
|
||||||
|
solver PBiCGStab;
|
||||||
|
preconditioner DIC;
|
||||||
|
|
||||||
tolerance 1e-9;
|
tolerance 1e-9;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
minIter 1;
|
minIter 1;
|
||||||
@ -60,12 +63,13 @@ solvers
|
|||||||
tolerance 1e-6;
|
tolerance 1e-6;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
minIter 1;
|
minIter 1;
|
||||||
|
maxIter 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
"Theta.*"
|
"Theta.*"
|
||||||
{
|
{
|
||||||
solver smoothSolver;
|
solver PBiCGStab;
|
||||||
smoother symGaussSeidel;
|
preconditioner DILU;
|
||||||
tolerance 1e-6;
|
tolerance 1e-6;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
minIter 1;
|
minIter 1;
|
||||||
@ -73,8 +77,8 @@ solvers
|
|||||||
|
|
||||||
"(k|epsilon).*"
|
"(k|epsilon).*"
|
||||||
{
|
{
|
||||||
solver smoothSolver;
|
solver PBiCGStab;
|
||||||
smoother symGaussSeidel;
|
preconditioner DILU;
|
||||||
tolerance 1e-5;
|
tolerance 1e-5;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
minIter 1;
|
minIter 1;
|
||||||
@ -84,9 +88,9 @@ solvers
|
|||||||
PIMPLE
|
PIMPLE
|
||||||
{
|
{
|
||||||
nOuterCorrectors 3;
|
nOuterCorrectors 3;
|
||||||
nCorrectors 1;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
faceMomentum yes;
|
faceMomentum no;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
Reference in New Issue
Block a user