tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection: Improved stability

Main changes in the tutorial:
  - General cleanup of the phaseProperties of unnecessary entries
  - sensibleEnthalpy is used for both phases
  - setTimeStep functionObject is used to set a sharp reduction in time step near the start of the injection
  - Monitoring of pressure minimum and maximum

Patch contributed by Juho Peltola, VTT.
This commit is contained in:
Henry Weller
2017-04-11 20:48:32 +01:00
parent 707abb910e
commit aef09b8daf
8 changed files with 75 additions and 88 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -253,6 +253,14 @@ makeReactionMixtureThermo
constRefRhoConstHThermoPhysics constRefRhoConstHThermoPhysics
); );
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
multiComponentMixture,
constRefFluidHThermoPhysics
);
makeReactionMixtureThermo makeReactionMixtureThermo
( (

View File

@ -71,7 +71,7 @@ options
volumeMode absolute; volumeMode absolute;
injectionRateSuSp injectionRateSuSp
{ {
e.steam (3700 0); // kg*m^2/s^3 h.steam (3700 0); // kg*m^2/s^3
} }
} }
} }

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type thermalPhaseChangeTwoPhaseSystem; type thermalPhaseChangeTwoPhaseSystem;
phases (steam water); phases (steam water);
@ -34,7 +34,7 @@ steam
} }
Sc 0.7; Sc 0.7;
residualAlpha 1e-6; residualAlpha 1e-3;
} }
water water
@ -47,7 +47,7 @@ water
} }
Sc 0.7; Sc 0.7;
residualAlpha 1e-6; residualAlpha 1e-3;
} }
blending blending
@ -56,30 +56,6 @@ blending
{ {
type none; type none;
continuousPhase water; continuousPhase water;
minFullyContinuousAlpha.steam 0.7;
minPartlyContinuousAlpha.steam 0.5;
minFullyContinuousAlpha.water 0.7;
minPartlyContinuousAlpha.water 0.5;
}
heatTransfer
{
type none;
continuousPhase water;
minFullyContinuousAlpha.steam 1;
minPartlyContinuousAlpha.steam 0;
minFullyContinuousAlpha.water 1;
minPartlyContinuousAlpha.water 0;
}
massTransfer
{
type none;
continuousPhase water;
minFullyContinuousAlpha.steam 1;
minPartlyContinuousAlpha.steam 0;
minFullyContinuousAlpha.water 1;
minPartlyContinuousAlpha.water 0;
} }
} }
@ -107,12 +83,6 @@ aspectRatio
type constant; type constant;
E0 1.0; E0 1.0;
} }
(water in steam)
{
type constant;
E0 1.0;
}
); );
drag drag
@ -126,16 +96,6 @@ drag
type none; type none;
} }
} }
(water in steam)
{
type SchillerNaumann;
residualRe 1e-3;
swarmCorrection
{
type none;
}
}
); );
virtualMass virtualMass
@ -145,27 +105,18 @@ virtualMass
type constantCoefficient; type constantCoefficient;
Cvm 0.5; Cvm 0.5;
} }
(water in steam)
{
type constantCoefficient;
Cvm 0.5;
}
); );
interfaceComposition interfaceComposition
();
heatTransfer
( (
(steam in water) (steam in water)
{ {
type Saturated; type spherical;
species ( H2O ); residualAlpha 1e-4;
Le 1.0;
saturationPressure
{
type ArdenBuck;
}
} }
); );
heatTransfer.steam heatTransfer.steam
@ -187,33 +138,19 @@ heatTransfer.water
); );
massTransfer.steam massTransfer.steam
( ();
);
massTransfer.water massTransfer.water
( ();
);
lift lift
( ();
);
wallLubrication wallLubrication
( ();
);
turbulentDispersion turbulentDispersion
( ();
(steam in water)
{
type Burns;//
sigma 0.7;
Ctd 1.0;
residualAlpha 1e-3;
}
);
// Minimum allowable pressure // Minimum allowable pressure
pMin 10000; pMin 10000;

View File

@ -23,9 +23,13 @@ thermoType
thermo hRefConst; thermo hRefConst;
equationOfState perfectGas; equationOfState perfectGas;
specie specie; specie specie;
energy sensibleInternalEnergy; energy sensibleEnthalpy;
} }
dpdt yes;
pressureWorkAlphaLimit 0;
species species
( (
water water

View File

@ -23,9 +23,13 @@ thermoType
thermo hRefConst; thermo hRefConst;
equationOfState perfectFluid; equationOfState perfectFluid;
specie specie; specie specie;
energy sensibleInternalEnergy; energy sensibleEnthalpy;
} }
dpdt yes;
pressureWorkAlphaLimit 0;
species species
( (
water water

View File

@ -25,11 +25,11 @@ stopAt endTime;
endTime 10; endTime 10;
deltaT 1e-6; deltaT 1e-3;
writeControl adjustableRunTime; writeControl adjustableRunTime;
writeInterval 0.5; writeInterval 0.1;
purgeWrite 0; purgeWrite 0;
@ -41,7 +41,7 @@ writeCompression compressed;
timeFormat general; timeFormat general;
timePrecision 6; timePrecision 9;
runTimeModifiable yes; runTimeModifiable yes;
@ -51,5 +51,30 @@ maxCo 0.1;
maxDeltaT 1e-2; maxDeltaT 1e-2;
functions
{
timeStepping
{
type setTimeStep;
functionObjectLibs ("libutilityFunctionObjects.so");
enabled yes;
deltaT tableFile;
file "system/deltaTvalues";
}
minMaxp
{
type fieldMinMax;
functionObjectLibs ("libfieldFunctionObjects.so");
fields
(
p
);
location no;
writeControl timeStep;
writeInterval 1;
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -0,0 +1,9 @@
(
(0 1e-3)
(0.99 1e-3)
(0.999 1e-4)
(0.9999 1e-5)
(1.001 1e-5)
(1.01 1e-4)
(1.1 1e-3)
);

View File

@ -27,8 +27,8 @@ solvers
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-8; tolerance 1e-10;
relTol 0; relTol 0.001;
} }
p_rghFinal p_rghFinal
@ -78,10 +78,10 @@ solvers
PIMPLE PIMPLE
{ {
nOuterCorrectors 4; nOuterCorrectors 3;
nCorrectors 1; nCorrectors 1;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nEnergyCorrectors 1; nEnergyCorrectors 2;
faceMomentum yes; faceMomentum yes;
} }
@ -89,7 +89,7 @@ relaxationFactors
{ {
fields fields
{ {
iDmdt 1; iDmdt 1;
} }
equations equations