Commit Graph

4635 Commits

Author SHA1 Message Date
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
c4e9f79a97 momentumTransportModel: Corrected readModelDict backward-compatibility function
adds support for reading constant/momentumTransport if present otherwise
constant/turbulenceProperties in read.
2020-04-16 17:00:20 +01:00
46f5de875d omegaWallFunctionFvPatchScalarField: Removed misleading documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3485
2020-04-16 16:49:45 +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
1a1381d093 freestreamVelocity BC: changed to use patchInternalField for valueFraction calculation
to prevent the valueFraction "locking" to 1 when a velocity points exactly normal and inwards to the face
2020-04-16 12:49:06 +01:00
e1dedc10d3 foamCloneCase: improved messaging when additional file does not exist 2020-04-16 12:45:33 +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
f7ec6855c7 tutorials/.../biconic25-55Run35: Corrected patch types 2020-04-15 15:18:10 +01:00
d3fed1155a wallHeatFlux: Output values only on the patches specified
Resolves bug report https://bugs.openfoam.org/view.php?id=3481
2020-04-15 15:06:29 +01:00
5a80034f93 ThermophysicalTransportModels: Corrected the handling of the phase-fraction for multi-phase simulations 2020-04-15 11:44:35 +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
3d3f61ac36 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-15 11:22:28 +01:00
7c402dde4e Removed redundant library link statements 2020-04-15 11:17:16 +01:00
e3cd634104 paraview: More corrections to library paths 2020-04-15 09:47:24 +01:00
4f1beb3830 flowRateInletVelocity: Added alpha option for use with interstitial velocities 2020-04-15 09:47:24 +01:00
365282af5b Added missing wmake target 2020-04-15 09:39:34 +01:00
48a3622bcc Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-14 21:15:24 +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
a4efd0ed55 paraview: Corrected library paths 2020-04-14 12:18:06 +01:00
d9103613a9 bin/tools: Added version number comparison script
This script allows version numbers to be compared. It is called in the
following way:

    foamVersionCompare <version-1> <comparison> <version-2>

The <comparison> argument can be one of; eq (equal-to), lt (less-than),
gt (greater-than), le (less-than-or-equal-to), or ge
(greater-than-or-equal-to). The script returns a successful exit code if
the comparison evaluates as true.

Example usage:

    if $WM_PROJECT_DIR/bin/tools/foamVersionCompare 5.4.3 gt 5.5.1
    then
        echo "5.4.3 IS greater than 5.5.1"
    else
        echo "5.4.3 is NOT greater than 5.5.1"
    fi
20200414
2020-04-14 09:24:55 +01:00
ba0fe79c5f tutorials/.../DTCHull: Simplified and unified mesh setups
This also restores the upstream refinement in the wave case so that the
waves now correctly propagate to the hull
2020-04-14 08:25:26 +01:00