Commit Graph

4328 Commits

Author SHA1 Message Date
a2bb959e23 tutorials/combustion/XiFoam/RAS/moriyoshiHomogeneous: Simplification
Re-scripted the tutorials to take advantage of foamDictionary and .orig
2019-11-28 14:47:18 +00:00
c28eab7318 heheuPsiThermo: Utilised heThermo's templated field evaluation functions
This reduces code duplication within heheuPsiThermo. This also resolves
a Clang floating point error issue associated with loop vectorisation.
See commit 9675107f for the corresponding fix to heThermo.
2019-11-28 11:25:27 +00:00
7d229e7026 functionObject: Log by default to stdout when in postProcess mode, not otherwise
This change formalises the usage of the "log" keyword in function
objects. By default, logging to stdout is activated when running
"postProcess" or "<solver> -postProcess", and deactivated when a
function is being executed as part of a run.

This behaviour can now be overridden in the function object dictionary
when operating in either mode.
2019-11-27 16:27:27 +00:00
9675107f7e heThermo: Simplified initialisation and fixed Clang optimisation issue
The initialisation of energy in heThermo has been rewritten to use the
"he" method.

This has had the effect of resolving a floating point error in the
initialisation by disabling Clang's vectorisation of the loop in which
cell values of energy are calculated from the temperature field.
2019-11-27 15:46:43 +00:00
5eaf74c3a4 dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
2019-11-27 14:56:32 +00:00
d987648ef4 dictionary label lookup: simplified syntax using the type templated lookup function
Replaced
    readLabel(dict.lookup("name"))
with
    dict.lookup<label>("name)
2019-11-27 11:38:59 +00:00
f2f9fae27b thermophysicalFunction: Moved the operator<< to thermophysicalFunction.C 2019-11-26 20:05:32 +00:00
0f9578d53f thermophysicalProperties: Cleanup of IO and removal of redundant << operators 2019-11-26 19:53:22 +00:00
6ee3f7849e liquidProperties::H2O: Removed temporary diagnostic message 2019-11-26 18:10:22 +00:00
7aab12e0d8 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-11-26 17:57:03 +00:00
1ad75252de thermophysicalProperties: Rationalised write functions
and corrected output to be consistent with input.
2019-11-26 17:55:28 +00:00
d0768e6039 waves: Protected exponential and hyperbolic functions from overflow
Resolves bug report https://bugs.openfoam.org/view.php?id=3397
2019-11-26 16:26:32 +00:00
bce61e943e constantThermophysicalFunction: New constant liquid property function
Usage
    \constant
        Property    | Description
        value       | Constant property value
    \endconstant

    Example for the density of water between 280 and 350K
    \verbatim
    rho
    {
        type    constant;
        value   999.87;
    }
    \endverbatim
2019-11-26 14:50:03 +00:00
7055e0400e tableThermophysicalFunction: New tabulated liquid property function
Description
    Tabulated property function the linearly interpolates between
    the table values.

Usage
    \table
        Property    | Description
        Tlow        | Lower temperature limit of the table
        Thigh       | Upper temperature limit of the table
        values      | Property values, assumed uniformly distributed
    \endtable

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

        Tlow    280;
        Thigh   350;

        values
        (
            999.87
            991.53
            973.7
        );
    }
    \endverbatim
2019-11-26 13:53:46 +00:00
f240507ae9 thermophysicalFunctions: Created a thermophysicalFunctions namespace and rationalised function names 2019-11-25 19:36:08 +00:00
e1daa5391f liquidProperties: Added support for multiple entries is mixture each of specified type
If the optional "type" entry is provided for the liquid specie that type is
looked-up rather than the entry name, e.g.

mixture
{
    H2O
    {
        type    liquid;

        W       18.015;
        Tc      647.13;
        Pc      2.2055e+7;
        Vc      0.05595;
        Zc      0.229;
        Tt      273.16;
        Pt      6.113e+2;
        Tb      373.15;
        dipm    6.1709e-30;
        omega   0.3449;
        delta   4.7813e+4;

        rho
        {
            type    NSRDSfunc5;
            a       98.343885;
            b       0.30542;
            c       647.13;
            d       0.081;
        }
        .
        .
        .
    }

    ethanol
    {
        type    liquid;

        W       46.07;
        .
        .
        .
    }
}
2019-11-25 14:43:22 +00:00
375e1f7c63 liquidProperties::liquid: New generic liquid thermophysical properties class
Description
    Generic thermophysical properties class for a liquid in which the
    functions and coefficients for each property are run-time selected.

Property functions need only be specified for properties that are actually used
in the simulation, e.g. in the thermophysicalProperties.water dictionary of the
tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D case the water
properties can be specified directly as

mixture
{
    liquid
    {
        W       18.015;
        Tc      647.13;
        Pc      2.2055e+7;
        Vc      0.05595;
        Zc      0.229;
        Tt      273.16;
        Pt      6.113e+2;
        Tb      373.15;
        dipm    6.1709e-30;
        omega   0.3449;
        delta   4.7813e+4;

        rho
        {
            type    NSRDSfunc5;
            a       98.343885;
            b       0.30542;
            c       647.13;
            d       0.081;
        }

        Cp
        {
            type    NSRDSfunc0;
            a       15341.1046350264;
            b       -116.019983347211;
            c       0.451013044684985;
            d       -0.000783569247849015;
            e       5.20127671384957e-07;
            f       0;
        }

        h
        {
            type    NSRDSfunc0;
            a       -17957283.7993676;
            b       15341.1046350264;
            c       -58.0099916736053;
            d       0.150337681561662;
            e       -0.000195892311962254;
            f       1.04025534276991e-07;
        }

        mu
        {
            type    NSRDSfunc1;
            a       -51.964;
            b       3670.6;
            c       5.7331;
            d       -5.3495e-29;
            e       10;
        }

        kappa
        {
            type    NSRDSfunc0;
            a       -0.4267;
            b       0.0056903;
            c       -8.0065e-06;
            d       1.815e-09;
            e       0;
            f       0;
        }

        sigma
        {
            type    NSRDSfunc6;
            Tc      647.13;
            a       0.18548;
            b       2.717;
            c       -3.554;
            d       2.047;
            e       0;
        }
    }
}
2019-11-24 23:05:28 +00:00
c78536f511 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-11-21 13:00:42 +00:00
e18c81e84f TDACChemistryModel: Removed CPU time accumulation between ISAT operations
Resolves feature request https://bugs.openfoam.org/view.php?id=3393
Patch contributed by Bulut Tekgul
2019-11-21 12:58:53 +00:00
b87fac2899 foamCloneCase: correction to -processor option check 2019-11-21 08:46:24 +00:00
6a17553516 foamCloneCase: correction to serial operation 2019-11-21 08:15:38 +00:00
f06e13a0bc foamCloneCase: added -processor and -add options and tidied code
-add <file1...N> copy 1 or more additional files/directories from source case
-processor       copies processor* directories of a decomposed case
2019-11-20 18:11:16 +00:00
4cf747f1b0 phaseForces: Simplified loop structure 2019-11-20 15:47:36 +00:00
ead5825cdd Revert "TDACChemistryModel: Removed CPU time accumulation between ISAT operations"
This reverts commit f66ea31584.
2019-11-20 13:54:30 +00:00
faa094ccc3 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-11-20 12:50:12 +00:00
f66ea31584 TDACChemistryModel: Removed CPU time accumulation between ISAT operations
Resolves feature request https://bugs.openfoam.org/view.php?id=3392
Patch contributed by Francesco Contino
2019-11-20 12:48:23 +00:00
6ad711057b reactingEulerFoam/.../coalescenceModels/PrinceBlanch: Added laminar shear contribution
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-11-19 14:30:08 +00:00
08ea2465c1 phaseForces: Additional check for existence of the sub-moodel
This fix ensures that the function still operates even if models only
exist on some interfaces.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-11-19 14:06:14 +00:00
b8873283a6 wallHeatTransferFvPatchScalarField: Removed
The wallHeatTransfer condition has been removed. It provided no
additional functionality beyond that available in
externalWallHeatFluxTemperature. It was also broken; it triggered
lookup errors due to it evaluating during construction and trying to
access a turbulence model that had not yet been created.
2019-11-19 13:44:56 +00:00
612164005d foamDictionary: Removed the -disableFunctionEntries option 2019-11-19 13:28:40 +00:00
c1edb022b0 foamDictionary: Disabled functionEntry expansion by default
functionEntry expansion is enabled for dictionary expansion with the -expand
option.  The disableFunctionEntries option is no longer needed and has been removed.
2019-11-19 11:42:33 +00:00
8a0509d6d7 dimensionSets: Minor cleanup 2019-11-18 15:09:31 +00:00
322c9a473a dimensionSets, dimensionedConstants: Simplified the input
When reading dimensionSets and dimensionedConstants the name of the
dimensionedScalar is no longer required in addition to the dictionary keyword,
e.g.

            c       c [0 1 -1 0 0 0 0] 2.99792e+08;

can now be specified as

            c       [0 1 -1 0 0 0 0]    2.99792e+08;
2019-11-16 09:15:58 +00:00
5f0e76fcf9 functionObjectList: Prevent execution during construction
As of 2ebed5ec, functonObjectList::start contains run commands that
trigger if some function objects are executable at time-zero. A call to
this method in functionObjectList::New has been removed (and replaced
with functonObjectList::read) as it was causing postProcess and <solver>
-postProcess to execute twice; once on construction, and once at the
selected initial time.

This change also fixes lookup errors generated by postProcess which
occured because fields (specified with -field or -fields arguments) are
not read and registered prior to function object construction.

Usage of functonObjectList::start within Time::run has not been altered.
2019-11-15 16:07:35 +00:00
0d9786651b Function1: Made Table and Constant readable in multiple formats
A typical Function1 entry can be read in one of three ways; with the
parameters in the current dictionary, in a separate sub-dict, or with
the entry itself as the dictionary; e.g.,

    // Current-dictionary form
    <entryName>     sine;
    amplitude       0.1;
    frequency       10;
    level           0.2;

    // Coeff-dictionary form
    <entryName>     sine;
    <entryName>Coeffs
    {
        amplitude       0.1;
        frequency       10;
        level           0.2;
    }

    // Entry-as-dictionary form
    <entryName>
    {
        type            sine;
        amplitude       0.1;
        frequency       10;
        level           0.2;
    }

The latter two sub-dictionary forms are needed when there are multiple
Function1 entries of the same type in a dictionary. Enclosing the
parameters in a separate sub-dictionary prevents the keywords (in this
case "amplitude", "frequency" and "level") from being duplicated.

Table and constant Function1 entries are different in that they have
special formats which allow the data to be appended directly to the
entry name; e.g;

    <entryName>         table ((0 (1 0 0)) (1 (2 0 0)));

    <entryName>         constant (1 0 0);

    // (constant can even have the "constant" keyword omitted)
    <entryName>         (1 0 0);

Table also has two optional additional controls; "outOfBounds" and
"interpolationScheme". In order for these to be written out in such a
way that the entries are not duplicated, table needs to be written out
(and therefore also read in) as one of the sub-dictionary forms. To that
effect, Table has been extended to additionally permit reading in the
three forms described previously, and to write in the coeff-dictionary
form.

    // Current-dictionary form
    <entryName>     table;
    values          ((0 (1 0 0)) (1 (2 0 0)));
    outOfBounds     repeat;
    interpolationScheme linear;

    // Coeff-dictionary form
    <entryName>     sine;
    <entryName>Coeffs
    {
        values          ((0 (1 0 0)) (1 (2 0 0)));
        outOfBounds     repeat;
        interpolationScheme linear;
    }

    // Entry-as-dictionary form
    <entryName>
    {
        type            table;
        values          ((0 (1 0 0)) (1 (2 0 0)));
        outOfBounds     repeat;
        interpolationScheme linear;
    }

For completeness and consistency, constant has also been modified so
that it can read in these forms. However, constant has no additional
control entries, which means writing a coeff-dictionary is unecessary,
so the output has not been changed.
2019-11-15 12:26:23 +00:00
e286cf4ef9 combustionModels::laminar: Reinstated non-integrating reaction rate evaluation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3389
2019-11-15 09:00:00 +00:00
9513ad8ef9 dimensionedConstants: Substantially simplified the implementation and use of the declaration macros 2019-11-14 23:21:07 +00:00
9028c3f411 NamedEnum: Added registration class and macros
Named enumerations used as info and optimisation controls can now be
registered conveniently in the same way as switches are.
2019-11-14 15:22:00 +00:00
242ba13ac7 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-11-14 11:53:30 +00:00
a64d71929f snappyHexMesh::refinementSurfaces: Removed problematic shell refinement transfer to surface
// Find out if triangle inside shell with higher level
            // What level does shell want to refine fc to?
            //
            // Note: it is not clear for what cases this additional requirement
            // is beneficial but for triangulated surfaces with triangles that
            // span refinement regions it introduces unnecessary refinement so
            // it has been removed.
            //
            // This option can be reinstated under a switch if cases are
            // provided which demonstrate the benefit.
            /*
            labelList shellLevel;
            shells.findHigherLevel(ctrs, minLevelField, shellLevel);

            forAll(minLevelField, i)
            {
                minLevelField[i] = max(minLevelField[i], shellLevel[i]);
            }
            */

Resolves bug-report https://bugs.openfoam.org/view.php?id=3361
2019-11-14 11:51:13 +00:00
cebc401534 reacting*EulerFoam: populationBalanceModel: Improvements to updates of mass transfer rate and sources
The update of mass transfer rates in the population balance system is
now done at the same time as other source terms. This benefits
synchronisation of the mass transfer rate and the source terms and
prevents the system converging to an incorrect state.

Patch contributed by VTT Technical Research Centre of Finland Ltd and
Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2019-11-14 11:13:19 +00:00
b22545b931 DPMFoam: Changed the cloud source splitting to handle symmetric semi-implicit sources consistently
Resolves bug-report https://bugs.openfoam.org/view.php?id=3385
2019-11-13 17:15:12 +00:00
80bb6e2b0f blockMesh::projectFace: Improved robustness of convergence check 2019-11-13 14:45:58 +00:00
e7128a0852 blockMesh::projectFace: Correct handling of unnecessary face project
Resolves bug-report https://bugs.openfoam.org/view.php?id=3371
2019-11-12 16:38:28 +00:00
16d810c5fe ideasUnvToFoam: added region option
This allows mesh conversion of several UNV files into region meshes of a
multi-region case.

Patch contributed by Tobias Holzmann
2019-11-12 09:28:51 +00:00
a3f769ba4a signals::sigWriteNow, sigStopAtWriteNow: Do not print messages when writeInfoHeader is false
This avoids log messaged being generated by foamListTimes when optimisation
switches are set in the case controlDict, e.g.

OptimisationSwitches
{
    writeNowSignal              10;
}
2019-11-11 17:46:57 +00:00
da429d77f5 reactingTwoPhaseEulerFoam: Significantly improved handling of the particle pressure
In order to improve stability and robustness of fluidised bed cases the
semi-implicit treatment of the particle pressure (pPrime) is now applied within
the time-step sub-cycling along with the phase differential flux update.  This
allows the simulations to be performed reliably at a significantly increased
maximum Courant number (up to 5 for some cases) without introducing
chequerboarding patterns in regions of low particle phase fraction which
occurred with the previous algorithm.

The fluidisedBed tutorial has been updated to be more representative of real
bubbling bed cases and to demonstrate the new pPrime functionality.

Developed in collaboration with Timo Niemi, VTT.
2019-11-11 14:41:35 +00:00
93047de818 functionObject::surfaceFieldValue: Removed temporary diagnostics statement 2019-11-11 13:19:02 +00:00
a5c33c5e18 functionObject::surfaceFieldValue: Added support for weighting with negative fields
For example this allows the an inlet flux to be used to create a weighted
average.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3384
2019-11-11 12:20:35 +00:00
263a22a67b subCycle: Add special treatment for nSubCycles = 1
Now running sub-cycling with nSubCycles = 1 is as efficient as running the same
code without the sub-cycling loop.
20191109
2019-11-07 17:17:09 +00:00