Commit Graph

1013 Commits

Author SHA1 Message Date
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
fb7edbcffc tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012: Corrected fvConstraints 2021-03-09 12:40:52 +00:00
46dbb26299 fvModels: Corrected typos 2021-03-08 12:15:11 +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
ba1e6da3b1 tutorials/incompressible/simpleFoam/drivaerFastback/Allrun: Added -test exclusion 2021-02-24 08:34:08 +00:00
2bd0fd2f49 drivaerFastback: changed mesh size options.
Allrun script includes the following options
-c | -cores <nCores>   number of cores in parallel run
-h | -help             help
-m | -mesh <S|M|L|XL>  mesh size
                       - S: small, 440k cells
                       - M: medium, 3M cells (default)
                       - L: large, 22.5M cells
                       - XL: extra large, ~200M cells
2021-02-19 15:45:25 +00:00
8922bdf6a7 drivaerFastback: additional '-help' option in Allrun script 2021-02-19 09:37:56 +00:00
ab38757902 drivaerFastback: additional '-cores' and '-meshSize' options in Allrun script 2021-02-19 09:33:12 +00:00
a72c3e6c88 tutorials::drivaerFastback: Added commented reconstruction commands 2021-02-19 08:52:58 +00:00
03f8a05e12 drivaerFastback: corrected gzip-compressed files 2021-02-18 20:48:04 +00:00
6336a30468 drivaerFastback: gzip-compressed geometry files 2021-02-18 19:46:58 +00:00
c8e35a2f67 drivaerFastback: example case of automotive aerodynamics 2021-02-18 19:43:45 +00:00
0e13649996 surfaceFeatures: Consistent plane specification for subsetting
Specifying a plane with which to subset feature edges is now done using
the same dictionary syntax used elsewhere in OpenFOAM. For example, in
system/surfaceFeaturesDict:

    subsetFeatures
    {
        // Include only edges that intersect the plane
        plane
        {
            planeType       pointAndNormal;
            point           (0 0 0);
            normal          (1 0 0);
        }

        ...
    }
2021-02-18 09:09:53 +00:00
de8042ee6a tutorials/resources/blockMesh/sloshingTank3D: Reformatting. 2021-02-17 16:23:57 +00:00
bed0454b2d tutorials/resources/blockMesh/sloshingTank2D: Reformatting. 2021-02-17 16:21:42 +00:00
306d44a04b tutorials/resources/blockMesh/titaniaSynthesis: Reformatting. 2021-02-17 16:15:31 +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
94e5094f04 mixerVessel2D blockMeshDict reformatting 2021-02-10 18:24:10 +00:00
9457a9d21a rotor2D: Removed blockMeshDict.m4 and replaced by blockMeshDict dictionary.
Vertices generated using run time compilation functionality.
2021-02-10 16:50:46 +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
a1e7357823 surfaceFilmModels: Renamed injection -> ejection
The injection models do not inject parcels into the film they specifically eject
parcels from the film and the name "injection" is very confusing and misleading
hence the logical rename injection -> ejection.
2021-02-09 11:49:39 +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
95c98625b5 tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer: Updated eMesh files 2021-02-05 13:23:40 +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
199e53fd0d dynamicMotionSolverFvMesh: Removed unsupported motion solver keywords
A dynamicMotionSolverFvMesh must now use a "motionSolver" or
"motionSolvers" entry to select the underlying motion solver. For
example, in constant/dynamicMeshDict:

    dynamicFvMesh   dynamicMotionSolverFvMesh;
    motionSolverLibs ("librigidBodyMeshMotion.so");
    motionSolver    rigidBodyMotion;
    ...

Previously the motion solver could also be specified with the keyword
"solver", but this resulted in a name clash with rigid body solvers
which are frequently specified in the same scope. For this reason, the
"solver" and "solvers" entries have been removed.
2021-01-14 08:33:57 +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
12afa0966a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-08 13:19:26 +00:00
d43375f648 tutorials: Updated air mass-fraction composition 2021-01-08 13:18:56 +00:00
bda07488f0 volumetricFlowRateTriSurface: Corrected pre-configuration, and added an example
A volumetric flow rate through a tri-surface can now be obtained using
the volumetricFlowRateTriSurface preconfigured function object, using
the following entry in system/controlDict:

    fuctions
    {
        #includeFunc "volumetricFlowRateTriSurface(name=surface.stl)"
    }

Where "surface.stl" is a tri-surface file in the constant/triSurface
directory. An example of this has been added to the
incompressible/pimpleFoam/RAS/impeller tutorial case.

Note that when possible, it is preferable to use the flowRatePatch or
flowRateFaceZone functions, as these make direct use of the flux and
therefore report a value that is exactly that computed by the solver.
volumetricFlowRateTriSurface, by contrast, does interpolation of the
velocity field which introduces error.

In addition, a minor fix has been made to the underlying
surfaceFieldValue function object so that it does not need a zone/set
name when values on a searchable surface are requested.
2021-01-08 12:03:25 +00:00
d6477085d7 coolingCylinder2D: reverted change to initial U 2021-01-06 11:08:32 +00:00
a4d1b58e82 coolingCylinder2D: Flow initialization update. 2021-01-05 13:20:52 +00:00