Commit Graph

371 Commits

Author SHA1 Message Date
96f07b0137 surfaceFilmModels: Removed dependency on the deprecated SLGThermo
SLGThermo has been moved to lagrangian, which still depends on it, pending
complete removal and replacement with a more rational interface to the carrier
phase thermodynamics.
2021-03-16 16:47:07 +00:00
b0a57397a4 plateFilm: New compressibleInterFoam tutorial to demonstrate the VoFSurfaceFilm fvModel
The film is left to drain down a vertical plate after the liquid drains out.
2021-03-10 14:24:58 +00:00
da3f4cc92e fvModels, fvConstraints: Rational separation of fvOptions between physical modelling and numerical constraints
The new fvModels is a general interface to optional physical models in the
finite volume framework, providing sources to the governing conservation
equations, thus ensuring consistency and conservation.  This structure is used
not only for simple sources and forces but also provides a general run-time
selection interface for more complex models such as radiation and film, in the
future this will be extended to Lagrangian, reaction, combustion etc.  For such
complex models the 'correct()' function is provided to update the state of these
models at the beginning of the PIMPLE loop.

fvModels are specified in the optional constant/fvModels dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The new fvConstraints is a general interface to optional numerical constraints
applied to the matrices of the governing equations after construction and/or to
the resulting field after solution.  This system allows arbitrary changes to
either the matrix or solution to ensure numerical or other constraints and hence
violates consistency with the governing equations and conservation but it often
useful to ensure numerical stability, particularly during the initial start-up
period of a run.  Complex manipulations can be achieved with fvConstraints, for
example 'meanVelocityForce' used to maintain a specified mean velocity in a
cyclic channel by manipulating the momentum matrix and the velocity solution.

fvConstraints are specified in the optional system/fvConstraints dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The separation of fvOptions into fvModels and fvConstraints provides a rational
and consistent separation between physical and numerical models which is easier
to understand and reason about, avoids the confusing issue of location of the
controlling dictionary file, improves maintainability and easier to extend to
handle current and future requirements for optional complex physical models and
numerical constraints.
2021-03-07 22:45:01 +00:00
7d22121153 tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh: Updated extrudeMesh -dict option 2021-03-05 13:46:55 +00:00
a936156f6d multiphaseEulerFoam: populationBalance: Removed population balance name suffix
A population balance suffix after the phase suffix makes determining the
phase for a given name more complex. The additional suffix is also
unnecessary as a phase can only ever belong to one population balance,
so the phase name alone uniquely idetifies the grouping.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-03-03 14:06:35 +00:00
bdf45fb915 multiphaseEulerFoam: Added correctPhi support for moving-mesh cases with cell-volume change 2021-03-01 17:12:29 +00:00
be0ee0f464 tutorials/multiphase/interFoam/RAS/planingHullW3: Removed unused scheme 2021-02-17 15:18:36 +00:00
a24e8e463a fvOptions::damping: Replaced the unused cellSetOption base-class with option
Resolves the bug-report https://bugs.openfoam.org/view.php?id=3631
2021-02-17 15:16:25 +00:00
fa21918cb5 tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D: Changed rotor U BC
to fixedValue to provide velocity distribution on the rotor for post-processing.
2021-02-15 15:13:10 +00:00
583d97d145 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2021-02-12 15:12:27 +00:00
6b29786f36 mixerVesselAMI: delete buried README file 2021-02-12 15:12:10 +00:00
6b469e278c containerDischarge2D: Tutorial with liquid discharge from the container. 2021-02-12 14:08:37 +00:00
3f64e27f46 multiphaseEulerFoam: Added phaseSurfaceArrhenius reaction
A modified Arrhenius reaction rate given by:

    k = (A * T^beta * exp(-Ta/T))*a

Where a is the phase surface area per unit volume. The name of the phase is
specified by the user.

Example usage:

    oxidationAtSurface
    {
        type        irreversiblePhaseSurfaceArrhenius;

        reaction    "O2^0 + TiCl4 = TiO2_s + 2Cl2";

        A           4.9e1; // The pre-exponential factor is in units
                           // equal to that in the usual volumetric
                           // reaction rate **divided by length**, as
                           // the Arrhenius expression is taken to give
                           // rate per unit area, not per unit volume
        beta        0.0;
        Ta          8993;

        phase       particles;
    }

This reaction has been applied to the titaniaSynthesisSurface tutorial,
which avoids the need for explicit caching of the surface area density
field.
2021-02-11 16:37:58 +00:00
dcc3f336bd mixerVessel2D: Removed blockMeshDict.m4 and replaced by mixerVessel2D dictionary.
Vertices generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/mixerVessel2D
2021-02-10 16:45:48 +00:00
7b19245b1e tutorials/.../wallBoiling: Use tabulated properties and add validation
Patch contributed by Juho Peltola, VTT.
2021-02-10 12:51:39 +00:00
4bfe7d48c9 tutorials: Prevent "unconfirmed completion" in test loop 2021-02-09 21:19:40 +00:00
aa4151d649 Function1: Added squarePulse
This function gives a value of one during a user-specified duration, and
zero at all other times. It is useful for defining the time range in
which an injection or ignition heat source or similar operates.

Example usage, scaling a value:

    <name>
    {
        type        scale;
        scale       squarePulse;
        start       0;
        duration    1;
        value       100;
    }

This function has been utilised in a number of tutorial fvOption
configurations to provide a specific window in which the fvOption is
applied. This was previously achieved by "timeStart" and "duration"
controls hard coded into the fvOptions themselves.
2021-02-09 20:02:21 +00:00
69e98dc28d fvOptions: Added massSource option
This fvOption applies a mass source to the continuity equation and to
all field equations.

Example usage:

    massSource
    {
        type            massSource;

        selectionMode   cellSet;
        cellSet         massSource;

        massFlowRate    1e-4;

        fieldValues
        {
            U               (10 0 0);
            T               350;
            k               0.375;
            epsilon         14.855;
        }
    }

Values should be provided for all solved for fields. Warnings will be
issued if values are not provided for fields for which transport equations
are solved. Warnings will also be issued if values are provided for fields
which are not solved for.
2021-02-09 20:02:14 +00:00
07f5080f2e fvOptions: Remove type restrictions and rewrite of field-name handling
A number of fvOptions that apply to a user-derined field can now
automatically work what primitive type they apply to. These options can
apply to any field type, and in some cases even multiple fields of
differing type. Example usage of the options to which this change
applies are shown below:

    codedSource1
    {
        type            codedSource;
        name            codedSource1;

        field           h;

        ...
    }

    fixedValueConstraint1
    {
        type            fixedValueConstraint;

        fieldValues
        {
            R           (1 0 0 1 0 1);
            epsilon     150;
        }

        ...
    }

    phaseLimitStabilization11
    {
        type            phaseLimitStabilization;

        field           sigma.liquid;

        ...
    }

Previously to apply to a given type, these options had to be selected
with the name of the type prepended to the option name (e.g., "type
symmTensorPhaseLimitStabilization;") and those that operated on multiple
fields were restricted to those fields being of the same type.

A number of other options have had improvements made to their handling
of user specification of fields. Where possible, the option will now
attempt to work out what field the option applies to automatically. The
following options, therefore, no longer require "field" or "fields"
entries:

    actuationDiskSource
    buoyancyEnergy
    buoyancyForce
    meanVelocityForce
    rotorDiskSource
    volumeFractionSource
    constantHeatTransfer
    function2HeatTransfer
    variableHeatTransfer

Non-standard field names can be overridden in the same way as in
boundary conditions; e.g., the velocity name can be overridden with a "U
<UName>;" entry if it does not have the default name, "U". The name of
the energy field is now always determined from the thermodynamics
model and should always be correct. Some options that can be applied to
an individual phase also support a "phase <phaseName>;" entry;

fvOptions field-name handling has been rewritten to increase its
flexibility and to improve warning messages. The flexibility now allows
for options that apply to all fields, or all fields of a given phase,
rather than being limited to a specific list of field names. Messages
warning about options that have not been applied now always print just
once per time-step.
2021-02-09 16:53:26 +00:00
81ec2012be titaniaSynthesis: Removed blockMeshDict.m4 and replaced by titaniaSynthesis dictionary. 2021-02-09 15:13:33 +00:00
c5b6e666c2 sloshingTank: Removed blockMeshDict.m4 and replaced by sloshingTank2D and sloshingTank3D dictionary.
Vertices are generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/sloshingTank2D
tutorials/resources/blockMesh/sloshingTank3D
2021-02-05 16:25:49 +00:00
35f73c1c17 angledDuct: Removed blockMeshDict.m4 and replaced by angledDuct dictionary.
Vertices are generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/angledDuct.
2021-02-05 08:53:31 +00:00
66c62e9296 searchableSurface: Renamed geometry directory triSurface -> geometry
Originally the only supported geometry specification were triangulated surfaces,
hence the name of the directory: constant/triSurface, however now that other
surface specifications are supported and provided it is much more logical that
the directory is named accordingly: constant/geometry.  All tutorial and
template cases have been updated.

Note that backward compatibility is provided such that if the constant/geometry
directory does not exist but constant/triSurface does then the geometry files
are read from there.
2021-02-04 13:51:48 +00:00
441ff53e2d multiphaseEulerFoam: Added moving-mesh support for both cell- and face-momentum algorithms
Mesh-motion with or without topology change or AMI is now supported in
multiphaseEulerFoam for both cell- and face-momentum algorithms.

The new tutorial case mixerVesselAMI2D is provided which is the AMI version of
the 4-phase MRF mixerVessel2D case.  It is setup with the cell-momentum
algorithm but also runs fine with the face-momentum algorithm although the
results are noticeably less accurate, particularly when the case is run
single-phase and compared directly with those from pimpleFoam.

Further testing is in progress.

I2D/constant/thermophysicalProperties.water
2021-02-01 11:06:25 +00:00
c2f4c6191d interFoam: Added support for phase-change with cavitation models
The phase-change functionality in interPhaseChangeFoam has been generalised and
moved into the run-time selectable twoPhaseChange library included into
interFoam providing optional phase-change.  The three cavitation models provided
in interPhaseChangeFoam are now included in the twoPhaseChange library and the
two interPhaseChangeFoam cavitation tutorials updated for interFoam.

interPhaseChangeFoam has been replaced by a user redirection script which prints
the following message:

The interPhaseChangeFoam solver has solver has been replaced by the more general
interFoam solver, which now supports phase-change using the new twoPhaseChange
models library.

To run with with phase-change create a constant/phaseChangeProperties dictionary
containing the phase-change model specification, e.g.

    phaseChangeModel SchnerrSauer;

    pSat            2300;   // Saturation pressure

See the following cases for an example converted from interPhaseChangeFoam:

    $FOAM_TUTORIALS/multiphase/interFoam/laminar/cavitatingBullet
    $FOAM_TUTORIALS/multiphase/interFoam/RAS/propeller
2021-01-24 23:35:17 +00:00
9e947d1644 topoSet: Renamed point entries for cylinder sources
End points of topoSet cylinder sources should now be specified as
"point1" and "point2", which is consistent with other parts of the code.

The previous keywords, "p1" and "p2" have been retained for backwards
compatibility but may be removed in future.
2021-01-14 08:33:57 +00:00
dabceadd13 tutorials/multiphase/interFoam/RAS/waterChannel: Removed ".*" from BCs to avoid confusion 2021-01-11 20:23:03 +00:00
a0bad5772e multiphaseEulerFoam: Removed unused granular temperature fields
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-12-22 21:06:32 +00:00
0a053fc5fe extrudeMesh: Added -dict option 2020-12-10 16:31:18 +00:00
19b3a5c385 Sub-models, fvOptions: Removed 'active' switch
It is better to not select and instantiate a model, fvOption etc. than to create
it and set it inactive as the creation process requires reading of settings,
parameters, fields etc. with all the associated specification and storage
without being used.  Also the incomplete implementation added a lot of
complexity in the low-level operation of models introducing a significant
maintenance overhead and development overhead for new models.
2020-12-01 18:50:20 +00:00
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
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
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
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
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
bddd829fc2 chemistrySolver::EulerImplicit: Updated to use the StandardChemistryModel reaction Jacobian 2020-07-29 19:09:40 +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