Commit Graph

1477 Commits

Author SHA1 Message Date
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
5f3c604d05 reactingParticleFoam: Support singleComponentMixtures
This is useful for testing purposes in comparison with rhoPimpleFoam.

Also made a fix to the handling of multivariate convection schemes in
chtMultiRegionFoam.
2020-07-31 11:38:59 +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
37db7718ac foamListTimes: Added -withFunctionEntries option to execute functionEntries 2020-07-30 13:52:54 +01:00
9ff320a8da multiphaseEulerFoam: Updated documentation 2020-07-30 12:30:26 +01:00
f4facbc664 multiphaseEulerFoam: Updated documentation
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-07-30 12:27:35 +01:00
0257ab1459 Updated to C++14 standard
gcc version 5 and above and clang version 3.4 and above fully support the C++14
standard and the compilation rules of OpenFOAM-dev now require this support
allowing for further development and maintenance to benefit from the additional
language features provided in C++14.
2020-07-23 15:31:07 +01:00
68e4678221 reactingTwoPhaseEulerFoam: Replaced by multiphaseEulerFoam
The reactingtTwoPhaseEulerFoam solver has been replaced by the more general
multiphaseEulerFoam solver which supports two-phase and multiphase systems
containing fluid and stationary phases, compressible or incompressible, with
heat and mass transfer, reactions, size distribution and all the usual phase
interaction and transfer models.

All reactingtTwoPhaseEulerFoam tutorials have been ported to multiphaseEulerFoam
to demonstrate two-phase capability with a wide range of phase and
phase-interaction models.

When running with two-phases the optional referencePhase entry in
phaseProperties can be used to specify which phase fraction should not be
solved, providing compatibility with reactingtTwoPhaseEulerFoam, see

tutorials/multiphase/multiphaseEulerFoam/RAS/fluidisedBed
tutorials/multiphase/multiphaseEulerFoam/laminar/bubbleColumn

for examples.
2020-07-17 20:18:15 +01:00
02baeece45 multiphaseEulerFoam: Rationalised and updated the library names 2020-07-17 18:01:49 +01:00
9fd9172913 Rationalised the named of uncoupled particle tracing solvers and functionObject
Solvers
    icoUncoupledKinematicParcelFoam -> particleFoam
    uncoupledKinematicParcelFoam -> rhoParticleFoam

functionObjects
    icoUncoupledKinematicCloud -> particles
2020-07-16 13:06:08 +01:00
9cebc18bb4 Standardised naming convention for source files containing New selector functions 2020-07-16 00:05:21 +01:00
49c9766c44 multiphaseEulerFoam: Updated name of functionObjects library 2020-07-15 20:53:05 +01:00
b832453b72 multiphaseEulerFoam: replacement for reactingMultiphaseEulerFoam
The new multiphaseEulerFoam is based on reactingMultiphaseEulerFoam with some
improvements and rationalisation to assist maintenance and further development.

The phase system solution has been enhanced to handle two phases more
effectively and all two-phase specific models updated for compatibility so that
multiphaseEulerFoam can also replace reactingTwoPhaseEulerFoam.
When running multiphaseEulerFoam with only two-phases the default behaviour is
to solve for both phase-fractions but optionally a reference phase can be
specified so that only the other phase-fraction is solved, providing better
compatibility with the behaviour of reactingTwoPhaseEulerFoam.

All reactingMultiphaseEulerFoam and reactingTwoPhaseEulerFoam tutorials have
been updated for multiphaseEulerFoam.
2020-07-15 18:13:40 +01:00
1d9ad9aa8e reactingEulerFoam::phaseSystem: Merged with multiphaseSystem
The base phaseSystem now provides all the functionality needed for
reactingMultiphaseEulerFoam and twoPhaseSystem is a specialisation, simplifying
maintenance.
2020-07-14 15:51:44 +01:00
1c9004358d reactingEulerFoam::functionObjects::phaseMap: Corrected documentation 2020-07-14 12:11:58 +01:00
35a04f0fb8 reactingEulerFoam::functionObjects::phaseMap: New functionObject to write the phase map field
Description
    This functionObject writes the phase-fraction map field alpha.map with
    incremental value ranges for each phase
    e.g., with values 0-1 for water, 1-2 for air, 2-3 for oil etc.

    Example of function object specification:
    \verbatim
    phaseMap
    {
        type            phaseMap;
        libs            ("libreactingEulerFoamFunctionObjects.so");
        writeControl    writeTime;
    }
    \endverbatim

Usage
    \table
        Property     | Description             | Required    | Default value
        type         | type name: phaseMap     | yes         |
    \endtable

This replaces the alphas functionality previously built-in to
reactingMultiphaseEulerFoam so that the storage, calculation and writing of the
phase map field is now under user control.
2020-07-14 10:18:00 +01:00
c3d72345fb reactingMultiphaseEulerFoam: Improved the handling of the optional referencePhase
The optional reference phase fraction field is not read even if the file is
present, it is constructed with "calculated" BCs as it is a derived field.  All
other phase fraction field files are read and now must be present.
2020-07-13 18:06:44 +01:00
7412cc47e1 MomentumTransportModels::mixtureKEpsilon: Used the dispersed phase drag only for bubble generated turbulence 2020-07-10 23:49:29 +01:00
4b959ba566 multiphaseEulerFoam: Superseded by the much more general and extensible reactingMultiphaseEulerFoam 2020-07-10 20:17:25 +01:00
5c1f24054d reactingMultiphaseEulerFoam: Simplified the velocity and flux correction after partial elimination 2020-07-10 12:04:08 +01:00
2e62bfe5bc reactingMultiphaseEulerFoam: Updated remaining two-phase turbulent transport and IATE models
for compatibility with reactingMultiphaseEulerFoam when run with two-phases.
Some of these two-phase models could be enhanced to operate with multiple
dispersed phases in the future.

In order to update these models for reactingMultiphaseEulerFoam it has been
necessary to break compatibility with the now redundant twoPhaseEulerFoam solver
which has been superseded by the much more capable reactingEulerFoam solvers and
now removed.
2020-07-10 09:37:48 +01:00
27ce5a0a18 reactingMultiphaseEulerFoam: Updated partial elimination
to ensure the velocity and flux of the phases sum the conservative mixture
values obtained from the pressure solution.

Also corrected handling of MRF and updated to work with partial elimination.
2020-07-09 15:37:35 +01:00
ccd45f53a6 foamyQuadMesh: Prevent indexing beyond end of face-vertices array 2020-07-07 16:19:51 +01:00
e63f3c1e98 rhoReactingBuoyantFoam: Added pRef 2020-07-04 09:51:04 +01:00
3cc2ded6d0 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-03 15:45:18 +01:00
2f30c1364b heatTransfer solvers: Added optional pressure reference
Added optional pressure reference pRef to p_rgh in buoyantPimpleFoam,
buoyantSimpleFoam and chtMultiRegionFoam which handles cases in which the
pressure variation is small compared to the pressure level more accurately.

The pRef value is provided in the optional constant/pRef file.

All tutorials and templates have been updated to use pRef as appropriate.
2020-07-03 15:41:58 +01:00
3f5df8fb78 reacting*EulerFoam/.../kineticTheoryModel: Run without drag
This change protects the lookup of the drag model so that if it is not
found then the drag terms in the Theta equation are set to zero. This is
not likely to be correct usage in physical cases, but is useful for
doing uncoupled simulations for the purpose of model verification.
2020-07-03 09:04:32 +01:00
fa79bab863 interfaceCompression: New run-time selectable VoF interface compression scheme
A new run-time selectable interface compression scheme framework has been added
to the two-phase VoF solvers to provide greater flexibility, extensibility and
more consistent user-interface.  The previously built-in interface compression
is now in the standard run-time selectable surfaceInterpolationScheme
interfaceCompression:

Class
    Foam::interfaceCompression

Description
    Interface compression corrected scheme, based on counter-gradient
    transport, to maintain sharp interfaces during VoF simulations.

    The interface compression is applied to the face interpolated field from a
    suitable 2nd-order shape-preserving NVD or TVD scheme, e.g.  vanLeer or
    vanAlbada.  A coefficient is supplied to control the degree of compression,
    with a value of 1 suitable for most VoF cases to ensure interface integrity.
    A value larger than 1 can be used but the additional compression can bias
    the interface to follow the mesh more closely while a value smaller than 1
    can lead to interface smearing.

    Example:
    \verbatim
    divSchemes
    {
        .
        .
        div(phi,alpha)     Gauss interfaceCompression vanLeer 1;
        .
        .
    }
    \endverbatim

The separate scheme for the interface compression term "div(phirb,alpha)" is no
longer required or used nor is the compression coefficient cAlpha in fvSolution
as this is now part of the "div(phi,alpha)" scheme specification as shown above.

Backward-compatibility is provided by checking the specified "div(phi,alpha)"
scheme against the known interface compression schemes and if it is not one of
those the new interfaceCompression scheme is used with the cAlpha value
specified in fvSolution.

More details can be found here:
https://cfd.direct/openfoam/free-software/multiphase-interface-capturing

Henry G. Weller
CFD Direct Ltd.
2020-07-02 10:13:15 +01:00
08603410b6 basicThermo, basicSpecieMixture: Added sensible enthalpy methods 2020-06-30 08:34:15 +01:00
4d0661ccd0 alphatWallBoilingWallFunction: Added missing mapping and cloning functionality 2020-06-30 08:34:15 +01:00
393d8e17fd potentialFoam: Ensure that the flux field phi is relative in MRF regions 2020-06-29 16:53:09 +01:00
658b0c5195 reactingMultiphaseEulerFoam: Make phase fluxes relative in MRF regions 2020-06-25 19:28:19 +01:00
20c66b0c2b reactingEulerFoam::MomentumTransferPhaseSystem::AFfs: Ensure the face force field list exists for single phase 2020-06-25 10:29:03 +01:00
993bbc35de Standardised private member function section header 2020-06-24 17:08:40 +01:00
1fec2bae30 reactingEulerFoam::MomentumTransferPhaseSystem: Removed unused member function declaration 2020-06-24 17:06:01 +01:00
87c7a76e3f reactingEulerFoam::shapeModel/shapeModel.H: Updated documentation
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 14:51:17 +01:00
b2b9f3a56b reactingEulerFoam::shapeModels/spherical: Corrected source file link
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 14:48:45 +01:00
f544de4f81 setRDeltaT: Corrected typo 2020-06-24 14:40:29 +01:00
c109bec4cc chtMultiRegionFoam: Changed solid energy from enthalpy to internal energy
The solid is currently assumed incompressible (the solid pressure is not
updated) and in general would be near incompressible so internal energy is a
more appropriate energy choice than enthalpy which would require a pressure work
term currently not implemented.  Additionally due to the way in which the
conduction is handled in terms of the gradient of energy the accuracy of the
current enthalpy implementation is sensitive to the pressure distribution as
this introduces an enthalpy gradient from the p/rho term which would need to be
corrected; this issue is avoided by solving for internal energy instead.

This improvement requires the scheme and solver settings for the solids in
chtMultiRegionFoam cases to be changed from "h" to "e" and the thermo-physical
properties in <solid>/thermophysicalProperties to be set to the corresponding
internal energy forms, e.g.:

    thermo          eConst;
    .
    .
    .
    energy          sensibleInternalEnergy;

All tutorials have be updated to reflect this and provide guidance when updating
cases.
2020-06-10 15:38:54 +01:00
517270e215 foamDictionary: Removed documentation for the unused -case option
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
2020-06-04 10:19:06 +01:00
4250d7ce42 Added "using" statements to avoid warning messages from clang 2020-06-02 21:37:36 +01:00
80f15bd984 thermophysicalModels: Refactored mixtures
to separate those based on pure species from the simplified combustion mixtures
based on composite reactant and product pseudo species.
2020-06-02 17:24:44 +01:00
cf36a5de3c solidDisplacementFoam: Correct handling of the re-reading of the controls
when the fvSolution file is changed during the run

Resolves bug-report https://bugs.openfoam.org/view.php?id=3498
2020-05-25 11:08:59 +01:00
cda505c718 solidDisplacementFoam: Added Function1 support for the pressure specification 2020-05-20 19:14:52 +01:00
746c080603 VoF: Removed the isotropic compression option which has not proved useful for any cases 2020-05-09 14:41:15 +01:00
4561d9f813 HashSet: Added construction from std::initializer_list 2020-05-09 14:39:31 +01:00
83bd225910 foamyHexMesh: Updated to compile against CGAL 5.0+
CGAL and Boost are now used header-only. The minimum supported version
of CGAL is now 4.9.
2020-05-08 11:24:58 +01:00
4c2fae3d06 thermophysicalModels: Added new tabulated equation of state, thermo and transport models
using the new nonUniformTable to interpolate between the values vs temperature
provided.  All properties (density, heat capacity, viscosity and thermal
conductivite) are considered functions of temperature only and the equation of
state is thus incompressible.  Built-in mixing rules corresponding to those in
the other thermo and transport models are not efficient or practical for
tabulated data and so these models are currently only instantiated for the pure
specie/mixture rhoThermo package but a general external mixing method will be
added in the future.

To handle reactions the Jacobian function dKcdTbyKc has been rewritten to use
the Gstd and S functions directly removing the need for the miss-named dGdT
function and hence removing the bugs in the implementation of that function for
some of the thermo models.  Additionally the Hc() function has been renamed
Hf() (heat of formation) which is more commonly used terminology and consistent
with the internals of the thermo models.
2020-05-05 20:33:45 +01:00
c45bc02d00 phaseCompressibleMomentumTransportModels: Updated R() -> sigma() 2020-05-05 18:37:11 +01:00