The combustion and chemistry models no longer select and own the
thermodynamic model; they hold a reference instead. The construction of
the combustion and chemistry models has been changed to require a
reference to the thermodyanmics, rather than the mesh and a phase name.
At the solver-level the thermo, turbulence and combustion models are now
selected in sequence. The cyclic dependency between the three models has
been resolved, and the raw-pointer based post-construction step for the
combustion model has been removed.
The old solver-level construction sequence (typically in createFields.H)
was as follows:
autoPtr<combustionModels::psiCombustionModel> combustion
(
combustionModels::psiCombustionModel::New(mesh)
);
psiReactionThermo& thermo = combustion->thermo();
// Create rho, U, phi, etc...
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New(rho, U, phi, thermo)
);
combustion->setTurbulence(*turbulence);
The new sequence is:
autoPtr<psiReactionThermo> thermo(psiReactionThermo::New(mesh));
// Create rho, U, phi, etc...
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New(rho, U, phi, *thermo)
);
autoPtr<combustionModels::psiCombustionModel> combustion
(
combustionModels::psiCombustionModel::New(*thermo, *turbulence)
);
ENH: combustionModel, chemistryModel: Simplified model selection
The combustion and chemistry model selection has been simplified so
that the user does not have to specify the form of the thermodynamics.
Examples of new combustion and chemistry entries are as follows:
In constant/combustionProperties:
combustionModel PaSR;
combustionModel FSD;
In constant/chemistryProperties:
chemistryType
{
solver ode;
method TDAC;
}
All the angle bracket parts of the model names (e.g.,
<psiThermoCombustion,gasHThermoPhysics>) have been removed as well as
the chemistryThermo entry.
The changes are mostly backward compatible. Only support for the
angle bracket form of chemistry solver names has been removed. Warnings
will print if some of the old entries are used, as the parts relating to
thermodynamics are now ignored.
ENH: combustionModel, chemistryModel: Simplified model selection
Updated all tutorials to the new format
STYLE: combustionModel: Namespace changes
Wrapped combustion model make macros in the Foam namespace and removed
combustion model namespace from the base classes. This fixes a namespace
specialisation bug in gcc 4.8. It is also somewhat less verbose in the
solvers.
This resolves bug report https://bugs.openfoam.org/view.php?id=2787
ENH: combustionModels: Default to the "none" model
When the constant/combustionProperties dictionary is missing, the solver
will now default to the "none" model. This is consistent with how
radiation models are selected.
Support the following expansions when they occur at the start of a
string:
Short-form Equivalent
========= ===========
<etc>/ ~OpenFOAM/ (as per foamEtcFile)
<case>/ $FOAM_CASE/
<constant>/ $FOAM_CASE/constant/
<system>/ $FOAM_CASE/system/
These can be used in fileName expansions to improve clarity and reduce
some typing
"<constant>/reactions" vs "$FOAM_CASE/constant/reactions"
- Use on/off vs longer compressed/uncompressed.
For consistency, replaced yes/no with on/off.
- Avoid the combination of binary/compressed,
which is disallowed and provokes a warning anyhow
using a run-time selectable preconditioner
References:
Van der Vorst, H. A. (1992).
Bi-CGSTAB: A fast and smoothly converging variant of Bi-CG
for the solution of nonsymmetric linear systems.
SIAM Journal on scientific and Statistical Computing, 13(2), 631-644.
Barrett, R., Berry, M. W., Chan, T. F., Demmel, J., Donato, J.,
Dongarra, J., Eijkhout, V., Pozo, R., Romine, C. & Van der Vorst, H.
(1994).
Templates for the solution of linear systems:
building blocks for iterative methods
(Vol. 43). Siam.
See also: https://en.wikipedia.org/wiki/Biconjugate_gradient_stabilized_method
Tests have shown that PBiCGStab with the DILU preconditioner is more
robust, reliable and shows faster convergence (~2x) than PBiCG with
DILU, in particular in parallel where PBiCG occasionally diverges.
This remarkable improvement over PBiCG prompted the update of all
tutorial cases currently using PBiCG to use PBiCGStab instead. If any
issues arise with this update please report on Mantis: http://bugs.openfoam.org
Provides efficient integration of complex laminar reaction chemistry,
combining the advantages of automatic dynamic specie and reaction
reduction with ISAT (in situ adaptive tabulation). The advantages grow
as the complexity of the chemistry increases.
References:
Contino, F., Jeanmart, H., Lucchini, T., & D’Errico, G. (2011).
Coupling of in situ adaptive tabulation and dynamic adaptive chemistry:
An effective method for solving combustion in engine simulations.
Proceedings of the Combustion Institute, 33(2), 3057-3064.
Contino, F., Lucchini, T., D'Errico, G., Duynslaegher, C.,
Dias, V., & Jeanmart, H. (2012).
Simulations of advanced combustion modes using detailed chemistry
combined with tabulation and mechanism reduction techniques.
SAE International Journal of Engines,
5(2012-01-0145), 185-196.
Contino, F., Foucher, F., Dagaut, P., Lucchini, T., D’Errico, G., &
Mounaïm-Rousselle, C. (2013).
Experimental and numerical analysis of nitric oxide effect on the
ignition of iso-octane in a single cylinder HCCI engine.
Combustion and Flame, 160(8), 1476-1483.
Contino, F., Masurier, J. B., Foucher, F., Lucchini, T., D’Errico, G., &
Dagaut, P. (2014).
CFD simulations using the TDAC method to model iso-octane combustion
for a large range of ozone seeding and temperature conditions
in a single cylinder HCCI engine.
Fuel, 137, 179-184.
Two tutorial cases are currently provided:
+ tutorials/combustion/chemFoam/ic8h18_TDAC
+ tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC
the first of which clearly demonstrates the advantage of dynamic
adaptive chemistry providing ~10x speedup,
the second demonstrates ISAT on the modest complex GRI mechanisms for
methane combustion, providing a speedup of ~4x.
More tutorials demonstrating TDAC on more complex mechanisms and cases
will be provided soon in addition to documentation for the operation and
settings of TDAC. Also further updates to the TDAC code to improve
consistency and integration with the rest of OpenFOAM and further
optimize operation can be expected.
Original code providing all algorithms for chemistry reduction and
tabulation contributed by Francesco Contino, Tommaso Lucchini, Gianluca
D’Errico, Hervé Jeanmart, Nicolas Bourgeois and Stéphane Backaert.
Implementation updated, optimized and integrated into OpenFOAM-dev by
Henry G. Weller, CFD Direct Ltd with the help of Francesco Contino.
RunFunctions: Added "isTest()" argument parsing function
tutorials: Updated Allrun scripts to propagate the "-test" option
tutorials: Removed the lower Alltest scripts and updated the Allrun to
use the "isTest()" function to handle test-specific operation