Commit Graph

1154 Commits

Author SHA1 Message Date
095054d82e applications/solvers/combustion: Moved the inertSpecie functionality into basicSpecieMixture
and renamed defaultSpecie as its mass fraction is derived from the sum of the
mass fractions of all other species and it need not be inert but must be present
everywhere, e.g. N2 in air/fuel combustion which can be involved in the
production of NOx.

The previous name inertSpecie in thermophysicalProperties is supported for
backward compatibility.
2020-10-26 20:57:01 +00:00
a7de472748 multiphaseEulerFoam::phasePressureModel: Updated to use *Field::New 2020-10-22 10:21:27 +01:00
ffbcf8a4fb multiphaseEulerFoam::SchaefferFrictionalStress: Updated allocation of temporary using volScalarField::New 2020-10-22 08:55:22 +01:00
7e3f4976a8 PatchFields: Removed simple copy constructors and clone functions
These do not necessarily set the internal field reference correctly and it is
safer that the correct internal field is provided as an argument.
2020-10-03 22:16:10 +01:00
d89a8d3daa compressibleMultiphaseInterFoam: updated mixing of thermophysical properties
Thermodynamic properties are now mass-fraction mixed
Transport properties remain volume-fraction mixed
2020-10-01 15:24:14 +01:00
90e4222db3 twoPhaseMixtureThermo: Added documentation for Alpha1,2 2020-10-01 12:45:16 +01:00
268c2e5aed twoPhaseMixtureThermo: Correct gamma functions 2020-10-01 11:27:22 +01:00
8fa6bfcded compressibleInterFoam: Updated to use the thermo:rho 2020-10-01 10:44:36 +01:00
1988e3df7f compressibleInterFoam: Updated mixing of thermophysical properties
Thermodynamic properties are now mass-fraction mixed
Transport properties remain volume-fraction mixed
2020-09-30 20:15:36 +01:00
77b31c7f3a temperatureCoupledBase: Updated to use solidThermo::KappaLocal 2020-09-25 17:15:42 +01:00
1bd316e69a solidDisplacementThermo: Updated adding q and divq functions 2020-09-25 16:29:15 +01:00
f15d150ca8 chtMultiRegionFoam, heSolidThermo: Moved the solid heat flux model into heSolidThermo
and changed to be an energy implicit correction to a temperature gradient
based heat-flux.  This formulation is both energy conservative and temperature
consistent.

The wallHeatFlux functionObject has been updated to use a consistent heat-flux
from the heSolidThermo.
2020-09-25 16:09:18 +01:00
6ca68b0ebe multiphaseThermophysicalTransportModels: Added temperature gradient based heat flux models 2020-09-24 17:00:31 +01:00
f3c21b74a8 Minor corrections to options files
Resolves bug-report https://bugs.openfoam.org/view.php?id=3553
2020-09-22 17:29:58 +01:00
73e5ea961d basicThermo: Added volScalarField overload of THE 2020-09-10 14:41:02 +01:00
0efc492a77 multiphaseEulerFoam: Mass/heat transfer consistency and linearisation
All heat transfers that result from mass-transfer are now implemented in
terms of sensible enthalpy, so that they are consistent regardless of
which form of energy is being solved for. This has removed some spurious
temperature anomalies from a number of cases involving mass-transfer.

All heat transfers that result from mass-transfer are now linearised. In
the case of multi-specie systems this requires the specification of a
residual mass fraction, which is given by a new "residualY" keyword in
the constant/phaseProperties dictionary. If this entry is omitted for
multi-specie systems then linearisation is deactivated.

**** Details for developers ****

Methods have been added to the base heat transfer phase systems to
permit energy transfer as a result of phase change, without coupling to
a diffusive heat transfer model. These functions require a "weight" to
be specified in the call to define how the latent heat is divided
between either side of the interface. A weight of 0 indicates that the
latent heat is dissipated entirely in the upwind phase, and 1 means it
is entirely in the downwind phase.

The forms of latent heat calculation and transfer have been standardised
between the various phase systems. There are now two methods of
calculating the latent heat, and two methods of applying the transfer
(see below for details). These options are currently hard-coded into the
systems that use them, but they could be made user modifiable
per-mass-transfer in future.

Interface temperatures are now stored by the derived phase systems
alongside their corresponding mass transfer rates. These temperatures
are passed by argument to the phase-change heat transfer methods
provided by the base heat transfer systems. This allows multiple
mechanisms of mass transfer each involving different interface state to
occur across the same interface.

These changes have allowed all phase systems to use the same set of
base energy-transfer functionality.

**** Even more details for developers ****

The two forms of latent heat scheme available are:

    symmetric: The latent heat is calculated as the difference between
               the interface enthalpies on either side of an interface.
               This is the simplest form.

       upwind: The latent heat is calculated as the difference between
               the bulk enthalpy on the side of the interface that mass
               is being transferred from and the interface enthalpy on
               the side of the interface that mass is transferring to.
               This form may confer some stability benefits.

The two format of latent heat transfer are:

         heat: The latent heat is applied by transferring heat unequally
               on either side of an interface using the difference
               between the bulk phase temperatures and the interface
               temperature. No explicit latent heat source is required.
               This method has a stability advantage over the "mass"
               option, but the transfer is not energy conservative
               unless the interface temperature is exactly correct.

         mass: The latent heat is applied as an explicit mass transfer
               source to both sides of an interface. The ratio between
               the heat transfer coefficients on either side determines
               what proportion of the latent heat source ends up in each
               phase. Heat transfer is calculated equally on both sides
               of an interface using bulk phase temperatures and is not
               coupled to the thermal effect of phase change. This
               method has the advantage of being energy conservative
               even if the interface temperature is not exact, but it is
               less stable than the "heat" option at extreme conditions.
2020-09-08 16:26:37 +01:00
1cbb707a86 multiphaseEulerFoam/.../populationBalance: Added fvOption source terms
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:04 +01:00
f94884c87a multiphaseEulerFoam/.../populationBalance: Changed sizeGroup equations to volumetric form
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:03 +01:00
571c5524d2 multiphaseEulerFoam/.../populationBalance: Corrected density change drift model
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:03 +01:00
def4772281 Documentation: Centred the Class Declaration comment
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-28 13:28:58 +01:00
573cdcf82a buoyantSimpleFoam: Removed redundant include 2020-08-26 17:29:57 +01:00
306871f317 buoyantSimpleFoam: Updated to use fluidThermo rather than rhoThermo
thus supporting both rho- and psi-base thermophysical models.
2020-08-26 16:54:54 +01:00
281f8ba40c multiphaseEulerFoam/.../BrownianCollisions: Added slip correction
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-26 14:22:01 +01:00
36ce8b31ae multiphaseEulerFoam/.../aerosolDrag: Improvements
Expanded the documentation and updated the mean free path calculation

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-26 14:19:51 +01:00
1844051d91 thermophysicalModels: Removed alphah from the low-level specie thermo
alphah is derived from kappa/Cp and mixing rules should be applied to kappa and
Cp separately rather than to alphah so it is more consistent to calculate the
mixture alphah from the mixture kappa and Cp at the heThermo level.
2020-08-26 13:16:03 +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
c39f990c65 Made casting explicit in mixed Geometric/DimensionedField operations 2020-08-21 12:41:03 +01:00
36da539e82 buoyantPimpleFoam,buoyantSimpleFoam: Apply adjustPhi for steady subsonic and transonic cases 2020-08-18 10:47:05 +01:00
fca921c303 buoyantPimpleFoam::pEqn: Removed temporary diagnostic message 2020-08-17 16:15:28 +01:00
8ed965fe57 buoyantPimpleFoam::pEqn: Removed unnecessary additional call to adjustPhi 2020-08-17 16:02:20 +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
5d9a5d2cbd phaseSystemSolve: Added comments to the changes to the flux used for the limiter 2020-08-12 21:15:58 +01:00
749f4c6119 multiphaseMixtureThermo, multiphaseMixture: Updated handling of alphaPhi 2020-08-12 11:10:40 +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
5b545e6db7 multiphaseEulerFoam::phaseSystemSolve: changed the phase limiter to be based on the phase rather the mean flux
This may avoid the need for

extremaCoeff    1;

in fluidised bed simulations.
2020-08-08 21:02:22 +01:00
1c1d8a562e multiphaseEulerFoam::phaseSystemSolve: Removed the unnecessary referencePhase.correctInflowOutflow
The referencePhase flux is derived from the sum of the fluxes of the other
phases and there is no need to correct the inflow or outflow.
2020-08-08 10:49:06 +01:00
1ce62c6ff5 phaseSystemSolve: Update the reference phase fraction during sub-cycling
for the phir flux.
2020-08-06 16:50:56 +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
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
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
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