Commit Graph

2725 Commits

Author SHA1 Message Date
9ff320a8da multiphaseEulerFoam: Updated documentation 2020-07-30 12:30:26 +01:00
e0e448a8bb slicedFvPatchField, slicedFvsPatchField: Removed from New selection tables
Sliced Fv? patch fields are explicitly constructed and lookup from the
fv?PatchField constructor tables is not necessary or appropriate
2020-07-29 21:51:59 +01:00
bddd829fc2 chemistrySolver::EulerImplicit: Updated to use the StandardChemistryModel reaction Jacobian 2020-07-29 19:09:40 +01:00
6637ed0e9f slicedFvsPatchField: Set empty internal field in constructor
is reset by shallowCopy in SlicedGeometricField
2020-07-29 14:07:57 +01:00
a29d6f6a15 heRhoThermo: Corrected template argument name 2020-07-27 17:15:50 +01:00
1a7f10a986 sampledSurfaces: Put inside functionObjects namespace 2020-07-24 14:11:36 +01:00
bf7ade04d8 sampledSurfaces: Added documentation 2020-07-24 12:12:19 +01:00
4b6d0aefc3 plane: Made the sub-dictionary optional
This means a plane can now be specified like this:

    planeType   pointAndNormal;
    point       (0 0 0);
    normal      (0 0 1);

As well as this:

    planeType   pointAndNormal;
    pointAndNormalDict
    {
        point       (0 0 0);
        normal      (0 0 1);
    }
2020-07-24 12:12:19 +01:00
b2c402365e fvMatrix: Added division by scalar and scalar fields scaling operations 2020-07-24 12:02:10 +01:00
6c8732df5b dictionary: Set the default scoping syntax to 'slash'
The new optional 'slash' scoping syntax is now the default and provides a more
intuitive and flexible syntax than the previous 'dot' syntax, corresponding to
the common directory/file access syntax used in UNIX, providing support for
reading entries from other dictionary files.

In the 'slash' syntax
    '/' is the scope operator
    '../' is the parent dictionary scope operator
    '!' is the top-level dictionary scope operator

Examples:

    internalField 3.4;

    active
    {
        type            fixedValue;
        value.air       $internalField;
    }

    inactive
    {
        type            anotherFixedValue;

        value           $../active/value.air;
        anotherValue    $!active/value.air;

        sub
        {
            value           $../../active/value.air;
            anotherValue    $!active/value.air;
        }
    }

    "U.*"
    {
        solver GAMG;
    }

    e.air
    {
        $U.air;
    }

    external
    {
        value $testSlashDict2!active/value.air;
    }

    active2
    {
        $testSlashDict2!active;
    }

If there is a part of the keyword before the '!' then this is taken to be the
file name of the dictionary from which the entry will be looked-up using the
part of the keyword after the '!'.  For example given a file testSlashDict containing

    internalField 5.6;

    active
    {
        type            fixedValue;
        value.air       $internalField;
    }

entries from it can be read directly from another file, e.g.

    external
    {
        value $testSlashDict2!active/value.air;
    }

    active2
    {
        $testSlashDict2!active;
    }

    which expands to

    external
    {
        value           5.6;
    }

    active2
    {
        type            fixedValue;
        value.air       5.6;
    }

These examples are provided in applications/test/dictionary.

The the default syntax can be changed from 'slash' to 'dot' in etc/controlDict
to revert to the previous behaviour:

OptimisationSwitches
{
.
.
.
    // Default dictionary scoping syntax
    inputSyntax slash;  // Change to dot for previous behaviour
}

or within a specific dictionary by adding the entry

See applications/test/dictionary/testDotDict.
2020-07-23 20:36:51 +01:00
efd50eae81 dictionary::functionEntries::calcEntry: Change code dictionary construction so variable lookup works as expected
For example

    thermo:rho.air1
    {
        explicit 3e-07;
        implicit 0;
    }

    f1.air1.bubbles
    {
        value       3.5;
        explicit    #calc "$value*$../thermo:rho.air1/explicit";
        implicit    0;
    }

now works, whereas previously an extra level of '../' was required:

        explicit    #calc "$value*$../../thermo:rho.air1/explicit";

because #calc created its own sub-dictionary.  The '$value' would have also
needed a '../' except that the 'value' entry is in the direct parent and could
be looked-up automatically by the parent search.
2020-07-18 13:24:46 +01:00
68e4678221 reactingTwoPhaseEulerFoam: Replaced by multiphaseEulerFoam
The reactingtTwoPhaseEulerFoam solver has been replaced by the more general
multiphaseEulerFoam solver which supports two-phase and multiphase systems
containing fluid and stationary phases, compressible or incompressible, with
heat and mass transfer, reactions, size distribution and all the usual phase
interaction and transfer models.

All reactingtTwoPhaseEulerFoam tutorials have been ported to multiphaseEulerFoam
to demonstrate two-phase capability with a wide range of phase and
phase-interaction models.

When running with two-phases the optional referencePhase entry in
phaseProperties can be used to specify which phase fraction should not be
solved, providing compatibility with reactingtTwoPhaseEulerFoam, see

tutorials/multiphase/multiphaseEulerFoam/RAS/fluidisedBed
tutorials/multiphase/multiphaseEulerFoam/laminar/bubbleColumn

for examples.
2020-07-17 20:18:15 +01:00
51af92baae stringOps: Updated handling of environment variable lookup 2020-07-17 18:00:39 +01:00
2de39480c5 solidSpecie: Removed redundant make files 2020-07-17 11:58:07 +01:00
5bfd3b2488 functionObjects::stopAtClockTime: New functionObject to stop the run when the specified clock time is exceeded
Description
    Stops the run when the specified clock time in second has been reached
    and optionally write results before stopping.

    The following actions are supported:
    - noWriteNow
    - writeNow
    - nextWrite (default)

    Examples of function object specification:
    \verbatim
    stop
    {
        type        stopAtClockTime;
        libs        ("libutilityFunctionObjects.so");
        stopTime    10;
        action      writeNow;
    }
    \endverbatim
    will stop the run at the next write after the file "stop" is created in the
    case directory.

Usage
    \table
        Property | Description              | Required | Default value
        type     | type name: stopAtClockTime | yes    |
        stopTime | Maximum elapsed time [s] | yes      |
        action   | Action executed          | no       | nextWrite
    \endtable
2020-07-17 11:13:46 +01:00
e1c41275ac stringOps: Added support for the dictionary "slash" variable scope syntax 2020-07-17 11:12:55 +01:00
7379f4525f functionObjects::stopAt: New abstract base class for run stop conditions
By default the case stops following the next write but stopping immediately with
or without writing are also options.

The stopAtFile functionObject derived from stopAt stops the run when a file
predefined file is created in the case directory:

Description
    Stops the run when the specified file is created in the case directory.

    The default name of the trigger file is \c $FOAM_CASE/<name> where \c
    <name> is the name of the functionObject entry and the default action is \c
    nextWrite.

    Currently the following action types are supported:
    - noWriteNow
    - writeNow
    - nextWrite

    Examples of function object specification:
    \verbatim
    stop
    {
        type stopAtFile;
        libs ("libutilityFunctionObjects.so");
    }
    \endverbatim
    will stop the run at the next write after the file "stop" is created in the
    case directory.

    \verbatim
    stop
    {
        type stopAtFile;
        libs ("libutilityFunctionObjects.so");
        file "$FOAM_CASE/stop";
        action writeNow;
    }
    \endverbatim
    will write the fields and stop the run when the file "stop" is created in
    the case directory.

Usage
    \table
        Property | Description            | Required | Default value
        type     | type name: stopAtFile  | yes      |
        file     | Trigger file path name | no       | $FOAM_CASE/<name>
        action   | Action executed        | no       | nextWrite
    \endtable
2020-07-16 17:44:51 +01:00
9fd9172913 Rationalised the named of uncoupled particle tracing solvers and functionObject
Solvers
    icoUncoupledKinematicParcelFoam -> particleFoam
    uncoupledKinematicParcelFoam -> rhoParticleFoam

functionObjects
    icoUncoupledKinematicCloud -> particles
2020-07-16 13:06:08 +01:00
9cebc18bb4 Standardised naming convention for source files containing New selector functions 2020-07-16 00:05:21 +01:00
98d4937ee3 functionObjects::abort: Added documentation 2020-07-14 12:12:24 +01:00
7412cc47e1 MomentumTransportModels::mixtureKEpsilon: Used the dispersed phase drag only for bubble generated turbulence 2020-07-10 23:49:29 +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
b507f38a8f CellZoneInjection: Correction to cell tet volume fractions
The cellZoneInjection now correctly fills all tets of a given cell with
a random distribution of particles. Previously an error in the
calculation of the cumulative tet volume fractions for a cell meant that
one tet never had any particles injected into it.
2020-07-09 15:15:14 +01:00
282fbbd78c lagrangian: Rationalised trackPart enumerations 2020-07-08 16:03:25 +01:00
8addff24f0 chemPointISAT.H: Corrected documentation 2020-07-03 15:45:31 +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
e8a2c4570b surfaceFeatures: Prevent floating point error when edge is parallel to plane 2020-07-01 14:33:41 +01:00
559e6f9ce5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-01 13:27:21 +01:00
6a76542985 fvOptions::fixedTemperatureConstraint: Added phase support 2020-07-01 13:26:48 +01:00
08603410b6 basicThermo, basicSpecieMixture: Added sensible enthalpy methods 2020-06-30 08:34:15 +01:00
6f4b667181 equationOfState: Changed "departure" to "contribution"
The term "departure function" relates to difference between real and ideal gas
thermodynamic properties but the implementation is more general than that and
handles all contributions from the equations of state to the thermodynamic
properties.  To reflect this the term "departure" has been replaced with
"contribution".
2020-06-28 18:05:45 +01:00
993bbc35de Standardised private member function section header 2020-06-24 17:08:40 +01:00
f544de4f81 setRDeltaT: Corrected typo 2020-06-24 14:40:29 +01:00
c6089ae3a6 solutionControl: Check residuals after function object execution
This change means that fields that are solved for by function objects
(e.g., a scalar transport field) can now be included in time/iteration
loop convergence tests.

Resolves bug report https://bugs.openfoam.org/view.php?id=3510
2020-06-23 10:13:34 +01:00
3b2230d6c7 ILList: Added explicit call to base constructor
Prevents a compiler warning when using the "transfer" method
2020-06-12 16:29:53 +01:00
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
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
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
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
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