Commit Graph

751 Commits

Author SHA1 Message Date
4e183e33d4 Function1::Table: simplified and rationalised
TableBase, TableFile and Table now combined into a single simpler Table class
which handle both the reading of embedded and file data using the generalised
TableReader.  The new EmbeddedTableReader handles the embedded data reading
providing the functionality of the original Table class within the same
structure that can read the data from separate files.

The input format defaults to 'embedded' unless the 'file' entry is present and
the Table class is added to the run-time selection table under the name 'table'
and 'tableFile' which provides complete backward comparability.  However it is
advisable to migrate cases to use the new 'table' entry and all tutorial cases
have been updated.
2020-11-16 23:48:47 +00:00
bfedfcde55 dynamicMesh::sixDoFMotion: Generalised replacement for tabulated6DoFMotion
using Function1 and supporting all the standard Function1s including tabulated
and coded.

tutorials/multiphase/interFoam/laminar/sloshingTank3D6DoF updated to use
sixDoFMotion.
2020-11-13 21:12:15 +00:00
e8fba9844a thermophysicalModels::reaction: New concrete base class for Reaction
to provide reaction specie coefficients without the need for a thermodynamics
model.
2020-10-29 22:21:58 +00:00
4cd71d9d0d tutorials/compressible/rhoCentralFoam/biconic25-55Run35: Removed temporary changes 2020-10-27 20:42:02 +00:00
f7848e62a1 functionObjects: Emit warning messages only for field names which do not exist for any type
Resolves bug-report https://bugs.openfoam.org/view.php?id=3583
2020-10-27 20:03:19 +00:00
095054d82e applications/solvers/combustion: Moved the inertSpecie functionality into basicSpecieMixture
and renamed defaultSpecie as its mass fraction is derived from the sum of the
mass fractions of all other species and it need not be inert but must be present
everywhere, e.g. N2 in air/fuel combustion which can be involved in the
production of NOx.

The previous name inertSpecie in thermophysicalProperties is supported for
backward compatibility.
2020-10-26 20:57:01 +00:00
5e3c5a9698 tutorials/combustion/reactingFoam: Removed redundant entries
Resolves bug report https://bugs.openfoam.org/view.php?id=3582
2020-10-25 18:14:44 +00:00
ea3e7f50bf tutorials/.../TJunction: Added OBJ-based flow rate monitoring
This tutorial now serves as an example of how to compute flow-rates
through zones defined by triangulated surfaces.

A small fix has also been added to searchableSurfaceToFaceZone to
improve robustness on ambiguous cases.
2020-10-22 11:19:13 +01:00
d89a8d3daa compressibleMultiphaseInterFoam: updated mixing of thermophysical properties
Thermodynamic properties are now mass-fraction mixed
Transport properties remain volume-fraction mixed
2020-10-01 15:24:14 +01:00
8fa6bfcded compressibleInterFoam: Updated to use the thermo:rho 2020-10-01 10:44:36 +01:00
31891a38b2 coordinateSystems: Corrected, updated and tested
It is now possible to define coordinate systems in a central location and
selected them by name for any model requiring one, e.g. the
explicitPorositySource.

Description
    Provides a centralized coordinateSystem collection.

    For example with the porous region specified in \c constant/fvOptions as

    \verbatim
    porosity
    {
        type            explicitPorositySource;

        explicitPorositySourceCoeffs
        {
            selectionMode   cellZone;
            cellZone        porousBlockage;

            type            DarcyForchheimer;

            // D 100;  // Very little blockage
            // D 200;  // Some blockage but steady flow
            // D 500;  // Slight waviness in the far wake
            D 1000; // Fully shedding behavior

            d   ($D $D $D);
            f   (0 0 0);

            coordinateSystem porousBlockage;
        }
    }
    \endverbatim

    the corresponding coordinate system \c porousBlockage is looked-up
    automatically from the \c constant/coordinateSystems dictionary:

    \verbatim
    porousBlockage
    {
        type    cartesian;
        origin  (0 0 0);
        coordinateRotation
        {
            type    axesRotation;
            e1  (1 0 0);
            e2  (0 1 0);
        }
    }
    \endverbatim

    See \c tutorials/incompressible/pisoFoam/laminar/porousBlockage
2020-09-29 15:09:58 +01:00
f1a4caa3fb tutorials/heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger: Updated for changes to solid heat-flux 2020-09-25 21:13:21 +01:00
f15d150ca8 chtMultiRegionFoam, heSolidThermo: Moved the solid heat flux model into heSolidThermo
and changed to be an energy implicit correction to a temperature gradient
based heat-flux.  This formulation is both energy conservative and temperature
consistent.

The wallHeatFlux functionObject has been updated to use a consistent heat-flux
from the heSolidThermo.
2020-09-25 16:09:18 +01:00
747cea6d0f ThermophysicalTransportModels: Added temperature gradient based heat flux models
Fourier, eddyDiffusivity and nonUnityLewisEddyDiffusivity thermophysical
transport models now apply an implicit energy correction to a temperature
gradient based heat-flux to provide computational stability and efficiency while
converging to temperature gradient based solution.  This ensures consistent heat
exchange between fluid and solid regions in CHT cases and with heat-flux
boundaries.

The Fourier and eddyDiffusivity models support single specie systems only
whereas nonUnityLewisEddyDiffusivity supports specie diffusion with independent
specification of turbulent Prandtl and Schmidt numbers, i.e. non-unity Lewis
number.

The unityLewisFourier and unityLewisEddyDiffusivity thermophysical transport
models use an implicit energy gradient based heat-flux which is optimal for
numerical stability and convergence but does not guarantee consistent heat
exchange between fluid and solid regions and heat-flux boundaries in the
presence of gradients of heat capacity.  Both of these models support specie
diffusion with the restriction that the laminar and turbulent Prandtl and
Schmidt numbers are equal, i.e. unity Lewis number.

The thermophysical transport model is specified in the optional
thermophysicalTransport dictionary; if this file is not present the
unityLewisFourier model is selected for laminar and unityLewisEddyDiffusivity
for turbulent cases for backward compatibility.

The chtMultiRegionFoam tutorial cases have been updated to use the most
appropriate of the new thermophysical transport models.
2020-09-23 16:15:38 +01:00
01205c98fb tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe: Added tutorial
This tutorial demonstrates the use of the population balance modeling
capability of multiphaseEulerFoam for the case of a vertical pipe. It
superseeds all bubbleColumnPolydisperse cases, which have been removed.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-09 13:36:26 +01:00
ca0ed722a7 tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete: Rename and corrections
Renamed the bubblePipe tutorial to Grossetete after the study on which
the case is based. Also fixed the mapped patch setup.
2020-09-09 13:36:01 +01:00
37e2922cd5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-09-03 10:30:49 +01:00
3831bc05a7 tutorials: Updated the object name turbulenceProperties -> momentumTransport 2020-09-03 10:29:48 +01:00
f94884c87a multiphaseEulerFoam/.../populationBalance: Changed sizeGroup equations to volumetric form
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:03 +01:00
281f8ba40c multiphaseEulerFoam/.../BrownianCollisions: Added slip correction
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-26 14:22:01 +01:00
36ce8b31ae multiphaseEulerFoam/.../aerosolDrag: Improvements
Expanded the documentation and updated the mean free path calculation

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-26 14:19:51 +01:00
80662fe1e3 tutorials::fluidisedBed: Removed the extremaCoeff
With the new formulation of multiphase limiters the extremaCoeff is no longer
needed for fluidised bed simulations.
2020-08-26 11:42:47 +01:00
e339ec34ee tutorials/multiphase/multiphaseEulerFoam/laminar/injection: Changed to adjustTimeStep 2020-08-18 12:33:24 +01:00
d926651d63 multiphaseEulerFoam: Added switches to revert to the previous phase limiters for testing
Optional switches "splitPhaseFlux" and "meanFluxReference" are now provided and
can be set true in fvSolution e.g.

solvers
{
    "alpha.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;

        splitPhaseFlux  true;
        meanFluxReference true;
    }
.
.
.

to reinstate the previous form of phase flux limiters in which the mean and
phase flux differences are interpolated separately and the limited correction
referenced to the mean rather than phase flux.  This form of discretisation and
limiting is more aggressive than the latest version and hence less accurate but
it is hoped that the latest form of limitSum will handle the boundedness at the
upper limit reliably allowing the new more accurate limiters to be used for most
if not all multiphase simulations.
2020-08-15 11:23:41 +01:00
d65b3ef761 Updated calls to foamDictionary in the tutorials to use the 'slash' entry scope syntax 2020-08-15 00:16:16 +01:00
51d763685e thermophysicalModels: Removed pressure field from solid thermos
Solid thermo no longer requires a pressure field, so solid regions of
chtMultiRegionFoam cases no longer need a 0/<solidRegionName>/p file.

In order for solidThermo to continue to use heThermo and the low level
thermo classes, it now constructs a uniformGeometricScalarField for the
pressure with the value NaN. This is passed into the low-level thermo
models by heThermo. The enforces the requirement that low-level thermo
models used by solidThermo should have no pressure dependence. If an
instantiation is made with pressure dependence, the code will fail with
a floating point error.
2020-08-07 12:32:20 +01:00
1eab1b7ffe tutorials/lagrangian/.../verticalChannel*: Updated particle tracks configuration
Resolves bug report https://bugs.openfoam.org/view.php?id=3528
2020-08-06 14:32:58 +01:00
ff20398245 fvOptions: Changed the source, constraint and correct functions to const
Most fvOptions change the state of the fields and equations they are applied to
but do not change internal state so it makes more sense that the interface is
const, consistent with MeshObjects.  For the few fvOptions which do maintain a
changing state the member data is now mutable.
2020-08-04 15:40:40 +01:00
87f17b66bb tutorials/Alltest: Removed no longer functional code 2020-08-04 11:27:16 +01:00
5f3c604d05 reactingParticleFoam: Support singleComponentMixtures
This is useful for testing purposes in comparison with rhoPimpleFoam.

Also made a fix to the handling of multivariate convection schemes in
chtMultiRegionFoam.
2020-07-31 11:38:59 +01:00
43d66b5e7c lagrangian: Run-time selectable clouds
The standard set of Lagrangian clouds are now selectable at run-time.
This means that a solver that supports Lagrangian modelling can now use
any type of cloud (with some restrictions). Previously, solvers were
hard-coded to use specific cloud modelling. In addition, a cloud-list
structure has been added so that solvers may select multiple clouds,
rather than just one.

The new system is controlled as follows:

- If only a single cloud is required, then the settings for the
  Lagrangian modelling should be placed in a constant/cloudProperties
  file.

- If multiple clouds are required, then a constant/clouds file should be
  created containing a list of cloud names defined by the user. Each
  named cloud then reads settings from a corresponding
  constant/<cloudName>Properties file. Clouds are evolved sequentially
  in the order in which they are listed in the constant/clouds file.

- If no clouds are required, then the constant/cloudProperties file and
  constant/clouds file should be omitted.

The constant/cloudProperties or constant/<cloudName>Properties files are
the same as previous cloud properties files; e.g.,
constant/kinematicCloudProperties or constant/reactingCloud1Properties,
except that they now also require an additional top-level "type" entry
to select which type of cloud is to be used. The available options for
this entry are:

    type    cloud;                   // A basic cloud of solid
                                     // particles. Includes forces,
                                     // patch interaction, injection,
                                     // dispersion and stochastic
                                     // collisions. Same as the cloud
                                     // previously used by
                                     // rhoParticleFoam
                                     // (uncoupledKinematicParticleFoam)

    type    collidingCloud;          // As "cloud" but with resolved
                                     // collision modelling. Same as the
                                     // cloud previously used by DPMFoam
                                     // and particleFoam
                                     // (icoUncoupledKinematicParticleFoam)

    type    MPPICCloud;              // As "cloud" but with MPPIC
                                     // collision modelling. Same as the
                                     // cloud previously used by
                                     // MPPICFoam.

    type    thermoCloud;             // As "cloud" but with
                                     // thermodynamic modelling and heat
                                     // transfer with the carrier phase.
                                     // Same as the limestone cloud
                                     // previously used by
                                     // coalChemistryFoam.

    type    reactingCloud;           // As "thermoCloud" but with phase
                                     // change and mass transfer
                                     // coupling with the carrier
                                     // phase. Same as the cloud
                                     // previously used in fireFoam.

    type    reactingMultiphaseCloud; // As "reactingCloud" but with
                                     // particles that contain multiple
                                     // phases. Same as the clouds
                                     // previously used in
                                     // reactingParcelFoam and
                                     // simpleReactingParcelFoam and the
                                     // coal cloud used in
                                     // coalChemistryFoam.

    type    sprayCloud;              // As "reactingCloud" but with
                                     // additional spray-specific
                                     // collision and breakup modelling.
                                     // Same as the cloud previously
                                     // used in sprayFoam and
                                     // engineFoam.

The first three clouds are not thermally coupled, so are available in
all Lagrangian solvers. The last four are thermally coupled and require
access to the carrier thermodynamic model, so are only available in
compressible Lagrangian solvers.

This change has reduced the number of solvers necessary to provide the
same functionality; solvers that previously differed only in their
Lagrangian modelling can now be combined. The Lagrangian solvers have
therefore been consolidated with consistent naming as follows.

    denseParticleFoam: Replaces DPMFoam and MPPICFoam

    reactingParticleFoam: Replaces sprayFoam and coalChemistryFoam

    simpleReactingParticleFoam: Replaces simpleReactingParcelFoam

    buoyantReactingParticleFoam: Replaces reactingParcelFoam

fireFoam and engineFoam remain, although fireFoam is likely to be merged
into buoyantReactingParticleFoam in the future once the additional
functionality it provides is generalised.

Some additional minor functionality has also been added to certain
solvers:

- denseParticleFoam has a "cloudForceSplit" control which can be set in
  system/fvOptions.PIMPLE. This provides three methods for handling the
  cloud momentum coupling, each of which have different trade-off-s
  regarding numerical artefacts in the velocity field. See
  denseParticleFoam.C for more information, and also bug report #3385.

- reactingParticleFoam and buoyantReactingParticleFoam now support
  moving mesh in order to permit sharing parts of their implementation
  with engineFoam.
2020-07-31 09:35:12 +01:00
bddd829fc2 chemistrySolver::EulerImplicit: Updated to use the StandardChemistryModel reaction Jacobian 2020-07-29 19:09:40 +01:00
dee1e4f4c2 plane: Removed unnecessary sub-dictionaries from caseDicts and tutorials 2020-07-24 14:11:36 +01:00
36731b2fe9 tutorials: Prevent foamDictionary output from printing during test loop
foamDictionary executions are now wrapped by runApplication like any
other execution so that they do not print during a test loop.
foamDictionary does not produce a conforming log, however, so
log.foamDictionary has been filtered out of the formation of the test
loop report so that false failures are not reported.
2020-07-24 14:11:32 +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
4ed94497d6 tutorials/multiphase/interFoam/planingHullW3: Scripting fixes for test loop 2020-07-21 14:09:26 +01:00
5e76801920 tutorials/multiphase/interFoam/planingHullW3: Corrected spelling of directory 2020-07-21 14:09:25 +01:00
b5db891c3e tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun: Removed unnecessary rm 2020-07-21 12:24:10 +01:00
49ef558adb tutorials/heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger/constant/regionProperties: Corrected version 2020-07-21 12:23:41 +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
557f73a8e4 planningHullW3/Allrun: corrected handling of -test 2020-07-17 17:59:00 +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
627a8caf5d planningHullW3/Allrun: Added dummy -test argument support 2020-07-16 00:06:18 +01:00
1d2f2aba3f flowWithOpenBoundary/Allrun: Added dummy -test argument support 2020-07-15 21:59:27 +01:00
49c9766c44 multiphaseEulerFoam: Updated name of functionObjects library 2020-07-15 20:53:05 +01:00
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