Commit Graph

1420 Commits

Author SHA1 Message Date
2bbe47cc75 ThermophysicalTransportModel::eddyDiffusivity: New common class for RAS and LES
eddyDiffusivity is a generic model for both RAS and LES to avoid the previous
code duplication.
2020-04-17 13:53:06 +01:00
6557788618 foamListTimes: disable controlDict function entries
avoids warning and error messages from the processing of the functions entry in
controlDict which unlikely to be needed for foamListTimes.
2020-04-16 18:10:43 +01:00
9fabb9b002 paraview: Upgrade to 5.8.0
PVReaders now support compilation against ParaView version 5.7.0 and
greater. All references to ParaView versions less than 4.0.0 have been
removed.

Based on a patch contributed by CFD Support
2020-04-16 13:45:37 +01:00
ff22c54957 CompressibleMomentumTransportModel, PhaseCompressibleMomentumTransportModel: Generalised the access to the thermo model
This allowed as significant simplification of the phaseModel in
reactingEulerFoam.
2020-04-16 13:16:12 +01:00
0405176670 reactingEulerFoam: Added divq and divj function to generalise the thermal and specie transport
These function map to the corresponding functions in the
PhaseThermophysicalTransportModel to allow run-time selection and extensibility
of the phase thermophysical transport.
2020-04-15 18:48:42 +01:00
b4cf4042d1 ThermophysicalTransportModels: Added j and divj functions for specie mass-fraction transport
Provides an abstraction of specie transport to support run-times selectable and
extensible multi-component thermal and specie laminar and turbulent transport.
2020-04-15 11:24:11 +01:00
7c402dde4e Removed redundant library link statements 2020-04-15 11:17:16 +01:00
de66b1be68 MomentumTransportModels: Update of the TurbulenceModels library for all flow types
providing the shear-stress term in the momentum equation for incompressible and
compressible Newtonian, non-Newtonian and visco-elastic laminar flow as well as
Reynolds averaged and large-eddy simulation of turbulent flow.

The general deviatoric shear-stress term provided by the MomentumTransportModels
library is named divDevTau for compressible flow and divDevSigma (sigma =
tau/rho) for incompressible flow, the spherical part of the shear-stress is
assumed to be either included in the pressure or handled separately.  The
corresponding stress function sigma is also provided which in the case of
Reynolds stress closure returns the effective Reynolds stress (including the
laminar contribution) or for other Reynolds averaged or large-eddy turbulence
closures returns the modelled Reynolds stress or sub-grid stress respectively.
For visco-elastic flow the sigma function returns the effective total stress
including the visco-elastic and Newtonian contributions.

For thermal flow the heat-flux generated by thermal diffusion is now handled by
the separate ThermophysicalTransportModels library allowing independent run-time
selection of the heat-flux model.

During the development of the MomentumTransportModels library significant effort
has been put into rationalising the components and supporting libraries,
removing redundant code, updating names to provide a more logical, consistent
and extensible interface and aid further development and maintenance.  All
solvers and tutorials have been updated correspondingly and backward
compatibility of the input dictionaries provided.

Henry G. Weller
CFD Direct Ltd.
2020-04-14 20:44:22 +01:00
08e686eb18 TurbulenceModels: Refactored to transfer all heat and specie transport to the new ThermophysicalTransportModels library
This provides an extensible and run-time selectable framework to support complex
energy and specie transport models, in particular multi-component diffusion.
Currently only the Fourier for laminar and eddyDiffusivity for RAS and LES
turbulent flows are provided but the interface is general and the set of models
will be expanded in the near future.
2020-04-12 10:35:52 +01:00
25b34809c7 ThermophysicalTransportModels: New library to handle the transport of energy and species
The simplistic energy transport support in compressibleTurbulenceModels has been
abstracted and separated into the new ThermophysicalTransportModels library in
order to provide a more general interface to support complex energy and specie
transport models, in particular multi-component diffusion.  Currently only the
Fourier for laminar and eddyDiffusivity for RAS and LES turbulent flows are
provided but the interface is general and the set of models will be expanded in
the near future.

The ThermalDiffusivity and EddyDiffusivity modelling layers remain in
compressibleTurbulenceModels but will be removed shortly and the alphat boundary
conditions will be moved to ThermophysicalTransportModels.
2020-04-10 18:18:51 +01:00
7f5144312e Renamed turbulenceProperties -> momentumTransport
Following the generalisation of the TurbulenceModels library to support
non-Newtonian laminar flow including visco-elasticity and extensible to other
form of non-Newtonian behaviour the name TurbulenceModels is misleading and does
not properly represent how general the OpenFOAM solvers now are.  The
TurbulenceModels now provides an interface to momentum transport modelling in
general and the plan is to rename it MomentumTransportModels and in preparation
for this the turbulenceProperties dictionary has been renamed momentumTransport
to properly reflect its new more general purpose.

The old turbulenceProperties name is supported for backward-compatibility.
2020-04-10 17:17:37 +01:00
53ac3f223a reactingEulerFoam::phaseCompressibleTurbulenceModels: Added missing clone functions
Patch contributed by Timo Niemi, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=3478
2020-04-10 09:28:57 +01:00
3bd86e85e5 TurbulenceModels: Removed the redundant propertiesName constructor and selector argument 2020-04-08 11:46:24 +01:00
d98c83e62b TurbulenceModels: Removed the redundant propertiesName constructor and selector argument
The ability to specify the file name of the turbulenceProperties dictionary
during construction was added to support multi-phases but now that the handling
of the phase name extension has been completely rationalised and standardised
this complexity and code clutter is no longer used, needed or appropriate.
2020-04-07 11:07:31 +01:00
eb73f38176 reacting*EulerFoam/.../ThermalPhaseChangePhaseSystem: Corrected heat transfer in n-phase simulations
Corrected the use of the lagged thermal phase change dmdt in interfacial
heat transfer calculations of n-phase simulations

Patch contributed by Juho Peltola, VTT.
2020-03-17 08:41:36 +00:00
54b38778f1 reacting*EulerFoam/.../MultiComponentPhaseModel: Fix to species fraction clipping
Made consistent with reactingFoam

Patch contributed by Timo Niemi, VTT.
2020-03-17 08:31:05 +00:00
fbe98c6e84 surfaceFeatures: Added optional input of maximum angle between opposite points considered close
To handle the additional optional specification for the closeness calculation
these settings are now is a sub-dictionary of surfaceFeaturesDict, e.g.

    closeness
    {
        // Output the closeness of surface elements to other surface elements.
        faceCloseness           no;

        // Output the closeness of surface points to other surface elements.
        pointCloseness          yes;

        // Optional maximum angle between opposite points considered close
        internalAngleTolerance  80;
        externalAngleTolerance  80;
    }
2020-03-16 19:29:28 +00:00
99982d0358 turbulenceModels/laminar/PTT: New implementation of the PTT viscoelastic model for polymer flows
Description
    PTT model for viscoelasticity using the upper-convected time
    derivative of the stress tensor with support for multiple modes.

    Reference:
    \verbatim
        Thien, N. P., & Tanner, R. I. (1977).
        A new constitutive equation derived from network theory.
        Journal of Non-Newtonian Fluid Mechanics, 2(4), 353-365.
    \endverbatim

Currently the common exponential form of the PTT model is provided but it could
easily be extended to also support the linear and quadratic forms if the need
arises.
2020-03-15 22:37:54 +00:00
262a3366f9 rhoCentralFoam: Updated BCs to support mesh refinement and unrefinement 2020-03-11 23:23:29 +00:00
ab88bc3ee2 reactingEulerFoam::alphatWallBoilingWallFunctionFvPatchScalarField: Corrected constructor for clang 2020-03-10 15:21:37 +00:00
66397001c2 regionModels::kinematicSingleLayer: Rationalised and simplified the handling of the film surface and wall velocities 2020-03-06 15:49:59 +00:00
7c32fe8c8e rhoPimpleFoam, rhoSimpleFoam, buoyantPimpleFoam, buoyantSimpleFoam: Consistency improvements
Various small changes to make comparison between pimple and simple
variants of the single-phase compressible solvers easier
2020-03-05 19:29:49 +00:00
27ab3edc5e buoyantPimpleFoam, chtMultiRegionFoam, rhoReactingBuoyantFoam: Share pEqn.H 2020-03-05 18:08:45 +00:00
f933861c48 pressureControl: Added support for p_rgh
Updated buoyantPimpleFoam to use pressureControl with p_rgh support.
2020-03-05 12:14:58 +00:00
a2f4320c0a reactingEulerFoam::reactingEulerFoam: Copy the limiter field if not a temporary
Ensures correct operation in case a derived limiter function return a
non-temporary field.
2020-03-05 11:10:45 +00:00
3068d9701e reactingEulerFoam::wallDampingModel: Corrected dampingf() function to include zeroInNearWallCells option 2020-03-05 09:24:37 +00:00
b5363ca324 rhoPimpleFoam, rhoSimpleFoam, reactingFoam: Combined pEqn.H and pcEqn.H to reduce duplication 2020-03-04 17:24:56 +00:00
97cda40634 rhoPimpleFoam: Operate in SIMPLE mode
rhoPimpleFoam now produces identical results to rhoSimpleFoam when run
with a steady-state time-scheme. The intention is that this solver can
now be used as a reference when adding steady-state support to other
compressible solvers for which no SIMPLE variant exists.

rhoReactingFoam has also been updated to support SIMPLE operation, as it
shares a pressure equation with rhoPimpleFoam.
2020-03-04 15:31:06 +00:00
9a71022d93 reacting*EulerFoam/.../populationBalanceModel: Corrected mass-transfer source terms
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-03-04 14:40:02 +00:00
779ed4de1f reactingEulerFoam::alphatPhaseChangeWallFunctionFvPatchScalarField: Corrected restart reading of dmdtLf 2020-03-02 15:57:28 +00:00
46d54df9a3 SlicedGeometricField: Added splice member function
to splice the SlicedGeometricField into a complete contiguous Field.
e.g. to splice the flux field phi:

    scalarField completePhi
    (
        slicedSurfaceScalarField
        (
            IOobject
            (
                "slicedPhi",
                runTime.timeName(),
                mesh
            ),
            phi,
            false
        ).splice()
    );
2020-02-29 10:07:53 +00:00
50814f8d89 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-28 17:11:21 +00:00
2ee5c7de12 buoyantPimpleFoam: Added topology change support to ddtCorr 2020-02-28 17:10:54 +00:00
d23a8a62b1 alphatWallBoilingWallFunction: Check if saturationModel is found
ThermalPhaseChangePhaseSystem enables phase change for phase pairs that
have saturationModels. This change makes alphatWallBoilingWallFunction
work in the same way; i.e., it disables evalulation of the wall boiling
models if a saturation model is not found.

Patch contributed by Juho Peltola, VTT.
2020-02-28 17:08:56 +00:00
e10a214c6b buoyantPimpleFoam: Added correction of rhoUf and dpdt for moving meshes 2020-02-28 17:06:24 +00:00
8173999d10 buoyantPimpleFoam: Updated header description 2020-02-28 17:01:18 +00:00
fc8a57ea9a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-28 16:53:21 +00:00
38fff77d35 buoyantPimpleFoam: Added moving and changing mesh capability 2020-02-28 16:52:49 +00:00
88405e4c94 thermoPhysicalModels/.../hConstThermo, eConstThermo: Added reference state
The hRefConst and eRefConst thermos that were local to
reacting*EulerFoam have been removed and the reference state that they
used has been incorporated into the standard hConst and eConst thermos.

The hConst thermo model now evaluates the enthalpy like so:

    Ha = Hf + Hs
       = Hf + Cp*(T - Tref) + Hsref (+ equation of state terms)

Where Ha is absolute enthalpy, Hs is sensible enthalpy, Cp is specific
heat at constant pressure, T is temperature, Tref is a reference
temperature and Hsref is a reference sensible enthalpy. Hf, Cp, Tref and
Hsref are user inputs. Of these, Tref and Hsref are new. An example
specification is as follows:

    thermodynamics
    {
        Hf          -1.34229e+07;
        Cp          2078.4;
        Tref        372.76;
        Hsref       128652;
    }

The ref quantities allows the user to specify a state around which to
linearise the relationship between temperature and enthalpy. This is
useful if the temperature range of the simulation is small enough to
consider the relationship linear, but linearity does not hold all the
way to standard conditions.

To maintain backwards compatibility, Tref defaults to standard
temperature, and Hsref defaults to zero, so a case using hConst thermo
requires no modification as a result of this change.

The only change to the default operation is that to calculate sensible
enthalpy Cp is multiplied by the difference between the current
temperature and the standard temperature, whether as previously Cp was
multiplied by the current temperature only. This means that at standard
conditions sensible enthalpy is now zero, and absolute enthalpy equals
the formation enthalpy. This is more consistent with the definitions of
the various enthalpies, and with other thermo models such as janaf. This
change should only affect reacting cases that use constant thermo
models.
2020-02-28 12:07:56 +00:00
047e9640b6 reacting*EulerFoam/.../ThermalPhaseChange: Update to new definition of continuity error
The ThermalPhaseChangePhaseSystem stores the thermal phase change dmdt
used in the previous continuity error update and uses that to stabilize
the interfacial heat transfer calculations when phase fractions approach
zero.

Patch contributed by Juho Peltola, VTT.
2020-02-27 10:25:02 +00:00
57e6515379 reactingTwoPhaseEulerFoam: Corrected phase1 EEqn fvOption call.
Patch contributed by Juho Peltola, VTT.
2020-02-27 10:24:49 +00:00
e3903fdb35 reacting*EulerFoam: Separate continuity error from mass transfer
continuityError is now just the transport inconsistency. Mass sources,
whether as a result of fvOptions or phase-transfer/change processes, are
not included.
2020-02-27 10:24:32 +00:00
b923ebebf9 reactingMultiphaseEulerFoam::multiphaseSystem: Changed the update of the referencePhase to preserve fixedValue BCs 2020-02-25 12:14:29 +00:00
5493c4062a reactingMultiphaseEulerFoam::multiphaseSystem: Corrected phase comparison to be pointer rather than values based 2020-02-25 12:13:20 +00:00
5b4e84c97b reactingEulerFoam::MovingPhaseModel: Generalised support for derived fixedValue BCs using the assignable() member function
Resolves bug-report https://bugs.openfoam.org/view.php?id=3457
2020-02-23 22:17:54 +00:00
5ce2130f1a reactingEulerFoam/phaseSystems: Rationalised the handling of continuity error compensation
Updated the continuity error compensation term in the face momentum formulation
so that separate flow and source continuity errors are combined into a single
term.
2020-02-18 17:24:33 +00:00
75c332c6c8 reacting*EulerFoam/.../wallDampingModels: Fixed memory reuse issue and removed unused code 2020-02-18 08:38:07 +00:00
17afa7d79b reactingEulerFoam::AnisothermalPhaseModel: Added a continuity error compensation term to the internal energy pressure work
Reduced the accumulation of error for incompressible and low compressibility
cases.

Partly resolves report https://bugs.openfoam.org/view.php?id=3442
2020-02-17 14:04:45 +00:00
89439aa1ff tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase: New tutorial to demonstrate interface capturing in reactingMultiphaseEulerFoam
This case is an updated version of
tutorials/multiphase/multiphaseEulerFoam/damBreak4phase using the latest models
available in reactingMultiphaseEulerFoam for interface capturing.
2020-02-16 00:14:32 +00:00
6996bcb28c reacting*EulerFoam/.../interfaceCompositionModel: Fixed pair ordering bug 2020-02-14 12:23:34 +00:00