Commit Graph

5226 Commits

Author SHA1 Message Date
e8ff92cd67 CorrectPhi: Added pressureReference argument to set the reference cell
so that the same reference cell is used for pcorr and p or p_rgh to improve
consistency between flux and flux correction.
2021-04-30 21:07:15 +01:00
007658b768 thermophysicalModels::rhoReactionThermos: Only instantiate singleComponentMixture for rhoReactionThermo
to avoid duplicate entries for rhoThermo
2021-04-30 15:52:09 +01:00
4181e9e5e6 fvConstraints::limitPressure: Corrected parallel handling of minFactor and maxFactor 2021-04-30 14:38:44 +01:00
77d3985edc Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-30 12:23:01 +01:00
6d7703bfa3 Time: Corrected handling of startTime other than 0 with writeControl runTime
Resolves bug-report https://bugs.openfoam.org/view.php?id=3669
2021-04-30 12:21:32 +01:00
8f851eab77 functionObjects: stopAtClockTime: Corrected documentation 2021-04-30 09:28:53 +01:00
c6e1d1b2f1 bash_completion: Updated 2021-04-30 09:17:00 +01:00
61f3662b0a foamDictionary: Added writePrecision option 2021-04-30 09:14:44 +01:00
9c7328c097 thermophysicalModels: Improved compilation error message generated for unsupported combination of properties and mixing
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.
2021-04-29 18:48:15 +01:00
6e3b5207ae surfaceFilmModels: waxSolventEvaporation: Fixed parallelisation 2021-04-29 14:43:49 +01:00
61012f472b tests: Rmeoved depreciated pMin entries 2021-04-29 11:16:13 +01:00
6c48cd55dd tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution: Removed deprecated pMax/MinFactor entries 2021-04-28 18:59:55 +01:00
1b84e2f2e1 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-28 17:48:24 +01:00
07d583e989 StandardChemistryModel: Renamed as standardChemistryModel for consistency with the run-time selection name "standard"
which simplifies dynamic compilation of chemistry and error messages.
2021-04-28 17:47:08 +01:00
dd06d98c16 multiphaseEulerFoam: Renamed Laakkonen et al models
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-04-28 16:52:06 +01:00
80139f6116 compileTemplate: Improved the handling of backward-compatibility renaming of classes 2021-04-28 11:29:35 +01:00
c4484b0a60 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-28 10:54:10 +01:00
ed2ca63244 surfaceInterpolationSchemes::deferred: New convection interpolation scheme which provides conservative diagonal dominance
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.
2021-04-27 20:17:34 +01:00
9e7480e028 TDACChemistryModel: Updates to configuration files
Unused entries have been removed, and documentation provided for
previously undocumented entries has been added.

Patch contributed by Francesco Contino
2021-04-27 11:04:00 +01:00
5371ffcc6e StandardChemistryModel: Consistent chemical time scale
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.
2021-04-27 10:40:51 +01:00
4b65112182 tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere: Updated water Prandtl number
and removed unused files.

Resolves patch request https://bugs.openfoam.org/view.php?id=3666
2021-04-27 10:35:14 +01:00
ab7d010a9a fvConstraints: Added limitPressure which replaces pressureControl.limit
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.
2021-04-27 10:25:28 +01:00
ad82628b14 Reaction: Simplified rate methods
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.
20210425
2021-04-22 16:14:33 +01:00
469c3b1c82 Reaction: Removed unused rate calculation methods 2021-04-22 10:46:00 +01:00
672afc917d ISAT: Removed variable time step flag
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.
2021-04-22 10:31:57 +01:00
974712b2bd thermophysicalModels: Removed seldom used or unused instantiations
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.
2021-04-21 21:22:52 +01:00
6897a85cc3 volPointInterpolation::pointConstraints: Resize patchPatchPointConstraints_ if necessary 2021-04-21 21:21:14 +01:00
1db93cb57b StandardChemistryModel: Removed unused method 2021-04-21 16:49:44 +01:00
204de79bf6 combustionModels/EDC: Added "outerCorrect" switch
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.
2021-04-21 12:01:57 +01:00
f0d6051815 tutorials: Fixes to TDAC cases
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.
2021-04-20 17:25:19 +01:00
8547ae173f chemistryReductionMethods: Change dictionaries to lists
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.
2021-04-20 17:14:30 +01:00
955d9d3bc7 chemistryModel: Corrections to the Jacobian
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.
2021-04-20 17:07:25 +01:00
78ef8e1eb0 etc/codeTemplates/dynamicCode: Added basicChemistryModel dynamic compilation support
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.
2021-04-20 16:37:12 +01:00
013a33a109 TDACChemistryModel: Better error messaging when missing "elements" entries 2021-04-20 08:27:59 +01:00
735c169a25 Corrected documentation for Doxygen
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-04-19 14:34:10 +01:00
f60252ff7b etc/codeTemplates/dynamicCode: Added rhoThermo and rhoReactionThermo dynamic compilation support
for multiphaseEulerFoam, compressibleInterFoam and compressibleMultiphaseInterFoam
2021-04-16 20:18:11 +01:00
29bbbd6984 etc/codeTemplates/dynamicCode: Added fluidReactionThermo dynamic compilation support
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.
2021-04-16 18:42:38 +01:00
d4d269e93e etc/codeTemplates/dynamicCode/psiuReactionThermo: Pruned selection tables for compressibility based EoSs 2021-04-16 15:39:45 +01:00
c81dc67e8f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-16 12:24:55 +01:00
ae0e8e0751 etc/codeTemplates/dynamicCode: Added psiuReactionThermo dynamic compilation support
for XiFoam and PDRFoam
2021-04-16 12:24:00 +01:00
07adb183b4 StandardChemistryModel: Integrate from old time properties
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.
2021-04-16 08:48:36 +01:00
ad0082a7eb etc/codeTemplates/dynamicCode: Added psiThermo dynamic compilation support
for rhoCentralFoam
2021-04-15 19:17:36 +01:00
9132abf492 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-15 16:43:40 +01:00
04cab84af6 basicThermo: Added support for dynamic compilation of thermophysical property packages
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.
2021-04-15 16:32:50 +01:00
ed5341f7f2 multiphaseEulerFoam: InterfaceCompositionPhaseChangePhaseSystem: Fixed sign
Resolves bug report https://bugs.openfoam.org/view.php?id=3664
2021-04-15 11:57:25 +01:00
b6114a79ee Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-15 10:46:13 +01:00
3de28f8736 interFoam,compressibleInterFoam,multiphaseEulerFoam: Ensure divU is registered for mapping
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.
2021-04-15 10:44:04 +01:00
000876bbc6 multiphaseEulerFoam: Pressure implicit thermal mass transfer
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.
2021-04-14 16:28:27 +01:00
e5dd6117b2 POSIX:cp: Changed from character-wise to buffer copy
Resolves patch request https://bugs.openfoam.org/view.php?id=3661
2021-04-14 12:09:55 +01:00
bf340f02e3 twoPhaseMixtureThermo: Corrected Alpha2 constructor
Resolves bug-report https://bugs.openfoam.org/view.php?id=3662
2021-04-14 11:35:48 +01:00