Compare commits
3 Commits
develop.me
...
PDRfoam-rc
| Author | SHA1 | Date | |
|---|---|---|---|
| 1161a11931 | |||
| ae0b6ee7bc | |||
| c32da817c4 |
@ -15,7 +15,7 @@
|
|||||||
)
|
)
|
||||||
: -betav*dpdt
|
: -betav*dpdt
|
||||||
)
|
)
|
||||||
- fvm::laplacian(Db, hea)
|
- fvm::laplacian(DbThermal, hea)
|
||||||
+ betav*fvOptions(rho, hea)
|
+ betav*fvOptions(rho, hea)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -16,13 +16,7 @@ if (ign.ignited())
|
|||||||
)*rho/thermo.rhou()
|
)*rho/thermo.rhou()
|
||||||
: -betav*dpdt*rho/thermo.rhou()
|
: -betav*dpdt*rho/thermo.rhou()
|
||||||
)
|
)
|
||||||
- fvm::laplacian(Db, heau)
|
- fvm::laplacian(DbThermal, heau)
|
||||||
|
|
||||||
// These terms cannot be used in partially-premixed combustion due to
|
|
||||||
// the resultant inconsistency between ft and heau transport.
|
|
||||||
// A possible solution would be to solve for ftu as well as ft.
|
|
||||||
//- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau)
|
|
||||||
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau)
|
|
||||||
==
|
==
|
||||||
betav*fvOptions(rho, heau)
|
betav*fvOptions(rho, heau)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,33 +1,35 @@
|
|||||||
XiModels/XiModel/XiModel.C
|
XiModels/XiModel/XiModel.C
|
||||||
XiModels/XiModel/XiModelNew.C
|
XiModels/XiModel/XiModelNew.C
|
||||||
XiModels/fixed/fixed.C
|
|
||||||
XiModels/algebraic/algebraic.C
|
XiModels/transport/transportTwoEqs/transportTwoEqs.C
|
||||||
XiModels/transport/transport.C
|
|
||||||
|
|
||||||
XiModels/XiEqModels/XiEqModel/XiEqModel.C
|
XiModels/XiEqModels/XiEqModel/XiEqModel.C
|
||||||
XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
|
XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
|
||||||
|
|
||||||
XiModels/XiEqModels/Gulder/Gulder.C
|
XiModels/XiEqModels/Gulder/Gulder.C
|
||||||
XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C
|
XiModels/XiEqModels/instability2XiEq/instability2XiEq.C
|
||||||
XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C
|
XiModels/XiEqModels/BLMgMaXiEq/BLMgMaXiEq.C
|
||||||
XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
|
|
||||||
|
|
||||||
XiModels/XiGModels/XiGModel/XiGModel.C
|
XiModels/XiGModels/XiGModel/XiGModel.C
|
||||||
XiModels/XiGModels/XiGModel/XiGModelNew.C
|
XiModels/XiGModels/XiGModel/XiGModelNew.C
|
||||||
|
|
||||||
XiModels/XiGModels/KTS/KTS.C
|
XiModels/XiGModels/KTS/KTS.C
|
||||||
XiModels/XiGModels/instabilityG/instabilityG.C
|
XiModels/XiGModels/instabilityG/instabilityG.C
|
||||||
|
XiModels/XiGModels/instability2G/instability2G.C
|
||||||
|
|
||||||
PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
|
PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
|
||||||
|
|
||||||
PDRModels/dragModels/PDRDragModel/PDRDragModel.C
|
PDRModels/dragModels/PDRDragModel/PDRDragModel.C
|
||||||
PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
|
PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
|
||||||
PDRModels/dragModels/basic/basic.C
|
PDRModels/dragModels/basic/basic.C
|
||||||
|
PDRModels/dragModels/basicSch/basicSch.C
|
||||||
|
|
||||||
PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C
|
PDRModels/XiEqModels/normBasicXiSubXiEq/normBasicXiSubXiEq.C
|
||||||
PDRModels/XiGModels/basicXiSubG/basicXiSubG.C
|
|
||||||
|
PDRModels/XiGModels/normBasicXiSubG/normBasicXiSubG.C
|
||||||
|
|
||||||
laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
|
laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C
|
||||||
|
|
||||||
/*PDRFoamAutoRefine.C*/
|
|
||||||
PDRFoam.C
|
PDRFoam.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/PDRFoam
|
EXE = $(FOAM_APPBIN)/PDRFoam
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
EXE_INC = \
|
EXE_INC = -DFULLDEBUG -O0 -g \
|
||||||
-IXiModels/XiModel \
|
-IXiModels/XiModel \
|
||||||
-IXiModels/XiEqModels/XiEqModel \
|
-IXiModels/XiEqModels/XiEqModel \
|
||||||
-IXiModels/XiGModels/XiGModel \
|
-IXiModels/XiGModels/XiGModel \
|
||||||
-IPDRModels/dragModels/PDRDragModel \
|
-IPDRModels/dragModels/PDRDragModel \
|
||||||
-IlaminarFlameSpeed/SCOPE \
|
-IlaminarFlameSpeed/SCOPE \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
@ -15,12 +12,13 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
|
||||||
-lfvOptions \
|
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lengine \
|
-lengine \
|
||||||
-lturbulenceModels \
|
-lturbulenceModels \
|
||||||
@ -30,4 +28,6 @@ EXE_LIBS = \
|
|||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-ldynamicFvMesh
|
-lfiniteVolume \
|
||||||
|
-ldynamicFvMesh \
|
||||||
|
-lfvOptions
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -81,8 +82,11 @@ Description
|
|||||||
#include "PDRDragModel.H"
|
#include "PDRDragModel.H"
|
||||||
#include "ignition.H"
|
#include "ignition.H"
|
||||||
#include "bound.H"
|
#include "bound.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
|
#include "dynamicRefineFvMesh.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -95,22 +99,24 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include "postProcess.H"
|
#include "postProcess.H"
|
||||||
|
|
||||||
#include "addCheckCaseOptions.H"
|
#include "addCheckCaseOptions.H"
|
||||||
#include "setRootCaseLists.H"
|
#include "setRootCaseLists.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
|
||||||
#include "createControl.H"
|
#include "createDynamicFvMesh.H"
|
||||||
|
#include "createDyMControls.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
#include "readCombustionProperties.H"
|
#include "readCombustionProperties.H"
|
||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createFieldRefs.H"
|
#include "createFieldRefs.H"
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
#include "createTimeControls.H"
|
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
scalar StCoNum = 0.0;
|
scalar StCoNum = 0.0;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -119,33 +125,62 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readTimeControls.H"
|
#include "readDyMControls.H"
|
||||||
|
|
||||||
#include "compressibleCourantNo.H"
|
#include "compressibleCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
++runTime;
|
++runTime;
|
||||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
|
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||||
|
{
|
||||||
|
fvc::makeAbsolute(phi, rho, U);
|
||||||
|
|
||||||
|
// Flux estimate for introduced faces.
|
||||||
|
volVectorField rhoU("rhoU", rho*U);
|
||||||
|
|
||||||
|
bool meshChanged = mesh.controlledUpdate();
|
||||||
|
|
||||||
|
if (runTime.write() && meshChanged)
|
||||||
|
{
|
||||||
|
betav.write();
|
||||||
|
betai.write();
|
||||||
|
Blong.write();
|
||||||
|
Bv.write();
|
||||||
|
Lobs.write();
|
||||||
|
CT.write();
|
||||||
|
drag->writeFields();
|
||||||
|
flameWrinkling->writeFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phi, rho, U);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pimple.firstIter())
|
||||||
|
{
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
#include "bEqn.H"
|
||||||
|
#include "ftEqn.H"
|
||||||
|
#include "EauEqn.H"
|
||||||
|
#include "EaEqn.H"
|
||||||
|
|
||||||
|
if (!ign.ignited())
|
||||||
|
{
|
||||||
|
thermo.heu() == thermo.he();
|
||||||
|
}
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.correct())
|
||||||
{
|
{
|
||||||
#include "bEqn.H"
|
|
||||||
#include "ftEqn.H"
|
|
||||||
#include "EauEqn.H"
|
|
||||||
#include "EaEqn.H"
|
|
||||||
|
|
||||||
if (!ign.ignited())
|
|
||||||
{
|
|
||||||
thermo.heu() == thermo.he();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,12 +190,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
runTime.printExecutionTime(Info);
|
runTime.printExecutionTime(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\n end\n";
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,216 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
PDRFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Solver for compressible premixed/partially-premixed combustion with
|
|
||||||
turbulence modelling.
|
|
||||||
|
|
||||||
Combusting RANS code using the b-Xi two-equation model.
|
|
||||||
Xi may be obtained by either the solution of the Xi transport
|
|
||||||
equation or from an algebraic expression. Both approaches are
|
|
||||||
based on Gulder's flame speed correlation which has been shown
|
|
||||||
to be appropriate by comparison with the results from the
|
|
||||||
spectral model.
|
|
||||||
|
|
||||||
Strain effects are incorporated directly into the Xi equation
|
|
||||||
but not in the algebraic approximation. Further work need to be
|
|
||||||
done on this issue, particularly regarding the enhanced removal rate
|
|
||||||
caused by flame compression. Analysis using results of the spectral
|
|
||||||
model will be required.
|
|
||||||
|
|
||||||
For cases involving very lean Propane flames or other flames which are
|
|
||||||
very strain-sensitive, a transport equation for the laminar flame
|
|
||||||
speed is present. This equation is derived using heuristic arguments
|
|
||||||
involving the strain time scale and the strain-rate at extinction.
|
|
||||||
the transport velocity is the same as that for the Xi equation.
|
|
||||||
|
|
||||||
For large flames e.g. explosions additional modelling for the flame
|
|
||||||
wrinkling due to surface instabilities may be applied.
|
|
||||||
|
|
||||||
PDR (porosity/distributed resistance) modelling is included to handle
|
|
||||||
regions containing blockages which cannot be resolved by the mesh.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "dynamicFvMesh.H"
|
|
||||||
#include "psiuReactionThermo.H"
|
|
||||||
#include "turbulentFluidThermoModel.H"
|
|
||||||
#include "laminarFlameSpeed.H"
|
|
||||||
#include "XiModel.H"
|
|
||||||
#include "PDRDragModel.H"
|
|
||||||
#include "ignition.H"
|
|
||||||
#include "bound.H"
|
|
||||||
#include "dynamicRefineFvMesh.H"
|
|
||||||
#include "pimpleControl.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
argList::addNote
|
|
||||||
(
|
|
||||||
"Solver for compressible premixed/partially-premixed combustion with"
|
|
||||||
" turbulence modelling."
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "setRootCaseLists.H"
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createDynamicFvMesh.H"
|
|
||||||
|
|
||||||
pimpleControl pimple(mesh);
|
|
||||||
|
|
||||||
#include "readCombustionProperties.H"
|
|
||||||
#include "readGravitationalAcceleration.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
#include "createTimeControls.H"
|
|
||||||
#include "compressibleCourantNo.H"
|
|
||||||
#include "setInitialDeltaT.H"
|
|
||||||
|
|
||||||
turbulence->validate();
|
|
||||||
scalar StCoNum = 0.0;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
bool hasChanged = false;
|
|
||||||
|
|
||||||
while (runTime.run())
|
|
||||||
{
|
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "compressibleCourantNo.H"
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
// Indicators for refinement.
|
|
||||||
// Note: before ++runTime only for post-processing reasons.
|
|
||||||
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
|
|
||||||
volScalarField normalisedGradP
|
|
||||||
(
|
|
||||||
"normalisedGradP",
|
|
||||||
tmagGradP()/max(tmagGradP())
|
|
||||||
);
|
|
||||||
normalisedGradP.writeOpt() = IOobject::AUTO_WRITE;
|
|
||||||
tmagGradP.clear();
|
|
||||||
|
|
||||||
++runTime;
|
|
||||||
|
|
||||||
Info<< "\n\nTime = " << runTime.timeName() << endl;
|
|
||||||
|
|
||||||
{
|
|
||||||
// Make the fluxes absolute
|
|
||||||
fvc::makeAbsolute(phi, rho, U);
|
|
||||||
|
|
||||||
// Test : disable refinement for some cells
|
|
||||||
bitSet& protectedCell =
|
|
||||||
refCast<dynamicRefineFvMesh>(mesh).protectedCell();
|
|
||||||
|
|
||||||
if (protectedCell.empty())
|
|
||||||
{
|
|
||||||
protectedCell.setSize(mesh.nCells());
|
|
||||||
protectedCell = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
forAll(betav, celli)
|
|
||||||
{
|
|
||||||
if (betav[celli] < 0.99)
|
|
||||||
{
|
|
||||||
protectedCell.set(celli);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Flux estimate for introduced faces.
|
|
||||||
volVectorField rhoU("rhoU", rho*U);
|
|
||||||
|
|
||||||
// Do any mesh changes
|
|
||||||
bool meshChanged = mesh.update();
|
|
||||||
|
|
||||||
|
|
||||||
if (meshChanged)
|
|
||||||
{
|
|
||||||
hasChanged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runTime.write() && hasChanged)
|
|
||||||
{
|
|
||||||
betav.write();
|
|
||||||
Lobs.write();
|
|
||||||
CT.write();
|
|
||||||
drag->writeFields();
|
|
||||||
flameWrinkling->writeFields();
|
|
||||||
hasChanged = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
|
||||||
fvc::makeRelative(phi, rho, U);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
while (pimple.loop())
|
|
||||||
{
|
|
||||||
#include "UEqn.H"
|
|
||||||
|
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
|
||||||
while (pimple.correct())
|
|
||||||
{
|
|
||||||
#include "bEqn.H"
|
|
||||||
#include "ftEqn.H"
|
|
||||||
#include "huEqn.H"
|
|
||||||
#include "hEqn.H"
|
|
||||||
|
|
||||||
if (!ign.ignited())
|
|
||||||
{
|
|
||||||
hu == h;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "pEqn.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pimple.turbCorr())
|
|
||||||
{
|
|
||||||
turbulence->correct();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
runTime.printExecutionTime(Info);
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "\n end\n";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,150 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "basicXiSubXiEq.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiEqModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(basicSubGrid, 0);
|
|
||||||
addToRunTimeSelectionTable(XiEqModel, basicSubGrid, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::basicSubGrid::basicSubGrid
|
|
||||||
(
|
|
||||||
const dictionary& XiEqProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
|
||||||
|
|
||||||
B_
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"B",
|
|
||||||
Su.mesh().facesInstance(),
|
|
||||||
Su.mesh(),
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
Su.mesh()
|
|
||||||
),
|
|
||||||
|
|
||||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::basicSubGrid::~basicSubGrid()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
|
||||||
{
|
|
||||||
const fvMesh& mesh = Su_.mesh();
|
|
||||||
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
|
||||||
|
|
||||||
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
|
||||||
const volSymmTensorField& nsv =
|
|
||||||
mesh.lookupObject<volSymmTensorField>("nsv");
|
|
||||||
|
|
||||||
volScalarField magU(mag(U));
|
|
||||||
volVectorField Uhat
|
|
||||||
(
|
|
||||||
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
|
|
||||||
);
|
|
||||||
|
|
||||||
const scalarField Cw = pow(mesh.V(), 2.0/3.0);
|
|
||||||
|
|
||||||
volScalarField N
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"N",
|
|
||||||
mesh.time().constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar(Nv.dimensions(), Zero)
|
|
||||||
);
|
|
||||||
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
|
|
||||||
|
|
||||||
volSymmTensorField ns
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"ns",
|
|
||||||
U.mesh().time().timeName(),
|
|
||||||
U.mesh(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
U.mesh(),
|
|
||||||
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
|
||||||
);
|
|
||||||
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
|
|
||||||
|
|
||||||
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
|
|
||||||
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
|
|
||||||
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
|
||||||
|
|
||||||
volScalarField XiSubEq
|
|
||||||
(
|
|
||||||
scalar(1)
|
|
||||||
+ max(2.2*sqrt(b), min(0.34*magU/up*sqrt(b), scalar(1.6)))
|
|
||||||
* min(n, scalar(1))
|
|
||||||
);
|
|
||||||
|
|
||||||
return (XiSubEq*XiEqModel_->XiEq());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiEqModels::basicSubGrid::read(const dictionary& XiEqProperties)
|
|
||||||
{
|
|
||||||
XiEqModel::read(XiEqProperties);
|
|
||||||
|
|
||||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::XiEqModels::basicSubGrid
|
|
||||||
|
|
||||||
Description
|
|
||||||
Basic sub-grid obstacle flame-wrinkling enhancement factor model.
|
|
||||||
Details supplied by J Puttock 2/7/06.
|
|
||||||
|
|
||||||
<b> Sub-grid flame area generation </b>
|
|
||||||
|
|
||||||
\f$ n = N - \hat{\dwea{\vec{U}}}.n_{s}.\hat{\dwea{\vec{U}}} \f$
|
|
||||||
\f$ n_{r} = \sqrt{n} \f$
|
|
||||||
|
|
||||||
where:
|
|
||||||
|
|
||||||
\f$ \hat{\dwea{\vec{U}}} = \dwea{\vec{U}} / \vert \dwea{\vec{U}}
|
|
||||||
\vert \f$
|
|
||||||
|
|
||||||
\f$ b = \hat{\dwea{\vec{U}}}.B.\hat{\dwea{\vec{U}}} / n_{r} \f$
|
|
||||||
|
|
||||||
where:
|
|
||||||
|
|
||||||
\f$ B \f$ is the file "B".
|
|
||||||
|
|
||||||
\f$ N \f$ is the file "N".
|
|
||||||
|
|
||||||
\f$ n_{s} \f$ is the file "ns".
|
|
||||||
|
|
||||||
The flame area enhancement factor \f$ \Xi_{sub} \f$ is expected to
|
|
||||||
approach:
|
|
||||||
|
|
||||||
\f[
|
|
||||||
\Xi_{{sub}_{eq}} =
|
|
||||||
1 + max(2.2 \sqrt{b}, min(0.34 \frac{\vert \dwea{\vec{U}}
|
|
||||||
\vert}{{\vec{U}}^{'}}, 1.6)) \times min(\frac{n}{4}, 1)
|
|
||||||
\f]
|
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
basicSubGrid.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef basicSubGrid_H
|
|
||||||
#define basicSubGrid_H
|
|
||||||
|
|
||||||
#include "XiEqModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiEqModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class basicSubGrid Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class basicSubGrid
|
|
||||||
:
|
|
||||||
public XiEqModel
|
|
||||||
{
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- tblock
|
|
||||||
volSymmTensorField B_;
|
|
||||||
|
|
||||||
//- Equilibrium Xi model due to turbulence
|
|
||||||
autoPtr<XiEqModel> XiEqModel_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
basicSubGrid(const basicSubGrid&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const basicSubGrid&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("basicSubGrid");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
basicSubGrid
|
|
||||||
(
|
|
||||||
const dictionary& XiEqProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~basicSubGrid();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
|
||||||
virtual tmp<volScalarField> XiEq() const;
|
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
|
||||||
virtual bool read(const dictionary& XiEqProperties);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace XiEqModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,229 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "normBasicXiSubXiEq.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "ignition.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiEqModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(normBasicSubGrid, 0);
|
||||||
|
addToRunTimeSelectionTable(XiEqModel, normBasicSubGrid, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::normBasicSubGrid::normBasicSubGrid
|
||||||
|
(
|
||||||
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiEqModel(XiEqProperties, modelType,thermo, turbulence, Su),
|
||||||
|
Cxpe1_(XiEqModelCoeffs_.get<scalar>("Cxpe1")),
|
||||||
|
Cxpe2_(XiEqModelCoeffs_.get<scalar>("Cxpe2")),
|
||||||
|
Cxpe3_(XiEqModelCoeffs_.get<scalar>("Cxpe3")),
|
||||||
|
Cxpe4_(XiEqModelCoeffs_.get<scalar>("Cxpe4"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::normBasicSubGrid::~normBasicSubGrid()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::normBasicSubGrid::XiEq() const
|
||||||
|
{
|
||||||
|
const fvMesh& mesh = Su_.mesh();
|
||||||
|
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
||||||
|
const volScalarField& b = mesh.lookupObject<volScalarField>("b");
|
||||||
|
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
||||||
|
const volSymmTensorField& nsv =
|
||||||
|
mesh.lookupObject<volSymmTensorField>("nsv");
|
||||||
|
const volSymmTensorField& Bv =
|
||||||
|
mesh.lookupObject<volSymmTensorField>("Bv");
|
||||||
|
|
||||||
|
volScalarField magU(mag(U));
|
||||||
|
|
||||||
|
const scalarField Cw = pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
|
tmp<volScalarField> tN
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tN",
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar(Nv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& N = tN.ref();
|
||||||
|
|
||||||
|
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> tns
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tns",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
volSymmTensorField& ns = tns.ref();
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> tB
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tB",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedSymmTensor(Bv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
volSymmTensorField& B = tB.ref();
|
||||||
|
|
||||||
|
//calculating flame normal
|
||||||
|
|
||||||
|
volVectorField flNormal
|
||||||
|
(
|
||||||
|
"flNormal",
|
||||||
|
fvc::reconstruct(fvc::snGrad(b)*mesh.magSf())
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField mgb("mgb", mag(flNormal));
|
||||||
|
|
||||||
|
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
|
||||||
|
|
||||||
|
const volScalarField bc(b*(1.0-b));
|
||||||
|
|
||||||
|
dMgb += 1.0e-8*
|
||||||
|
(bc*mgb)().weightedAverage(mesh.V())
|
||||||
|
/(bc.weightedAverage(mesh.V()) + SMALL);
|
||||||
|
|
||||||
|
mgb += dMgb;
|
||||||
|
flNormal /= mgb;
|
||||||
|
|
||||||
|
B.primitiveFieldRef() = Bv.primitiveField()*sqrt(Cw);
|
||||||
|
volScalarField Ntemp("Ntemp", N);
|
||||||
|
volScalarField Np("Np", max(N - (flNormal & ns & flNormal), scalar(1)));
|
||||||
|
|
||||||
|
// B_ is Bv*sqrt(Cw)
|
||||||
|
volScalarField bl("bl",(flNormal & B & flNormal)/sqrt(Np));
|
||||||
|
bl.min(1.0);
|
||||||
|
|
||||||
|
volScalarField up(sqrt((2.0/3.0)*turbulence_.k()));
|
||||||
|
|
||||||
|
IOdictionary combustionProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
ignition ign(combustionProperties, mesh.time(), mesh);
|
||||||
|
|
||||||
|
dimensionedVector ignLoc("ignLoc", dimLength, ign.sites()[0].location());
|
||||||
|
|
||||||
|
dimensionedScalar filtRad2
|
||||||
|
(
|
||||||
|
"filtRad2",
|
||||||
|
dimLength,
|
||||||
|
6.0*ign.sites()[0].diameter()
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField filDist(mag(mesh.C() - ignLoc));
|
||||||
|
|
||||||
|
const volScalarField filterMult
|
||||||
|
(
|
||||||
|
pos(filDist - filtRad2)*neg(bl - 0.99)*pos(N - 1e-3)
|
||||||
|
);
|
||||||
|
|
||||||
|
tmp<volScalarField> XiSubEq
|
||||||
|
(
|
||||||
|
scalar(1)
|
||||||
|
+ min( min(Cxpe1_, Cxpe2_*magU/up)*sqrt(bl), Cxpe3_)
|
||||||
|
* filterMult
|
||||||
|
);
|
||||||
|
|
||||||
|
return XiSubEq;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiEqModels::normBasicSubGrid::read(const dictionary& XiEqProperties)
|
||||||
|
{
|
||||||
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
|
XiEqModelCoeffs_.readEntry("Cxpe1", Cxpe1_);
|
||||||
|
XiEqModelCoeffs_.readEntry("Cxpe2", Cxpe2_);
|
||||||
|
XiEqModelCoeffs_.readEntry("Cxpe3", Cxpe3_);
|
||||||
|
XiEqModelCoeffs_.readEntry("Cxpe4", Cxpe4_);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,20 +24,18 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiEqModels::instability
|
Foam::XiEqModels::normBasicSubGrid
|
||||||
|
|
||||||
Description
|
Description
|
||||||
This is the equilibrium level of the flame wrinkling generated by
|
|
||||||
instability. It is a constant (default 2.5). It is used in
|
|
||||||
\link XiModel.H \endlink.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
instability.C
|
normBasicSubGrid.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef instability_H
|
#ifndef normBasicSubGrid_H
|
||||||
#define instability_H
|
#define normBasicSubGrid_H
|
||||||
|
|
||||||
#include "XiEqModel.H"
|
#include "XiEqModel.H"
|
||||||
|
|
||||||
@ -49,43 +47,44 @@ namespace XiEqModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class instability Declaration
|
Class normBasicSubGrid Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class instability
|
class normBasicSubGrid
|
||||||
:
|
:
|
||||||
public XiEqModel
|
public XiEqModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Equilibrium Xi due to instability only
|
// Constants in the equilibrium Xp equation
|
||||||
scalar XiEqIn;
|
scalar Cxpe1_;
|
||||||
|
scalar Cxpe2_;
|
||||||
//- Equilibrium Xi model due to all other effects
|
scalar Cxpe3_;
|
||||||
autoPtr<XiEqModel> XiEqModel_;
|
scalar Cxpe4_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
instability(const instability&) = delete;
|
normBasicSubGrid(const normBasicSubGrid&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const instability&) = delete;
|
void operator=(const normBasicSubGrid&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("instability");
|
TypeName("normBasicSubGrid");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
instability
|
normBasicSubGrid
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -93,17 +92,16 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~instability();
|
virtual ~normBasicSubGrid();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
//- Return the flame-wrinking XiEq
|
||||||
virtual tmp<volScalarField> XiEq() const;
|
virtual tmp<volScalarField> XiEq() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiEqProperties);
|
virtual bool read(const dictionary& XiEqProperties);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1,115 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "basicXiSubG.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiGModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(basicSubGrid, 0);
|
|
||||||
addToRunTimeSelectionTable(XiGModel, basicSubGrid, dictionary);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiGModels::basicSubGrid::basicSubGrid
|
|
||||||
(
|
|
||||||
const dictionary& XiGProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
|
||||||
k1(XiGModelCoeffs_.get<scalar>("k1")),
|
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiGModels::basicSubGrid::~basicSubGrid()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
|
|
||||||
{
|
|
||||||
const objectRegistry& db = Su_.db();
|
|
||||||
const volVectorField& U = db.lookupObject<volVectorField>("U");
|
|
||||||
const volScalarField& Nv = db.lookupObject<volScalarField>("Nv");
|
|
||||||
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
|
||||||
|
|
||||||
tmp<volScalarField> tGtot = XiGModel_->G();
|
|
||||||
volScalarField& Gtot = tGtot.ref();
|
|
||||||
|
|
||||||
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
|
||||||
scalarField N(Nv.primitiveField()*Cw);
|
|
||||||
|
|
||||||
forAll(N, celli)
|
|
||||||
{
|
|
||||||
if (N[celli] > 1e-3)
|
|
||||||
{
|
|
||||||
Gtot[celli] += k1*mag(U[celli])/Lobs[celli];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return tGtot;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::Db() const
|
|
||||||
{
|
|
||||||
const objectRegistry& db = Su_.db();
|
|
||||||
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
|
||||||
const volScalarField& rho = db.lookupObject<volScalarField>("rho");
|
|
||||||
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
|
||||||
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
|
||||||
|
|
||||||
return XiGModel_->Db()
|
|
||||||
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*Lobs)*Lobs/(mgb*Lobs + 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiGModels::basicSubGrid::read(const dictionary& XiGProperties)
|
|
||||||
{
|
|
||||||
XiGModel::read(XiGProperties);
|
|
||||||
|
|
||||||
XiGModelCoeffs_.readEntry("k1", k1);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,300 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "normBasicXiSubG.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "zeroGradientFvPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiGModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(normBasicSubGrid, 0);
|
||||||
|
addToRunTimeSelectionTable(XiGModel, normBasicSubGrid, dictionary);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiGModels::normBasicSubGrid::normBasicSubGrid
|
||||||
|
(
|
||||||
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiGModel(XiGProperties, modelType, thermo, turbulence, Su),
|
||||||
|
// Bv_
|
||||||
|
// (
|
||||||
|
// IOobject
|
||||||
|
// (
|
||||||
|
// "Bv",
|
||||||
|
// Su.mesh().facesInstance(),
|
||||||
|
// Su.mesh(),
|
||||||
|
// IOobject::MUST_READ,
|
||||||
|
// IOobject::NO_WRITE
|
||||||
|
// ),
|
||||||
|
// Su.mesh()
|
||||||
|
// ),
|
||||||
|
k1_(XiGModelCoeffs_.get<scalar>("k1")),
|
||||||
|
kb1_(XiGModelCoeffs_.get<scalar>("kb1")),
|
||||||
|
kbe_(XiGModelCoeffs_.get<scalar>("kbe")),
|
||||||
|
kbx_(XiGModelCoeffs_.get<scalar>("kbx")),
|
||||||
|
k2_(XiGModelCoeffs_.get<scalar>("k2")),
|
||||||
|
LOverCw_(XiGModelCoeffs_.get<scalar>("LOverCw"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiGModels::normBasicSubGrid::~normBasicSubGrid()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiGModels::normBasicSubGrid::G() const
|
||||||
|
{
|
||||||
|
const objectRegistry& db = Su_.db();
|
||||||
|
const fvMesh& mesh = Su_.mesh();
|
||||||
|
const volVectorField& U = db.lookupObject<volVectorField>("U");
|
||||||
|
const volScalarField& b = db.lookupObject<volScalarField>("b");
|
||||||
|
const volScalarField& Nv = db.lookupObject<volScalarField>("Nv");
|
||||||
|
const volScalarField& St = db.lookupObject<volScalarField>("St");
|
||||||
|
const volSymmTensorField& nsv = db.lookupObject<volSymmTensorField>("nsv");
|
||||||
|
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
||||||
|
const volSymmTensorField& Bv = db.lookupObject<volSymmTensorField>("Bv");
|
||||||
|
|
||||||
|
const scalarField Cw(pow(Su_.mesh().V(), 2.0/3.0));
|
||||||
|
volScalarField CwVol
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"CwVol",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionSet(dimLength),
|
||||||
|
Cw,
|
||||||
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
|
);
|
||||||
|
CwVol.correctBoundaryConditions();
|
||||||
|
|
||||||
|
if (!db.foundObject<volScalarField>("Ep"))
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::tmp<Foam::volScalarField> Foam::XiGModels::"
|
||||||
|
"normBasicSubGrid::G() const"
|
||||||
|
)
|
||||||
|
<< "Looking for Ep in db which does not exist "
|
||||||
|
<< Foam::abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
const volScalarField& Ep = db.lookupObject<volScalarField>("Ep");
|
||||||
|
const volScalarField& Xp = db.lookupObject<volScalarField>("Xp");
|
||||||
|
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
||||||
|
|
||||||
|
//tmp<volScalarField> tGtot = XiGModel_->G();
|
||||||
|
tmp<volScalarField> tGtot
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tGtot",
|
||||||
|
Su_.mesh().time().timeName(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
Su_.mesh(),
|
||||||
|
dimensionedScalar(inv(dimTime), Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& Gtot = tGtot.ref();
|
||||||
|
|
||||||
|
|
||||||
|
//calculating flame normal
|
||||||
|
|
||||||
|
volVectorField flNormal(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
|
||||||
|
volScalarField mgb("mgb", mag(flNormal));
|
||||||
|
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
|
||||||
|
{
|
||||||
|
volScalarField bc(b*(1.0-b));
|
||||||
|
|
||||||
|
dMgb += 1.0e-8*
|
||||||
|
(bc*mgb)().weightedAverage(mesh.V())
|
||||||
|
/(bc.weightedAverage(mesh.V()) + SMALL);
|
||||||
|
}
|
||||||
|
mgb += dMgb;
|
||||||
|
flNormal /= mgb;
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> tN
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tN",
|
||||||
|
Su_.mesh().time().timeName(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
Su_.mesh(),
|
||||||
|
dimensionedScalar(Nv.dimensions(), Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& N = tN.ref();
|
||||||
|
|
||||||
|
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> tns
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tns",
|
||||||
|
Su_.mesh().time().timeName(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
Su_.mesh(),
|
||||||
|
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField& ns = tns.ref();
|
||||||
|
|
||||||
|
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> tB
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tB",
|
||||||
|
Su_.mesh().time().timeName(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
Su_.mesh(),
|
||||||
|
dimensionedSymmTensor(Bv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField& B = tB.ref();
|
||||||
|
|
||||||
|
B.primitiveFieldRef() = Bv.primitiveField()*sqrt(Cw);
|
||||||
|
|
||||||
|
volScalarField Np(max(N - (flNormal & ns & flNormal), scalar(1)));
|
||||||
|
|
||||||
|
// B_ is Bv*sqrt(Cw)
|
||||||
|
volScalarField bl("bl",(flNormal & B & flNormal)/sqrt(Np));
|
||||||
|
bl.min(1.0);
|
||||||
|
|
||||||
|
volScalarField flSpeed("flSpeed", ((U & flNormal) + St)*b/(b+SMALL)) ;
|
||||||
|
|
||||||
|
volScalarField up("up", sqrt((2.0/3.0)*turbulence_.k()));
|
||||||
|
|
||||||
|
const volScalarField Gtot1
|
||||||
|
(
|
||||||
|
"Gtot1",
|
||||||
|
(
|
||||||
|
k1_ + kb1_*min(pow(bl, kbe_), kbx_)
|
||||||
|
)*mag(flSpeed)/(max(Lobs, LOverCw_*CwVol))
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField Gtot2("Gtot2", k2_*Ep*Su_*Xi/(Xp - 0.999));
|
||||||
|
|
||||||
|
const volScalarField value(pos(N - 1.e-3)*neg(bl - 0.99));
|
||||||
|
|
||||||
|
Gtot = value*Gtot1+(1.0 - value)*Gtot2;
|
||||||
|
|
||||||
|
|
||||||
|
//if (Xi.mesh().time().outputTime())
|
||||||
|
{
|
||||||
|
//Gtot.write();
|
||||||
|
//bl.write();
|
||||||
|
//Lobs.write();
|
||||||
|
//flSpeed.write();
|
||||||
|
//N.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
return tGtot;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiGModels::normBasicSubGrid::Db() const
|
||||||
|
{
|
||||||
|
// Not used //
|
||||||
|
const objectRegistry& db = Su_.db();
|
||||||
|
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
||||||
|
const volScalarField& rho = db.lookupObject<volScalarField>("rho");
|
||||||
|
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
||||||
|
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
||||||
|
const volScalarField& Db = db.lookupObject<volScalarField>("Db");
|
||||||
|
|
||||||
|
//return turbulence_.muEff()
|
||||||
|
return Db
|
||||||
|
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*Lobs)*Lobs/(mgb*Lobs + 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiGModels::normBasicSubGrid::read(const dictionary& XiGProperties)
|
||||||
|
{
|
||||||
|
XiGModel::read(XiGProperties);
|
||||||
|
|
||||||
|
XiGModelCoeffs_.readEntry("k1", k1_);
|
||||||
|
XiGModelCoeffs_.readEntry("kb1", kb1_);
|
||||||
|
XiGModelCoeffs_.readEntry("kbe", kbe_);
|
||||||
|
XiGModelCoeffs_.readEntry("kbx", kbx_);
|
||||||
|
XiGModelCoeffs_.readEntry("k2", k2_);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,37 +24,19 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiGModels::basicSubGrid
|
Foam::XiGModel::normBasicSubGrid
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
Basic sub-grid obstacle flame-wrinkling generation rate coefficient model.
|
|
||||||
Details supplied by J Puttock 2/7/06.
|
|
||||||
|
|
||||||
\f$ G_{sub} \f$ denotes the generation coefficient and it is given by
|
|
||||||
|
|
||||||
\f[
|
|
||||||
G_{sub} = k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{obs}}
|
|
||||||
\frac{/Xi_{{sub}_{eq}}-1}{/Xi_{sub}}
|
|
||||||
\f]
|
|
||||||
|
|
||||||
and the removal:
|
|
||||||
|
|
||||||
\f[
|
|
||||||
- k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}}
|
|
||||||
\frac{\Xi_{sub}-1}{\Xi_{sub}}
|
|
||||||
\f]
|
|
||||||
|
|
||||||
Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$
|
|
||||||
due to the turbulence.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
basicSubGrid.C
|
normBasicSubGrid.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef basicSubGrid_H
|
#ifndef normBasicSubGrid_H
|
||||||
#define basicSubGrid_H
|
#define normBasicSubGrid_H
|
||||||
|
|
||||||
#include "XiGModel.H"
|
#include "XiGModel.H"
|
||||||
|
|
||||||
@ -66,43 +48,55 @@ namespace XiGModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class basicSubGrid Declaration
|
Class normBasicSubGrid Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class basicSubGrid
|
class normBasicSubGrid
|
||||||
:
|
:
|
||||||
public XiGModel
|
public XiGModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Sub-grid generation rate coefficient
|
//- Sub-grid generation rate coefficient
|
||||||
scalar k1;
|
scalar k1_;
|
||||||
|
|
||||||
//- Xi generation rate model due to turbulence
|
//- Sub-grid generation rate coefficient - * sqrt(b)
|
||||||
autoPtr<XiGModel> XiGModel_;
|
scalar kb1_;
|
||||||
|
|
||||||
|
//- Sub-grid generation rate coefficient - * b
|
||||||
|
scalar kbe_;
|
||||||
|
|
||||||
|
//- Sub-grid generation rate upper limit coefficient - * b
|
||||||
|
scalar kbx_;
|
||||||
|
|
||||||
|
//- Sub-grid generation rate coefficient
|
||||||
|
scalar k2_;
|
||||||
|
|
||||||
|
//- Maximum Lobs/CellWidth
|
||||||
|
scalar LOverCw_;
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
basicSubGrid(const basicSubGrid&) = delete;
|
normBasicSubGrid(const normBasicSubGrid&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const basicSubGrid&) = delete;
|
void operator=(const normBasicSubGrid&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("basicSubGridG");
|
TypeName("normBasicSubGridG");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
basicSubGrid
|
normBasicSubGrid
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -110,12 +104,12 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~basicSubGrid();
|
virtual ~normBasicSubGrid();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling generation rate
|
//- Return the flame-wrinking generation rate
|
||||||
virtual tmp<volScalarField> G() const;
|
virtual tmp<volScalarField> G() const;
|
||||||
|
|
||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -71,7 +71,7 @@ Foam::PDRDragModel::PDRDragModel
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::PDRDragModel::~PDRDragModel()
|
Foam::PDRDragModel::~PDRDragModel()
|
||||||
{}
|
{}
|
||||||
@ -81,7 +81,7 @@ Foam::PDRDragModel::~PDRDragModel()
|
|||||||
|
|
||||||
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
||||||
{
|
{
|
||||||
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs");
|
||||||
|
|
||||||
PDRDragModelCoeffs_.readEntry("drag", on_);
|
PDRDragModelCoeffs_.readEntry("drag", on_);
|
||||||
|
|
||||||
|
|||||||
@ -76,11 +76,11 @@ private:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
PDRDragModel(const PDRDragModel&) = delete;
|
PDRDragModel(const PDRDragModel&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const PDRDragModel&) = delete;
|
void operator=(const PDRDragModel&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -161,13 +161,15 @@ public:
|
|||||||
using regIOobject::read;
|
using regIOobject::read;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& PDRProperties) = 0;
|
virtual bool read(const dictionary& PDRProperties);
|
||||||
|
|
||||||
|
//- Write Data
|
||||||
virtual bool writeData(Ostream&) const
|
virtual bool writeData(Ostream&) const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Write fields
|
||||||
virtual void writeFields() const
|
virtual void writeFields() const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,32 +31,34 @@ License
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
|
Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& PDRProperties,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(dict.get<word>("PDRDragModel"));
|
const word modelType(PDRProperties.get<word>("PDRDragModel"));
|
||||||
|
|
||||||
Info<< "Selecting drag model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalIOErrorInLookup
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
dict,
|
"PDRDragModel::New"
|
||||||
"PDRDragModel",
|
) << "Unknown PDRDragModel type "
|
||||||
modelType,
|
<< modelType << nl << nl
|
||||||
*dictionaryConstructorTablePtr_
|
<< "Valid PDRDragModels are : " << endl
|
||||||
) << exit(FatalIOError);
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<PDRDragModel>
|
return autoPtr<PDRDragModel>
|
||||||
(cstrIter()(dict, turbulence, rho, U, phi));
|
(cstrIter()(PDRProperties,turbulence, rho, U, phi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -83,7 +83,7 @@ Foam::PDRDragModels::basic::basic
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::PDRDragModels::basic::~basic()
|
Foam::PDRDragModels::basic::~basic()
|
||||||
{}
|
{}
|
||||||
@ -159,6 +159,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
|||||||
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return tGk;
|
return tGk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -110,11 +110,11 @@ class basic
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
basic(const basic&) = delete;
|
basic(const basic&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const basic&) = delete;
|
void operator=(const basic&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -0,0 +1,319 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "basicSch.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace PDRDragModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(basicSch, 0);
|
||||||
|
addToRunTimeSelectionTable(PDRDragModel, basicSch, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::PDRDragModels::basicSch::basicSch
|
||||||
|
(
|
||||||
|
const dictionary& PDRProperties,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PDRDragModel(PDRProperties,turbulence, rho, U, phi),
|
||||||
|
Csu("Csu", dimless, PDRDragModelCoeffs_),
|
||||||
|
Csk("Csk", dimless, PDRDragModelCoeffs_),
|
||||||
|
Aw_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Aw",
|
||||||
|
U_.mesh().facesInstance(),
|
||||||
|
U_.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
U_.mesh()
|
||||||
|
),
|
||||||
|
|
||||||
|
CR_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"CR",
|
||||||
|
U_.mesh().facesInstance(),
|
||||||
|
U_.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
U_.mesh()
|
||||||
|
),
|
||||||
|
nrCoef_(PDRDragModelCoeffs_.get<scalar>("nrCoef")),
|
||||||
|
nrExp2_(PDRDragModelCoeffs_.get<scalar>("nrExp2")),
|
||||||
|
lCoef_(PDRDragModelCoeffs_.get<scalar>("lCoef")),
|
||||||
|
maxSchFac_(PDRDragModelCoeffs_.get<scalar>("maxSchFac")),
|
||||||
|
subGridSchelkin_(PDRDragModelCoeffs_.get<bool>("subGridSchelkin"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::PDRDragModels::basicSch::~basicSch()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basicSch::Dcu() const
|
||||||
|
{
|
||||||
|
tmp<volSymmTensorField> tDragDcu
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tDragDcu",
|
||||||
|
U_.mesh().time().constant(),
|
||||||
|
U_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
U_.mesh(),
|
||||||
|
dimensionedSymmTensor(dimMass/dimTime/dimVolume, Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField& DragDcu = tDragDcu.ref();
|
||||||
|
|
||||||
|
if (on_)
|
||||||
|
{
|
||||||
|
const volScalarField& betav =
|
||||||
|
U_.db().lookupObject<volScalarField>("betav");
|
||||||
|
|
||||||
|
DragDcu =
|
||||||
|
(0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tDragDcu;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basicSch::Gk() const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tGk
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tGk",
|
||||||
|
U_.mesh().time().constant(),
|
||||||
|
U_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
U_.mesh(),
|
||||||
|
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& Gk = tGk.ref();
|
||||||
|
|
||||||
|
if (on_)
|
||||||
|
{
|
||||||
|
const volScalarField& betav =
|
||||||
|
U_.db().lookupObject<volScalarField>("betav");
|
||||||
|
|
||||||
|
const volSymmTensorField& CT =
|
||||||
|
U_.db().lookupObject<volSymmTensorField>("CT");
|
||||||
|
|
||||||
|
Gk =
|
||||||
|
(0.5*rho_)*mag(U_)*(U_ & CT & U_)
|
||||||
|
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
||||||
|
|
||||||
|
if (subGridSchelkin_)
|
||||||
|
{
|
||||||
|
Gk *= schFac();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return tGk;
|
||||||
|
}
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basicSch::schFac() const
|
||||||
|
{
|
||||||
|
const volScalarField& Su_ = U_.db().lookupObject<volScalarField>("Su");
|
||||||
|
const volScalarField& rhou_ = U_.db().lookupObject<volScalarField>("rhou");
|
||||||
|
const volScalarField& muu_ = U_.db().lookupObject<volScalarField>("muu");
|
||||||
|
|
||||||
|
tmp<volScalarField> tfac
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tfac",
|
||||||
|
U_.mesh().time().constant(),
|
||||||
|
U_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
U_.mesh(),
|
||||||
|
dimensionedScalar(dimless, Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& schFac = tfac.ref();
|
||||||
|
|
||||||
|
const volScalarField& k = turbulence_.k();
|
||||||
|
const volScalarField& epsilon = turbulence_.epsilon();
|
||||||
|
|
||||||
|
const volScalarField up(sqrt((2.0/3.0)*k));
|
||||||
|
const volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
||||||
|
|
||||||
|
volScalarField Rs(Su_*l*rhou_/muu_);
|
||||||
|
|
||||||
|
if (subGridSchelkin_)
|
||||||
|
{
|
||||||
|
schFac = max
|
||||||
|
(
|
||||||
|
1.0,
|
||||||
|
min
|
||||||
|
(
|
||||||
|
maxSchFac_,
|
||||||
|
pow(Rs, 2.0 * SchelkinExponent(nrCoef_, nrExp2_, Su_))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tfac;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basicSch::SchelkinExponent
|
||||||
|
(
|
||||||
|
const scalar nrCoef,
|
||||||
|
const scalar nrExp,
|
||||||
|
const volScalarField& Su
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const fvMesh& mesh = Su.mesh();
|
||||||
|
|
||||||
|
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
||||||
|
|
||||||
|
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
||||||
|
const volSymmTensorField& nsv =
|
||||||
|
mesh.lookupObject<volSymmTensorField>("nsv");
|
||||||
|
|
||||||
|
tmp<volScalarField> tN
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tN",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar(Nv.dimensions(), Zero)
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& N = tN.ref();
|
||||||
|
|
||||||
|
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> tns
|
||||||
|
(
|
||||||
|
new volSymmTensorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tns",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField& ns = tns.ref();
|
||||||
|
|
||||||
|
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
|
const volVectorField Uhat
|
||||||
|
(
|
||||||
|
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField nr(sqrt(max(N - (Uhat & ns & Uhat), scalar(1.0))));
|
||||||
|
|
||||||
|
//Re use tN
|
||||||
|
N.primitiveFieldRef() =
|
||||||
|
nrCoef*((scalar(1.0) - pow(nrExp, nr))/(1.0 - nrExp) - scalar(1.0));
|
||||||
|
|
||||||
|
return tN;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::PDRDragModels::basicSch::read(const dictionary& PDRProperties)
|
||||||
|
{
|
||||||
|
PDRDragModel::read(PDRProperties);
|
||||||
|
|
||||||
|
PDRDragModelCoeffs_.readEntry("Csu", Csu.value());
|
||||||
|
PDRDragModelCoeffs_.readEntry("Csk", Csk.value());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::PDRDragModels::basicSch::writeFields() const
|
||||||
|
{
|
||||||
|
Aw_.write();
|
||||||
|
CR_.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,90 +24,115 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiModels::fixed
|
Foam::PDRDragModels::basicSch
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Fixed value model for Xi. See \link XiModel.H \endlink for more details
|
|
||||||
on flame wrinkling modelling.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixed.C
|
basicSch.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fixed_H
|
#ifndef basicSch_H
|
||||||
#define fixed_H
|
#define basicSch_H
|
||||||
|
|
||||||
#include "XiModel.H"
|
#include "PDRDragModel.H"
|
||||||
|
#include "XiEqModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace XiModels
|
namespace PDRDragModels
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixed Declaration
|
Class basicSch Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class fixed
|
class basicSch
|
||||||
:
|
:
|
||||||
public XiModel
|
public PDRDragModel
|
||||||
{
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
dimensionedScalar Csu;
|
||||||
|
dimensionedScalar Csk;
|
||||||
|
volScalarField Aw_;
|
||||||
|
volSymmTensorField CR_;
|
||||||
|
|
||||||
|
//- Schelkin effect Model constants
|
||||||
|
const scalar nrCoef_;
|
||||||
|
const scalar nrExp2_;
|
||||||
|
const scalar lCoef_;
|
||||||
|
const scalar maxSchFac_;
|
||||||
|
|
||||||
|
//- Use sub-grid Schelkin effect
|
||||||
|
bool subGridSchelkin_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
fixed(const fixed&) = delete;
|
basicSch(const basicSch&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const fixed&) = delete;
|
void operator=(const basicSch&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("fixed");
|
TypeName("basicSch");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
fixed
|
basicSch
|
||||||
(
|
(
|
||||||
const dictionary& XiProperties,
|
const dictionary& PDRProperties,
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su,
|
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volScalarField& b,
|
const volVectorField& U,
|
||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~fixed();
|
virtual ~basicSch();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi
|
//- Return the momentum drag coefficient
|
||||||
virtual void correct()
|
virtual tmp<volSymmTensorField> Dcu() const;
|
||||||
{}
|
|
||||||
|
//- Return the momentum drag turbulence generation rate
|
||||||
|
virtual tmp<volScalarField> Gk() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiProperties);
|
virtual bool read(const dictionary& PDRProperties);
|
||||||
|
|
||||||
//- Write fields of the XiEq model
|
//- Write fields
|
||||||
virtual void writeFields()
|
void writeFields() const;
|
||||||
{}
|
|
||||||
|
|
||||||
|
//- Return the schelkin factor for drag turbulence generation rate
|
||||||
|
tmp<volScalarField> schFac() const;
|
||||||
|
|
||||||
|
//- Return the sub-grid Schelkin effect exponent
|
||||||
|
tmp<volScalarField> SchelkinExponent
|
||||||
|
(
|
||||||
|
const scalar,
|
||||||
|
const scalar,
|
||||||
|
const volScalarField&
|
||||||
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace XiModels
|
} // End namespace PDRDragModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -5,8 +5,8 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "PDRkEpsilon.H"
|
#include "PDRkEpsilon.H"
|
||||||
#include "PDRDragModel.H"
|
#include "PDRDragModel.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -70,16 +71,40 @@ PDRkEpsilon::PDRkEpsilon
|
|||||||
modelName
|
modelName
|
||||||
),
|
),
|
||||||
|
|
||||||
C4_
|
C5_(coeffDict_.get<scalar>("C5")),
|
||||||
|
C6_(coeffDict_.get<scalar>("C6")),
|
||||||
|
maxLOverCellW_(coeffDict_.get<scalar>("maxLOverCellW")),
|
||||||
|
lCoef_(coeffDict_.get<scalar>("lCoef")),
|
||||||
|
noTurbUntil_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
(
|
(
|
||||||
"C4",
|
"noTurbUntil",
|
||||||
coeffDict_,
|
coeffDict_,
|
||||||
0.1
|
0.0
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
{}
|
LOverLobs_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"LOverLobs",
|
||||||
|
coeffDict_,
|
||||||
|
0.2
|
||||||
|
)
|
||||||
|
),
|
||||||
|
LOverMobs_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"LOverMobs",
|
||||||
|
coeffDict_,
|
||||||
|
0.0
|
||||||
|
)
|
||||||
|
),
|
||||||
|
bMin_(coeffDict_.get<scalar>("bMin")),
|
||||||
|
flameFilteredG_(coeffDict_.get<bool>("flameFilteredG"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||||
@ -94,7 +119,9 @@ bool PDRkEpsilon::read()
|
|||||||
{
|
{
|
||||||
if (RASModel::read())
|
if (RASModel::read())
|
||||||
{
|
{
|
||||||
C4_.readIfPresent(coeffDict_);
|
noTurbUntil_.readIfPresent(coeffDict_);
|
||||||
|
LOverLobs_.readIfPresent(coeffDict_);
|
||||||
|
LOverMobs_.readIfPresent(coeffDict_);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,16 +137,12 @@ void PDRkEpsilon::correct()
|
|||||||
nut_ = Cmu_*sqr(k_)/epsilon_;
|
nut_ = Cmu_*sqr(k_)/epsilon_;
|
||||||
nut_.correctBoundaryConditions();
|
nut_.correctBoundaryConditions();
|
||||||
|
|
||||||
// Re-calculate thermal diffusivity
|
|
||||||
//***HGWalphat_ = mut_/Prt_;
|
|
||||||
//alphat_.correctBoundaryConditions();
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RASModel::correct();
|
RASModel::correct();
|
||||||
|
|
||||||
volScalarField divU(fvc::div(phi_/fvc::interpolate(rho_)));
|
volScalarField divU("divU",fvc::div(phi_/fvc::interpolate(rho_)));
|
||||||
|
|
||||||
if (mesh_.moving())
|
if (mesh_.moving())
|
||||||
{
|
{
|
||||||
@ -127,7 +150,9 @@ void PDRkEpsilon::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmp<volTensorField> tgradU = fvc::grad(U_);
|
tmp<volTensorField> tgradU = fvc::grad(U_);
|
||||||
|
|
||||||
volScalarField G(GName(), rho_*nut_*(tgradU() && dev(twoSymm(tgradU()))));
|
volScalarField G(GName(), rho_*nut_*(tgradU() && dev(twoSymm(tgradU()))));
|
||||||
|
|
||||||
tgradU.clear();
|
tgradU.clear();
|
||||||
|
|
||||||
// Update epsilon and G at the wall
|
// Update epsilon and G at the wall
|
||||||
@ -141,59 +166,102 @@ void PDRkEpsilon::correct()
|
|||||||
const volScalarField& Lobs =
|
const volScalarField& Lobs =
|
||||||
U_.db().lookupObject<volScalarField>("Lobs");
|
U_.db().lookupObject<volScalarField>("Lobs");
|
||||||
|
|
||||||
|
const volVectorField& U = mesh_.lookupObject<volVectorField>("U");
|
||||||
|
|
||||||
|
const volScalarField& b = mesh_.lookupObject<volScalarField>("b");
|
||||||
|
|
||||||
|
const scalarField Cw(pow(mesh_.V(), 2.0/3.0));
|
||||||
|
|
||||||
const PDRDragModel& drag =
|
const PDRDragModel& drag =
|
||||||
U_.db().lookupObject<PDRDragModel>("PDRDragModel");
|
U_.db().lookupObject<PDRDragModel>("PDRDragModel");
|
||||||
|
|
||||||
volScalarField GR(drag.Gk());
|
volScalarField GR(drag.Gk());
|
||||||
|
|
||||||
volScalarField LI
|
volScalarField LD
|
||||||
(C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL)));
|
|
||||||
|
|
||||||
// Dissipation equation
|
|
||||||
tmp<fvScalarMatrix> epsEqn
|
|
||||||
(
|
(
|
||||||
betav*fvm::ddt(rho_, epsilon_)
|
"LD",
|
||||||
+ fvm::div(phi_, epsilon_)
|
(LOverLobs_)*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL))
|
||||||
- fvm::laplacian(rho_*DepsilonEff(), epsilon_)
|
|
||||||
==
|
|
||||||
C1_*betav*G*epsilon_/k_
|
|
||||||
+ 1.5*pow(Cmu_, 3.0/4.0)*GR*sqrt(k_)/LI
|
|
||||||
- fvm::SuSp(((2.0/3.0)*C1_)*betav*rho_*divU, epsilon_)
|
|
||||||
- fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
epsEqn.ref().relax();
|
LD.primitiveFieldRef() = min(LD.primitiveField(), maxLOverCellW_*sqrt(Cw));
|
||||||
|
|
||||||
epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
|
const volScalarField LI(lCoef_*pow(k_, 3.0/2.0)/epsilon_);
|
||||||
|
|
||||||
solve(epsEqn);
|
IOdictionary combustionProperties
|
||||||
bound(epsilon_, epsilonMin_);
|
|
||||||
|
|
||||||
|
|
||||||
// Turbulent kinetic energy equation
|
|
||||||
|
|
||||||
tmp<fvScalarMatrix> kEqn
|
|
||||||
(
|
(
|
||||||
betav*fvm::ddt(rho_, k_)
|
IOobject
|
||||||
+ fvm::div(phi_, k_)
|
(
|
||||||
- fvm::laplacian(rho_*DkEff(), k_)
|
"combustionProperties",
|
||||||
==
|
mesh_.time().constant(),
|
||||||
betav*G + GR
|
mesh_,
|
||||||
- fvm::SuSp((2.0/3.0)*betav*rho_*divU, k_)
|
IOobject::MUST_READ,
|
||||||
- fvm::Sp(betav*rho_*epsilon_/k_, k_)
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
kEqn.ref().relax();
|
ignition ign(combustionProperties, mesh_.time(), U.mesh());
|
||||||
solve(kEqn);
|
|
||||||
bound(k_, kMin_);
|
|
||||||
|
|
||||||
|
dimensionedVector ignLoc("ignLoc", dimLength, ign.sites()[0].location());
|
||||||
|
|
||||||
|
dimensionedScalar filtRad2
|
||||||
|
(
|
||||||
|
"filtRad2",
|
||||||
|
dimLength,
|
||||||
|
6.0*ign.sites()[0].diameter()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (flameFilteredG_)
|
||||||
|
{
|
||||||
|
const volScalarField filDist(mag(mesh_.C() - ignLoc));
|
||||||
|
const volScalarField filterG(pos(filDist - filtRad2));
|
||||||
|
const volScalarField filterdivU(pos(filDist - filtRad2));
|
||||||
|
const volScalarField filterGR(pos(filDist - filtRad2)*pos(b - bMin_));
|
||||||
|
|
||||||
|
G *= filterG;
|
||||||
|
GR *= filterGR;
|
||||||
|
divU *= filterdivU;
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField Cl(C5_ + (C6_*((LI - LD)/LI)));
|
||||||
|
Cl.max(0.0);
|
||||||
|
|
||||||
|
if (mesh_.time() > noTurbUntil_)
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> epsEqn
|
||||||
|
(
|
||||||
|
betav*fvm::ddt(rho_, epsilon_)
|
||||||
|
+ fvm::div(phi_, epsilon_)
|
||||||
|
- fvm::laplacian(rho_*DepsilonEff(), epsilon_)
|
||||||
|
==
|
||||||
|
C1_*betav*G*epsilon_/k_
|
||||||
|
+ Cl*(epsilon_/k_)*GR
|
||||||
|
- fvm::SuSp(((2.0/3.0)*C1_+C3_)*betav*rho_*divU, epsilon_)
|
||||||
|
- fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_)
|
||||||
|
);
|
||||||
|
|
||||||
|
epsEqn.ref().relax();
|
||||||
|
epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
|
||||||
|
solve(epsEqn);
|
||||||
|
bound(epsilon_, epsilonMin_);
|
||||||
|
|
||||||
|
tmp<fvScalarMatrix> kEqn
|
||||||
|
(
|
||||||
|
betav*fvm::ddt(rho_, k_)
|
||||||
|
+ fvm::div(phi_, k_)
|
||||||
|
- fvm::laplacian(rho_*DkEff(), k_)
|
||||||
|
==
|
||||||
|
(betav*G + GR)
|
||||||
|
- fvm::SuSp((2.0/3.0)*betav*rho_*divU, k_)
|
||||||
|
- fvm::Sp(betav*rho_*epsilon_/k_, k_)
|
||||||
|
);
|
||||||
|
|
||||||
|
kEqn.ref().relax();
|
||||||
|
solve(kEqn);
|
||||||
|
bound(k_, kMin_);
|
||||||
|
}
|
||||||
// Re-calculate viscosity
|
// Re-calculate viscosity
|
||||||
nut_ = Cmu_*sqr(k_)/epsilon_;
|
nut_ = Cmu_*sqr(k_)/epsilon_;
|
||||||
nut_.correctBoundaryConditions();
|
nut_.correctBoundaryConditions();
|
||||||
|
|
||||||
// Re-calculate thermal diffusivity
|
|
||||||
//***HGWalphat_ = mut_/Prt_;
|
|
||||||
//alphat_.correctBoundaryConditions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -30,30 +31,6 @@ Description
|
|||||||
Standard k-epsilon turbulence model with additional source terms
|
Standard k-epsilon turbulence model with additional source terms
|
||||||
corresponding to PDR basic drag model (\link basic.H \endlink)
|
corresponding to PDR basic drag model (\link basic.H \endlink)
|
||||||
|
|
||||||
The default model coefficients correspond to the following:
|
|
||||||
\verbatim
|
|
||||||
PDRkEpsilonCoeffs
|
|
||||||
{
|
|
||||||
Cmu 0.09;
|
|
||||||
C1 1.44;
|
|
||||||
C2 1.92;
|
|
||||||
C3 -0.33; // only for compressible
|
|
||||||
C4 0.1;
|
|
||||||
sigmak 1.0; // only for compressible
|
|
||||||
sigmaEps 1.3;
|
|
||||||
Prt 1.0; // only for compressible
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
The turbulence source term \f$ G_{R} \f$ appears in the
|
|
||||||
\f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to
|
|
||||||
interaction with unresolved obstacles.
|
|
||||||
|
|
||||||
In the \f$ \epsilon \f$ equation \f$ C_{1} G_{R} \f$ is added as a source
|
|
||||||
term.
|
|
||||||
|
|
||||||
In the \f$ \kappa \f$ equation \f$ G_{R} \f$ is added as a source term.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
PDRkEpsilon.C
|
PDRkEpsilon.C
|
||||||
|
|
||||||
@ -63,6 +40,7 @@ SourceFiles
|
|||||||
#define compressiblePDRkEpsilon_H
|
#define compressiblePDRkEpsilon_H
|
||||||
|
|
||||||
#include "kEpsilon.H"
|
#include "kEpsilon.H"
|
||||||
|
#include "ignition.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -88,10 +66,18 @@ class PDRkEpsilon
|
|||||||
>
|
>
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
// Model coefficients
|
// Model coefficients
|
||||||
dimensionedScalar C4_;
|
scalar C5_;
|
||||||
|
scalar C6_;
|
||||||
|
scalar maxLOverCellW_;
|
||||||
|
scalar lCoef_;
|
||||||
|
dimensionedScalar noTurbUntil_;
|
||||||
|
dimensionedScalar LOverLobs_;
|
||||||
|
dimensionedScalar LOverMobs_;
|
||||||
|
scalar bMin_;
|
||||||
|
bool flameFilteredG_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,10 +36,9 @@ Description
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phiSt))().primitiveField()
|
fvc::surfaceSum(mag(phiSt))().primitiveField()/rho.primitiveField()
|
||||||
/ rho.primitiveField()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
MRF.correctBoundaryVelocity(U);
|
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
betav*fvm::ddt(rho, U) + fvm::div(phi, U)
|
betav*fvm::ddt(rho, U) + fvm::div(phi, U)
|
||||||
+ MRF.DDt(rho, U)
|
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
==
|
==
|
||||||
betav*rho*g
|
betav*rho*g
|
||||||
|
|||||||
@ -0,0 +1,261 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "BLMgMaXiEq.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiEqModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(BLMgMaXiEq, 0);
|
||||||
|
addToRunTimeSelectionTable(XiEqModel, BLMgMaXiEq, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::BLMgMaXiEq::BLMgMaXiEq
|
||||||
|
(
|
||||||
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiEqModel(XiEqProperties, modelType, thermo, turbulence, Su),
|
||||||
|
kaCoef_(XiEqModelCoeffs_.get<scalar>("kaCoef")),
|
||||||
|
lowK0_(XiEqModelCoeffs_.get<scalar>("lowK0")),
|
||||||
|
lowKg_(XiEqModelCoeffs_.get<scalar>("lowKg")),
|
||||||
|
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||||
|
alphaCoefP_(XiEqModelCoeffs_.get<scalar>("alphaCoefP")),
|
||||||
|
betaCoefP_(XiEqModelCoeffs_.get<scalar>("betaCoefP")),
|
||||||
|
alphaCoefN_(XiEqModelCoeffs_.get<scalar>("alphaCoefN")),
|
||||||
|
betaCoefN_(XiEqModelCoeffs_.get<scalar>("betaCoefN")),
|
||||||
|
maLim_(XiEqModelCoeffs_.get<scalar>("maLim")),
|
||||||
|
maLim1_(XiEqModelCoeffs_.get<scalar>("maLim1")),
|
||||||
|
quenchCoef_(XiEqModelCoeffs_.get<scalar>("quenchCoef")),
|
||||||
|
quenchExp_(XiEqModelCoeffs_.get<scalar>("quenchExp")),
|
||||||
|
quenchM_(XiEqModelCoeffs_.get<scalar>("quenchM")),
|
||||||
|
quenchRate1_(XiEqModelCoeffs_.get<scalar>("quenchRate1")),
|
||||||
|
quenchRate2_(XiEqModelCoeffs_.get<scalar>("quenchRate2")),
|
||||||
|
lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")),
|
||||||
|
SuMin_(0.01*Su.average()),
|
||||||
|
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||||
|
nrExp_(XiEqModelCoeffs_.get<scalar>("nrExp")),
|
||||||
|
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")),
|
||||||
|
MaModel
|
||||||
|
(
|
||||||
|
IOdictionary
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
Su.mesh().time().constant(),
|
||||||
|
Su.mesh(),
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::BLMgMaXiEq::~BLMgMaXiEq()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::BLMgMaXiEq::XiEq() const
|
||||||
|
{
|
||||||
|
const volScalarField& k = turbulence_.k();
|
||||||
|
const volScalarField& epsilon = turbulence_.epsilon();
|
||||||
|
volScalarField up("up", sqrt((2.0/3.0)*k));
|
||||||
|
if (subGridSchelkin_)
|
||||||
|
{
|
||||||
|
up.primitiveFieldRef() +=
|
||||||
|
calculateSchelkinEffect(uPrimeCoef_, nrExp_);
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
||||||
|
volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu());
|
||||||
|
|
||||||
|
volScalarField upBySu("upBySu", up/(Su_ + SuMin_));
|
||||||
|
volScalarField K("K", kaCoef_*upBySu*upBySu/sqrt(Rl));
|
||||||
|
volScalarField Ma("Ma", MaModel.Ma());
|
||||||
|
|
||||||
|
volScalarField regime("regime", MaModel.Ma()*scalar(0.0));
|
||||||
|
|
||||||
|
tmp<volScalarField> tXiEq
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"XiEq",
|
||||||
|
epsilon.time().timeName(),
|
||||||
|
epsilon.db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
epsilon.mesh(),
|
||||||
|
dimensionedScalar(dimless, Zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const objectRegistry& db = Su_.db();
|
||||||
|
|
||||||
|
const volScalarField& b = db.lookupObject<volScalarField>("b");
|
||||||
|
|
||||||
|
const volScalarField multiP1(0.0*pos(b - 0.99) + 1.0*neg(b - 0.99));
|
||||||
|
const volScalarField multiP2(1.0*pos(b - 0.01) + 0.0*neg(b - 0.01));
|
||||||
|
|
||||||
|
volScalarField& xieq = tXiEq.ref();
|
||||||
|
|
||||||
|
forAll(xieq, celli)
|
||||||
|
{
|
||||||
|
scalar alpha;
|
||||||
|
scalar beta;
|
||||||
|
scalar gulderMa;
|
||||||
|
|
||||||
|
if (Ma[celli]>= 0)
|
||||||
|
{
|
||||||
|
gulderMa =
|
||||||
|
1.0
|
||||||
|
+ (0.1402 - 0.007*Ma[celli])
|
||||||
|
* upBySu[celli]*sqrt(upBySu[celli]/K[celli]);
|
||||||
|
|
||||||
|
regime[celli] = multiP1[celli]*multiP2[celli];
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gulderMa =
|
||||||
|
1.0
|
||||||
|
+ (0.005*Ma[celli]*Ma[celli]+0.01*Ma[celli] + 0.125)
|
||||||
|
* upBySu[celli]*sqrt(upBySu[celli]/K[celli]);
|
||||||
|
|
||||||
|
regime[celli] = 2*multiP1[celli]*multiP2[celli];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (K[celli] < (lowK0_ + lowKg_*Ma[celli]) )
|
||||||
|
{
|
||||||
|
xieq[celli] = gulderMa;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Ma[celli] >= 0.0)
|
||||||
|
{
|
||||||
|
alpha = alphaCoefP_*(maLim_ - Ma[celli]);
|
||||||
|
beta = betaCoefP_*(maLim_ - Ma[celli]);
|
||||||
|
regime[celli] = 3*multiP1[celli]*multiP2[celli];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alpha = alphaCoefN_*(maLim1_ - Ma[celli]) ;
|
||||||
|
beta = betaCoefN_*(maLim_ + Ma[celli]);
|
||||||
|
regime[celli] = 4*multiP1[celli]*multiP2[celli];
|
||||||
|
}
|
||||||
|
xieq[celli] = XiEqCoef_*alpha*pow(K[celli], beta)*upBySu[celli];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Ma[celli] > -3.0 && Ma[celli] < 11.0)
|
||||||
|
{
|
||||||
|
scalar K0p8 = quenchCoef_*pow( Ma[celli] - quenchM_, quenchExp_);
|
||||||
|
scalar quenchRate = quenchRate1_ + quenchRate2_*Ma[celli];
|
||||||
|
if (K[celli] > (K0p8 - 0.223/quenchRate))
|
||||||
|
{
|
||||||
|
xieq[celli] *= 0.8*exp(-quenchRate*(K[celli] - K0p8));
|
||||||
|
regime[celli] = 5*multiP1[celli]*multiP2[celli];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(xieq.boundaryField(), patchi)
|
||||||
|
{
|
||||||
|
scalarField& xieqp = xieq.boundaryFieldRef()[patchi];
|
||||||
|
const scalarField& Kp = K.boundaryField()[patchi];
|
||||||
|
const scalarField& Map = Ma.boundaryField()[patchi];
|
||||||
|
const scalarField& upBySup = upBySu.boundaryField()[patchi];
|
||||||
|
|
||||||
|
forAll(xieqp, facei)
|
||||||
|
{
|
||||||
|
scalar alpha;
|
||||||
|
scalar beta;
|
||||||
|
|
||||||
|
if (Map[facei] > 0.0)
|
||||||
|
{
|
||||||
|
alpha = alphaCoefP_*(maLim_ - Map[facei]);
|
||||||
|
beta = betaCoefP_*(maLim_ - Map[facei]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alpha = alphaCoefN_*(maLim_ - Map[facei]);
|
||||||
|
beta = betaCoefN_*(maLim_ + Map[facei]);
|
||||||
|
}
|
||||||
|
xieqp[facei] =
|
||||||
|
XiEqCoef_*alpha*pow(Kp[facei], beta)*upBySup[facei];
|
||||||
|
|
||||||
|
if (Map[facei] > -3.0 && Map[facei] < 11.0)
|
||||||
|
{
|
||||||
|
scalar K0p8 = quenchCoef_*pow(Map[facei] - quenchM_, quenchExp_);
|
||||||
|
scalar quenchRate = quenchRate1_ + quenchRate2_*Ma[facei];
|
||||||
|
|
||||||
|
if (Kp[facei] > (K0p8 - 0.223/quenchRate))
|
||||||
|
{
|
||||||
|
xieqp[facei] *= 0.8*exp(-quenchRate*(Kp[facei] - K0p8));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<<
|
||||||
|
"Markstein Number out of range for Quench Formulation" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tXiEq;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiEqModels::BLMgMaXiEq::read(const dictionary& XiEqProperties)
|
||||||
|
{
|
||||||
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,21 +24,22 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiEqModels::SCOPEXiEq
|
Foam::XiEqModel::BLMgMaXiEq
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation
|
Model for XiEq based on Bradley, Lawes and Mansour (2011)
|
||||||
|
Cobustion and Falme, 158, 123 correlation
|
||||||
with a linear correction function to give a plausible profile for XiEq.
|
with a linear correction function to give a plausible profile for XiEq.
|
||||||
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE laminar
|
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE laminar
|
||||||
flame speed model.
|
flame speed model.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
SCOPEXiEq.C
|
BLMgMaXiEq.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef SCOPEXiEq_H
|
#ifndef BLMgMaXiEq_H
|
||||||
#define SCOPEXiEq_H
|
#define BLMgMaXiEq_H
|
||||||
|
|
||||||
#include "XiEqModel.H"
|
#include "XiEqModel.H"
|
||||||
#include "SCOPELaminarFlameSpeed.H"
|
#include "SCOPELaminarFlameSpeed.H"
|
||||||
@ -51,29 +52,37 @@ namespace XiEqModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SCOPEXiEq Declaration
|
Class BLMgMaXiEq Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class SCOPEXiEq
|
class BLMgMaXiEq
|
||||||
:
|
:
|
||||||
public XiEqModel
|
public XiEqModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
// Model constant
|
// Model constants
|
||||||
|
|
||||||
|
scalar kaCoef_;
|
||||||
|
scalar lowK0_;
|
||||||
|
scalar lowKg_;
|
||||||
scalar XiEqCoef_;
|
scalar XiEqCoef_;
|
||||||
|
scalar alphaCoefP_;
|
||||||
// Model constant
|
scalar betaCoefP_;
|
||||||
scalar XiEqExp_;
|
scalar alphaCoefN_;
|
||||||
|
scalar betaCoefN_;
|
||||||
// Model constant
|
scalar maLim_;
|
||||||
|
scalar maLim1_;
|
||||||
|
scalar quenchCoef_, quenchExp_, quenchM_;
|
||||||
|
scalar quenchRate1_, quenchRate2_;
|
||||||
scalar lCoef_;
|
scalar lCoef_;
|
||||||
|
|
||||||
//- Minimum Su
|
//- Minimum Su
|
||||||
dimensionedScalar SuMin_;
|
dimensionedScalar SuMin_;
|
||||||
|
|
||||||
//- Schelkin effect Model constant
|
//- Schelkin effect Model constants
|
||||||
scalar uPrimeCoef_;
|
scalar uPrimeCoef_;
|
||||||
|
scalar nrExp_;
|
||||||
|
|
||||||
//- Use sub-grid Schelkin effect
|
//- Use sub-grid Schelkin effect
|
||||||
bool subGridSchelkin_;
|
bool subGridSchelkin_;
|
||||||
@ -86,25 +95,26 @@ class SCOPEXiEq
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
SCOPEXiEq(const SCOPEXiEq&) = delete;
|
BLMgMaXiEq(const BLMgMaXiEq&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const SCOPEXiEq&) = delete;
|
void operator=(const BLMgMaXiEq&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("SCOPEXiEq");
|
TypeName("BLMgMaXiEq");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
SCOPEXiEq
|
BLMgMaXiEq
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -112,16 +122,17 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~SCOPEXiEq();
|
virtual ~BLMgMaXiEq();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
//- Return the flame-wrinking XiEq
|
||||||
virtual tmp<volScalarField> XiEq() const;
|
virtual tmp<volScalarField> XiEq() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiEqProperties);
|
virtual bool read(const dictionary& XiEqProperties);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -45,20 +45,25 @@ namespace XiEqModels
|
|||||||
Foam::XiEqModels::Gulder::Gulder
|
Foam::XiEqModels::Gulder::Gulder
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
XiEqModel(XiEqProperties, modelType, thermo, turbulence, Su),
|
||||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
||||||
SuMin_(0.01*Su.average()),
|
SuMin_(0.01*Su.average()),
|
||||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
||||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin"))
|
nrExp_(XiEqModelCoeffs_.get<scalar>("nrExp")),
|
||||||
|
subGridSchelkin_
|
||||||
|
(
|
||||||
|
XiEqModelCoeffs_.get<bool>("subGridSchelkin")
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiEqModels::Gulder::~Gulder()
|
Foam::XiEqModels::Gulder::~Gulder()
|
||||||
{}
|
{}
|
||||||
@ -73,7 +78,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
|
|||||||
|
|
||||||
if (subGridSchelkin_)
|
if (subGridSchelkin_)
|
||||||
{
|
{
|
||||||
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_, nrExp_);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
||||||
@ -97,6 +102,7 @@ bool Foam::XiEqModels::Gulder::read(const dictionary& XiEqProperties)
|
|||||||
|
|
||||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
||||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
||||||
|
XiEqModelCoeffs_.readEntry("nrExp", nrExp_);
|
||||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class Gulder
|
|||||||
|
|
||||||
//- Schelkin effect Model constant
|
//- Schelkin effect Model constant
|
||||||
scalar uPrimeCoef_;
|
scalar uPrimeCoef_;
|
||||||
|
scalar nrExp_;
|
||||||
|
|
||||||
//- Use sub-grid Schelkin effect
|
//- Use sub-grid Schelkin effect
|
||||||
bool subGridSchelkin_;
|
bool subGridSchelkin_;
|
||||||
@ -72,11 +73,11 @@ class Gulder
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
Gulder(const Gulder&) = delete;
|
Gulder(const Gulder&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const Gulder&) = delete;
|
void operator=(const Gulder&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -91,6 +92,7 @@ public:
|
|||||||
Gulder
|
Gulder
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -103,7 +105,7 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
//- Return the flame-wrinking XiEq
|
||||||
virtual tmp<volScalarField> XiEq() const;
|
virtual tmp<volScalarField> XiEq() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
|
|||||||
@ -1,95 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "SCOPEBlendXiEq.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiEqModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(SCOPEBlend, 0);
|
|
||||||
addToRunTimeSelectionTable(XiEqModel, SCOPEBlend, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::SCOPEBlend::SCOPEBlend
|
|
||||||
(
|
|
||||||
const dictionary& XiEqProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
|
||||||
XiEqModelL_
|
|
||||||
(
|
|
||||||
XiEqModel::New
|
|
||||||
(
|
|
||||||
XiEqModelCoeffs_.subDict("XiEqModelL"),
|
|
||||||
thermo,
|
|
||||||
turbulence,
|
|
||||||
Su
|
|
||||||
)
|
|
||||||
),
|
|
||||||
XiEqModelH_
|
|
||||||
(
|
|
||||||
XiEqModel::New
|
|
||||||
(
|
|
||||||
XiEqModelCoeffs_.subDict("XiEqModelH"),
|
|
||||||
thermo,
|
|
||||||
turbulence,
|
|
||||||
Su
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::SCOPEBlend::~SCOPEBlend()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEBlend::XiEq() const
|
|
||||||
{
|
|
||||||
return pow
|
|
||||||
(
|
|
||||||
pow4(1.0/XiEqModelL_->XiEq()) + pow4(1.0/XiEqModelH_->XiEq()),
|
|
||||||
-0.25
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,159 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "SCOPEXiEq.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiEqModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(SCOPEXiEq, 0);
|
|
||||||
addToRunTimeSelectionTable(XiEqModel, SCOPEXiEq, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq
|
|
||||||
(
|
|
||||||
const dictionary& XiEqProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
|
||||||
XiEqCoef_(XiEqModelCoeffs_.get<scalar>("XiEqCoef")),
|
|
||||||
XiEqExp_(XiEqModelCoeffs_.get<scalar>("XiEqExp")),
|
|
||||||
lCoef_(XiEqModelCoeffs_.get<scalar>("lCoef")),
|
|
||||||
SuMin_(0.01*Su.average()),
|
|
||||||
uPrimeCoef_(XiEqModelCoeffs_.get<scalar>("uPrimeCoef")),
|
|
||||||
subGridSchelkin_(XiEqModelCoeffs_.get<bool>("subGridSchelkin")),
|
|
||||||
MaModel
|
|
||||||
(
|
|
||||||
Su.mesh().lookupObject<IOdictionary>("combustionProperties"),
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::SCOPEXiEq::~SCOPEXiEq()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
|
||||||
{
|
|
||||||
const volScalarField& k = turbulence_.k();
|
|
||||||
const volScalarField& epsilon = turbulence_.epsilon();
|
|
||||||
|
|
||||||
volScalarField up(sqrt((2.0/3.0)*k));
|
|
||||||
if (subGridSchelkin_)
|
|
||||||
{
|
|
||||||
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
|
||||||
volScalarField Rl(up*l*thermo_.rhou()/thermo_.muu());
|
|
||||||
|
|
||||||
volScalarField upBySu(up/(Su_ + SuMin_));
|
|
||||||
volScalarField K(0.157*upBySu/sqrt(Rl));
|
|
||||||
volScalarField Ma(MaModel.Ma());
|
|
||||||
|
|
||||||
tmp<volScalarField> tXiEq
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"XiEq",
|
|
||||||
epsilon.time().timeName(),
|
|
||||||
epsilon.db(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
epsilon.mesh(),
|
|
||||||
dimensionedScalar(dimless, Zero)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
volScalarField& xieq = tXiEq.ref();
|
|
||||||
|
|
||||||
forAll(xieq, celli)
|
|
||||||
{
|
|
||||||
if (Ma[celli] > 0.01)
|
|
||||||
{
|
|
||||||
xieq[celli] =
|
|
||||||
XiEqCoef_*pow(K[celli]*Ma[celli], -XiEqExp_)*upBySu[celli];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
volScalarField::Boundary& xieqBf = xieq.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(xieq.boundaryField(), patchi)
|
|
||||||
{
|
|
||||||
scalarField& xieqp = xieqBf[patchi];
|
|
||||||
const scalarField& Kp = K.boundaryField()[patchi];
|
|
||||||
const scalarField& Map = Ma.boundaryField()[patchi];
|
|
||||||
const scalarField& upBySup = upBySu.boundaryField()[patchi];
|
|
||||||
|
|
||||||
forAll(xieqp, facei)
|
|
||||||
{
|
|
||||||
if (Ma[facei] > 0.01)
|
|
||||||
{
|
|
||||||
xieqp[facei] =
|
|
||||||
XiEqCoef_*pow(Kp[facei]*Map[facei], -XiEqExp_)
|
|
||||||
*upBySup[facei];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return tXiEq;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiEqModels::SCOPEXiEq::read(const dictionary& XiEqProperties)
|
|
||||||
{
|
|
||||||
XiEqModel::read(XiEqProperties);
|
|
||||||
|
|
||||||
XiEqModelCoeffs_.readEntry("XiEqCoef", XiEqCoef_);
|
|
||||||
XiEqModelCoeffs_.readEntry("XiEqExp", XiEqExp_);
|
|
||||||
XiEqModelCoeffs_.readEntry("lCoef", lCoef_);
|
|
||||||
XiEqModelCoeffs_.readEntry("uPrimeCoef", uPrimeCoef_);
|
|
||||||
XiEqModelCoeffs_.readEntry("subGridSchelkin", subGridSchelkin_);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -41,6 +41,7 @@ namespace Foam
|
|||||||
Foam::XiEqModel::XiEqModel
|
Foam::XiEqModel::XiEqModel
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -50,7 +51,7 @@ Foam::XiEqModel::XiEqModel
|
|||||||
(
|
(
|
||||||
XiEqProperties.subDict
|
XiEqProperties.subDict
|
||||||
(
|
(
|
||||||
XiEqProperties.get<word>("XiEqModel") + "Coeffs"
|
XiEqProperties.get<word>(modelType) + "Coeffs"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
@ -59,7 +60,7 @@ Foam::XiEqModel::XiEqModel
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiEqModel::~XiEqModel()
|
Foam::XiEqModel::~XiEqModel()
|
||||||
{}
|
{}
|
||||||
@ -69,7 +70,8 @@ Foam::XiEqModel::~XiEqModel()
|
|||||||
|
|
||||||
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
||||||
{
|
{
|
||||||
XiEqModelCoeffs_ = XiEqProperties.optionalSubDict(type() + "Coeffs");
|
|
||||||
|
XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -77,22 +79,20 @@ bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
|||||||
|
|
||||||
void Foam::XiEqModel::writeFields() const
|
void Foam::XiEqModel::writeFields() const
|
||||||
{
|
{
|
||||||
//***HGW It is not clear why B is written here
|
|
||||||
if (Su_.mesh().foundObject<volSymmTensorField>("B"))
|
|
||||||
{
|
|
||||||
const volSymmTensorField& B =
|
|
||||||
Su_.mesh().lookupObject<volSymmTensorField>("B");
|
|
||||||
B.write();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
|
||||||
Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
Foam::tmp<Foam::volScalarField>Foam::XiEqModel::calculateSchelkinEffect
|
||||||
|
(
|
||||||
|
const scalar uPrimeCoef,
|
||||||
|
const scalar nrExp
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
const fvMesh& mesh = Su_.mesh();
|
const fvMesh& mesh = Su_.mesh();
|
||||||
|
|
||||||
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
const volVectorField& U = mesh.lookupObject<volVectorField>("U");
|
||||||
|
|
||||||
const volSymmTensorField& CT = mesh.lookupObject<volSymmTensorField>("CT");
|
const volSymmTensorField& CT = mesh.lookupObject<volSymmTensorField>("CT");
|
||||||
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
const volScalarField& Nv = mesh.lookupObject<volScalarField>("Nv");
|
||||||
const volSymmTensorField& nsv =
|
const volSymmTensorField& nsv =
|
||||||
@ -115,22 +115,30 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
dimensionedScalar(Nv.dimensions(), Zero)
|
dimensionedScalar(Nv.dimensions(), Zero)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& N = tN.ref();
|
volScalarField& N = tN.ref();
|
||||||
|
|
||||||
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
volSymmTensorField ns
|
tmp<volSymmTensorField> tns
|
||||||
(
|
(
|
||||||
IOobject
|
new volSymmTensorField
|
||||||
(
|
(
|
||||||
"tns",
|
IOobject
|
||||||
mesh.time().timeName(),
|
(
|
||||||
|
"tns",
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
||||||
IOobject::NO_WRITE
|
)
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedSymmTensor(nsv.dimensions(), Zero)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
volSymmTensorField& ns = tns.ref();
|
||||||
|
|
||||||
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
const volVectorField Uhat
|
const volVectorField Uhat
|
||||||
@ -144,13 +152,11 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
|
|
||||||
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
|
||||||
|
|
||||||
const scalarField deltaUp(upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0));
|
//Re use tN
|
||||||
|
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, nrExp)) - 1.0);
|
||||||
// Re use tN
|
|
||||||
N.primitiveFieldRef() = upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0);
|
|
||||||
|
|
||||||
return tN;
|
return tN;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,12 +28,6 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Base-class for all XiEq models used by the b-XiEq combustion model.
|
Base-class for all XiEq models used by the b-XiEq combustion model.
|
||||||
The available models are :
|
|
||||||
\link basicXiSubXiEq.H \endlink
|
|
||||||
\link Gulder.H \endlink
|
|
||||||
\link instabilityXiEq.H \endlink
|
|
||||||
\link SCOPEBlendXiEq.H \endlink
|
|
||||||
\link SCOPEXiEq.H \endlink
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
XiEqModel.C
|
XiEqModel.C
|
||||||
@ -76,16 +70,15 @@ protected:
|
|||||||
//- Laminar burning velocity
|
//- Laminar burning velocity
|
||||||
const volScalarField& Su_;
|
const volScalarField& Su_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
XiEqModel(const XiEqModel&) = delete;
|
XiEqModel(const XiEqModel&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const XiEqModel&) = delete;
|
void operator=(const XiEqModel&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -103,12 +96,14 @@ public:
|
|||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
XiEqProperties,
|
XiEqProperties,
|
||||||
|
modelType,
|
||||||
thermo,
|
thermo,
|
||||||
turbulence,
|
turbulence,
|
||||||
Su
|
Su
|
||||||
@ -122,6 +117,7 @@ public:
|
|||||||
static autoPtr<XiEqModel> New
|
static autoPtr<XiEqModel> New
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -134,6 +130,7 @@ public:
|
|||||||
XiEqModel
|
XiEqModel
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -146,14 +143,15 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
//- Return the flame-wrinking XiEq
|
||||||
virtual tmp<volScalarField> XiEq() const
|
virtual tmp<volScalarField> XiEq() const = 0;
|
||||||
{
|
|
||||||
return turbulence_.muEff();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the sub-grid Schelkin effect
|
// Only used by sperseded modles
|
||||||
tmp<volScalarField> calculateSchelkinEffect(const scalar) const;
|
tmp<volScalarField> calculateSchelkinEffect
|
||||||
|
(
|
||||||
|
const scalar uPrimeCoef,
|
||||||
|
const scalar nrExp
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiEqProperties) = 0;
|
virtual bool read(const dictionary& XiEqProperties) = 0;
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,30 +31,42 @@ License
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& propDict,
|
||||||
|
const word& modelName,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(dict.get<word>("XiEqModel"));
|
const word modelType(propDict.get<word>(modelName));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model Eq " << modelType << endl;
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalIOErrorInLookup
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
dict,
|
"XiEqModel::New"
|
||||||
"XiEqModel",
|
"("
|
||||||
modelType,
|
" const psiuReactionThermo& thermo,"
|
||||||
*dictionaryConstructorTablePtr_
|
" const word& modelType,"
|
||||||
) << exit(FatalIOError);
|
" const compressible::RASModel& turbulence,"
|
||||||
|
" const volScalarField& Su"
|
||||||
|
")"
|
||||||
|
) << "Unknown XiEqModel type "
|
||||||
|
<< modelType << nl << nl
|
||||||
|
<< "Valid XiEqModels are : " << endl
|
||||||
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<XiEqModel>(cstrIter()(dict, thermo, turbulence, Su));
|
return autoPtr<XiEqModel>(cstrIter()
|
||||||
|
(
|
||||||
|
propDict, modelName, thermo, turbulence, Su)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,141 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "instability2XiEq.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "IFstream.H"
|
||||||
|
#include "fvCFD.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiEqModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(instability2XiEq, 0);
|
||||||
|
addToRunTimeSelectionTable(XiEqModel, instability2XiEq, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::instability2XiEq::instability2XiEq
|
||||||
|
(
|
||||||
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiEqModel(XiEqProperties, modelType, thermo, turbulence, Su),
|
||||||
|
saModel_
|
||||||
|
(
|
||||||
|
IOdictionary
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
Su.mesh().time().constant(),
|
||||||
|
Su.mesh(),
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thermo
|
||||||
|
),
|
||||||
|
CIn_(saModel_.CIn()),
|
||||||
|
defaultCIn_(XiEqModelCoeffs_.get<scalar>("defaultCIn")),
|
||||||
|
XiEqInFade_(XiEqModelCoeffs_.get<scalar>("XiEqInFade")),
|
||||||
|
XiEqModel_
|
||||||
|
(
|
||||||
|
XiEqModel::New(XiEqModelCoeffs_, modelType, thermo, turbulence, Su)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (CIn_ <= 0.0)
|
||||||
|
{
|
||||||
|
CIn_ = defaultCIn_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiEqModels::instability2XiEq::~instability2XiEq()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability2XiEq::XiEq() const
|
||||||
|
{
|
||||||
|
IOdictionary combustionProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
Su_.mesh().time().constant(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
ignition ign(combustionProperties, Su_.mesh().time(), Su_.mesh());
|
||||||
|
|
||||||
|
//const scalar ignTim = ign.sites()[0].tmIgn();
|
||||||
|
scalar curTime = Su_.mesh().time().value();
|
||||||
|
scalar deltaT = Su_.mesh().time().deltaTValue();
|
||||||
|
const scalar ignTim = curTime - deltaT - ign.sites()[0].time();
|
||||||
|
|
||||||
|
volScalarField turbXiEq(XiEqModel_->XiEq());
|
||||||
|
|
||||||
|
volScalarField XiEqIn1("XiEqIn1", 0.0*turbXiEq);
|
||||||
|
|
||||||
|
dimensionedScalar CIn("CIn", dimensionSet(0, -2, 1, 0, 0, 0, 0), CIn_);
|
||||||
|
dimensionedScalar ignTm("ignTm", dimTime, ignTim);
|
||||||
|
XiEqIn1 = exp(CIn*Su_*Su_*ignTm) - 1.0;
|
||||||
|
|
||||||
|
return
|
||||||
|
(
|
||||||
|
1.0 + sqrt(XiEqInFade_*sqr(XiEqIn1) + sqr(turbXiEq - 1.0))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiEqModels::instability2XiEq::read(const dictionary& XiEqProperties)
|
||||||
|
{
|
||||||
|
XiEqModel::read(XiEqProperties);
|
||||||
|
|
||||||
|
XiEqModelCoeffs_.readEntry("defaultCIn", defaultCIn_);
|
||||||
|
XiEqModelCoeffs_.readEntry("XiEqInFade", XiEqInFade_);
|
||||||
|
|
||||||
|
return XiEqModel_->read(XiEqModelCoeffs_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,22 +24,25 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiEqModels::SCOPEBlend
|
Foam::XiEqModels::instability2XiEq
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple SCOPEBlendXiEq model for XiEq based on SCOPEXiEqs correlation
|
|
||||||
with a linear correction function to give a plausible profile for XiEq.
|
|
||||||
See \link SCOPELaminarFlameSpeed.H \endlink for details on the SCOPE
|
|
||||||
laminar flame speed model.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
SCOPEBlend.C
|
instability2XiEq.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef SCOPEBlend_H
|
#ifndef instability2XiEq_H
|
||||||
#define SCOPEBlend_H
|
#define instability2XiEq_H
|
||||||
|
|
||||||
|
#include "laminarFlameSpeed.H"
|
||||||
|
#include "SCOPELaminarFlameSpeed.H"
|
||||||
|
#include "ignitionSite.H"
|
||||||
|
#include "ignition.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
#include "XiEqModel.H"
|
#include "XiEqModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -50,43 +53,53 @@ namespace XiEqModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SCOPEBlend Declaration
|
Class instability2 Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class SCOPEBlend
|
class instability2XiEq
|
||||||
:
|
:
|
||||||
public XiEqModel
|
public XiEqModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Low turbulence intensity equilibrium Xi model
|
// -Laminar burning speed
|
||||||
autoPtr<XiEqModel> XiEqModelL_;
|
laminarFlameSpeedModels::SCOPE saModel_;
|
||||||
|
|
||||||
//- High turbulence intensity equilibrium Xi model
|
//- GIn (initial instability G)divided by Su^2. Read from fuel file
|
||||||
autoPtr<XiEqModel> XiEqModelH_;
|
scalar CIn_;
|
||||||
|
|
||||||
|
//- Default CIn if not in fuel file
|
||||||
|
scalar defaultCIn_;
|
||||||
|
|
||||||
|
//- Determines how fast XiEqIn fades out as turbulence comes in
|
||||||
|
scalar XiEqInFade_;
|
||||||
|
|
||||||
|
//- Equilibrium Xi model due to all other effects
|
||||||
|
autoPtr<XiEqModel> XiEqModel_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
SCOPEBlend(const SCOPEBlend&) = delete;
|
instability2XiEq(const instability2XiEq&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const SCOPEBlend&) = delete;
|
void operator=(const instability2XiEq&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("SCOPEBlend");
|
TypeName("instability2XiEq");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
SCOPEBlend
|
instability2XiEq
|
||||||
(
|
(
|
||||||
const dictionary& XiEqProperties,
|
const dictionary& XiEqProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -94,19 +107,16 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~SCOPEBlend();
|
virtual ~instability2XiEq();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling XiEq
|
//- Return the flame-wrinking XiEq
|
||||||
virtual tmp<volScalarField> XiEq() const;
|
virtual tmp<volScalarField> XiEq() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiEqProperties)
|
virtual bool read(const dictionary& XiEqProperties);
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "instabilityXiEq.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiEqModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(instability, 0);
|
|
||||||
addToRunTimeSelectionTable(XiEqModel, instability, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::instability::instability
|
|
||||||
(
|
|
||||||
const dictionary& XiEqProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiEqModel(XiEqProperties, thermo, turbulence, Su),
|
|
||||||
XiEqIn(XiEqModelCoeffs_.get<scalar>("XiEqIn")),
|
|
||||||
XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiEqModels::instability::~instability()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiEqModels::instability::XiEq() const
|
|
||||||
{
|
|
||||||
volScalarField turbXiEq(XiEqModel_->XiEq());
|
|
||||||
return XiEqIn/turbXiEq + turbXiEq;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiEqModels::instability::read(const dictionary& XiEqProperties)
|
|
||||||
{
|
|
||||||
XiEqModel::read(XiEqProperties);
|
|
||||||
|
|
||||||
XiEqModelCoeffs_.readEntry("XiEqIn", XiEqIn);
|
|
||||||
|
|
||||||
return XiEqModel_->read(XiEqModelCoeffs_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -45,17 +45,18 @@ namespace XiGModels
|
|||||||
Foam::XiGModels::KTS::KTS
|
Foam::XiGModels::KTS::KTS
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties,modelType, thermo, turbulence, Su),
|
||||||
GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef"))
|
GEtaCoef_(XiGModelCoeffs_.get<scalar>("GEtaCoef"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiGModels::KTS::~KTS()
|
Foam::XiGModels::KTS::~KTS()
|
||||||
{}
|
{}
|
||||||
@ -74,6 +75,15 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::G() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiGModels::KTS::Db() const
|
||||||
|
{
|
||||||
|
const objectRegistry& db = Su_.db();
|
||||||
|
const volScalarField& Db1 = db.lookupObject<volScalarField>("Db");
|
||||||
|
//return turbulence_.muEff();
|
||||||
|
return Db1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
bool Foam::XiGModels::KTS::read(const dictionary& XiGProperties)
|
||||||
{
|
{
|
||||||
XiGModel::read(XiGProperties);
|
XiGModel::read(XiGProperties);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,8 +27,8 @@ Class
|
|||||||
Foam::XiGModels::KTS
|
Foam::XiGModels::KTS
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple Kolmogorov time-scale (KTS) model for the flame-wrinling generation
|
Simple Kolmogorov time-scale (KTS) model for the flame-wrinkling
|
||||||
rate.
|
generation rate.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
KTS.C
|
KTS.C
|
||||||
@ -62,11 +62,11 @@ class KTS
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
KTS(const KTS&) = delete;
|
KTS(const KTS&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const KTS&) = delete;
|
void operator=(const KTS&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -81,6 +81,7 @@ public:
|
|||||||
KTS
|
KTS
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -93,9 +94,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling generation rate
|
//- Return the flame-wrinking generation rate
|
||||||
virtual tmp<volScalarField> G() const;
|
virtual tmp<volScalarField> G() const;
|
||||||
|
|
||||||
|
//- Return the flame diffusivity
|
||||||
|
virtual tmp<volScalarField> Db() const;
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiGProperties);
|
virtual bool read(const dictionary& XiGProperties);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -41,6 +41,7 @@ namespace Foam
|
|||||||
Foam::XiGModel::XiGModel
|
Foam::XiGModel::XiGModel
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -50,7 +51,7 @@ Foam::XiGModel::XiGModel
|
|||||||
(
|
(
|
||||||
XiGProperties.subDict
|
XiGProperties.subDict
|
||||||
(
|
(
|
||||||
XiGProperties.get<word>("XiGModel") + "Coeffs"
|
XiGProperties.get<word>(modelType) + "Coeffs"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
@ -59,7 +60,7 @@ Foam::XiGModel::XiGModel
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiGModel::~XiGModel()
|
Foam::XiGModel::~XiGModel()
|
||||||
{}
|
{}
|
||||||
@ -69,7 +70,7 @@ Foam::XiGModel::~XiGModel()
|
|||||||
|
|
||||||
bool Foam::XiGModel::read(const dictionary& XiGProperties)
|
bool Foam::XiGModel::read(const dictionary& XiGProperties)
|
||||||
{
|
{
|
||||||
XiGModelCoeffs_ = XiGProperties.optionalSubDict(type() + "Coeffs");
|
XiGModelCoeffs_ = XiGProperties.subDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,9 +28,6 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Base-class for all Xi generation models used by the b-Xi combustion model.
|
Base-class for all Xi generation models used by the b-Xi combustion model.
|
||||||
See Technical Report SH/RE/01R for details on the PDR modelling. For details
|
|
||||||
on the use of XiGModel see \link XiModel.H \endlink. The model available is
|
|
||||||
\link instabilityG.H \endlink
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
XiGModel.C
|
XiGModel.C
|
||||||
@ -72,11 +69,11 @@ private:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
XiGModel(const XiGModel&) = delete;
|
XiGModel(const XiGModel&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const XiGModel&) = delete;
|
void operator=(const XiGModel&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -94,12 +91,14 @@ public:
|
|||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
XiGProperties,
|
XiGProperties,
|
||||||
|
modelType,
|
||||||
thermo,
|
thermo,
|
||||||
turbulence,
|
turbulence,
|
||||||
Su
|
Su
|
||||||
@ -113,6 +112,7 @@ public:
|
|||||||
static autoPtr<XiGModel> New
|
static autoPtr<XiGModel> New
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -125,6 +125,7 @@ public:
|
|||||||
XiGModel
|
XiGModel
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -137,14 +138,11 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling generation rate
|
//- Return the flame-wrinking genration rate
|
||||||
virtual tmp<volScalarField> G() const = 0;
|
virtual tmp<volScalarField> G() const = 0;
|
||||||
|
|
||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
virtual tmp<volScalarField> Db() const
|
virtual tmp<volScalarField> Db() const = 0;
|
||||||
{
|
|
||||||
return turbulence_.muEff();
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiGProperties) = 0;
|
virtual bool read(const dictionary& XiGProperties) = 0;
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,30 +31,41 @@ License
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& propDict,
|
||||||
|
const word& modelName,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(dict.get<word>("XiGModel"));
|
const word modelType(propDict.get<word>(modelName));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model for G " << modelType << endl;
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalIOErrorInLookup
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
dict,
|
"XiGModel::New"
|
||||||
"XiGModel",
|
"("
|
||||||
modelType,
|
" const psiuReactionThermo& thermo,"
|
||||||
*dictionaryConstructorTablePtr_
|
" const compressible::RASModel& turbulence,"
|
||||||
) << exit(FatalIOError);
|
" const volScalarField& Su"
|
||||||
|
")"
|
||||||
|
) << "Unknown XiGModel type "
|
||||||
|
<< modelType << nl << nl
|
||||||
|
<< "Valid XiGModels are : " << endl
|
||||||
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<XiGModel>(cstrIter()(dict, thermo, turbulence, Su));
|
return autoPtr<XiGModel>(cstrIter()
|
||||||
|
(
|
||||||
|
propDict, modelName, thermo, turbulence, Su)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,171 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "IFstream.H"
|
||||||
|
#include "instability2G.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "fvCFD.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiGModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(instability2G, 0);
|
||||||
|
addToRunTimeSelectionTable(XiGModel, instability2G, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiGModels::instability2G::instability2G
|
||||||
|
(
|
||||||
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiGModel(XiGProperties, modelType, thermo, turbulence, Su),
|
||||||
|
saModel_
|
||||||
|
(
|
||||||
|
IOdictionary
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
Su.mesh().time().constant(),
|
||||||
|
Su.mesh(),
|
||||||
|
IOobject::MUST_READ
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thermo
|
||||||
|
),
|
||||||
|
CIn_(saModel_.CIn()),
|
||||||
|
defaultCIn_(XiGModelCoeffs_.get<scalar>("defaultCIn")),
|
||||||
|
GInFade_(XiGModelCoeffs_.get<scalar>("GInFade")),
|
||||||
|
GInMult_(XiGModelCoeffs_.get<scalar>("GInMult")),
|
||||||
|
lambdaIn_("lambdaIn", XiGModelCoeffs_),
|
||||||
|
XiGModel_
|
||||||
|
(
|
||||||
|
XiGModel::New(XiGModelCoeffs_,modelType,thermo, turbulence, Su)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (CIn_ <= 0.0)
|
||||||
|
{
|
||||||
|
CIn_ = defaultCIn_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiGModels::instability2G::~instability2G()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instability2G::G() const
|
||||||
|
{
|
||||||
|
IOdictionary combustionProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
Su_.mesh().time().constant(),
|
||||||
|
Su_.mesh(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
ignition ign(combustionProperties, Su_.mesh().time(), Su_.mesh());
|
||||||
|
|
||||||
|
scalar curTime = Su_.mesh().time().value();
|
||||||
|
scalar deltaT = Su_.mesh().time().deltaTValue();
|
||||||
|
const scalar ignTim = curTime - deltaT - ign.sites()[0].time();
|
||||||
|
|
||||||
|
volScalarField turbXiG(XiGModel_->G());
|
||||||
|
|
||||||
|
volScalarField GIn("GIn", 0.0*turbXiG);
|
||||||
|
|
||||||
|
|
||||||
|
forAll (GIn, i)
|
||||||
|
{
|
||||||
|
GIn[i] = CIn_*Su_[i]*Su_[i]*exp(CIn_*Su_[i]*Su_[i]*ignTim)*GInMult_;
|
||||||
|
}
|
||||||
|
|
||||||
|
dimensionedScalar CIn("CIn", dimensionSet(0, -2, 1, 0, 0, 0, 0), CIn_);
|
||||||
|
dimensionedScalar ignTm("ignTm", dimTime, ignTim);
|
||||||
|
|
||||||
|
GIn = CIn*Su_*Su_*exp(CIn*Su_*Su_*ignTm)*GInMult_;
|
||||||
|
|
||||||
|
GIn *=
|
||||||
|
GIn
|
||||||
|
/
|
||||||
|
(
|
||||||
|
GIn
|
||||||
|
+ GInFade_*turbXiG
|
||||||
|
+ dimensionedScalar("GSmall", inv(dimTime), SMALL)
|
||||||
|
);
|
||||||
|
|
||||||
|
return (GIn + turbXiG);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiGModels::instability2G::Db() const
|
||||||
|
{
|
||||||
|
const objectRegistry& db = Su_.db();
|
||||||
|
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
||||||
|
const volScalarField& rho = db.lookupObject<volScalarField>("rho");
|
||||||
|
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
||||||
|
const volScalarField& Db1 = db.lookupObject<volScalarField>("Db");
|
||||||
|
|
||||||
|
//return turbulence_.muEff()
|
||||||
|
return Db1
|
||||||
|
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiGModels::instability2G::read(const dictionary& XiGProperties)
|
||||||
|
{
|
||||||
|
XiGModel::read(XiGProperties);
|
||||||
|
|
||||||
|
XiGModelCoeffs_.readEntry("defaultCIn", defaultCIn_);
|
||||||
|
XiGModelCoeffs_.readEntry("GInFade", GInFade_);
|
||||||
|
XiGModelCoeffs_.readEntry("GInMult", GInMult_);
|
||||||
|
XiGModelCoeffs_.readEntry("lambdaIn", lambdaIn_);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,106 +24,114 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiModels::algebraic
|
Foam::XiGModels::instability2G
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple algebraic model for Xi based on Gulders correlation
|
|
||||||
with a linear correction function to give a plausible profile for Xi.
|
|
||||||
See report TR/HGW/10 for details on the Weller two equations model.
|
|
||||||
See \link XiModel.H \endlink for more details on flame wrinkling modelling.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
algebraic.C
|
instability2G.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef algebraic_H
|
#ifndef instability2G_H
|
||||||
#define algebraic_H
|
#define instability2G_H
|
||||||
|
|
||||||
#include "XiModel.H"
|
#include "laminarFlameSpeed.H"
|
||||||
#include "XiEqModel.H"
|
#include "SCOPELaminarFlameSpeed.H"
|
||||||
#include "XiGModel.H"
|
#include "XiGModel.H"
|
||||||
|
#include "ignitionSite.H"
|
||||||
|
#include "ignition.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
namespace XiModels
|
namespace XiGModels
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class algebraic Declaration
|
Class instability2G Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class algebraic
|
class instability2G
|
||||||
:
|
:
|
||||||
public XiModel
|
public XiGModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
scalar XiShapeCoef;
|
laminarFlameSpeedModels::SCOPE saModel_;
|
||||||
|
|
||||||
autoPtr<XiEqModel> XiEqModel_;
|
// GIn (inituial instability G)divided by Su^2. Read from fuel file
|
||||||
|
scalar CIn_;
|
||||||
|
|
||||||
|
//- Default CIn if not in fuel file
|
||||||
|
scalar defaultCIn_;
|
||||||
|
|
||||||
|
// Determine how fast GIn fades out as turbulence starts
|
||||||
|
scalar GInFade_;
|
||||||
|
|
||||||
|
// Set GIn large so that XiEq determines Xi value. Son increase byfactor:
|
||||||
|
scalar GInMult_;
|
||||||
|
|
||||||
|
//- instability2G length-scale
|
||||||
|
dimensionedScalar lambdaIn_;
|
||||||
|
|
||||||
|
//- Xi generation rate model due to all other processes
|
||||||
autoPtr<XiGModel> XiGModel_;
|
autoPtr<XiGModel> XiGModel_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
algebraic(const algebraic&) = delete;
|
instability2G(const instability2G&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const algebraic&) = delete;
|
void operator=(const instability2G&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("algebraic");
|
TypeName("instability2G");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
algebraic
|
instability2G
|
||||||
(
|
(
|
||||||
const dictionary& XiProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su,
|
const volScalarField& Su
|
||||||
const volScalarField& rho,
|
|
||||||
const volScalarField& b,
|
|
||||||
const surfaceScalarField& phi
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~algebraic();
|
virtual ~instability2G();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the flame-wrinking generation rate
|
||||||
|
virtual tmp<volScalarField> G() const;
|
||||||
|
|
||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
virtual tmp<volScalarField> Db() const;
|
virtual tmp<volScalarField> Db() const;
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi
|
|
||||||
virtual void correct();
|
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
virtual bool read(const dictionary& XiProperties);
|
virtual bool read(const dictionary& XiGProperties);
|
||||||
|
|
||||||
//- Write fields of the XiEq model
|
|
||||||
virtual void writeFields()
|
|
||||||
{
|
|
||||||
XiEqModel_().writeFields();
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace XiModels
|
} // End namespace XiGModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -45,19 +45,20 @@ namespace XiGModels
|
|||||||
Foam::XiGModels::instabilityG::instabilityG
|
Foam::XiGModels::instabilityG::instabilityG
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
XiGModel(XiGProperties, thermo, turbulence, Su),
|
XiGModel(XiGProperties, modelType, thermo, turbulence, Su),
|
||||||
GIn_("GIn", dimless/dimTime, XiGModelCoeffs_),
|
GIn_("GIn", XiGModelCoeffs_),
|
||||||
lambdaIn_("lambdaIn", dimLength, XiGModelCoeffs_),
|
lambdaIn_("lambdaIn", XiGModelCoeffs_),
|
||||||
XiGModel_(XiGModel::New(XiGModelCoeffs_, thermo, turbulence, Su))
|
XiGModel_(XiGModel::New(XiGModelCoeffs_,modelType,thermo, turbulence, Su))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiGModels::instabilityG::~instabilityG()
|
Foam::XiGModels::instabilityG::~instabilityG()
|
||||||
{}
|
{}
|
||||||
@ -76,11 +77,14 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::instabilityG::Db() const
|
|||||||
{
|
{
|
||||||
const objectRegistry& db = Su_.db();
|
const objectRegistry& db = Su_.db();
|
||||||
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
const volScalarField& Xi = db.lookupObject<volScalarField>("Xi");
|
||||||
|
const volScalarField& Xp = db.lookupObject<volScalarField>("Xp");
|
||||||
const volScalarField& rho = db.lookupObject<volScalarField>("rho");
|
const volScalarField& rho = db.lookupObject<volScalarField>("rho");
|
||||||
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
||||||
|
const volScalarField& Db1 = db.lookupObject<volScalarField>("Db");
|
||||||
|
|
||||||
return XiGModel_->Db()
|
//return turbulence_.muEff()
|
||||||
+ rho*Su_*(Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_);
|
return Db1
|
||||||
|
+ rho*Su_*(Xp*Xi - 1.0)*mgb*(0.5*lambdaIn_)/(mgb + 1.0/lambdaIn_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,10 +27,9 @@ Class
|
|||||||
Foam::XiGModels::instabilityG
|
Foam::XiGModels::instabilityG
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Flame-surface instabilityG flame-wrinkling generation rate coefficient model
|
Flame-surface instabilityG flame-wrinking generation rate coefficient model
|
||||||
used in \link XiModel.H \endlink.
|
used in \link XiModel.H \endlink.
|
||||||
|
|
||||||
See Technical Report SH/RE/01R for details on the PDR modelling.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
instabilityG.C
|
instabilityG.C
|
||||||
@ -59,7 +58,7 @@ class instabilityG
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Flame instabilityG wrinkling generation rate coefficient
|
//- Flame instabilityG wrinling generation rate coefficient
|
||||||
dimensionedScalar GIn_;
|
dimensionedScalar GIn_;
|
||||||
|
|
||||||
//- InstabilityG length-scale
|
//- InstabilityG length-scale
|
||||||
@ -71,11 +70,11 @@ class instabilityG
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
instabilityG(const instabilityG&) = delete;
|
instabilityG(const instabilityG&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const instabilityG&) = delete;
|
void operator=(const instabilityG&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -90,6 +89,7 @@ public:
|
|||||||
instabilityG
|
instabilityG
|
||||||
(
|
(
|
||||||
const dictionary& XiGProperties,
|
const dictionary& XiGProperties,
|
||||||
|
const word& modelType,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su
|
const volScalarField& Su
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling generation rate
|
//- Return the flame-wrinking generation rate
|
||||||
virtual tmp<volScalarField> G() const;
|
virtual tmp<volScalarField> G() const;
|
||||||
|
|
||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -73,11 +73,23 @@ Foam::XiModel::XiModel
|
|||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
b.mesh()
|
b.mesh()
|
||||||
)
|
),
|
||||||
|
Xp_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Xp",
|
||||||
|
b.time().timeName(),
|
||||||
|
b.db(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
b.mesh()
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::XiModel::~XiModel()
|
Foam::XiModel::~XiModel()
|
||||||
{}
|
{}
|
||||||
@ -87,7 +99,7 @@ Foam::XiModel::~XiModel()
|
|||||||
|
|
||||||
bool Foam::XiModel::read(const dictionary& XiProperties)
|
bool Foam::XiModel::read(const dictionary& XiProperties)
|
||||||
{
|
{
|
||||||
XiModelCoeffs_ = XiProperties.optionalSubDict(type() + "Coeffs");
|
XiModelCoeffs_ = XiProperties.subDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,8 +95,8 @@ SourceFiles
|
|||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
#include "psiuReactionThermo.H"
|
#include "psiuReactionThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "multivariateSurfaceInterpolationScheme.H"
|
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
|
#include "multivariateSurfaceInterpolationScheme.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -124,19 +124,21 @@ protected:
|
|||||||
const volScalarField& b_;
|
const volScalarField& b_;
|
||||||
const surfaceScalarField& phi_;
|
const surfaceScalarField& phi_;
|
||||||
|
|
||||||
//- Flame wrinkling field
|
//- Flame wrinking field
|
||||||
volScalarField Xi_;
|
volScalarField Xi_;
|
||||||
|
|
||||||
|
//- Flame wrinking field for the subgrid obstacles
|
||||||
|
volScalarField Xp_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
XiModel(const XiModel&) = delete;
|
XiModel(const XiModel&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const XiModel&) = delete;
|
void operator=(const XiModel&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -209,30 +211,42 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return the flame-wrinkling Xi
|
//- Return the flame-wrinking Xi
|
||||||
virtual const volScalarField& Xi() const
|
virtual const volScalarField& Xi() const
|
||||||
{
|
{
|
||||||
return Xi_;
|
return Xi_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the obstacle-flame-wrinking Xp
|
||||||
|
virtual const volScalarField& Xp() const
|
||||||
|
{
|
||||||
|
return Xp_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
virtual tmp<volScalarField> Db() const
|
virtual tmp<volScalarField> Db() const
|
||||||
{
|
{
|
||||||
return turbulence_.muEff();
|
const objectRegistry& db = Su_.db();
|
||||||
|
const volScalarField& Db1 = db.lookupObject<volScalarField>("Db");
|
||||||
|
//return turbulence_.muEff();
|
||||||
|
return Db1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Add Xi to the multivariateSurfaceInterpolationScheme table
|
//- Add Xi to the multivariateSurfaceInterpolationScheme table
|
||||||
// if required
|
// if required
|
||||||
virtual void addXi
|
void addXi
|
||||||
(
|
(
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable&
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable& fields
|
||||||
)
|
)
|
||||||
{}
|
{
|
||||||
|
fields.add(Xi_);
|
||||||
|
fields.add(Xp_);
|
||||||
|
}
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi
|
//- Correct the flame-wrinking Xi
|
||||||
virtual void correct() = 0;
|
virtual void correct() = 0;
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi using the given convection scheme
|
//- Correct the flame-wrinking Xi using the given convection scheme
|
||||||
virtual void correct(const fv::convectionScheme<scalar>&)
|
virtual void correct(const fv::convectionScheme<scalar>&)
|
||||||
{
|
{
|
||||||
correct();
|
correct();
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,7 +31,7 @@ License
|
|||||||
|
|
||||||
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& propDict,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
const compressible::RASModel& turbulence,
|
const compressible::RASModel& turbulence,
|
||||||
const volScalarField& Su,
|
const volScalarField& Su,
|
||||||
@ -41,25 +40,27 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
|||||||
const surfaceScalarField& phi
|
const surfaceScalarField& phi
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word modelType(dict.get<word>("XiModel"));
|
const word modelType(propDict.get<word>("XiModel"));
|
||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalIOErrorInLookup
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
dict,
|
"XiModel::New"
|
||||||
"XiModel",
|
) << "Unknown XiModel type "
|
||||||
modelType,
|
<< modelType << nl << nl
|
||||||
*dictionaryConstructorTablePtr_
|
<< "Valid XiModels are : " << endl
|
||||||
) << exit(FatalIOError);
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<XiModel>
|
return autoPtr<XiModel>
|
||||||
(cstrIter()(dict, thermo, turbulence, Su, rho, b, phi));
|
(cstrIter()(propDict, thermo, turbulence, Su, rho, b, phi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,100 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "algebraic.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(algebraic, 0);
|
|
||||||
addToRunTimeSelectionTable(XiModel, algebraic, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiModels::algebraic::algebraic
|
|
||||||
(
|
|
||||||
const dictionary& XiProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volScalarField& b,
|
|
||||||
const surfaceScalarField& phi
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
|
||||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
|
||||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiModels::algebraic::~algebraic()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiModels::algebraic::Db() const
|
|
||||||
{
|
|
||||||
return XiGModel_->Db();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::XiModels::algebraic::correct()
|
|
||||||
{
|
|
||||||
volScalarField XiEqEta(XiEqModel_->XiEq());
|
|
||||||
volScalarField GEta(XiGModel_->G());
|
|
||||||
|
|
||||||
volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
|
|
||||||
|
|
||||||
volScalarField XiEqStar(R/(R - GEta));
|
|
||||||
|
|
||||||
Xi_ == 1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiModels::algebraic::read(const dictionary& XiProperties)
|
|
||||||
{
|
|
||||||
XiModel::read(XiProperties);
|
|
||||||
|
|
||||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "transport.H"
|
|
||||||
#include "surfaceInterpolate.H"
|
|
||||||
#include "fvmDdt.H"
|
|
||||||
#include "fvcLaplacian.H"
|
|
||||||
#include "fvmDiv.H"
|
|
||||||
#include "fvmSup.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace XiModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(transport, 0);
|
|
||||||
addToRunTimeSelectionTable(XiModel, transport, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiModels::transport::transport
|
|
||||||
(
|
|
||||||
const dictionary& XiProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volScalarField& b,
|
|
||||||
const surfaceScalarField& phi
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
|
||||||
XiShapeCoef(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
|
||||||
XiEqModel_(XiEqModel::New(XiProperties, thermo, turbulence, Su)),
|
|
||||||
XiGModel_(XiGModel::New(XiProperties, thermo, turbulence, Su))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiModels::transport::~transport()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::XiModels::transport::Db() const
|
|
||||||
{
|
|
||||||
return XiGModel_->Db();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::XiModels::transport::correct
|
|
||||||
(
|
|
||||||
const fv::convectionScheme<scalar>& mvConvection
|
|
||||||
)
|
|
||||||
{
|
|
||||||
volScalarField XiEqEta(XiEqModel_->XiEq());
|
|
||||||
volScalarField GEta(XiGModel_->G());
|
|
||||||
|
|
||||||
volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
|
|
||||||
|
|
||||||
volScalarField XiEqStar(R/(R - GEta));
|
|
||||||
|
|
||||||
volScalarField XiEq
|
|
||||||
(
|
|
||||||
1.0 + (1.0 + (2*XiShapeCoef)*(0.5 - b_))*(XiEqStar - 1.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField G(R*(XiEq - 1.0)/XiEq);
|
|
||||||
|
|
||||||
const objectRegistry& db = b_.db();
|
|
||||||
const volScalarField& betav = db.lookupObject<volScalarField>("betav");
|
|
||||||
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
|
||||||
const surfaceScalarField& phiSt =
|
|
||||||
db.lookupObject<surfaceScalarField>("phiSt");
|
|
||||||
const volScalarField& Db = db.lookupObject<volScalarField>("Db");
|
|
||||||
const surfaceScalarField& nf = db.lookupObject<surfaceScalarField>("nf");
|
|
||||||
|
|
||||||
surfaceScalarField phiXi
|
|
||||||
(
|
|
||||||
"phiXi",
|
|
||||||
phiSt
|
|
||||||
+ (
|
|
||||||
- fvc::interpolate(fvc::laplacian(Db, b_)/mgb)*nf
|
|
||||||
+ fvc::interpolate(rho_)*fvc::interpolate(Su_*(1.0/Xi_ - Xi_))*nf
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
betav*fvm::ddt(rho_, Xi_)
|
|
||||||
+ mvConvection.fvmDiv(phi_, Xi_)
|
|
||||||
+ fvm::div(phiXi, Xi_)
|
|
||||||
- fvm::Sp(fvc::div(phiXi), Xi_)
|
|
||||||
==
|
|
||||||
betav*rho_*R
|
|
||||||
- fvm::Sp(betav*rho_*(R - G), Xi_)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Correct boundedness of Xi
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
Xi_.max(1.0);
|
|
||||||
Xi_ = min(Xi_, 2.0*XiEq);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::XiModels::transport::read(const dictionary& XiProperties)
|
|
||||||
{
|
|
||||||
XiModel::read(XiProperties);
|
|
||||||
|
|
||||||
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,253 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "transportTwoEqs.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace XiModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(transportTwoEqs, 0);
|
||||||
|
addToRunTimeSelectionTable(XiModel, transportTwoEqs, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiModels::transportTwoEqs::transportTwoEqs
|
||||||
|
(
|
||||||
|
const dictionary& XiProperties,
|
||||||
|
const psiuReactionThermo& thermo,
|
||||||
|
const compressible::RASModel& turbulence,
|
||||||
|
const volScalarField& Su,
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volScalarField& b,
|
||||||
|
const surfaceScalarField& phi
|
||||||
|
)
|
||||||
|
:
|
||||||
|
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi),
|
||||||
|
XiShapeCoef_(XiModelCoeffs_.get<scalar>("XiShapeCoef")),
|
||||||
|
CpfiDot_(XiModelCoeffs_.get<scalar>("CpfiDot")),
|
||||||
|
CpfiCross_(XiModelCoeffs_.get<scalar>("CpfiCross")),
|
||||||
|
GEtaExp_(XiModelCoeffs_.get<scalar>("GEtaExp")),
|
||||||
|
LOverCw_(XiModelCoeffs_.get<scalar>("LOverCw")),
|
||||||
|
XiEqModel_
|
||||||
|
(
|
||||||
|
XiEqModel::New(XiProperties, "XiEqModel", thermo, turbulence, Su)
|
||||||
|
),
|
||||||
|
XiGModel_(XiGModel::New(XiProperties, "XiGModel", thermo, turbulence, Su)),
|
||||||
|
XpEqModel_
|
||||||
|
(
|
||||||
|
XiEqModel::New(XiProperties, "XpEqModel", thermo, turbulence, Su)
|
||||||
|
),
|
||||||
|
XpGModel_
|
||||||
|
(
|
||||||
|
XiGModel::New(XiProperties, "XpGModel", thermo, turbulence, Su)
|
||||||
|
),
|
||||||
|
Ep_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Ep",
|
||||||
|
b.time().timeName(),
|
||||||
|
b.db(),
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
b.mesh()
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::XiModels::transportTwoEqs::~transportTwoEqs()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::XiModels::transportTwoEqs::Db() const
|
||||||
|
{
|
||||||
|
return XiGModel_->Db();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::XiModels::transportTwoEqs::correct
|
||||||
|
(
|
||||||
|
const fv::convectionScheme<scalar>& mvConvection
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const volScalarField XiEqEta(XiEqModel_->XiEq());
|
||||||
|
volScalarField GEta(XiGModel_->G());
|
||||||
|
|
||||||
|
GEta *= max( 1.0, exp( GEtaExp_*(1.0 - (Xi_ - 1.0)/(XiEqEta - 0.999)))) ;
|
||||||
|
|
||||||
|
const volScalarField R(GEta*XiEqEta/(XiEqEta - 0.999));
|
||||||
|
|
||||||
|
const volScalarField XiEqStar(R/(R - GEta));
|
||||||
|
|
||||||
|
const volScalarField XiEq
|
||||||
|
(
|
||||||
|
1.0 + (1.0 + (2*XiShapeCoef_)*(0.5 - b_))*(XiEqStar - 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField G(R*(XiEq - 1.0)/XiEq);
|
||||||
|
|
||||||
|
|
||||||
|
const objectRegistry& db = b_.db();
|
||||||
|
const volScalarField& betav = db.lookupObject<volScalarField>("betav");
|
||||||
|
const volScalarField& p = db.lookupObject<volScalarField>("p");
|
||||||
|
const volScalarField& mgb = db.lookupObject<volScalarField>("mgb");
|
||||||
|
const surfaceScalarField& phiSt =
|
||||||
|
db.lookupObject<surfaceScalarField>("phiSt");
|
||||||
|
const volScalarField& Db = db.lookupObject<volScalarField>("Db");
|
||||||
|
const surfaceScalarField& nf = db.lookupObject<surfaceScalarField>("nf");
|
||||||
|
|
||||||
|
surfaceScalarField phiXi
|
||||||
|
(
|
||||||
|
"phiXi",
|
||||||
|
phiSt
|
||||||
|
+ (
|
||||||
|
- fvc::interpolate(fvc::laplacian(Db, b_)/mgb)*nf
|
||||||
|
+ fvc::interpolate(rho_)
|
||||||
|
* fvc::interpolate(Su_*(1.0/(Xi_*Xp_) - (Xi_*Xp_)))*nf
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
dimensionedScalar zero
|
||||||
|
(
|
||||||
|
"zero",
|
||||||
|
dimensionSet(2, -6, -2, 0, 0, 0, 0),
|
||||||
|
scalar(0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField Gpfi
|
||||||
|
(
|
||||||
|
CpfiDot_*sqrt(max(fvc::grad(rho_)&fvc::grad(p), zero ))/rho_*b_*(1.0-b_)
|
||||||
|
+ CpfiCross_*sqrt(mag(fvc::grad(rho_)^fvc::grad(p) ))/rho_*b_*(1.0-b_)
|
||||||
|
);
|
||||||
|
|
||||||
|
fvScalarMatrix XiEqn_
|
||||||
|
(
|
||||||
|
betav*fvm::ddt(rho_, Xi_)
|
||||||
|
+ mvConvection.fvmDiv(phi_, Xi_)
|
||||||
|
+ fvm::div(phiXi, Xi_)
|
||||||
|
- fvm::Sp(fvc::div(phiXi), Xi_)
|
||||||
|
==
|
||||||
|
betav*rho_*(R + Gpfi )
|
||||||
|
- fvm::Sp(betav*rho_*(R - G), Xi_)
|
||||||
|
);
|
||||||
|
|
||||||
|
XiEqn_.relax();
|
||||||
|
XiEqn_.solve();
|
||||||
|
|
||||||
|
// Correct boundedness of Xi
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Xi_.max(1.0);
|
||||||
|
Xi_ = min(Xi_, 2.0*XiEq);
|
||||||
|
|
||||||
|
// Calculation of Xp generated by obstacles
|
||||||
|
volScalarField XpEqEta("XpEqEta",XpEqModel_->XiEq());
|
||||||
|
|
||||||
|
const volScalarField GpEta("GpEta", XpGModel_->G());
|
||||||
|
|
||||||
|
const volScalarField Rp("Rp", GpEta*XpEqEta/(XpEqEta - 0.999));
|
||||||
|
|
||||||
|
const volScalarField XpEq
|
||||||
|
(
|
||||||
|
"XpEq",
|
||||||
|
1.0 + (1.0 + (2*XiShapeCoef_)*(0.5 - b_))*(XpEqEta - 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
const volScalarField Gpp("Gpp", Rp*(XpEq - 1.0)/XpEq);
|
||||||
|
|
||||||
|
|
||||||
|
fvScalarMatrix XpEqn_
|
||||||
|
(
|
||||||
|
betav*fvm::ddt(rho_, Xp_)
|
||||||
|
+ mvConvection.fvmDiv(phi_, Xp_)
|
||||||
|
+ fvm::div(phiXi, Xp_)
|
||||||
|
- fvm::Sp(fvc::div(phiXi), Xp_)
|
||||||
|
==
|
||||||
|
betav*rho_*Rp
|
||||||
|
- fvm::Sp(betav*rho_*(Rp - Gpp), Xp_)
|
||||||
|
);
|
||||||
|
|
||||||
|
XpEqn_.relax();
|
||||||
|
XpEqn_.solve();
|
||||||
|
|
||||||
|
Xp_.max(1.0);
|
||||||
|
Xp_ = min(Xp_, 20.0*XpEq);
|
||||||
|
|
||||||
|
// Calculate Ep
|
||||||
|
const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
|
||||||
|
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
||||||
|
volScalarField LI(Lobs);
|
||||||
|
|
||||||
|
LI.primitiveFieldRef() = max(LI.primitiveField(),LOverCw_*sqrt(Cw));
|
||||||
|
|
||||||
|
fvScalarMatrix EpEqn_
|
||||||
|
(
|
||||||
|
betav*fvm::ddt(rho_, Ep_)
|
||||||
|
+ mvConvection.fvmDiv(phi_, Ep_)
|
||||||
|
+ fvm::div(phiXi, Ep_)
|
||||||
|
- fvm::Sp(fvc::div(phiXi), Ep_)
|
||||||
|
==
|
||||||
|
betav*rho_*Gpp*Xp_/LI
|
||||||
|
- fvm::Sp(betav*rho_*Rp, Ep_)
|
||||||
|
);
|
||||||
|
|
||||||
|
EpEqn_.relax();
|
||||||
|
EpEqn_.solve();
|
||||||
|
|
||||||
|
Ep_.max(0.0);
|
||||||
|
Ep_.min(100000.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::XiModels::transportTwoEqs::read(const dictionary& XiProperties)
|
||||||
|
{
|
||||||
|
XiModel::read(XiProperties);
|
||||||
|
|
||||||
|
XiModelCoeffs_.readEntry("XiShapeCoef", XiShapeCoef_);
|
||||||
|
XiModelCoeffs_.readEntry("CpfiDot", CpfiDot_);
|
||||||
|
XiModelCoeffs_.readEntry("CpfiCross", CpfiCross_);
|
||||||
|
XiModelCoeffs_.readEntry("GEtaExp", GEtaExp_);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,21 +25,17 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::XiModels::transport
|
Foam::XiModels::transportTwoEqs
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Simple transport model for Xi based on Gulders correlation
|
|
||||||
with a linear correction function to give a plausible profile for Xi.
|
|
||||||
See report TR/HGW/10 for details on the Weller two equations model.
|
|
||||||
See \link XiModel.H \endlink for more details on flame wrinkling modelling.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
transport.C
|
transportTwoEqs.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef transport_H
|
#ifndef transportTwoEqs_H
|
||||||
#define transport_H
|
#define transportTwoEqs_H
|
||||||
|
|
||||||
#include "XiModel.H"
|
#include "XiModel.H"
|
||||||
#include "XiEqModel.H"
|
#include "XiEqModel.H"
|
||||||
@ -52,40 +49,58 @@ namespace XiModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class transport Declaration
|
Class transportTwoEqs Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class transport
|
class transportTwoEqs
|
||||||
:
|
:
|
||||||
public XiModel
|
public XiModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
scalar XiShapeCoef;
|
scalar XiShapeCoef_;
|
||||||
|
scalar CpfiDot_;
|
||||||
|
scalar CpfiCross_;
|
||||||
|
scalar GEtaExp_;
|
||||||
|
|
||||||
|
//- Maximum Lobs/CellWidth
|
||||||
|
scalar LOverCw_;
|
||||||
|
|
||||||
|
//- Equilibrium for Xi (turbulence)
|
||||||
autoPtr<XiEqModel> XiEqModel_;
|
autoPtr<XiEqModel> XiEqModel_;
|
||||||
|
|
||||||
|
//- Generation for Xi (turbulence)
|
||||||
autoPtr<XiGModel> XiGModel_;
|
autoPtr<XiGModel> XiGModel_;
|
||||||
|
|
||||||
|
//- Equilibrium for Xp (obstacles)
|
||||||
|
autoPtr<XiEqModel> XpEqModel_;
|
||||||
|
|
||||||
|
//- Generation for Xp (obstacles)
|
||||||
|
autoPtr<XiGModel> XpGModel_;
|
||||||
|
|
||||||
|
//- Dissipation lenght scale for subgrid obstacles
|
||||||
|
volScalarField Ep_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- No copy construct
|
//- Disallow copy construct
|
||||||
transport(const transport&) = delete;
|
transportTwoEqs(const transportTwoEqs&);
|
||||||
|
|
||||||
//- No copy assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const transport&) = delete;
|
void operator=(const transportTwoEqs&);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("transport");
|
TypeName("transportTwoEqs");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
transport
|
transportTwoEqs
|
||||||
(
|
(
|
||||||
const dictionary& XiProperties,
|
const dictionary& XiProperties,
|
||||||
const psiuReactionThermo& thermo,
|
const psiuReactionThermo& thermo,
|
||||||
@ -98,7 +113,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~transport();
|
virtual ~transportTwoEqs();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -106,22 +121,13 @@ public:
|
|||||||
//- Return the flame diffusivity
|
//- Return the flame diffusivity
|
||||||
virtual tmp<volScalarField> Db() const;
|
virtual tmp<volScalarField> Db() const;
|
||||||
|
|
||||||
//- Add Xi to the multivariateSurfaceInterpolationScheme table
|
//- Correct the flame-wrinking Xi
|
||||||
virtual void addXi
|
|
||||||
(
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable& fields
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fields.add(Xi_);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi
|
|
||||||
virtual void correct()
|
virtual void correct()
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Correct the flame-wrinkling Xi using the given convection scheme
|
//- Correct the flame-wrinking Xi using the given convection scheme
|
||||||
virtual void correct(const fv::convectionScheme<scalar>& mvConvection);
|
virtual void correct(const fv::convectionScheme<scalar>& mvConvection);
|
||||||
|
|
||||||
//- Update properties from given dictionary
|
//- Update properties from given dictionary
|
||||||
@ -131,6 +137,7 @@ public:
|
|||||||
virtual void writeFields()
|
virtual void writeFields()
|
||||||
{
|
{
|
||||||
XiEqModel_().writeFields();
|
XiEqModel_().writeFields();
|
||||||
|
XpEqModel_().writeFields();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -5,11 +5,20 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
mesh,
|
mesh,
|
||||||
fields,
|
fields,
|
||||||
phi,
|
phi,
|
||||||
mesh.divScheme("div(phi,ft_b_ha_hau)")
|
mesh.divScheme("div(phi,ft_b_h_hu)")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField Db("Db", turbulence->muEff());
|
rhou = thermo.rhou();
|
||||||
|
muu = thermo.muu();
|
||||||
|
|
||||||
|
volScalarField Db("Db", turbulence->mut());
|
||||||
|
const volScalarField DbThermal
|
||||||
|
(
|
||||||
|
"DbAlpha",
|
||||||
|
turbulence->alphaEff()
|
||||||
|
//thermo.alpha() + turbulence->mut()/Prt
|
||||||
|
);
|
||||||
|
|
||||||
if (ign.ignited())
|
if (ign.ignited())
|
||||||
{
|
{
|
||||||
@ -17,30 +26,30 @@ if (ign.ignited())
|
|||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Su = unstrainedLaminarFlameSpeed()();
|
Su = unstrainedLaminarFlameSpeed()();
|
||||||
|
|
||||||
|
// Wrinkling due to turbulence
|
||||||
const volScalarField& Xi = flameWrinkling->Xi();
|
const volScalarField& Xi = flameWrinkling->Xi();
|
||||||
|
// Wrinkling due to obstacles
|
||||||
|
const volScalarField& Xp = flameWrinkling->Xp();
|
||||||
|
|
||||||
// progress variable
|
// progress variable
|
||||||
// ~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~
|
||||||
volScalarField c("c", 1.0 - b);
|
c = (1.0 - b);
|
||||||
|
|
||||||
// Unburnt gas density
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~
|
|
||||||
volScalarField rhou(thermo.rhou());
|
|
||||||
|
|
||||||
// Calculate flame normal etc.
|
// Calculate flame normal etc.
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
//volVectorField n(fvc::grad(b));
|
|
||||||
volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
|
volVectorField n(fvc::reconstruct(fvc::snGrad(b)*mesh.magSf()));
|
||||||
|
|
||||||
volScalarField mgb("mgb", mag(n));
|
volScalarField mgb("mgb", mag(n));
|
||||||
|
volScalarField ddtb("ddtb",fvc::ddt(b));
|
||||||
|
|
||||||
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
|
dimensionedScalar dMgb("dMgb", mgb.dimensions(), SMALL);
|
||||||
|
|
||||||
{
|
{
|
||||||
volScalarField bc(b*c);
|
volScalarField bc(b*c);
|
||||||
|
|
||||||
dMgb += 1.0e-3*
|
dMgb += 1.0e-8*
|
||||||
(bc*mgb)().weightedAverage(mesh.V())
|
(bc*mgb)().weightedAverage(mesh.V())
|
||||||
/(bc.weightedAverage(mesh.V()) + SMALL);
|
/(bc.weightedAverage(mesh.V()) + SMALL);
|
||||||
}
|
}
|
||||||
@ -54,6 +63,7 @@ if (ign.ignited())
|
|||||||
surfaceScalarField nf("nf", mesh.Sf() & nfVec);
|
surfaceScalarField nf("nf", mesh.Sf() & nfVec);
|
||||||
n /= mgb;
|
n /= mgb;
|
||||||
|
|
||||||
|
|
||||||
#include "StCorr.H"
|
#include "StCorr.H"
|
||||||
|
|
||||||
// Calculate turbulent flame speed flux
|
// Calculate turbulent flame speed flux
|
||||||
@ -64,8 +74,6 @@ if (ign.ignited())
|
|||||||
|
|
||||||
Db = flameWrinkling->Db();
|
Db = flameWrinkling->Db();
|
||||||
|
|
||||||
// Create b equation
|
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
fvScalarMatrix bEqn
|
fvScalarMatrix bEqn
|
||||||
(
|
(
|
||||||
betav*fvm::ddt(rho, b)
|
betav*fvm::ddt(rho, b)
|
||||||
@ -75,6 +83,7 @@ if (ign.ignited())
|
|||||||
- fvm::laplacian(Db, b)
|
- fvm::laplacian(Db, b)
|
||||||
==
|
==
|
||||||
betav*fvOptions(rho, b)
|
betav*fvOptions(rho, b)
|
||||||
|
// + betav*rhou*St*StCorr*mag(fvc::grad(b))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -82,17 +91,14 @@ if (ign.ignited())
|
|||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#include "ignite.H"
|
#include "ignite.H"
|
||||||
|
|
||||||
// Solve for b
|
|
||||||
// ~~~~~~~~~~~
|
|
||||||
bEqn.relax();
|
bEqn.relax();
|
||||||
|
|
||||||
fvOptions.constrain(bEqn);
|
fvOptions.constrain(bEqn);
|
||||||
|
|
||||||
bEqn.solve();
|
bEqn.solve();
|
||||||
|
|
||||||
fvOptions.correct(b);
|
fvOptions.correct(b);
|
||||||
|
|
||||||
Info<< "min(b) = " << min(b).value() << endl;
|
Info<< "min(b) = " << min(b).value() << nl
|
||||||
|
<< "max(b) = " << max(b).value() << endl;
|
||||||
|
|
||||||
if (composition.contains("ft"))
|
if (composition.contains("ft"))
|
||||||
{
|
{
|
||||||
@ -109,8 +115,14 @@ if (ign.ignited())
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Correct the flame-wrinkling
|
|
||||||
flameWrinkling->correct(mvConvection);
|
|
||||||
|
|
||||||
St = Xi*Su;
|
// Correct the flame-wrinkling, smoothing
|
||||||
|
flameWrinkling->correct(mvConvection);
|
||||||
|
St = Xp*Xi*Su*combustFlag;
|
||||||
|
|
||||||
|
if (PDRProperties.getOrDefault("smoothSt", false))
|
||||||
|
{
|
||||||
|
const scalar coeff = PDRProperties.get<scalar>("smoothStCoeff");
|
||||||
|
fvc::smooth(St, coeff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
scalar pMin = thermo.getOrDefault<scalar>("pMin", 0);
|
||||||
|
|||||||
@ -1,218 +1,303 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<psiuReactionThermo> pThermo
|
autoPtr<psiuReactionThermo> pThermo
|
||||||
(
|
|
||||||
psiuReactionThermo::New(mesh)
|
|
||||||
);
|
|
||||||
psiuReactionThermo& thermo = pThermo();
|
|
||||||
thermo.validate(args.executable(), "ha", "ea");
|
|
||||||
|
|
||||||
basicSpecieMixture& composition = thermo.composition();
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"rho",
|
psiuReactionThermo::New(mesh)
|
||||||
runTime.timeName(),
|
);
|
||||||
mesh,
|
psiuReactionThermo& thermo = pThermo();
|
||||||
IOobject::NO_READ,
|
thermo.validate(args.executable(), "ha", "ea");
|
||||||
IOobject::AUTO_WRITE
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
),
|
|
||||||
thermo.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField rho
|
||||||
|
|
||||||
volScalarField& b = composition.Y("b");
|
|
||||||
Info<< "min(b) = " << min(b).value() << endl;
|
|
||||||
|
|
||||||
Info<< "\nReading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"U",
|
IOobject
|
||||||
runTime.timeName(),
|
(
|
||||||
mesh,
|
"rho",
|
||||||
IOobject::MUST_READ,
|
runTime.timeName(),
|
||||||
IOobject::AUTO_WRITE
|
mesh,
|
||||||
),
|
IOobject::NO_READ,
|
||||||
mesh
|
IOobject::AUTO_WRITE
|
||||||
);
|
),
|
||||||
|
thermo.rho()
|
||||||
#include "compressibleCreatePhi.H"
|
);
|
||||||
|
volScalarField rhou
|
||||||
mesh.setFluxRequired(p.name());
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
|
||||||
autoPtr<compressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::New<compressible::RASModel>
|
|
||||||
(
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rhou",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rhou()
|
||||||
|
);
|
||||||
|
volScalarField muu
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"muu",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.muu()
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
|
||||||
|
volScalarField& b = composition.Y("b");
|
||||||
|
|
||||||
|
volScalarField combustFlag
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustFlag",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading fields betav, betai\n" << endl;
|
||||||
|
volScalarField betav
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"betav",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField betai
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"betai",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading field Bv\n" << endl;
|
||||||
|
volSymmTensorField Bv
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Bv",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading fields Nv,nsv\n" << endl;
|
||||||
|
volScalarField Nv
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Nv",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
volSymmTensorField nsv
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nsv",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading fields Blong\n" << endl;
|
||||||
|
volSymmTensorField Blong
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Blong",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "\nCreating field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "compressibleCreatePhi.H"
|
||||||
|
mesh.setFluxRequired(p.name());
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::RASModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::New<compressible::RASModel>
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "createDpdt.H"
|
||||||
|
|
||||||
|
#include "createK.H"
|
||||||
|
|
||||||
|
Info<< "Creating the unstrained laminar flame speed\n" << endl;
|
||||||
|
autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
|
||||||
|
(
|
||||||
|
laminarFlameSpeed::New(thermo)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading strained laminar flame speed field Su\n" << endl;
|
||||||
|
volScalarField Su
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Su",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Reading field Lobs\n" << endl;
|
||||||
|
volScalarField Lobs
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Lobs",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Reading field CT\n" << endl;
|
||||||
|
volSymmTensorField CT
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"CT",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
IOdictionary PDRProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"PDRProperties",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Create the drag model
|
||||||
|
autoPtr<PDRDragModel> drag = PDRDragModel::New
|
||||||
|
(
|
||||||
|
PDRProperties,
|
||||||
|
turbulence,
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
phi,
|
phi
|
||||||
thermo
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
//- Create the flame-wrinkling model
|
||||||
Info<< "Creating the unstrained laminar flame speed\n" << endl;
|
autoPtr<XiModel> flameWrinkling = XiModel::New
|
||||||
autoPtr<laminarFlameSpeed> unstrainedLaminarFlameSpeed
|
|
||||||
(
|
|
||||||
laminarFlameSpeed::New(thermo)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading strained laminar flame speed field Su\n" << endl;
|
|
||||||
volScalarField Su
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"Su",
|
PDRProperties,
|
||||||
runTime.timeName(),
|
thermo,
|
||||||
mesh,
|
turbulence,
|
||||||
IOobject::MUST_READ,
|
Su,
|
||||||
IOobject::AUTO_WRITE
|
rho,
|
||||||
),
|
b,
|
||||||
mesh
|
phi
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Reading field betav\n" << endl;
|
Info<< "Calculating turbulent flame speed field St\n" << endl;
|
||||||
volScalarField betav
|
volScalarField St
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"betav",
|
IOobject
|
||||||
mesh.facesInstance(),
|
(
|
||||||
mesh,
|
"St",
|
||||||
IOobject::MUST_READ,
|
runTime.timeName(),
|
||||||
IOobject::NO_WRITE
|
mesh,
|
||||||
),
|
IOobject::NO_READ,
|
||||||
mesh
|
IOobject::AUTO_WRITE
|
||||||
);
|
),
|
||||||
|
flameWrinkling->Xi()*Su
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Reading field Lobs\n" << endl;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
volScalarField Lobs
|
|
||||||
(
|
if (composition.contains("ft"))
|
||||||
IOobject
|
{
|
||||||
|
fields.add(composition.Y("ft"));
|
||||||
|
}
|
||||||
|
|
||||||
|
fields.add(b);
|
||||||
|
fields.add(thermo.he());
|
||||||
|
fields.add(thermo.heu());
|
||||||
|
flameWrinkling->addXi(fields);
|
||||||
|
|
||||||
|
#include "createMRF.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
|
|
||||||
|
volScalarField c
|
||||||
(
|
(
|
||||||
"Lobs",
|
IOobject
|
||||||
mesh.facesInstance(),
|
(
|
||||||
mesh,
|
"c",
|
||||||
IOobject::MUST_READ,
|
runTime.timeName(),
|
||||||
IOobject::NO_WRITE
|
mesh,
|
||||||
),
|
IOobject::NO_READ,
|
||||||
mesh
|
IOobject::NO_WRITE
|
||||||
);
|
),
|
||||||
|
scalar(1) - b
|
||||||
Info<< "Reading field CT\n" << endl;
|
);
|
||||||
volSymmTensorField CT
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"CT",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field Nv\n" << endl;
|
|
||||||
volScalarField Nv
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Nv",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field nsv\n" << endl;
|
|
||||||
volSymmTensorField nsv
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"nsv",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
IOdictionary PDRProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"PDRProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Create the drag model
|
|
||||||
autoPtr<PDRDragModel> drag = PDRDragModel::New
|
|
||||||
(
|
|
||||||
PDRProperties,
|
|
||||||
*turbulence,
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Create the flame-wrinkling model
|
|
||||||
autoPtr<XiModel> flameWrinkling = XiModel::New
|
|
||||||
(
|
|
||||||
PDRProperties,
|
|
||||||
thermo,
|
|
||||||
*turbulence,
|
|
||||||
Su,
|
|
||||||
rho,
|
|
||||||
b,
|
|
||||||
phi
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Calculating turbulent flame speed field St\n" << endl;
|
|
||||||
volScalarField St
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"St",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
flameWrinkling->Xi()*Su
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
|
||||||
|
|
||||||
if (composition.contains("ft"))
|
|
||||||
{
|
|
||||||
fields.add(composition.Y("ft"));
|
|
||||||
}
|
|
||||||
|
|
||||||
fields.add(b);
|
|
||||||
fields.add(thermo.he());
|
|
||||||
fields.add(thermo.heu());
|
|
||||||
flameWrinkling->addXi(fields);
|
|
||||||
|
|
||||||
#include "createDpdt.H"
|
|
||||||
|
|
||||||
#include "createK.H"
|
|
||||||
|
|
||||||
#include "createMRF.H"
|
|
||||||
#include "createFvOptions.H"
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -75,32 +75,28 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
|||||||
(
|
(
|
||||||
dictionary
|
dictionary
|
||||||
(
|
(
|
||||||
IFstream
|
IFstream(dict.get<fileName>("fuelFile"))()
|
||||||
(
|
).subDict(typeName + "Coeffs")
|
||||||
dict.get<fileName>("fuelFile")
|
|
||||||
)()
|
|
||||||
).optionalSubDict(typeName + "Coeffs")
|
|
||||||
),
|
|
||||||
LFL_
|
|
||||||
(
|
|
||||||
coeffsDict_.getCompat<scalar>
|
|
||||||
(
|
|
||||||
"lowerFlammabilityLimit",
|
|
||||||
{{"lowerFlamabilityLimit", 1712}}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
UFL_
|
|
||||||
(
|
|
||||||
coeffsDict_.getCompat<scalar>
|
|
||||||
(
|
|
||||||
"upperFlammabilityLimit",
|
|
||||||
{{"upperFlamabilityLimit", 1712}}
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
|
LFL_(coeffsDict_.get<scalar>("lowerFlamabilityLimit")),
|
||||||
|
UFL_(coeffsDict_.get<scalar>("upperFlamabilityLimit")),
|
||||||
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
|
||||||
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
|
||||||
Texp_(coeffsDict_.get<scalar>("Texp")),
|
Texp0_(coeffsDict_.get<scalar>("Texp0")),
|
||||||
pexp_(coeffsDict_.get<scalar>("pexp")),
|
Texp1_(coeffsDict_.get<scalar>("Texp1")),
|
||||||
|
Texp2_(coeffsDict_.get<scalar>("Texp2")),
|
||||||
|
Texp3_(coeffsDict_.get<scalar>("Texp3")),
|
||||||
|
Texp4_(coeffsDict_.get<scalar>("Texp4")),
|
||||||
|
Texp5_(coeffsDict_.get<scalar>("Texp5")),
|
||||||
|
Texp6_(coeffsDict_.get<scalar>("Texp6")),
|
||||||
|
pexp0_(coeffsDict_.get<scalar>("pexp0")),
|
||||||
|
pexp1_(coeffsDict_.get<scalar>("pexp1")),
|
||||||
|
pexp2_(coeffsDict_.get<scalar>("pexp2")),
|
||||||
|
pexp3_(coeffsDict_.get<scalar>("pexp3")),
|
||||||
|
pexp4_(coeffsDict_.get<scalar>("pexp4")),
|
||||||
|
pexp5_(coeffsDict_.get<scalar>("pexp5")),
|
||||||
|
pexp6_(coeffsDict_.get<scalar>("pexp6")),
|
||||||
|
CIn_(coeffsDict_.getOrDefault<scalar>("CIn", 0)),
|
||||||
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
MaPolyL_(coeffsDict_.subDict("lowerMaPolynomial")),
|
||||||
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
MaPolyU_(coeffsDict_.subDict("upperMaPolynomial"))
|
||||||
{
|
{
|
||||||
@ -158,19 +154,19 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
|
|||||||
{
|
{
|
||||||
if (phi < LFL_ || phi > UFL_)
|
if (phi < LFL_ || phi > UFL_)
|
||||||
{
|
{
|
||||||
// Return 0 beyond the flammability limits
|
// Return 0 beyond the flamibility limits
|
||||||
return scalar(0);
|
return scalar(0);
|
||||||
}
|
}
|
||||||
else if (phi < SuPolyL_.ll)
|
else if (phi < SuPolyL_.ll)
|
||||||
{
|
{
|
||||||
// Use linear interpolation between the low end of the
|
// Use linear interpolation between the low end of the
|
||||||
// lower polynomial and the lower flammability limit
|
// lower polynomial and the lower flamibility limit
|
||||||
return SuPolyL_.llv*(phi - LFL_)/(SuPolyL_.ll - LFL_);
|
return SuPolyL_.llv*(phi - LFL_)/(SuPolyL_.ll - LFL_);
|
||||||
}
|
}
|
||||||
else if (phi > SuPolyU_.ul)
|
else if (phi > SuPolyU_.ul)
|
||||||
{
|
{
|
||||||
// Use linear interpolation between the upper end of the
|
// Use linear interpolation between the upper end of the
|
||||||
// upper polynomial and the upper flammability limit
|
// upper polynomial and the upper flamibility limit
|
||||||
return SuPolyU_.ulv*(UFL_ - phi)/(UFL_ - SuPolyU_.ul);
|
return SuPolyU_.ulv*(UFL_ - phi)/(UFL_ - SuPolyU_.ul);
|
||||||
}
|
}
|
||||||
else if (phi < SuPolyL_.lu)
|
else if (phi < SuPolyL_.lu)
|
||||||
@ -185,7 +181,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorIn("laminarFlameSpeedModels::SCOPE::SuRef(scalar phi)")
|
||||||
<< "phi = " << phi
|
<< "phi = " << phi
|
||||||
<< " cannot be handled by SCOPE function with the "
|
<< " cannot be handled by SCOPE function with the "
|
||||||
"given coefficients"
|
"given coefficients"
|
||||||
@ -195,35 +191,41 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma
|
inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma
|
||||||
(
|
(
|
||||||
scalar phi
|
scalar phi
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (phi < MaPolyL_.ll)
|
if (phi < LFL_ || phi > UFL_)
|
||||||
{
|
{
|
||||||
// Beyond the lower limit assume Ma is constant
|
// Return 0 beyond the flamibility limits
|
||||||
return MaPolyL_.llv;
|
return scalar(0);
|
||||||
|
}
|
||||||
|
else if (phi < MaPolyL_.ll)
|
||||||
|
{
|
||||||
|
// Use linear interpolation between the low end of the
|
||||||
|
// lower polynomial and the lower flamibility limit
|
||||||
|
return MaPolyL_.llv*(phi - LFL_)/(MaPolyL_.ll - LFL_);
|
||||||
}
|
}
|
||||||
else if (phi > MaPolyU_.ul)
|
else if (phi > MaPolyU_.ul)
|
||||||
{
|
{
|
||||||
// Beyond the upper limit assume Ma is constant
|
// Use linear interpolation between the upper end of the
|
||||||
return MaPolyU_.ulv;
|
// upper polynomial and the upper flamibility limit
|
||||||
|
return MaPolyU_.ulv*(UFL_ - phi)/(UFL_ - MaPolyU_.ul);
|
||||||
}
|
}
|
||||||
else if (phi < SuPolyL_.lu)
|
else if (phi < MaPolyL_.lu)
|
||||||
{
|
{
|
||||||
// Evaluate the lower polynomial
|
// Evaluate the lower polynomial
|
||||||
return polyPhi(phi, MaPolyL_);
|
return polyPhi(phi, MaPolyL_);
|
||||||
}
|
}
|
||||||
else if (phi > SuPolyU_.lu)
|
else if (phi > MaPolyU_.lu)
|
||||||
{
|
{
|
||||||
// Evaluate the upper polynomial
|
// Evaluate the upper polynomial
|
||||||
return polyPhi(phi, MaPolyU_);
|
return polyPhi(phi, MaPolyU_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorIn("laminarFlameSpeedModels::SCOPE::Ma(scalar phi)")
|
||||||
<< "phi = " << phi
|
<< "phi = " << phi
|
||||||
<< " cannot be handled by SCOPE function with the "
|
<< " cannot be handled by SCOPE function with the "
|
||||||
"given coefficients"
|
"given coefficients"
|
||||||
@ -243,8 +245,31 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
|||||||
{
|
{
|
||||||
static const scalar Tref = 300.0;
|
static const scalar Tref = 300.0;
|
||||||
static const scalar pRef = 1.013e5;
|
static const scalar pRef = 1.013e5;
|
||||||
|
scalar phi1=phi-1.0;
|
||||||
|
|
||||||
return SuRef(phi)*pow((Tu/Tref), Texp_)*pow((p/pRef), pexp_);
|
scalar Texp_=
|
||||||
|
Texp0_+phi1*
|
||||||
|
(
|
||||||
|
Texp1_
|
||||||
|
+Texp2_*phi1+
|
||||||
|
Texp3_*pow(phi1, 2) +
|
||||||
|
Texp4_*pow(phi1, 3) +
|
||||||
|
Texp5_*pow(phi1, 4) +
|
||||||
|
Texp6_*pow(phi1, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
scalar pexp =
|
||||||
|
pexp0_ + phi1
|
||||||
|
*(
|
||||||
|
pexp1_
|
||||||
|
+ pexp2_*phi1
|
||||||
|
+ pexp3_*pow(phi1, 2)
|
||||||
|
+ pexp4_*pow(phi1, 3)
|
||||||
|
+ pexp5_*pow(phi1, 4)
|
||||||
|
+ pexp6_*pow(phi1, 5)
|
||||||
|
);
|
||||||
|
|
||||||
|
return SuRef(phi)*pow((Tu/Tref), Texp_)*pow((p/pRef), pexp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,11 +304,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
|||||||
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi);
|
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
|
forAll(Su0.boundaryField(), patchi)
|
||||||
|
|
||||||
forAll(Su0Bf, patchi)
|
|
||||||
{
|
{
|
||||||
scalarField& Su0p = Su0Bf[patchi];
|
scalarField& Su0p = Su0.boundaryFieldRef()[patchi];
|
||||||
const scalarField& pp = p.boundaryField()[patchi];
|
const scalarField& pp = p.boundaryField()[patchi];
|
||||||
const scalarField& Tup = Tu.boundaryField()[patchi];
|
const scalarField& Tup = Tu.boundaryField()[patchi];
|
||||||
|
|
||||||
@ -328,11 +351,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
|||||||
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]);
|
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
|
forAll(Su0.boundaryField(), patchi)
|
||||||
|
|
||||||
forAll(Su0Bf, patchi)
|
|
||||||
{
|
{
|
||||||
scalarField& Su0p = Su0Bf[patchi];
|
scalarField& Su0p = Su0.boundaryFieldRef()[patchi];
|
||||||
const scalarField& pp = p.boundaryField()[patchi];
|
const scalarField& pp = p.boundaryField()[patchi];
|
||||||
const scalarField& Tup = Tu.boundaryField()[patchi];
|
const scalarField& Tup = Tu.boundaryField()[patchi];
|
||||||
const scalarField& phip = phi.boundaryField()[patchi];
|
const scalarField& phip = phi.boundaryField()[patchi];
|
||||||
@ -352,7 +373,6 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
|
|||||||
return tSu0;
|
return tSu0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
|
Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
|
||||||
(
|
(
|
||||||
const volScalarField& phi
|
const volScalarField& phi
|
||||||
@ -382,11 +402,11 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
|
|||||||
ma[celli] = Ma(phi[celli]);
|
ma[celli] = Ma(phi[celli]);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField::Boundary& maBf = ma.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(maBf, patchi)
|
|
||||||
|
forAll(ma.boundaryField(), patchi)
|
||||||
{
|
{
|
||||||
scalarField& map = maBf[patchi];
|
scalarField& map = ma.boundaryFieldRef()[patchi];
|
||||||
const scalarField& phip = phi.boundaryField()[patchi];
|
const scalarField& phip = phi.boundaryField()[patchi];
|
||||||
|
|
||||||
forAll(map, facei)
|
forAll(map, facei)
|
||||||
@ -398,6 +418,11 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
|
|||||||
return tMa;
|
return tMa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::CIn() const
|
||||||
|
{
|
||||||
|
return CIn_ ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
||||||
@ -410,7 +435,8 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
|
|||||||
(
|
(
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
"stoichiometricAirFuelMassRatio",
|
||||||
|
psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -451,7 +477,8 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const
|
|||||||
psiuReactionThermo_.Tu(),
|
psiuReactionThermo_.Tu(),
|
||||||
dimensionedScalar
|
dimensionedScalar
|
||||||
(
|
(
|
||||||
"stoichiometricAirFuelMassRatio", dimless, psiuReactionThermo_
|
"stoichiometricAirFuelMassRatio",
|
||||||
|
psiuReactionThermo_
|
||||||
)*ft/(scalar(1) - ft)
|
)*ft/(scalar(1) - ft)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,11 +123,50 @@ class SCOPE
|
|||||||
//- Upper Su polynomial
|
//- Upper Su polynomial
|
||||||
polynomial SuPolyU_;
|
polynomial SuPolyU_;
|
||||||
|
|
||||||
//- Temperature correction exponent
|
//- Temperature correction exponent0
|
||||||
scalar Texp_;
|
scalar Texp0_;
|
||||||
|
|
||||||
//- Pressure correction exponent
|
//- Temperature correction exponent1
|
||||||
scalar pexp_;
|
scalar Texp1_;
|
||||||
|
|
||||||
|
//- Temperature correction exponent2
|
||||||
|
scalar Texp2_;
|
||||||
|
|
||||||
|
//- Temperature correction exponent3
|
||||||
|
scalar Texp3_;
|
||||||
|
|
||||||
|
//- Temperature correction exponent4
|
||||||
|
scalar Texp4_;
|
||||||
|
|
||||||
|
//- Temperature correction exponent5
|
||||||
|
scalar Texp5_;
|
||||||
|
|
||||||
|
//- Temperature correction exponent6
|
||||||
|
scalar Texp6_;
|
||||||
|
|
||||||
|
//- Pressure correction exponent0
|
||||||
|
scalar pexp0_;
|
||||||
|
|
||||||
|
//- Pressure correction exponent1
|
||||||
|
scalar pexp1_;
|
||||||
|
|
||||||
|
//- pressure correction exponent2
|
||||||
|
scalar pexp2_;
|
||||||
|
|
||||||
|
//- pressure correction exponent3
|
||||||
|
scalar pexp3_;
|
||||||
|
|
||||||
|
//- Pressure correction exponent4
|
||||||
|
scalar pexp4_;
|
||||||
|
|
||||||
|
//- Pressure correction exponent5
|
||||||
|
scalar pexp5_;
|
||||||
|
|
||||||
|
//- pressure correction exponent6
|
||||||
|
scalar pexp6_;
|
||||||
|
|
||||||
|
//- Additional coefficient
|
||||||
|
scalar CIn_;
|
||||||
|
|
||||||
//- Lower Ma polynomial
|
//- Lower Ma polynomial
|
||||||
polynomial MaPolyL_;
|
polynomial MaPolyL_;
|
||||||
@ -136,25 +175,25 @@ class SCOPE
|
|||||||
polynomial MaPolyU_;
|
polynomial MaPolyU_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Polynomial evaluated from the given equivalence ratio
|
//- Polynomial evaluated from the given equivalence ratio
|
||||||
// and polynomial coefficients
|
//- and polynomial coefficients
|
||||||
static inline scalar polyPhi(scalar phi, const polynomial& a);
|
static inline scalar polyPhi(scalar phi, const polynomial& a);
|
||||||
|
|
||||||
//- Laminar flame speed evaluated from the given equivalence ratio
|
//- Laminar flame speed evaluated from the given equivalence ratio
|
||||||
// at the reference temperature and pressure
|
//- at the reference temperature and pressure
|
||||||
inline scalar SuRef(scalar phi) const;
|
inline scalar SuRef(scalar phi) const;
|
||||||
|
|
||||||
//- Markstein evaluated from the given equivalence ratio
|
//- Markstein evaluated from the given equivalence ratio
|
||||||
inline scalar Ma(scalar phi) const;
|
inline scalar Ma(scalar phi) const;
|
||||||
|
|
||||||
//- Laminar flame speed evaluated from the given equivalence ratio
|
//- Laminar flame speed evaluated from the given equivalence ratio
|
||||||
// corrected for temperature and pressure dependence
|
//- corrected for temperature and pressure dependence
|
||||||
inline scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const;
|
inline scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const;
|
||||||
|
|
||||||
//- Laminar flame speed evaluated from the given uniform
|
//- Laminar flame speed evaluated from the given uniform
|
||||||
// equivalence ratio corrected for temperature and pressure dependence
|
//- equivalence ratio corrected for temperature and pressure dependence
|
||||||
tmp<volScalarField> Su0pTphi
|
tmp<volScalarField> Su0pTphi
|
||||||
(
|
(
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
@ -163,7 +202,7 @@ class SCOPE
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Laminar flame speed evaluated from the given equivalence ratio
|
//- Laminar flame speed evaluated from the given equivalence ratio
|
||||||
// distribution corrected for temperature and pressure dependence
|
//- distribution corrected for temperature and pressure dependence
|
||||||
tmp<volScalarField> Su0pTphi
|
tmp<volScalarField> Su0pTphi
|
||||||
(
|
(
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
@ -172,13 +211,14 @@ class SCOPE
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return the Markstein number
|
//- Return the Markstein number
|
||||||
// evaluated from the given equivalence ratio
|
//- evaluated from the given equivalence ratio
|
||||||
tmp<volScalarField> Ma(const volScalarField& phi) const;
|
tmp<volScalarField> Ma(const volScalarField& phi) const;
|
||||||
|
|
||||||
//- Construct as copy (not implemented)
|
//- No copy construct
|
||||||
SCOPE(const SCOPE&);
|
SCOPE(const SCOPE&) = delete;
|
||||||
|
|
||||||
void operator=(const SCOPE&);
|
//- No copy assign
|
||||||
|
void operator=(const SCOPE&) = delete;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -191,8 +231,8 @@ public:
|
|||||||
//- Construct from dictionary and psiuReactionThermo
|
//- Construct from dictionary and psiuReactionThermo
|
||||||
SCOPE
|
SCOPE
|
||||||
(
|
(
|
||||||
const dictionary&,
|
const dictionary& dict,
|
||||||
const psiuReactionThermo&
|
const psiuReactionThermo& ct
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -205,6 +245,9 @@ public:
|
|||||||
//- Return the Markstein number
|
//- Return the Markstein number
|
||||||
tmp<volScalarField> Ma() const;
|
tmp<volScalarField> Ma() const;
|
||||||
|
|
||||||
|
//- Return CIn
|
||||||
|
scalar CIn() const;
|
||||||
|
|
||||||
//- Return the laminar flame speed [m/s]
|
//- Return the laminar flame speed [m/s]
|
||||||
tmp<volScalarField> operator()() const;
|
tmp<volScalarField> operator()() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
|
|
||||||
volVectorField HbyA(constrainHbyA(invA & UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(invA & UEqn.H(), U, p));
|
||||||
|
|
||||||
if (pimple.transonic())
|
if (pimple.transonic())
|
||||||
@ -8,12 +9,7 @@ if (pimple.transonic())
|
|||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
fvc::interpolate(psi)*(fvc::flux(HbyA))
|
||||||
*(
|
|
||||||
fvc::flux(HbyA)
|
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
|
||||||
/fvc::interpolate(rho)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
@ -40,10 +36,7 @@ else
|
|||||||
surfaceScalarField phiHbyA
|
surfaceScalarField phiHbyA
|
||||||
(
|
(
|
||||||
"phiHbyA",
|
"phiHbyA",
|
||||||
(
|
fvc::flux(rho*HbyA)
|
||||||
fvc::flux(rho*HbyA)
|
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
@ -66,6 +59,8 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.max(pMin);
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -23,52 +24,24 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Global
|
||||||
|
readTimeControls
|
||||||
|
|
||||||
|
Description
|
||||||
|
Read the control parameters used by setDeltaT
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fixed.H"
|
const bool adjustTimeStep =
|
||||||
#include "addToRunTimeSelectionTable.H"
|
runTime.controlDict().getOrDefault<bool>("adjustTimeStep", false);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
scalar maxCo = runTime.controlDict().getOrDefault<scalar>("maxCo", 1.0);
|
||||||
|
|
||||||
namespace Foam
|
scalar maxDeltaT =
|
||||||
{
|
runTime.controlDict().getOrDefault<scalar>("maxDeltaT", GREAT);
|
||||||
namespace XiModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(fixed, 0);
|
|
||||||
addToRunTimeSelectionTable(XiModel, fixed, dictionary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
scalar maxDeltaTRatio =
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
runTime.controlDict().getOrDefault<scalar>("maxDeltaTRatio", 1.2);
|
||||||
|
|
||||||
Foam::XiModels::fixed::fixed
|
|
||||||
(
|
|
||||||
const dictionary& XiProperties,
|
|
||||||
const psiuReactionThermo& thermo,
|
|
||||||
const compressible::RASModel& turbulence,
|
|
||||||
const volScalarField& Su,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volScalarField& b,
|
|
||||||
const surfaceScalarField& phi
|
|
||||||
)
|
|
||||||
:
|
|
||||||
XiModel(XiProperties, thermo, turbulence, Su, rho, b, phi)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::XiModels::fixed::~fixed()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
bool Foam::XiModels::fixed::read(const dictionary& XiProperties)
|
|
||||||
{
|
|
||||||
return XiModel::read(XiProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -1,38 +1,3 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | www.openfoam.com
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Copyright (C) 2011 OpenFOAM Foundation
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Global
|
|
||||||
rhoEqn
|
|
||||||
|
|
||||||
Description
|
|
||||||
Solve the continuity for density.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
{
|
{
|
||||||
solve(betav*fvm::ddt(rho) + fvc::div(phi));
|
solve(betav*fvm::ddt(rho) + fvc::div(phi));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
|
|||||||
@ -36,7 +36,8 @@ Description
|
|||||||
if (adjustTimeStep)
|
if (adjustTimeStep)
|
||||||
{
|
{
|
||||||
scalar maxDeltaTFact = maxCo/(CoNum + StCoNum + SMALL);
|
scalar maxDeltaTFact = maxCo/(CoNum + StCoNum + SMALL);
|
||||||
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
|
scalar deltaTFact =
|
||||||
|
min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), maxDeltaTRatio);
|
||||||
|
|
||||||
runTime.setDeltaT
|
runTime.setDeltaT
|
||||||
(
|
(
|
||||||
|
|||||||
@ -15,19 +15,18 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
smoothSt false;
|
||||||
StSmoothCoef 1000.0;
|
StSmoothCoef 1000.0;
|
||||||
|
|
||||||
//No smooth if >100
|
|
||||||
|
|
||||||
schelkin
|
schelkin
|
||||||
{
|
{
|
||||||
subGridSchelkin true;
|
subGridSchelkin true;
|
||||||
uPrimeCoef 1.0;
|
uPrimeCoef 1.0;
|
||||||
lCoef 0.336;
|
lCoef 0.336;
|
||||||
maxSchFac 100.0;
|
maxSchFac 100.0;
|
||||||
nrCoef 0.1;
|
nrCoef 0.1;
|
||||||
nrExp 0.0;
|
nrExp 0.0;
|
||||||
nrExp2 0.05;
|
nrExp2 0.05;
|
||||||
}
|
}
|
||||||
|
|
||||||
PDRDragModel basic;
|
PDRDragModel basic;
|
||||||
@ -47,17 +46,8 @@ basicSchCoeffs
|
|||||||
Csk 0.0;
|
Csk 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
XiModel transport;
|
XiModel transportTwoEqs;
|
||||||
|
|
||||||
algebraicCoeffs
|
|
||||||
{
|
|
||||||
XiShapeCoef 1;
|
|
||||||
XpShapeCoef 1;
|
|
||||||
CpfiDot 0.0;
|
|
||||||
CpfiCross 0.0;
|
|
||||||
GEtaExp 0.0;
|
|
||||||
LOverCw 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
transportTwoEqsCoeffs
|
transportTwoEqsCoeffs
|
||||||
{
|
{
|
||||||
@ -69,51 +59,11 @@ transportTwoEqsCoeffs
|
|||||||
LOverCw 0.01;
|
LOverCw 0.01;
|
||||||
}
|
}
|
||||||
|
|
||||||
k3Coeffs
|
|
||||||
{
|
|
||||||
k3Obs 10.0;
|
|
||||||
k3Open 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
transportThreeEqsCoeffs
|
|
||||||
{
|
|
||||||
$transportTwoEqsCoeffs;
|
|
||||||
$k3Coeffs;
|
|
||||||
}
|
|
||||||
|
|
||||||
transportFourEqsCoeffs
|
|
||||||
{
|
|
||||||
$transportTwoEqsCoeffs;
|
|
||||||
$k3Coeffs;
|
|
||||||
}
|
|
||||||
|
|
||||||
transportOneEqObsCoeffs
|
|
||||||
{
|
|
||||||
XiShapeCoef 1;
|
|
||||||
Cpfi 0.0;
|
|
||||||
GEtaExp 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
transportXp
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
transportCoeffs
|
|
||||||
{
|
|
||||||
XiShapeCoef 1;
|
|
||||||
GEtaExp 0.28;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixedCoeffs
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
XiEqModel : Model for XiEq
|
XiEqModel : Model for XiEq
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
XiEqModel instability;
|
XiEqModel instability2XiEq;
|
||||||
|
|
||||||
BLMcoeffs
|
BLMcoeffs
|
||||||
{
|
{
|
||||||
@ -141,12 +91,9 @@ instability2XiEqCoeffs
|
|||||||
BLMgMaXiEqCoeffs
|
BLMgMaXiEqCoeffs
|
||||||
{
|
{
|
||||||
$schelkin;
|
$schelkin;
|
||||||
gulderCoef 1.0; //this value is not usssed 1.0.
|
|
||||||
kaCoef 0.25;
|
kaCoef 0.25;
|
||||||
lowK0 0.1;
|
lowK0 0.1;
|
||||||
lowKg 0.0;
|
lowKg 0.0;
|
||||||
gMaCoef 0.032; //not used
|
|
||||||
gMaCoef1 0.0; // not used
|
|
||||||
$BLMcoeffs;
|
$BLMcoeffs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,45 +108,6 @@ instability2XiEqCoeffs
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
instabilityCoeffs
|
|
||||||
{
|
|
||||||
|
|
||||||
XiEqIn 2.5;
|
|
||||||
XiEqModel Gulder;
|
|
||||||
GulderCoeffs
|
|
||||||
{
|
|
||||||
uPrimeCoef 1.0;
|
|
||||||
subGridSchelkin true;
|
|
||||||
XiEqCoef 0.62;
|
|
||||||
}
|
|
||||||
|
|
||||||
SCOPEBlendCoeffs
|
|
||||||
{
|
|
||||||
XiEqModelL
|
|
||||||
{
|
|
||||||
XiEqModel Gulder;
|
|
||||||
|
|
||||||
GulderCoeffs
|
|
||||||
{
|
|
||||||
$schelkin;
|
|
||||||
XiEqCoef 0.62;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XiEqModelH
|
|
||||||
{
|
|
||||||
XiEqModel SCOPEXiEq;
|
|
||||||
|
|
||||||
SCOPEXiEqCoeffs
|
|
||||||
{
|
|
||||||
$schelkin;
|
|
||||||
XiEqCoef 1.6;
|
|
||||||
XiEqExp 0.33333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
XiGModel : Model for generation of Xi
|
XiGModel : Model for generation of Xi
|
||||||
@ -207,25 +115,10 @@ instabilityCoeffs
|
|||||||
|
|
||||||
XiGModel instabilityG;
|
XiGModel instabilityG;
|
||||||
|
|
||||||
instability2GCoeffs
|
|
||||||
{
|
|
||||||
lambdaIn 0.0001;
|
|
||||||
defaultCIn 10.0;
|
|
||||||
GInMult 5.0;
|
|
||||||
GInFade 4.0;
|
|
||||||
|
|
||||||
XiGModel KTS;
|
|
||||||
|
|
||||||
KTSCoeffs
|
|
||||||
{
|
|
||||||
GEtaCoef 0.28;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
instabilityGCoeffs
|
instabilityGCoeffs
|
||||||
{
|
{
|
||||||
lambdaIn 4.5e-3;
|
lambdaIn lambdaIn [0 1 0 0 0 0 0] 4.5e-3;
|
||||||
GIn 1.917;
|
GIn GIn [0 0 -1 0 0 0 0] 1.917;
|
||||||
|
|
||||||
XiGModel KTS;
|
XiGModel KTS;
|
||||||
KTSCoeffs
|
KTSCoeffs
|
||||||
@ -249,11 +142,6 @@ normBasicSubGridCoeffs
|
|||||||
Cxpe4 1.0;
|
Cxpe4 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
basicSubGridCoeffs
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
XpGModel : Model for generation of Xp
|
XpGModel : Model for generation of Xp
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -273,14 +161,4 @@ normBasicSubGridGCoeffs
|
|||||||
Cxpe3 400.0;
|
Cxpe3 400.0;
|
||||||
Cxpe4 1.0;
|
Cxpe4 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
basicSubGridGCoeffs
|
|
||||||
{
|
|
||||||
XpGModel KTS;
|
|
||||||
KTSCoeffs
|
|
||||||
{
|
|
||||||
GEtaCoef 0.28;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -15,15 +15,11 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>;
|
|
||||||
|
|
||||||
thermoType
|
thermoType
|
||||||
{
|
{
|
||||||
type heheuPsiThermo;
|
type heheuPsiThermo;
|
||||||
mixture inhomogeneousMixture;
|
mixture inhomogeneousMixture;
|
||||||
//mixture sprayHomogeneousMixtureDisp;
|
|
||||||
//mixture sprayInhomogeneousMixture;
|
|
||||||
//mixture inhomogeneousMixture;
|
|
||||||
transport sutherland;
|
transport sutherland;
|
||||||
thermo janaf;
|
thermo janaf;
|
||||||
equationOfState perfectGas;
|
equationOfState perfectGas;
|
||||||
@ -31,26 +27,6 @@ thermoType
|
|||||||
energy absoluteEnthalpy;
|
energy absoluteEnthalpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
inertSpecie AIR;
|
|
||||||
|
|
||||||
liquids
|
|
||||||
{
|
|
||||||
//liquidComponents ( H2OPS );
|
|
||||||
H2OPS
|
|
||||||
{
|
|
||||||
defaultCoeffs yes;
|
|
||||||
}
|
|
||||||
water
|
|
||||||
{
|
|
||||||
defaultCoeffs yes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
solids
|
|
||||||
{
|
|
||||||
//solidComponents ( );
|
|
||||||
}
|
|
||||||
|
|
||||||
stoichiometricAirFuelMassRatio 17.1667;
|
stoichiometricAirFuelMassRatio 17.1667;
|
||||||
|
|
||||||
fuel
|
fuel
|
||||||
@ -119,27 +95,7 @@ burntProducts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
steam
|
dpdt false;
|
||||||
{
|
pMin 1e3;
|
||||||
specie
|
|
||||||
{
|
|
||||||
nMoles 1;
|
|
||||||
molWeight 18.02;
|
|
||||||
}
|
|
||||||
thermodynamics
|
|
||||||
{
|
|
||||||
Tlow 200.00;
|
|
||||||
Thigh 5000.00;
|
|
||||||
Tcommon 1000.00;
|
|
||||||
highCpCoeffs ( 2.67215e+00 3.05629e-03 -8.73026e-07 1.20100e-10 -6.39162e-15 -29899.199219 6.862820);
|
|
||||||
lowCpCoeffs ( 3.38684e+00 3.47498e-03 -6.35470e-06 6.96858e-09 -2.50659e-12 -30208.099609 2.590230);
|
|
||||||
}
|
|
||||||
transport
|
|
||||||
{
|
|
||||||
As 1.6721e-06;
|
|
||||||
Ts 1.7067e+02;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -22,18 +22,6 @@ RAS
|
|||||||
RASModel PDRkEpsilon;
|
RASModel PDRkEpsilon;
|
||||||
|
|
||||||
PDRkEpsilonCoeffs
|
PDRkEpsilonCoeffs
|
||||||
{
|
|
||||||
Cmu 0.09;
|
|
||||||
C1 1.44;
|
|
||||||
C2 1.92;
|
|
||||||
C3 -0.33;//0; (Original : -0.33)
|
|
||||||
C4 0.1;
|
|
||||||
alphah 1;
|
|
||||||
alphak 1;
|
|
||||||
alphaEps 0.76923;
|
|
||||||
}
|
|
||||||
|
|
||||||
PDRkEpsilonFiltCoeffs
|
|
||||||
{
|
{
|
||||||
Cmu 0.09;
|
Cmu 0.09;
|
||||||
C1 1.44;
|
C1 1.44;
|
||||||
@ -49,54 +37,8 @@ RAS
|
|||||||
LOverMobs 0.0;
|
LOverMobs 0.0;
|
||||||
maxLOverCellW 2.0;
|
maxLOverCellW 2.0;
|
||||||
lCoef 0.35;
|
lCoef 0.35;
|
||||||
resCoef 0.0;
|
bMin 0.85;
|
||||||
maxResFac 1.0;
|
flameFilteredG true;
|
||||||
filtRadMult 6.0;
|
|
||||||
bFilt 0.85;
|
|
||||||
flameFilteredG 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
PDRRNGkEpsilonCoeffs
|
|
||||||
{
|
|
||||||
Cmu 0.0845;
|
|
||||||
C1 1.42;
|
|
||||||
C2 1.68;
|
|
||||||
C3 -0.33;
|
|
||||||
sigmak 0.71942;
|
|
||||||
sigmaEps 0.71942;
|
|
||||||
eta0 4.38;
|
|
||||||
beta 0.012;
|
|
||||||
LOverLobs 0.5;
|
|
||||||
LOverMobs 0.5;
|
|
||||||
maxLOverCellW 2.0;
|
|
||||||
lCoef 0.35;
|
|
||||||
C5 1.5;
|
|
||||||
C6 1.0;
|
|
||||||
alphah 1;
|
|
||||||
alphak 1;
|
|
||||||
alphaEps 0.76923;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PDRrealkEpsilonCoeffs
|
|
||||||
{
|
|
||||||
Cmu 0.09;
|
|
||||||
A0 4.0;
|
|
||||||
C2 1.9;
|
|
||||||
C3 -0.33;
|
|
||||||
sigmak 1;
|
|
||||||
sigmaEps 0.71942;
|
|
||||||
eta0 4.38;
|
|
||||||
beta 0.012;
|
|
||||||
LOverLobs 0.5;
|
|
||||||
LOverMobs 0.5;
|
|
||||||
maxLOverCellW 2.0;
|
|
||||||
lCoef 0.35 ;
|
|
||||||
C5 1.5;
|
|
||||||
C6 1.0;
|
|
||||||
alphah 1;
|
|
||||||
alphak 1;
|
|
||||||
alphaEps 0.76923;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence on;
|
turbulence on;
|
||||||
|
|||||||
@ -4,8 +4,8 @@ name methane;
|
|||||||
|
|
||||||
SCOPECoeffs
|
SCOPECoeffs
|
||||||
{
|
{
|
||||||
lowerFlammabilityLimit 0.502449441017432;
|
lowerFlamabilityLimit 0.502449441017432;
|
||||||
upperFlammabilityLimit 1.68468341988198;
|
upperFlamabilityLimit 1.68468341988198;
|
||||||
|
|
||||||
lowerSuPolynomial
|
lowerSuPolynomial
|
||||||
{
|
{
|
||||||
@ -72,7 +72,23 @@ SCOPECoeffs
|
|||||||
}
|
}
|
||||||
|
|
||||||
Texp 2.0;
|
Texp 2.0;
|
||||||
pexp -0.5;
|
Texp0 1.5453;
|
||||||
|
Texp1 -0.4204;
|
||||||
|
Texp2 3.7503;
|
||||||
|
Texp3 1.782;
|
||||||
|
Texp4 0.0;
|
||||||
|
Texp5 0.0;
|
||||||
|
Texp6 0.0;
|
||||||
|
|
||||||
|
pexp -0.5;
|
||||||
|
pexp0 -0.314;
|
||||||
|
pexp1 0.608;
|
||||||
|
pexp2 0.0;
|
||||||
|
pexp3 0.0;
|
||||||
|
pexp4 0.0;
|
||||||
|
pexp5 0.0;
|
||||||
|
pexp6 0.0;
|
||||||
|
|
||||||
CIn 10.2;
|
CIn 10.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,13 @@ startTime 0;
|
|||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 0.125;
|
endTime 0.5;
|
||||||
|
|
||||||
deltaT 5e-06;
|
deltaT 5e-06;
|
||||||
|
|
||||||
writeControl runTime;
|
writeControl runTime;
|
||||||
|
|
||||||
writeInterval 0.001;
|
writeInterval 0.01;
|
||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
@ -53,6 +53,43 @@ maxDeltaT 1;
|
|||||||
functions
|
functions
|
||||||
{
|
{
|
||||||
#include "probes"
|
#include "probes"
|
||||||
|
|
||||||
|
normalisedGradP
|
||||||
|
{
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
type coded;
|
||||||
|
name normalisedGradP;
|
||||||
|
|
||||||
|
writeControl none;
|
||||||
|
writeInterval -1;
|
||||||
|
executeControl timeStep;
|
||||||
|
executeInterval -1;
|
||||||
|
|
||||||
|
codeExecute
|
||||||
|
#{
|
||||||
|
|
||||||
|
const volScalarField& p = mesh().lookupObject<volScalarField>("p");
|
||||||
|
|
||||||
|
if (!mesh().foundObject<volScalarField>("normalisedGradP"))
|
||||||
|
{
|
||||||
|
volScalarField* normalisedGradPPtr =
|
||||||
|
new volScalarField("normalisedGradP", mag(fvc::grad(p)));
|
||||||
|
|
||||||
|
normalisedGradPPtr->store();
|
||||||
|
|
||||||
|
Info << "Found normalisedGradP"<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField& normalisedGradP =
|
||||||
|
mesh().lookupObjectRef<volScalarField>("normalisedGradP");
|
||||||
|
|
||||||
|
normalisedGradP = mag(fvc::grad(p));
|
||||||
|
|
||||||
|
Info << "Found not normalisedGradP"<< max(normalisedGradP) << endl;
|
||||||
|
|
||||||
|
#};
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -50,23 +50,6 @@ divSchemes
|
|||||||
|
|
||||||
div(phi,K) Gauss limitedLinear 1;
|
div(phi,K) Gauss limitedLinear 1;
|
||||||
|
|
||||||
div(phi,ft_b_ha_hau_H2OPS_Y) Gauss multivariateSelection
|
|
||||||
{
|
|
||||||
ft limitedLinear01 1;
|
|
||||||
b limitedLinear01 1;
|
|
||||||
Xi limitedLinear 1;
|
|
||||||
Xp limitedLinear 1;
|
|
||||||
Ep limitedLinear 1;
|
|
||||||
h limitedLinear 1;
|
|
||||||
hu limitedLinear 1;
|
|
||||||
ha limitedLinear 1;
|
|
||||||
hau limitedLinear 1;
|
|
||||||
H2OPS limitedLinear 1;
|
|
||||||
water limitedLinear 1;
|
|
||||||
Y limitedLinear 1;
|
|
||||||
AIR limitedLinear 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
div(phi,ft_b_h_hu) Gauss multivariateSelection
|
div(phi,ft_b_h_hu) Gauss multivariateSelection
|
||||||
{
|
{
|
||||||
ft limitedLinear01 1;
|
ft limitedLinear01 1;
|
||||||
|
|||||||
@ -1,98 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2012 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object fvSchemes;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
ddtSchemes
|
|
||||||
{
|
|
||||||
default Euler;
|
|
||||||
}
|
|
||||||
|
|
||||||
gradSchemes
|
|
||||||
{
|
|
||||||
default Gauss linear;
|
|
||||||
grad(p) Gauss linear;
|
|
||||||
grad(b) fourth;
|
|
||||||
}
|
|
||||||
|
|
||||||
divSchemes
|
|
||||||
{
|
|
||||||
default Gauss upwind;
|
|
||||||
/*
|
|
||||||
div(phi,U) Gauss limitedLinearV 1;
|
|
||||||
div(phiU,p) Gauss limitedLinear 1;
|
|
||||||
div(phid,p) Gauss limitedLinear 1;
|
|
||||||
div(phi,k) Gauss limitedLinear 1;
|
|
||||||
div(phi,epsilon) Gauss limitedLinear 1;
|
|
||||||
|
|
||||||
div(phiXi,Xi) Gauss limitedLinear 1;
|
|
||||||
div(phiSt,b) Gauss limitedLinear01 1;
|
|
||||||
|
|
||||||
div(phi,K) Gauss limitedLinear 1;
|
|
||||||
*/
|
|
||||||
div(phi,ft_b_h_hu) Gauss multivariateSelection
|
|
||||||
{
|
|
||||||
ft upwind;//limitedLinear01 1;
|
|
||||||
b upwind;//limitedLinear01 1;
|
|
||||||
Xi upwind;//limitedLinear 1;
|
|
||||||
h upwind;//limitedLinear 1;
|
|
||||||
hu upwind;//limitedLinear 1;
|
|
||||||
Xp upwind;
|
|
||||||
Ep upwind;
|
|
||||||
};
|
|
||||||
|
|
||||||
div((Su*grad(b))) Gauss linear;
|
|
||||||
div((U+((Su*Xi)*grad(b)))) Gauss linear;
|
|
||||||
//div((muEff*dev2(T(grad(U))))) Gauss linear;
|
|
||||||
div(U) Gauss linear;
|
|
||||||
div((muEff*dev2(T(grad(Ubet))))) Gauss linear;
|
|
||||||
div(phi,Ubet) Gauss linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
laplacianSchemes
|
|
||||||
{
|
|
||||||
default none;
|
|
||||||
|
|
||||||
laplacian(muEff,Ubet) Gauss linear limited 0.333;
|
|
||||||
laplacian(DkEff,k) Gauss linear limited 0.333;
|
|
||||||
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
|
|
||||||
laplacian((rho*inv((((1)*A(Ubet))+tDragDcu))),p) Gauss linear limited 0.333;
|
|
||||||
//laplacian((rho*inv((((1)*A(U))+((((0.5*rho)*CR)*mag(U))+((((Csu*(1))*betav)*muEff)*sqr(Aw)))))),p) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,b) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,ft) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,h) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,hu) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,Ep) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,GRxp) Gauss linear limited 0.333;
|
|
||||||
laplacian(Db,GRep) Gauss linear limited 0.333;
|
|
||||||
}
|
|
||||||
|
|
||||||
interpolationSchemes
|
|
||||||
{
|
|
||||||
default linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
snGradSchemes
|
|
||||||
{
|
|
||||||
default limited 0.333;
|
|
||||||
}
|
|
||||||
|
|
||||||
fluxRequired
|
|
||||||
{
|
|
||||||
default no;
|
|
||||||
p;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,168 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2012 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object fvSolution;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
solvers
|
|
||||||
{
|
|
||||||
rho
|
|
||||||
{
|
|
||||||
solver PCG;
|
|
||||||
preconditioner DIC;
|
|
||||||
tolerance 1e-09;
|
|
||||||
relTol 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
rhoFinal
|
|
||||||
{
|
|
||||||
$rho;
|
|
||||||
}
|
|
||||||
|
|
||||||
p
|
|
||||||
{
|
|
||||||
solver PBiCG;
|
|
||||||
preconditioner DILU;
|
|
||||||
tolerance 1e-9;
|
|
||||||
relTol 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
pFinal
|
|
||||||
{
|
|
||||||
$p;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* "(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)"
|
|
||||||
{
|
|
||||||
solver PBiCG;
|
|
||||||
preconditioner DILU;
|
|
||||||
tolerance 1e-09;
|
|
||||||
relTol 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
"(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)Final"
|
|
||||||
{
|
|
||||||
solver PBiCG;
|
|
||||||
preconditioner DILU;
|
|
||||||
tolerance 1e-09;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
"(b|Xi|Xp|Ep|GRxp|GRep|ft|h|hu|ha|hau|k|epsilon)"
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-09;
|
|
||||||
relTol 0.05;
|
|
||||||
}
|
|
||||||
"(b|Xi|Xp|Ep|GRxp|GRep|ft|h|hu|ha|hau|k|epsilon)Final"
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-09;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PIMPLE
|
|
||||||
{
|
|
||||||
/* nCorrectors 3;
|
|
||||||
nOuterCorrectors 1;
|
|
||||||
nNonOrthogonalCorrectors 3;
|
|
||||||
momentumPredictor true;
|
|
||||||
transonic true;*/
|
|
||||||
|
|
||||||
nCorrectors 1;
|
|
||||||
nOuterCorrectors 10;
|
|
||||||
nNonOrthogonalCorrectors 3;
|
|
||||||
momentumPredictor true;
|
|
||||||
transonic true;
|
|
||||||
|
|
||||||
residualControl
|
|
||||||
{
|
|
||||||
b
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
p
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
Xi
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
Xp
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
Ep
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
ft
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
h
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
hu
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
k
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
U
|
|
||||||
{
|
|
||||||
tolerance 1e-5;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
relaxationFactors
|
|
||||||
{
|
|
||||||
fields
|
|
||||||
{
|
|
||||||
}
|
|
||||||
equations
|
|
||||||
{
|
|
||||||
"U" 0.9;
|
|
||||||
"UFinal" 1.0;
|
|
||||||
"(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)" 0.9;
|
|
||||||
"(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)Final" 1.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -26,29 +26,6 @@ actions
|
|||||||
source nearestToCell;
|
source nearestToCell;
|
||||||
points ( $location );
|
points ( $location );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionally grow cellSet by attached?
|
|
||||||
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
name corners;
|
|
||||||
type pointSet;
|
|
||||||
action new;
|
|
||||||
source cellToPoint;
|
|
||||||
set ignition;
|
|
||||||
option all;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name ignition;
|
|
||||||
type cellSet;
|
|
||||||
action add;
|
|
||||||
source pointToCell;
|
|
||||||
|
|
||||||
set corners;
|
|
||||||
option edge;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user