Commit Graph

2777 Commits

Author SHA1 Message Date
2ad3fa242a pairPatchAgglomeration: Added missing reduction for agglomeration in parallel
Resolves bug-report https://bugs.openfoam.org/view.php?id=3537
2020-08-25 16:59:05 +01:00
995cda665b reactionThermo::valueMultiComponentMixture: New mixture type providing property value based mixing
This provides support for mixtures of species in which coefficient mixing of the
thermophysical properties is not possible/practical, e.g. tabulated data.
Thermodynamic properties are mass-fraction mixed and transport properties
mole-fraction mixed.

In the new general mixture framework it is now possible to implement more
complex mixing rules which is particularly useful for transport properties,
e.g. the Wilke model for gases.  Combinations of coefficient mixing for thermo
and complex mixing for transport is also supported.

valueMultiComponentMixture is currently instantiated on all the standard
tabulated thermo combination:

thermoType
{
    type            heRhoThermo;
    mixture         valueMultiComponentMixture;
    transport       tabulated;
    thermo          hTabulated;
    energy          sensibleEnthalpy;
    equationOfState icoTabulated;
    specie          specie;
}

but can be used for any of the current or future combinations.
2020-08-25 16:20:05 +01:00
5b58603f4c specie::thermo: Generalised the H/E->T inversion function 2020-08-25 13:50:32 +01:00
d293f1e700 thermophysicalModels: Separated thermodynamic and transport mixing
To support coefficient mixing for thermo and complex specie property mixing for
transport efficiently.
2020-08-24 18:10:20 +01:00
586a0a447b Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-08-23 10:20:32 +01:00
a63b3041d1 thermophysicalModels: Separated the thermo type from the mixing type
to support the implementation of other mixing rules for thermo and transport
properties.
2020-08-23 10:19:19 +01:00
2fb061568a DimensionedField::New: Made compatible with point fields 2020-08-21 12:41:03 +01:00
d82d47c74b regIOobject.H: Rationalised includes 2020-08-21 08:40:47 +01:00
aa5a2dccfe Time: Removed unnecessary fileHandler code from destructor 2020-08-20 17:48:51 +01:00
9b79c352f2 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-08-20 17:33:44 +01:00
a296bcba51 Removed unused template argument from field reuse classes 2020-08-20 16:30:00 +01:00
fe41811c36 IOdictionary: Returned to original form without baseIOdictionary 2020-08-20 15:56:38 +01:00
f274630f4d unwatchedIOdictionary: Removed with associated clutter
IOdictionary is now used instead of unwatchedIOdictionary
2020-08-20 12:45:29 +01:00
85f043040b Time::controlDict: Returned to IOdictionary and removed fileHandler clutter
By registering controlDict as MUST_READ_IF_MODIFIED automatic re-read is handled
in the same manner as any other IOdictionary.
2020-08-20 11:53:36 +01:00
c5c0b900da localIOdictionary: Added missing constructor for surfaceRedistributePar 2020-08-20 10:01:23 +01:00
540e26f996 localIOdictionary: Added constructor needed by foamDictionary 2020-08-20 08:10:05 +01:00
5dd1ab94c3 IOdictionary, localIOdictionary: Further rationalisation 2020-08-20 00:04:25 +01:00
b1f6fa2ff5 Revert "Time::controlDict: Returned to IOdictionary and removed fileHandler clutter"
This reverts commit d071e40348.
2020-08-19 20:00:14 +01:00
d071e40348 Time::controlDict: Returned to IOdictionary and removed fileHandler clutter
By registering controlDict as MUST_READ_IF_MODIFIED automatic re-read is handled
in the same manner as any other IOdictionary.
2020-08-19 19:09:29 +01:00
303c5a1c81 fvOptions: Added using optionList::read to avoid warning messages from gcc 2020-08-19 17:15:14 +01:00
67e106c42c localIOdictionary: Now derived from IOdictionary to reduce code duplication 2020-08-19 17:14:38 +01:00
82a5e12c06 dictionary: Corrected global function 2020-08-18 17:01:31 +01:00
edc72c2efc dictionary, codeStream: Updated to handle #calc in all global dictionaries 2020-08-18 16:12:12 +01:00
2df733ef99 lagrangian: Corrected reading of constant/clouds in parallel 2020-08-18 11:28:16 +01:00
8c32b1bba1 lagrangian: Removal of unused construction by component 2020-08-18 11:28:16 +01:00
ce307be540 lagrangian/basic/particle: Remove inclusion of Cloud header
This isolates the particle implementation a little more, allowing it to
be constructed as a throwaway tracking object.
2020-08-18 11:28:16 +01:00
17c40d2aa5 UList,FixedList: Updated reverse_iterators for STL compliance
Resolves bug-report https://bugs.openfoam.org/view.php?id=3534
2020-08-17 14:04:42 +01:00
d926651d63 multiphaseEulerFoam: Added switches to revert to the previous phase limiters for testing
Optional switches "splitPhaseFlux" and "meanFluxReference" are now provided and
can be set true in fvSolution e.g.

solvers
{
    "alpha.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;

        splitPhaseFlux  true;
        meanFluxReference true;
    }
.
.
.

to reinstate the previous form of phase flux limiters in which the mean and
phase flux differences are interpolated separately and the limited correction
referenced to the mean rather than phase flux.  This form of discretisation and
limiting is more aggressive than the latest version and hence less accurate but
it is hoped that the latest form of limitSum will handle the boundedness at the
upper limit reliably allowing the new more accurate limiters to be used for most
if not all multiphase simulations.
2020-08-15 11:23:41 +01:00
73e756a362 multiphaseEulerFoam: Improved limitSum for cases with stationary phases
limitSum operates on the sum positive and negative flux corrections as it did
originally to guarantee that the phase fractions sum to 1 but now on the scaled
moving sub-set of the phases so that it handles the presence of stationary
phases in a consistent manner.

Additionally limitSum is now applied to two-phase systems even when only one of
the phases is solved for to ensure the solution is the same irrespective of
which phase fraction is solved or if both are solved.

compressibleMultiphaseInterFoam and multiphaseInterFoam have been updated to use
the same form of limitSum as multiphaseInterFoam but this does not change their
behaviour, it is to reduce code duplication.
2020-08-14 20:16:31 +01:00
81c16ac498 thermalBaffle1DFvPatchScalarField: Updated documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3530
2020-08-13 12:23:42 +01:00
8747e8d950 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-08-12 11:11:08 +01:00
7beaef7f99 MULES.H: Updated arguments for consistency with MULES.C 2020-08-12 11:10:15 +01:00
aa20d9b895 thermophysicalModels: Corrections to selector error messages 2020-08-12 09:31:04 +01:00
058562e1ef MULES: Improved limitSum for multiphaseEulerFoam 2020-08-11 22:04:56 +01:00
a8e8090803 thermophysicalModels: Added fluidReactionThermo
psiReactionThermo- and rhoReactionThermo-s now derive from an additional
fluidReactionThermo class and are included on a corresponding run-time
selection table.

This means all multi-specie solvers can now be used with either
compressibility/psi- or density/rho-based thermodynamic models, in the
same way that non-reacting solvers can.

rhoReactingFoam has been removed, as it is no longer necessary now that
reactingFoam can operate with density-based thermodynamics.

rhoReactingBuoyantFoam has also been renamed buoyantReactingFoam to
reflect the fact that it is no longer a variant specific to
density-based thermodynamics; it can now operate with
compressibility-based thermodynamic models as well.

The change is fully backwards compatible. All cases should continue to
run without modification, apart from the fact that a different solver
might need to be called.
2020-08-11 14:41:02 +01:00
a9945a0570 multiphaseEulerFoam::phaseSystemSolve: Simplified limitSum when solving for >1 phases
also change the interpolation use for the limitSum from upwind to linear which
might provide a modest improvement in accuracy.
2020-08-10 15:19:47 +01:00
95af33515a thermalBaffle1DFvPatchScalarField,thermalBaffleFvPatchScalarField: Updated documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3530
2020-08-10 14:12:48 +01:00
e872c54992 calculatedFvPatchField: Changed fixesValue to return false
While calculatedFvPatchField would be considered as a BC which fixes the value
during solution it cannot be used for that purpose and under all other
conditions it does not fix the boundary value as the '=' operator changes the
value.  However calculatedFvPatchField is used for the reference phase in
multiphase systems and if it is considered to fix the boundary value it interferes
with the operation of the MULES limiter and hence it is far preferable if it
does not fix the value.
2020-08-08 20:58:43 +01:00
51d763685e thermophysicalModels: Removed pressure field from solid thermos
Solid thermo no longer requires a pressure field, so solid regions of
chtMultiRegionFoam cases no longer need a 0/<solidRegionName>/p file.

In order for solidThermo to continue to use heThermo and the low level
thermo classes, it now constructs a uniformGeometricScalarField for the
pressure with the value NaN. This is passed into the low-level thermo
models by heThermo. The enforces the requirement that low-level thermo
models used by solidThermo should have no pressure dependence. If an
instantiation is made with pressure dependence, the code will fail with
a floating point error.
2020-08-07 12:32:20 +01:00
cbad002697 gnuplotGraph: added offset keyword and terminal consistent with gnuplotSetWriter
Resolves bug-report https://bugs.openfoam.org/view.php?id=3527
2020-08-05 12:03:53 +01:00
fdfe5f3517 MomentumTransportModels::kkLOmega: Implemented the Lopez, Walters, (2016) correction
This turbulence model is described in:
    \verbatim
        Walters, D. K., & Cokljat, D. (2008).
        A three-equation eddy-viscosity model for Reynolds-averaged
        Navier–Stokes simulations of transitional flow.
        Journal of Fluids Engineering, 130(12), 121401.
    \endverbatim

    corrected according to:

    \verbatim
        Furst, J. (2013).
        Numerical simulation of transitional flows with laminar kinetic energy.
        Engineering Mechanics, 20(5), 379-388.
    \endverbatim

    and includes the improvements proposed in:

    \verbatim
        Lopez, M., and Keith Walters, D. (2016).
        A Recommended Correction to the kT−kL−ω Transition-Sensitive
        Eddy-Viscosity Model.
        Journal of Fluids Engineering, 139(2), 024501.
    \endverbatim
2020-08-04 22:42:53 +01:00
94323816d5 MomentumTransportModels::kkLOmega: Implemented the Lopez, Walters, (2016) correction
This turbulence model is described in:
    \verbatim
        Walters, D. K., & Cokljat, D. (2008).
        A three-equation eddy-viscosity model for Reynolds-averaged
        Navier–Stokes simulations of transitional flow.
        Journal of Fluids Engineering, 130(12), 121401.
    \endverbatim

    corrected according to:

    \verbatim
        Furst, J. (2013).
        Numerical simulation of transitional flows with laminar kinetic energy.
        Engineering Mechanics, 20(5), 379-388.
    \endverbatim

    and includes the improvements proposed in:

    \verbatim
        Lopez, M., and Keith Walters, D. (2016).
        A Recommended Correction to the kT−kL−ω Transition-Sensitive
        Eddy-Viscosity Model.
        Journal of Fluids Engineering, 139(2), 024501.
    \endverbatim
2020-08-04 21:58:23 +01:00
ff20398245 fvOptions: Changed the source, constraint and correct functions to const
Most fvOptions change the state of the fields and equations they are applied to
but do not change internal state so it makes more sense that the interface is
const, consistent with MeshObjects.  For the few fvOptions which do maintain a
changing state the member data is now mutable.
2020-08-04 15:40:40 +01:00
2f6543b9c6 debug: Registered the debug switches of some classes 2020-08-04 11:26:24 +01:00
5893e29241 debug: Fixed behaviour of -listSwitches argument
There is now only one -listSwitches argument available to the
applications; -listUnsetSwitches and -listRegisteredSwitches have been
removed. -listSwitches prints everything, now also including the values.
It also categorises the output based on whether the switch has a
default, if it has the same value as that default, and whether or not it
is registered with a re-reader.

The list of debug switches in etc/controlDict has been reduced to only
the switches which have non-zero values. In general the list of valid
switches varies per application and per library, so it is not possible
to keep a single definitive list of all switches. The -listSwitches
argument provides the definitive list on a per applicaton basis.

Setting of defaults for named enum optimisation switches has been added.
2020-08-04 09:36:42 +01:00
b5ea22d339 Added "= delete" to some disabled copy constructors and assignment operators 2020-08-04 09:36:42 +01:00
b8f9ed8062 fvOptions: Changed to be a MeshObject to support automatic update for mesh changes
Now cellSetOption correctly handles the update of the cell set following mesh
topology changes rather than every time any of the fvOption functions are
called for moving meshes.  This is more efficient and consistent with the rest
of OpenFOAM and avoids a lot of unnecessary clutter in the log.
2020-08-02 18:46:20 +01:00
43d66b5e7c lagrangian: Run-time selectable clouds
The standard set of Lagrangian clouds are now selectable at run-time.
This means that a solver that supports Lagrangian modelling can now use
any type of cloud (with some restrictions). Previously, solvers were
hard-coded to use specific cloud modelling. In addition, a cloud-list
structure has been added so that solvers may select multiple clouds,
rather than just one.

The new system is controlled as follows:

- If only a single cloud is required, then the settings for the
  Lagrangian modelling should be placed in a constant/cloudProperties
  file.

- If multiple clouds are required, then a constant/clouds file should be
  created containing a list of cloud names defined by the user. Each
  named cloud then reads settings from a corresponding
  constant/<cloudName>Properties file. Clouds are evolved sequentially
  in the order in which they are listed in the constant/clouds file.

- If no clouds are required, then the constant/cloudProperties file and
  constant/clouds file should be omitted.

The constant/cloudProperties or constant/<cloudName>Properties files are
the same as previous cloud properties files; e.g.,
constant/kinematicCloudProperties or constant/reactingCloud1Properties,
except that they now also require an additional top-level "type" entry
to select which type of cloud is to be used. The available options for
this entry are:

    type    cloud;                   // A basic cloud of solid
                                     // particles. Includes forces,
                                     // patch interaction, injection,
                                     // dispersion and stochastic
                                     // collisions. Same as the cloud
                                     // previously used by
                                     // rhoParticleFoam
                                     // (uncoupledKinematicParticleFoam)

    type    collidingCloud;          // As "cloud" but with resolved
                                     // collision modelling. Same as the
                                     // cloud previously used by DPMFoam
                                     // and particleFoam
                                     // (icoUncoupledKinematicParticleFoam)

    type    MPPICCloud;              // As "cloud" but with MPPIC
                                     // collision modelling. Same as the
                                     // cloud previously used by
                                     // MPPICFoam.

    type    thermoCloud;             // As "cloud" but with
                                     // thermodynamic modelling and heat
                                     // transfer with the carrier phase.
                                     // Same as the limestone cloud
                                     // previously used by
                                     // coalChemistryFoam.

    type    reactingCloud;           // As "thermoCloud" but with phase
                                     // change and mass transfer
                                     // coupling with the carrier
                                     // phase. Same as the cloud
                                     // previously used in fireFoam.

    type    reactingMultiphaseCloud; // As "reactingCloud" but with
                                     // particles that contain multiple
                                     // phases. Same as the clouds
                                     // previously used in
                                     // reactingParcelFoam and
                                     // simpleReactingParcelFoam and the
                                     // coal cloud used in
                                     // coalChemistryFoam.

    type    sprayCloud;              // As "reactingCloud" but with
                                     // additional spray-specific
                                     // collision and breakup modelling.
                                     // Same as the cloud previously
                                     // used in sprayFoam and
                                     // engineFoam.

The first three clouds are not thermally coupled, so are available in
all Lagrangian solvers. The last four are thermally coupled and require
access to the carrier thermodynamic model, so are only available in
compressible Lagrangian solvers.

This change has reduced the number of solvers necessary to provide the
same functionality; solvers that previously differed only in their
Lagrangian modelling can now be combined. The Lagrangian solvers have
therefore been consolidated with consistent naming as follows.

    denseParticleFoam: Replaces DPMFoam and MPPICFoam

    reactingParticleFoam: Replaces sprayFoam and coalChemistryFoam

    simpleReactingParticleFoam: Replaces simpleReactingParcelFoam

    buoyantReactingParticleFoam: Replaces reactingParcelFoam

fireFoam and engineFoam remain, although fireFoam is likely to be merged
into buoyantReactingParticleFoam in the future once the additional
functionality it provides is generalised.

Some additional minor functionality has also been added to certain
solvers:

- denseParticleFoam has a "cloudForceSplit" control which can be set in
  system/fvOptions.PIMPLE. This provides three methods for handling the
  cloud momentum coupling, each of which have different trade-off-s
  regarding numerical artefacts in the velocity field. See
  denseParticleFoam.C for more information, and also bug report #3385.

- reactingParticleFoam and buoyantReactingParticleFoam now support
  moving mesh in order to permit sharing parts of their implementation
  with engineFoam.
2020-07-31 09:35:12 +01:00
165bcee48b PackedList: Added documentation 2020-07-31 09:28:29 +01:00
ccae22cbc5 PackedList: Added default constructor to avoid warning from clang 2020-07-31 09:25:38 +01:00