Commit Graph

856 Commits

Author SHA1 Message Date
b832453b72 multiphaseEulerFoam: replacement for reactingMultiphaseEulerFoam
The new multiphaseEulerFoam is based on reactingMultiphaseEulerFoam with some
improvements and rationalisation to assist maintenance and further development.

The phase system solution has been enhanced to handle two phases more
effectively and all two-phase specific models updated for compatibility so that
multiphaseEulerFoam can also replace reactingTwoPhaseEulerFoam.
When running multiphaseEulerFoam with only two-phases the default behaviour is
to solve for both phase-fractions but optionally a reference phase can be
specified so that only the other phase-fraction is solved, providing better
compatibility with the behaviour of reactingTwoPhaseEulerFoam.

All reactingMultiphaseEulerFoam and reactingTwoPhaseEulerFoam tutorials have
been updated for multiphaseEulerFoam.
2020-07-15 18:13:40 +01:00
1d9ad9aa8e reactingEulerFoam::phaseSystem: Merged with multiphaseSystem
The base phaseSystem now provides all the functionality needed for
reactingMultiphaseEulerFoam and twoPhaseSystem is a specialisation, simplifying
maintenance.
2020-07-14 15:51:44 +01:00
35a04f0fb8 reactingEulerFoam::functionObjects::phaseMap: New functionObject to write the phase map field
Description
    This functionObject writes the phase-fraction map field alpha.map with
    incremental value ranges for each phase
    e.g., with values 0-1 for water, 1-2 for air, 2-3 for oil etc.

    Example of function object specification:
    \verbatim
    phaseMap
    {
        type            phaseMap;
        libs            ("libreactingEulerFoamFunctionObjects.so");
        writeControl    writeTime;
    }
    \endverbatim

Usage
    \table
        Property     | Description             | Required    | Default value
        type         | type name: phaseMap     | yes         |
    \endtable

This replaces the alphas functionality previously built-in to
reactingMultiphaseEulerFoam so that the storage, calculation and writing of the
phase map field is now under user control.
2020-07-14 10:18:00 +01:00
c3d72345fb reactingMultiphaseEulerFoam: Improved the handling of the optional referencePhase
The optional reference phase fraction field is not read even if the file is
present, it is constructed with "calculated" BCs as it is a derived field.  All
other phase fraction field files are read and now must be present.
2020-07-13 18:06:44 +01:00
4b959ba566 multiphaseEulerFoam: Superseded by the much more general and extensible reactingMultiphaseEulerFoam 2020-07-10 20:17:25 +01:00
2db948188f tutorials/multiphase/reactingMultiphaseEulerFoam: Added reactingTwoPhaseEulerFoam tutorials 2020-07-10 20:09:17 +01:00
2e62bfe5bc reactingMultiphaseEulerFoam: Updated remaining two-phase turbulent transport and IATE models
for compatibility with reactingMultiphaseEulerFoam when run with two-phases.
Some of these two-phase models could be enhanced to operate with multiple
dispersed phases in the future.

In order to update these models for reactingMultiphaseEulerFoam it has been
necessary to break compatibility with the now redundant twoPhaseEulerFoam solver
which has been superseded by the much more capable reactingEulerFoam solvers and
now removed.
2020-07-10 09:37:48 +01:00
2f30c1364b heatTransfer solvers: Added optional pressure reference
Added optional pressure reference pRef to p_rgh in buoyantPimpleFoam,
buoyantSimpleFoam and chtMultiRegionFoam which handles cases in which the
pressure variation is small compared to the pressure level more accurately.

The pRef value is provided in the optional constant/pRef file.

All tutorials and templates have been updated to use pRef as appropriate.
2020-07-03 15:41:58 +01:00
1611e0dbfb PLIC,MPLIC: New piecewise-linear interface compression schemes
A new family of interface compression interpolation schemes based on
piecewise-linear interface calculation (PLIC). PLIC represents an interface by
surface-cuts which split each cell to match the volume fraction of the phase in
that cell. The surface-cuts are oriented according to the point field of the
local phase fraction. The phase fraction on each cell face — the interpolated
value — is then calculated from the amount submerged below the surface-cut.

The basic PLIC method generates a single cut so cannot handle cells in which
there are multiple interfaces or where the interface is not fully resolved. In
those cells, the interpolation reverts to an alternative scheme, typically
standard interface compression. PLIC, with a fallback to interface compression,
produces robust solutions for real engineering cases. It can run with large time
steps so can solve problems like hydrodynamics of a planing hull, with rigid
body motion of the hull (above). The user selects PLIC by the following setting
in fvSchemes:

    div(phi,alpha)      Gauss PLIC interfaceCompression vanLeer 1;

The multicut PLIC (MPLIC) scheme extends PLIC to handle multiple
surface-cuts. Where a single cut is insufficient, MPLIC performs a topological
face-edge-face walk to produce multiple splits of a cell. If that is still
insufficient, MPLIC decomposes the cell into tetrahedrons on which the cuts are
applied. The extra cutting carries an additional computational cost but requires
no fallback. The user selects MPLIC by the following setting in the fvSchemes
file:

    div(phi,alpha)      Gauss MPLIC;

Variants of the PLIC and MPLIC schemes are also available which use velocities
at the face points to calculate the face flux. These PLICU and MPLICU schemes
are likely to be more accurate in regions of interface under high shear.

More details can be found here:
https://cfd.direct/openfoam/free-software/multiphase-interface-capturing

Jakub Knir
CFD Direct Ltd.
2020-07-02 13:24:05 +01:00
fa79bab863 interfaceCompression: New run-time selectable VoF interface compression scheme
A new run-time selectable interface compression scheme framework has been added
to the two-phase VoF solvers to provide greater flexibility, extensibility and
more consistent user-interface.  The previously built-in interface compression
is now in the standard run-time selectable surfaceInterpolationScheme
interfaceCompression:

Class
    Foam::interfaceCompression

Description
    Interface compression corrected scheme, based on counter-gradient
    transport, to maintain sharp interfaces during VoF simulations.

    The interface compression is applied to the face interpolated field from a
    suitable 2nd-order shape-preserving NVD or TVD scheme, e.g.  vanLeer or
    vanAlbada.  A coefficient is supplied to control the degree of compression,
    with a value of 1 suitable for most VoF cases to ensure interface integrity.
    A value larger than 1 can be used but the additional compression can bias
    the interface to follow the mesh more closely while a value smaller than 1
    can lead to interface smearing.

    Example:
    \verbatim
    divSchemes
    {
        .
        .
        div(phi,alpha)     Gauss interfaceCompression vanLeer 1;
        .
        .
    }
    \endverbatim

The separate scheme for the interface compression term "div(phirb,alpha)" is no
longer required or used nor is the compression coefficient cAlpha in fvSolution
as this is now part of the "div(phi,alpha)" scheme specification as shown above.

Backward-compatibility is provided by checking the specified "div(phi,alpha)"
scheme against the known interface compression schemes and if it is not one of
those the new interfaceCompression scheme is used with the cAlpha value
specified in fvSolution.

More details can be found here:
https://cfd.direct/openfoam/free-software/multiphase-interface-capturing

Henry G. Weller
CFD Direct Ltd.
2020-07-02 10:13:15 +01:00
70cfa1a47c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-02 09:45:06 +01:00
5ef8edfc0c tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner: Changed to perfectGas
Only perfectGas and real-gas equations of state are consistent with standard
Janaf thermo data based on Cp.  Using other equations of state is possible but
the Janaf Cp data would have to be modified for consistency.
2020-07-02 09:42:07 +01:00
197b148010 flowWithOpenBoundary: tutorial case to explore p and U boundary conditions at an open boundary 2020-07-01 14:42:33 +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
6f2a75b2f7 tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq: Set the rho solver to diagonal 2020-05-26 09:54:17 +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
746c080603 VoF: Removed the isotropic compression option which has not proved useful for any cases 2020-05-09 14:41:15 +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
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
17f11090e2 aerofoilNACA0012 tutorial: added speed and angle of attack controls
and force coeffcients calculation
2020-04-17 19:01:46 +01:00
f7ec6855c7 tutorials/.../biconic25-55Run35: Corrected patch types 2020-04-15 15:18:10 +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
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
413429e214 tutorials/.../DTCHull: Changed the atmospheric boundary condition to prghEntrainmentPressure
This has removed all the noise/checkerboarding from the vicinity of the
atmospheric boundary.
2020-04-11 11:43:30 +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
b6f91de72c semiImplicitSource: Made operable on multiple different types
The scalarSemiImplicitSource, vectorSemiImplicitSource, etc...,
fvOptions have been replaced by a single semiImplicitSource fvOption.
This allows sources to be specified for multiple fields regardless of
type. For example:

    massSource
    {
        type            semiImplicitSource;

        timeStart       1;
        duration        500;

        selectionMode   points;
        points
        (
            (0.075 0.2 0.05)
        );

        volumeMode      absolute;

        sources
        {
            thermo:rho.steam
            {
                explicit    1.0e-3; // kg/s
                implicit    0;
            }

            U.steam
            {
                explicit    (0 1e-1 0); // kg*m/s^2
                implicit    0;
            }

            h.steam
            {
                explicit    3700; // kg*m^2/s^3
                implicit    0;
            }
        }
    }
2020-04-07 17:02:27 +01:00
b7b678bceb tutorials: Updated the momentum transport model type selection
renaming the legacy keywords
    RASModel -> model
    LESModel -> model
    laminarModel -> model

which is simpler and clear within the context in which they are specified, e.g.

RAS
{
    model               kOmegaSST;
    turbulence          on;
    printCoeffs         on;
}

rather than

RAS
{
    RASModel            kOmegaSST;
    turbulence          on;
    printCoeffs         on;
}

The old keywords are supported for backward compatibility.
2020-04-07 13:11:50 +01:00
95b5ef4458 fvOptions::SemiImplicitSource: Added support for Function1 specifications of the explicit and implicit sources
This significant improvement is flexibility of SemiImplicitSource required a
generalisation of the source specification syntax and all tutorials have been
updated accordingly.

Description
    Semi-implicit source, described using an input dictionary.  The injection
    rate coefficients are specified as pairs of Su-Sp coefficients, i.e.

        \f[
            S(x) = S_u + S_p x
        \f]

    where
    \vartable
        S(x)    | net source for field 'x'
        S_u     | explicit source contribution
        S_p     | linearised implicit contribution
    \endvartable

    Example tabulated heat source specification for internal energy:
    \verbatim
    volumeMode      absolute; // specific
    sources
    {
        e
        {
            explicit table ((0 0) (1.5 $power));
            implicit 0;
        }
    }
    \endverbatim

    Example coded heat source specification for enthalpy:
    \verbatim
    volumeMode      absolute; // specific
    sources
    {
        h
        {
            explicit
            {
                type coded;
                name heatInjection;
                code
                #{
                    // Power amplitude
                    const scalar powerAmplitude = 1000;

                    // x is the current time
                    return mag(powerAmplitude*sin(x));
                #};
            }
            implicit 0;
        }
    }
    \endverbatim
2020-04-01 18:53:09 +01:00
4c08b463fd snappyHexMesh::shellSurfaces: Added support for span refinement based on internal or external "closeness"
The closeness option in surfaceFeatures set in surfaceFeaturesDict, e.g.

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

calculates and writes both the internal and external surface "closeness"
measures either of which could be used to set the span refinement in
snappyHexMesh depending on which side of the surface is being meshed which is
specified with either refinement mode "insideSpan" or "externalSpan", e.g. in
the tutorials/mesh/snappyHexMesh/pipe case the inside of the pipe is meshed and
refined based on the internal span using the following specification:

    refinementRegions
    {
        pipeWall
        {
            mode insideSpan;
            levels ((1000 2));
            cellsAcrossSpan 40;
        }
    }
2020-03-18 18:06:55 +00:00
0177c7dd59 functionObjects::fieldAverage: Simplified the controls
Rather than specifying the controls per field it is simpler to use a single set
of controls for all the fields in the list and use separate instances of the
fieldAverage functionObject for different control sets:

    Example of function object specification setting all the optional parameters:
    fieldAverage1
    {
        type                fieldAverage;
        libs                ("libfieldFunctionObjects.so");

        writeControl        writeTime;

        restartOnRestart    false;
        restartOnOutput     false;
        periodicRestart     false;
        restartPeriod       0.002;

        base                time;
        window              10.0;
        windowName          w1;

        mean                yes;
        prime2Mean          yes;

        fields              (U p);
    }

This allows for a simple specification with the optional prime2Mean entry using

    #includeFunc fieldAverage(U, p, prime2Mean = yes)

or if the prime2Mean is not needed just

    #includeFunc fieldAverage(U, p)
2020-03-17 20:15:17 +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
7dc08ed86a dictionary::functionEntry: Simplified the handling of multi-line argument lists
The \ continuation line marker is no longer required, multi-line argument lists
are parsed naturally by searching for the end ), e.g. in

tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/titaniaSynthesis/system/controlDict

    #includeFunc writeObjects                         \
    (                                                 \
        d.particles,                                  \
        phaseTransfer:dmidtf.TiO2.particlesAndVapor   \
    )

is now written in the simpler form:

    #includeFunc writeObjects
    (
        d.particles,
        phaseTransfer:dmidtf.TiO2.particlesAndVapor
    )
2020-03-13 23:12:32 +00:00
c60cef9027 etc/caseDicts/postProcessing/fields/fieldAverage: New functionObject configuration file for field averaging
to support the more convenient #includeFunc specification in both

    #includeFunc fieldAverage(U.air, U.water, alpha.air, p)

and

    #includeFunc fieldAverage(fields = (U.air, U.water, alpha.air, p))

forms.
2020-03-12 10:11:36 +00:00
a7eb350536 turbulenceModels/laminar: Maxwell, Giesekus: Added multi-mode support
By specifying a list of coefficients in turbulenceProperties, e.g. for the
generalised Maxwell model:

        modes
        (
            {
                lambda          0.01;
            }

            {
                lambda          0.04;
            }
        );

of for the generalised Giesekus model:

        modes
        (
            {
                lambda          0.01;
                alphaG          0.05;
            }

            {
                lambda          0.04;
                alphaG          0.2;
            }
        );

Visco-elasticity stress tensors (sigma0, sigma1...) are solved for each mode and
summed to create the effective stress of the complex fluid:

Any number of modes can be specified and if only one mode is required the
'modes' entry is not read and the coefficients are obtained as before.

The mode sigma? fields are read if present otherwise are constructed and
initialised from the sigma field but all of the mode sigma? fields are written
for restart and the sigma field contains the sum.

    References:
        http://en.wikipedia.org/wiki/Generalized_Maxwell_model

        Wiechert, E. (1889). Ueber elastische Nachwirkung.
        (Doctoral dissertation, Hartungsche buchdr.).

        Wiechert, E. (1893).
        Gesetze der elastischen Nachwirkung für constante Temperatur.
        Annalen der Physik, 286(11), 546-570.
2020-03-11 23:24:08 +00:00
3659fb478b tutorials/lagrangian/reactingParcelFoam: Corrected momentum exchange consistent with the film laminar model 2020-03-06 17:57:12 +00:00
46c790dd09 functionObjects::fieldAverage: Simplified the interface by the introduction of defaults
The mean, prime2Mean and base now have default values:

    {
        mean            on;   // (default = on)
        prime2Mean      on;   // (default = off)
        base            time; // time or iteration (default = time)
        window          200;  // optional averaging window
        windowName      w1;   // optional window name (default = "")
    }

so for the majority of cases for which these defaults are appropriate the
fieldAverage functionObject can now be specified in the functions entry in
controlDict thus:

functions
{
    fieldAverage1
    {
        #includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"

        fields
        (
            U.air
            U.water
            alpha.air
            p
        );
    }
}

also utilising the new fieldAverage.cfg file.

For cases in which these defaults are not appropriate, e.g. the prime2Mean is
also required the optional entries can be specified within sub-dictionaries for
each field, e.g.

    fieldAverage1
    {
        #includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"

        fields
        (
            U
            {
                prime2Mean  yes;
            }

            p
            {
                prime2Mean  yes;
            }
        );
    }
2020-03-06 15:51:49 +00:00
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
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
bda904ca95 Corrected the name of tutorials/incompressible/boundaryFoam/boundaryNonNewtonian 2020-02-18 13:57:11 +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
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
19c9b59c4a tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity: Swapped the frontAndBack and topAndBottom patch names 2020-02-09 14:36:10 +00:00
d1170cd177 reactingMultiphaseEulerFoam: Added referencePhase option
In multiphase systems it is only necessary to solve for all but one of the
moving phases.  The new referencePhase option allows the user to specify which
of the moving phases should not be solved, e.g. in constant/phaseProperties of the
tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/fluidisedBed tutorial case with

phases (particles air);

referencePhase air;

the particles phase is solved for and the air phase fraction and fluxes obtained
from the particles phase which provides equivalent behaviour to
reactingTwoPhaseEulerFoam and is more efficient than solving for both phases.
2020-02-05 16:49:22 +00:00
35565437f5 reactingMultiphaseEulerFoam::multiphaseSystem: Updated implicitPhasePressure handling to improve stability and allow larger time-steps 2020-02-05 10:56:12 +00:00