Commit Graph

4656 Commits

Author SHA1 Message Date
fa9cccf11d equationOfState: Separated entropy contributions into Sp and Sv
The entropy contribution from the equation of state corrects the integral of the
heat capacity divided by temperature for changes in pressure in the case of Cp
named Sp or changes in volume in the case of Cv, named Sv.  This for enthalpy
based thermodynamics Sp is needed and for internal energy Sv is needed.
2020-06-11 00:09:34 +01:00
4ad1559fff Updated thermal baffle tutorials to use internal energy 2020-06-11 00:08: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
f2ad07bd12 face: Created static versions of area and centre methods
This lets you run the calculations with any list of points defining a
face, without having to allocate an identity face.
2020-06-09 11:58:08 +01:00
7dd592ff40 boost: Corrected include path 2020-06-09 09:27:56 +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
44cf9977c3 Use the new primitive mesh magFaceAreas where appropriate 2020-06-03 17:11:56 +01:00
6ef064984d cyclicACMI: Updated handling of magFaceAreas
Resolves bug-report https://bugs.openfoam.org/view.php?id=3502
2020-06-03 17:11:01 +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
1bd80e958b reactionThermo/mixtures: renamed getLocalThermo -> specieThermo
This function returns the thermo package for a particular specie and the new
name is far more logical.
2020-06-01 16:09:43 +01:00
6f2a75b2f7 tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq: Set the rho solver to diagonal 20200531 2020-05-26 09:54:17 +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
4d73bfad2a Doxygen::Doxyfile: Replaced the index bar with the more convenient tree-view 2020-05-22 18:42:59 +01:00
54f0ddcb7d ThermophysicalTransportModels/.../nonUnityLewisEddyDiffusivity: Corrected header documentation 2020-05-22 15:36:31 +01:00
9b23ae3b1b lagrangian/spray/submodels/BreakupModel/SHF: Prevent divide-by-zero
Resolves bug report https://bugs.openfoam.org/view.php?id=3495
2020-05-22 09:06:22 +01:00
8604c1eb5f lagrangian/distributionModels/RosinRammler: Corrected min/max handling
The clipping of the RosinRammler distribution now behaves in the same
way as if the un-clipped distribution were sampled and results out of
bounds were discarded. This has made it consistent with other
distribution models, such as massRosinRammler.

Resolves bug report https://bugs.openfoam.org/view.php?id=3492
2020-05-22 08:38:00 +01:00
cda505c718 solidDisplacementFoam: Added Function1 support for the pressure specification 2020-05-20 19:14:52 +01:00
1217724ed9 tutorials/incompressible/simpleFoam/pitzDaily/system/blockMeshDict: copy of $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
Added a local copy of the $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
corresponding to the OpenFOAM test instructions.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3497
2020-05-18 15:40:25 +01:00
73503b1a38 functionObjects::age: Added fvOption support 2020-05-18 15:09:57 +01:00
19d4f192f9 primitiveMesh: Added magFaceAreas
fvMesh: magSf() now returns the sliced primitiveMesh::magFaceAreas
2020-05-14 17:06:53 +01:00
8af31c58c5 src/twoPhaseModels/twoPhaseMixture/VoF/alphaControls.H: New centralised location for alphaControls.H 2020-05-11 10:37:39 +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
32b4e81a3c fvcFlux: Added construction from Istream 2020-05-09 14:40:09 +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.
20200508
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
1382ffae01 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-05-05 18:37:40 +01:00
c45bc02d00 phaseCompressibleMomentumTransportModels: Updated R() -> sigma() 2020-05-05 18:37:11 +01:00
98dde2522a paraview: Downgrade to version 5.6.3
Paraview 5.7.0+ has a bug relating to polygon and line offsetting which
means that when viewing a "Surface With Edges" representation at high
zoom excessive amounts of edges that should not be visible are shown.
This makes inspection of a typical mesh almost impossible.

See issues 19723 and 19437 on ParaView's gitlab.

Downgrading to version 5.6.3 until this issue is resolved.
2020-05-05 16:39:59 +01:00
813bcaff30 foamGet: remove message when no $HOME/.OpenFOAM directory exists 2020-05-02 10:34:21 +01:00
855cf2941a thermophysicalModels: Reinstated logPolynomial transport 2020-04-30 17:12:49 +01:00
0c719bc93c thermophysicalModels: Added missing polynomial instantiations 2020-04-30 17:07:33 +01:00
fe89082f73 thermophysicalModels: Centralised instantiation macros
All models that require templating on the thermodynamic model, including
the thermodynamic models themselves, are now instantiated using a
centralised set of variadic macros. Seven macros exist to instantiate
models for different classes of thermodynamics model. These are:

   forGases:          All model combinations valid for gases

   forCommonGases:    The most commonly used gas models

   forAbsoluteGases:  A limited selection of gas models with absolute
                      forms of energy, for use with Xi-combustion models

   forLiquids:        All model combinations valid for liquids

   forCommonLiquids:  The most commonly used liquid models

   forPolynomials:    Model combinations with properties fitted to
                      polynomials

   forSolids:         All model combinations valid for solids

All the *ThermoPhysics typedefs have been removed, as this system was
fundamentally not extensible. The enormous lists of thermodynamic
instantiations that existed for reaction thermos, chemistry models,
tabulation methods, etc..., were extremely difficult to read and reason
about what combinations are valid under what circumstances. This change
centralises those decisions, makes them concise and readable, and makes
them consistent across the entire codebase.

Soot model selection has now been brought up to date in line with
chemistry, combustion, and others. The angle-bracketed part of the name
is no longer necessary; this information is determined directly from the
existing thermo model. So, now to select a mixture-fraction soot model,
the entry is simply:

    sootModel   mixtureFraction;

Rather than:

    sootModel   mixtureFraction<rhoReactionThermo,gasHThermoPhysics>;

The only place in which *ThermoPhysics typedefs are still required in
the selection name is in the thermalBaffle1D boundary condition. Here
there is no thermo model from which to determine a name. This eventually
needs resolving either by adding a selection mechanism similar to that
of the thermo packages themselves, or by removing this boundary
condition in favour of the (non-1D) thermal baffle boundary condition
and region model.
2020-04-30 14:16:08 +01:00
73a594cbce nonUniformTableThermophysicalFunction: New non-uniform table thermophysicalFunction for liquid properties
Description
    Non-uniform tabulated property function that linearly interpolates between
    the values.

    To speed-up the search of the non-uniform table a uniform jump-table is
    created on construction which is used for fast indirect addressing into
    the table.

Usage
    \nonUniformTable
        Property    | Description
        values      | List of (temperature property) value pairs
    \endnonUniformTable

    Example for the density of water between 280 and 350K
    \verbatim
    rho
    {
        type    nonUniformTable;

        values
        (
            (280 999.87)
            (300 995.1)
            (350 973.7)
        );
    }
    \endverbatim
2020-04-30 14:08:44 +01:00
62d1bcdb72 nonUnityLewisEddyDiffusivity: Laminar unity Lewis assumption
The laminar Lewis number is now assumed to be one. This model only
provides specification of the turbulent diffusivity properties.
20200426
2020-04-22 16:07:13 +01:00
6e43847f5e extrudeMesh: Ensure the polyTopoChange runs on all processors if edge collaping has occurred on any
Resolves bug-report https://bugs.openfoam.org/view.php?id=3486
2020-04-22 10:40:55 +01:00
a4fb8c6460 functionObject.H: Corrected documentation of the end() member function
Resolves bug-report https://bugs.openfoam.org/view.php?id=3487
2020-04-22 10:10:18 +01:00
86f2c6de00 thermophysicalTransportModels: Added nonUnityLewisEddyDiffusivity
This allows specification of a turbulent Schmidt number independent from
that of the turbulent Prandtl number. An example specification in
constant/thermophysicalTransport is as follows:

    RAS
    {
        model           nonUnityLewisEddyDiffusivity;
        Prt             0.85;
        Sct             0.7;
    }

The defaulting of the turbulent Prandtl number (Prt) to 1 has also been
removed from the eddyDiffusivity model. Now the value must be set
explicitly. The only exception is if the
constant/thermophysicalTransport dictionary is omitted entirely, in
which case eddyDiffusivity with a turbulent Prandtl number of 1 is
selected as before.
2020-04-21 11:57:26 +01:00
cf358d7f99 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumn: Removed alphap setting
The results with alphap = 0.3 are not physical, the case runs better with the
default alphap.
2020-04-20 17:09:05 +01:00
9c27acc6c3 ThermophysicalTransportModels: call Allwmake from src/Allwmake 2020-04-20 15:39:08 +01:00
854daeab70 reactingEulerFoam: Instantiated PhaseThermophysicalTransportModel on rhoThermo and rhoReactionThermo
Now the PhaseThermophysicalTransportModel in reactingEulerFoam has access to
either rhoThermo or rhoReactionThermo depending on the choice of the thermo
package and provides necessary to structure to support multi-component diffusion
for reacting phases in the future.
2020-04-20 10:55:24 +01:00
d4207f56c5 psiReactionThermophysicalTransportModel: ThermophysicalTransportModel instantiated on psiReactionThermo
Updated reacting solvers to use psiReactionThermophysicalTransportModel or
rhoReactionThermophysicalTransportModel as appropriate to provide support for
interacting heat and specie transport.
2020-04-20 09:57:42 +01:00
7b1cbdb2cc Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-19 22:13:16 +01:00
f50c2bdb68 ThermophysicalTransportModel: Added ThermoModel argument
ThermophysicalTransportModel is now instantiated on both the
MomentmumTransportModel and also the particular thermo model model rather than
obtaining the fluidThermo from the MomentmumTransportModel.  This gives direct
access to the higher-level thermo model used in the solver, for example
rhoReactionThermo so that complex ThermophysicalTransportModels requiring access
to the composition for example are instantiated only for thermo models that
provide it and also avoiding run-time up-casting of the thermo model.
2020-04-19 22:08:10 +01:00
17f11090e2 aerofoilNACA0012 tutorial: added speed and angle of attack controls
and force coeffcients calculation
2020-04-17 19:01:46 +01:00
f7bcc19ad2 freestreamVelocity: changed to use mean of patchInternalField and patch value
for valueFraction calculation
2020-04-17 18:46:47 +01:00
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
b6e3838dbd freestreamVelocityFvPatchVectorField: Constructor call corrected for clang 2020-04-16 22:27:27 +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