Commit Graph

4408 Commits

Author SHA1 Message Date
cbdd4077c7 tutorials/.../angledDuct: Swictched to bounded schemes
This change greatly reduces the transients generated at the start of the
iteration sequence.
2020-02-28 12:07:56 +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
6061ed363f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-27 16:19:34 +00:00
b49b1a2c37 functionObjects::totalEnthalpy: New functionObject to calculate, cache and write the total enthalpy
The total enthalpy is calculated as

    Ha = ha + K

where

    ha is absolute enthalpy
    K is the kinetic energy: 1/2*magSqr(U)

The total enthalpy or a particular phase can be calculated by specifying the
optional "phase" name, e.g.

    #includeFunc totalEnthalpy(phase = liquid)
2020-02-27 16:12:00 +00:00
670b158f17 functionObjects::shearStress: Updated phase support 2020-02-27 16:10:50 +00:00
94a5e0ee93 reacting*EulerFoam/.../thermal: Added waterEvaporation test 2020-02-27 15:33:51 +00:00
26c8429469 reacting*EulerFoam/.../interfaceComposition: Improved waterEvaporation test
This test now also checks for the behaviour when the solved-for energy
forms of the two species are switched
2020-02-27 10:25:17 +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
7867ffce1b rhoThermos: Added missing gas instantiations 2020-02-26 13:22:14 +00:00
d77acaf4a0 doxygen: Handle arbitrary numbers of line continuations 2020-02-25 12:24:17 +00:00
3820f6d994 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-25 12:15:16 +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
684191eadd adsorptionMassFractionFvPatchScalarField: Corrected header formatting 2020-02-25 11:16:13 +00:00
b559ef28ef functionObjects::moleFractions: Added phase support
Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3459
2020-02-24 17:49:50 +00:00
e01de98df0 functionObjects::volFieldValue: Added support for a list of weighting fields
This is particularly useful for multiphase simulations for which integrating the
density weighted phase properties also requires the phase fraction to be
including in the weighting.

A single weight field can be specified as before:

    weightField rho;

or a list specified by:

    weightFields (alpha.water rho.water);
2020-02-24 15:28:36 +00:00
b494e5a9c8 externalWallHeatFluxTemperature, turbulentTemperatureRadCoupledMixed, turbulentTemperatureCoupledBaffleMixed: Added phase support
External and coupled Heat transfer boundary conditions are now supported for
multiphase simulations and can be applied per-phase.
2020-02-24 12:07:37 +00:00
f437c74423 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-23 22:20:09 +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
afd7a6ca7d CleanFunctions: Removed deletion of certain file types
A number of file name patterns have been removed from the list of things
that cleanCase deletes. Some patterns related to obsolete files that
OpenFOAM no longer generates, and some were deemed too generic to
delete as they might contain important persistent information.
2020-02-21 14:54:54 +00:00
c57ffd2d07 functionObjects: Added shearStress
This function will output the volumetric shear stress as a symmetric
tensor field
2020-02-19 17:06:28 +00:00
f85edb01fe face, primitiveMesh: Corrected face-centre calculations
Face centres are calculated by area-weighting the centres of triangles
that are formed by connecting each edge to a common point. The common
point is taken to be the average of all the face vertices, though in
principle the choice is arbitrary.

The areas used to perform the weighting are now taken to be the
projected areas of the triangles in the direction of the face normal
(i.e., the dot product between the triangle area and the face normal).
Previously the triangle area-magnitudes were used.

The new approach results in a centre that for flat faces is independent
of the choice of common point. It also means that concave faces have
contributions to the weighted sum from reversed triangles correctly
subtracted from the total. The centre of warped faces still changes with
the choice of common point, but that variation is now reduced to be
only in the direction of the face normal.

Preliminary results suggest a positive effect of this change on the
convergence of simulations on meshes with significantly distorted faces
and cells. The simpleFoam motorBike tutorial now converges with
residuals approximately half that previously observed.

Resolves bug report https://bugs.openfoam.org/view.php?id=1993
2020-02-19 15:44:35 +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
7f36cf7feb Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-18 13:57:41 +00:00
bda904ca95 Corrected the name of tutorials/incompressible/boundaryFoam/boundaryNonNewtonian 2020-02-18 13:57:11 +00:00
7010a8ec24 cyclicTransform: Improved automatic calculation of rotational transforms
Rotational transforms can now be automatically calculated from the
coupled patch geometries even when a) the patches are non-planar, b)
the patch normals are not perpendicular to the rotation axis, and/or c)
the rotation angle is 180 degrees.
2020-02-18 08:38:39 +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
fe13ba9fac functionObjects::forces: Corrected coordinate system example in header
Resolves bug-report https://bugs.openfoam.org/view.php?id=3455
2020-02-17 09:53:31 +00:00
1875257198 tutorials/incompressible/boundaryFoam/boundaryNonNewonian: New tutorial to demonstrate non-Netwonian flow capability in boundaryFoam 2020-02-16 00:17:46 +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
70f7643451 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-02-14 17:07:04 +00:00
4deaba90f7 cylinderAnnulusToFace, cylinderToFace: Corrected setType
Resolves bug-report https://bugs.openfoam.org/view.php?id=3453
2020-02-14 17:06:22 +00:00
6996bcb28c reacting*EulerFoam/.../interfaceCompositionModel: Fixed pair ordering bug 2020-02-14 12:23:34 +00:00
2d3b02c130 primitiveMeshGeometry, polyMeshGeometry: Removed unused code
The utilised static parts of polyMeshGeometry are now part of a
polyMeshCheck namespace. Everything else has been removed, as they were
unused, out of date, and/or duplicated elsewhere.
2020-02-13 14:33:18 +00:00
ba52c4047c transformer: Removed &= operator
This operator was defined with an incorrect (or at least
counter-intuitive) ordering. Given the possibility for ambiguity
associated with transformation ordering it is considered preferable for
the transformer class not to have compound assigment operators. Forcing
the full syntax (e.g., "a = a & b" or "a = b & a") makes it clear in
which order the transformations are intended to be applied.
2020-02-11 12:01:29 +00:00
a283130301 coupledPolyPatch: Removed unecessary calcGeometry overload 2020-02-11 09:23:44 +00:00
ba8e1ecd2d cyclicPolyPatch: Optionally deduce ordering transformation from temporary primativePatch
Resolves bug report https://bugs.openfoam.org/view.php?id=3447
2020-02-11 09:22:12 +00:00
e659b2e7ab PrimitivePatch: Added faceAreas method 2020-02-11 08:32:23 +00:00
bc0175f7ca reactingMultiphaseEulerFoam/multiphaseSystem: Fix to correction fluxes
Correction fluxes need for a given phase need to be calculated relative
to all other phases, both moving and stationary.
2020-02-10 16:13:51 +00:00
c829ae0cfc reacting*EulerFoam: Added pressure referencing for incompressible phase systems
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-02-10 13:42:25 +00:00
3d70311c21 filmViscosityModel::thixotropicViscosity: Added optional Bingham plastic yield stress support
There is now an optional tauy entry in the thixotropicCoeffs to specify the
Bingham yield stress.
2020-02-10 08:57:00 +00:00
ab9b5eae92 Revert "filmViscosityModel::thixotropicViscosity: Added optional Bingham plastic yield stress support"
This reverts commit fc5d0c7dee.
2020-02-10 08:55:52 +00:00
19c9b59c4a tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity: Swapped the frontAndBack and topAndBottom patch names 2020-02-09 14:36:10 +00:00
972af235a0 List: Corrected construction from SLList
Resolves bug-report https://bugs.openfoam.org/view.php?id=3448
2020-02-09 12:05:42 +00:00
d8cf7788eb CodedBase: Changed construction of static words to avoid construction order problems with Clang 20200208 2020-02-07 22:09:09 +00:00
04a3f9f237 CodedFunction1: Moved the static data member definitions to makeFunction1s.C 2020-02-07 15:42:13 +00:00
fc5d0c7dee filmViscosityModel::thixotropicViscosity: Added optional Bingham plastic yield stress support
There is now an optional tauy entry in the thixotropicCoeffs to specify the
Bingham yield stress, e.g.:

    filmViscosityModel thixotropic;
    thixotropicCoeffs
    {
        mu0             100;
        muInf           0.1;
        a               0.1;
        b               3;
        c               0.005;
        d               0.9;
        tauy            1.1;   // Yield stress in Pa
    }
2020-02-07 15:14:52 +00:00