Commit Graph

4070 Commits

Author SHA1 Message Date
30cceb42c0 objectRegistry: Corrected caching of registered temporary objects
For example the generation term in the k-epsilon turbulence kEpsilon:G is a
temporary field that is specifically named and registered so that it can be
looked-up be the wall-function boundary conditions and requires slightly
different handling compared to normal temporary fields which are not registered.

The tutorials/incompressible/simpleFoam/pitzDaily case now demostrates this
functionality with the addition of

cacheTemporaryObjects
(
    kEpsilon:G
);

functions
{
    #includeFunc writeObjects(objects = (kEpsilon:G))
}

in controlDict which caches kEpsilon:G and writes it at every write time.
2019-09-01 10:18:45 +01:00
c909bdc38d heSolidThermo: Updated to use the corrected equation of state coefficient mixing 2019-08-31 12:13:59 +01:00
c8d4346a54 Equations of state: Corrected coefficient mixing
and removed it from equations of state for which it is too inaccurate to be
useful, in particular from perfectFluid which has been superseded by rPolynomial
which is more accurate and naturally support coefficient mixing.
2019-08-31 12:04:57 +01:00
4817971e13 rPolynomial: New equation of state for liquids and solids
Description
    Reciprocal polynomial equation of state for liquids and solids

    \f[
        1/\rho = C_0 + C_1 T + C_2 T^2 - C_3 p - C_4 p T
    \f]

    This polynomial for the reciprocal of the density provides a much better fit
    than the equivalent polynomial for the density and has the advantage that it
    support coefficient mixing to support liquid and solid mixtures in an
    efficient manner.

Usage
    \table
        Property     | Description
        C            | Density polynomial coefficients
    \endtable

    Example of the specification of the equation of state for pure water:
    \verbatim
    equationOfState
    {
        C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16);
    }
    \endverbatim
    Note: This fit is based on the small amount of data which is freely
    available for the range 20-65degC and 1-100bar.

This equation of state is a much better fit for water and other liquids than
perfectFluid and in general polynomials for the reciprocal of the density
converge much faster than polynomials of the density.  Currently rPolynomial is
quadratic in the temperature and linear in the pressure which is sufficient for
modest ranges of pressure typically encountered in CFD but could be extended to
higher order in pressure and/temperature if necessary.  The other huge advantage
in formulating the equation of state in terms of the reciprocal of the density
is that coefficient mixing is simple.

Given these advantages over the perfectFluid equation of state the libraries and
tutorial cases have all been updated to us rPolynomial rather than perfectFluid
for liquids and water in particular.
2019-08-31 11:57:17 +01:00
7c133e3952 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-30 11:24:44 +01:00
c13d74e174 Rough wall functions: Added reference
Cebeci, T., & Bradshaw, P. (1977).
    Momentum transfer in boundary layers.
    Washington, DC, Hemisphere Publishing Corp.; New York,
    McGraw-Hill Book Co., 1977. 407 p.
2019-08-30 11:24:00 +01:00
af1ee78286 singleFluidCHT template case: corrected absorptionEmissionModel in radiationProperties files 2019-08-30 10:41:51 +01:00
888cb50536 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubblePipe: Referencing 2019-08-29 17:01:57 +01:00
9adf943be1 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubblePipe: Added turbulence settings 2019-08-29 14:22:57 +01:00
59001c3f0d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-29 14:18:29 +01:00
c8803042c7 IOobject: Changed foamFile from a static word to a constexpr const char*
to avoid link order problems in global namespace for older operating systems and
linkers.
2019-08-29 14:17:09 +01:00
2be90fd7b2 tutorials/multiphase/reactingTwoPhaseEulerFoam: Added bubblePipe tutorial
Patch contributed by Juho Peltola, VTT.
2019-08-29 12:21:58 +01:00
02dcff00af functionObjects: yPlus: Added support for phases
The yPlus function object can now take a "phase" keyword which defines
the name of the phase for which to write yPlus. For example, to write
yPlus for a phase named "liquid", the following entry can be used:

    yPlus1
    {
        type        yPlus;
        libs        ("libfieldFunctionObjects.so");
        phase       liquid;
    }

Note that this will only be necessary in Euler-Euler type simulations
where the phases have separate turbulence models. For VoF, the phase
name will not be required.

Patch contributed by Juho Peltola, VTT.
2019-08-29 12:19:56 +01:00
20d2492c0e tutorials/heatTransfer, lagrangian: replaced the icoPolynomial with perfectGas for air
and with perfectFluid for water.  These choices are more accurate and easier to
specify than icoPolynomial and provide correct mixing.
2019-08-28 16:58:29 +01:00
af6037b3c1 IOobjectReadHeader: Change header warning to a debug message
Allows directories to contain included files without FoamFile headers without
generating warning messages from ParaFoam and other post-processing tools.
2019-08-28 15:33:23 +01:00
774926ff2f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-28 12:15:08 +01:00
317205fbe4 thermophysicalModels: improved consistency of member function documentation for enthalpy 2019-08-28 12:13:57 +01:00
73c6f91a60 specie/thermo: Added Gstd member function which returns the Gibbs free energy of the mixture in the standard state
This is used to calculate the reaction equilibrium constant.
2019-08-28 12:11:27 +01:00
36927d8845 primitives/scalar: Added the scalar constant NaN
Used to set values to NaN when no further processing of them should be
allowed.
2019-08-28 12:09:30 +01:00
979cad1a6b reactingEulerFoam: wallDampingModel: Added documentation
Patch contributed by Juho Peltola, VTT.
2019-08-27 14:23:07 +01:00
f536328544 pimpleControl: Enabled residualControls in all pimple solvers
Resolves bug report https://bugs.openfoam.org/view.php?id=3336
2019-08-27 13:52:52 +01:00
7d6b7a78d7 reactingEulerFoam::dragModels::Ergun: Changed pair_.continuous().residualAlpha() to pair_.dispersed().residualAlpha()
Resolves request https://bugs.openfoam.org/view.php?id=3339#c10699
20190827
2019-08-26 17:39:43 +01:00
9847140a8f porosityModel: Corrected check for negative resistance
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=3338
2019-08-25 19:54:23 +01:00
3c57c47c23 Corrected typos 2019-08-23 13:03:51 +01:00
43566c7f40 particleTracks, steadyParticleTracks: Write the tracks into the <case>/VTK directory
when running serial or parallel as the tracks are reconstructed automatically.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3333
2019-08-22 22:29:23 +01:00
627f1810f4 tutorials::DTCHull: No need to renumber fields before setFields 2019-08-22 21:35:00 +01:00
87709f9ee0 rhoThermo, solidThermo: Corrected name of the thermo rho field in documentation 2019-08-22 18:56:02 +01:00
a823a7fea4 specie: Correct documentation for the mass fraction Y 2019-08-22 18:55:14 +01:00
54509a7968 mixtureAdiabaticFlameT: Add conversion of volume fraction to mass fractions 2019-08-22 18:54:42 +01:00
37204c1559 Field: Protect the direct mapping functions from self-mapping
Resolves bug-report https://bugs.openfoam.org/view.php?id=3334
2019-08-22 18:53:56 +01:00
f103a18d6e tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnEvaporatingReacting: Removed unused files and entries
Resolves bug report https://bugs.openfoam.org/view.php?id=3332
2019-08-22 10:13:20 +01:00
96bd820571 functionEntries::if.*Entry: use addToMemberFunctionSelectionTable 2019-08-21 13:05:58 +01:00
84a1266706 faceZoneAverage: New functionObject configuration to average fields over a faceZone
e.g. given a vol pressure field p

functions
{
    // Interpolate the pressure field to the faces
    surfacep
    {
        type        surfaceInterpolate;
        libs        ("libfieldFunctionObjects.so");
        fields      ((p surfacep));
        writeControl none;
    }

    // Average the surface pressure field over the centre faceZone
    #includeFunc faceZoneAverage(name=centre, surfacep)
    .
    .
    .
}
2019-08-21 11:57:16 +01:00
da52b23f41 functionEntry: Simplified the primitiveEntry created when functions are disabled 2019-08-20 23:36:49 +01:00
c5d4d5e17b plateHole/system/singleGraph: Removed unnecessary sub-dictionary 2019-08-20 23:35:56 +01:00
f77c9e4861 reactingEulerFoam: alphatWallBoilingWallFunction: Updated documentation and stabilised a division
Patch contributed by Juho Peltola, VTT.
2019-08-20 16:35:11 +01:00
4d8981bef7 functionEntries: Simplified implementation and reduced code duplication 2019-08-20 01:39:18 +01:00
e7f8987b28 dictionary: Removed unnecessary functions 2019-08-19 16:45:10 +01:00
05bbe6660e dictionary: Allow duplicate entries when function entries are disabled
Needed to support delayed expansion of conditional statements which contain
duplicate entries between the conditions.
2019-08-19 15:46:12 +01:00
db5d858802 PBiCGStab: Further improvements to the dual convergence logic 2019-08-19 12:49:02 +01:00
62c193d929 functionName: New word type for the type names of dictionary functionEntries
This simplifies the handling of functionEntries between the token parser,
keyType and dictionary entry reading.
2019-08-19 11:56:53 +01:00
c61a66fc00 fluent.*ToFoam: Added support for ';' in schemes expressions
Resolves feature request https://bugs.openfoam.org/view.php?id=3330
2019-08-19 11:06:54 +01:00
6736543e3a PBiCGStab: Added minIter test to first convergence test
Resolves bug-report https://bugs.openfoam.org/view.php?id=3329
2019-08-19 09:45:54 +01:00
7350f07582 foamDictionary: improved checking for FoamFile 2019-08-19 09:20:05 +01:00
3fe2d3d9ad variable: Simplified the Istream operator
The token parser guarantees the correct type handling for variable.
2019-08-18 19:31:34 +01:00
409548cbcc Moved the dictionary keyword type keyType into the dictionary directory
and removed the need for the direct dependency of Ostream on keyType which is
not a primitive IO type and relates specifically to dictionary and not all IO.
2019-08-17 20:22:30 +01:00
0b6346c721 keyType: Added proper type handling and formalised construction from the string types
Rationalised IO of keyType so the internal structure is not duplicated in
if-else structures in dictionary::entry.
2019-08-17 10:57:22 +01:00
c8f4487a07 Removed unused private data members 2019-08-16 17:56:59 +01:00
888d362bfa Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-16 15:39:36 +01:00
63ec196ea3 token: Added isAnyString and anyStringToken
to conveniently handle the cases where the particular string type does not
matter, e.g. the string equality comparison in the ifeqEntry dictionary function
entry.
2019-08-16 15:38:05 +01:00