in particular for equations of state which do not support coefficient mixing
required by equilibrium constant evaluation in reactions.
Also improved the set of pre-compiled combinations of properties and mixing
rules.
Description
Deferred correction interpolation scheme derived from upwind
which returns upwind weighting factors and an explicit correction obtained
from the specified scheme.
This ensures that the transport matrix generated is at least diagonally
equal and avoids the need for relaxation of the matrix (which can affect
conservation) for transient running.
e.g.
divSchemes
{
default none;
div(phi,U) Gauss deferred limitedLinear 1;
.
.
.
and with this setting relaxation of the U-equation is not necessary irrespective
of the Courant number.
Unused entries have been removed, and documentation provided for
previously undocumented entries has been added.
Patch contributed by Francesco Contino
The chemical time-scale has been generalised so that it generates
identical results for equivalent sets of reactions. Otherwise, the
calculation is unchanged. The time scale is still based on the amount of
time a reaction would take to consume all moles currently present in the
system.
To provide more flexibility, extensibility, run-time modifiability and
consistency the handling of optional pressure limits has been moved from
pressureControl (settings in system/fvSolution) to the new limitPressure
fvConstraint (settings in system/fvConstraints).
All tutorials have been updated which provides guidance when upgrading cases but
also helpful error messages are generated for cases using the old settings
providing specific details as to how the case should be updated, e.g. for the
tutorials/compressible/rhoSimpleFoam/squareBend case which has the pressure
limit specification:
SIMPLE
{
...
pMinFactor 0.1;
pMaxFactor 2;
...
generates the error message
--> FOAM FATAL IO ERROR:
Pressure limits should now be specified in fvConstraints:
limitp
{
type limitPressure;
minFactor 0.1;
maxFactor 2;
}
file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution/SIMPLE from line 41 to line 54.
The linearisation of the reaction rate relative to the concentration of
a reference specie is not required anywhere. This data has been removed
from the rate method's output and the internals of the rate method
simplified accordingly. The clipping in the rate methods has also been
simplified and made consistent across the different rate and rate
derivative methods.
This change ensures that ISAT operates correctly as a result of changes
to the chemistry integration step, by putting it permenantly into what
was previously a variable-time-step mode. The constant-time-step mode is
no longer available.
The constant-time-step mode was not compatible with run-time changes,
certain types of restart, or models in which chemistry is integrated
over a time-scale which differs from the physical time-step. The level
of optimsation that the constant-time-step mode previously provided was
also found to be negligible. It's removal therefore simplifies the code
and improves the correctness of operation whilst not removing any
meaningful functionality.
Now that dynamic compilation of thermo and chemistry is available it is no
longer necessary or useful to instantiate vast numbers of thermo combinations
within the standard OpenFOAM libraries. This reduces compile time, library size
and simplifies maintenance.
This switch controls whether the model is corrected every outer
iteration, or just once per timestep.
This is the same as the corresponding switch in the laminar and PaSR
models, except that in the case of EDC it defaults to true. EDC folds
more information pertaining to transport into the chemistry integration,
so updating the chemistry on outer iteration is likely to have greater
effect than for the other models.
Properties have been removed that are set in the standard TDAC ".cfg"
file, and ".orig" files have been used to better ensure that cleanCase
restores the original state. Sandia has also had it's TDAC parameters
slightly tweaked for stability.
The "initialSet" and "fuelSpecies" settings for chemistry reduction
methods now have to be formatted as lists, rather than dictionaries.
This is so that the settings in the TDAC configuration files can be
overridden in a case without the dictionaries being merged.
The chemistry models have been corrected so that the temperature
derivative terms in the jacobian are correct and are consistent with the
derivatives method. This has resulted in a modest improvement in the
efficiency of the ODE integration.
A debug checking routine has been added to ODESystem which prints the
correspondence between the implemented jacobian and one constructed from
calling the derivatives method with finite differences. This will
facilitate convenient verification of the implementation in the future.
In addition a clean up of the derivatives and jacobian functions was
performed. Unused code has been removed and variables have been renamed
more meaningfully. Duplicate code has also been removed from the TDAC
chemistry model.
for chemFoam, fireFoam, buoyantReactingFoam, reactingFoam, chtMultiRegionFoam,
buoyantReactingParticleFoam, reactingParticleFoam, simpleReactingParticleFoam
If the combination of chemistry model and solver selected in chemistryProperties
is not already compiled and present in the standard libraries for the selected
thermophysical properties the chemistry package will be constructed and compiled
automatically using the standard dynamicCode system provided in OpenFOAM.
The chemistry package is constructed automatically from the
etc/codeTemplates/dynamicCode/basicChemistryModel.* files, if these files do not
exist the standard chemistry lookup error message is generated as before.
As with all other dynamicCode options in OpenFOAM (codeStream,
codedFunctionObject etc.) dynamic compilation of the chemistry package is only
enabled if allowSystemOperations is set true.
for chemFoam, fireFoam, buoyantReactingFoam, reactingFoam, chtMultiRegionFoam,
buoyantReactingParticleFoam, reactingParticleFoam, simpleReactingParticleFoam
If the combination of property models selected in thermophysicalProperties is
not already compiled and present in the standard libraries the thermophysical
property package will be constructed and compiled automatically using the
standard dynamicCode system provided in OpenFOAM.
The thermophysical property package is constructed automatically from the
etc/codeTemplates/dynamicCode files for the corresponding base thermo type,
fluidThermo, fluidReactionThermo etc. If the corresponding codeTemplates files
do not exist the standard thermo lookup error message is generated as before.
As with all other dynamicCode options in OpenFOAM (codeStream,
codedFunctionObject etc.) dynamic compilation of the thermophysical property
package is only enabled if allowSystemOperations is set true.
Chemistry integration occurs over the simulation timestep, and should
therefore be initialised with old time properties. This is now the case.
This means that outer iteration of the chemistry within a timestep is
now correct.
In addition, the laminar combustion model (and derivations) has a new
flag which prevents it from being corrected more than once per timestep.
This flag is true by default, as outer iteration of a typical reaction
system is expensive and provides limited benefit.
If the combination of property models selected in thermophysicalProperties is
not already compiled and present in the standard libraries the thermophysical
property package will be constructed and compiled automatically using the
standard dynamicCode system provided in OpenFOAM.
The thermophysical property package is constructed automatically from the
etc/codeTemplates/dynamicCode files for the corresponding base thermo
type (e.g. fluidThermo), currently these are provided only for fluidThermo but
the others will be added shortly. If the corresponding codeTemplates files do
not exist the standard thermo lookup error message is generated as before.
As with all other dynamicCode options in OpenFOAM (codeStream,
codedFunctionObject etc.) dynamic compilation of the thermophysical property
package is only enabled if allowSystemOperations is set true.
divU is cached before mesh-motion and mapped post-motion to drive the optional pcorr flux
update to ensure the fluxes are conservative following mesh motion and change.
The phase system now have the ability to specify the derivative of mass
transfer rates w.r.t. pressure. This permits implicit handling of
pressure-coupled mass transfer processes.
This implicit handling has been applied to the mass transfers that are
modelled by the thermal phase system. This should result in significant
stability improvements. The implicit handling can be toggled on or off
by means of a "pressureImplicit" switch in constant/phaseProperties. It
is on by default.
Patch contributed by Juho Peltola, VTT.