Commit Graph

847 Commits

Author SHA1 Message Date
a997ddae5f buoyantReactingFoam: Added optional hydrostatic initialisation and replaced fireFoam
The fireFoam solver has solver has been replaced by the more general
buoyantReactingFoam solver, which supports buoyant compressible reacting flow
coupled to multiple run-time-selectable lagrangian clouds and surface film
modelling and optional hydrostatic initialisation of the pressure and p_rgh.

Hydrostatic initialisation of the pressure fields is useful for large fires in
open domains where the stability of the initial flow is dominated by the initial
pressure distribution in the domain and at the boundaries.  The optional
hydrostaticInitialization switch in fvSolution/PIMPLE with
nHydrostaticCorrectors enables hydrostatic initialisation, e.g.

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors  1;
    nCorrectors       2;
    nNonOrthogonalCorrectors 0;

    hydrostaticInitialization yes;
    nHydrostaticCorrectors 5;
}

and the resulting ph_rgh field can be used with the prghTotalHydrostaticPressure
p_rgh boundary condition to apply this hydrostatic pressure distribution at the
boundaries throughout the simulation.

See the following cases for examples transferred from fireFoam:

    $FOAM_TUTORIALS/combustion/buoyantReactingFoam/RAS
2021-05-31 15:05:19 +01:00
49ce8f6507 fvModels: Added new clouds and surfaceFilm fvModels to replace specialised solvers
With the new fvModels framework it is now possible to implement complex models
and wrappers around existing complex models which can then be optionally
selected in any general solver which provides compatible fields and
thermophysical properties.  This simplifies code development and maintenance by
significantly reducing complex code duplication and also provide the opportunity
of running these models in other solvers without the need for code duplication
and alteration.

The immediate advantage of this development is the replacement of the
specialised Lagrangian solvers with their general counterparts:

reactingParticleFoam        -> reactingFoam
reactingParcelFoam          -> reactingFoam
sprayFoam                   -> reactingFoam
simpleReactingParticleFoam  -> reactingFoam
buoyantReactingParticleFoam -> buoyantReactingFoam

For example to run a reactingParticleFoam case in reactingFoam add the following
entries in constant/fvModels:

buoyancyForce
{
    type        buoyancyForce;
}

clouds
{
    type    clouds;
    libs    ("liblagrangianParcel.so");
}

which add the acceleration due to gravity needed by Lagrangian clouds and the
clouds themselves.

See the following cases for examples converted from reactingParticleFoam:

    $FOAM_TUTORIALS/combustion/reactingFoam/Lagrangian

and to run a buoyantReactingParticleFoam case in buoyantReactingFoam add the
following entry constant/fvModels:

clouds
{
    type    clouds;
    libs    ("liblagrangianParcel.so");
}

to add support for Lagrangian clouds and/or

surfaceFilm
{
    type    surfaceFilm;
    libs    ("libsurfaceFilmModels.so");
}

to add support for surface film.  The buoyancyForce fvModel is not required in
this case as the buoyantReactingFoam solver has built-in support for buoyancy
utilising the p_rgh formulation to provide better numerical handling for this
force for strongly buoyancy-driven flows.

See the following cases for examples converted from buoyantReactingParticleFoam:

    $FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian

All the tutorial cases for the redundant solvers have been updated and converted
into their new equivalents and redirection scripts replace these solvers to
provide users with prompts on which solvers have been replaced by which and
information on how to upgrade their cases.

To support this change and allow all previous Lagrangian tutorials to run as
before the special Lagrangian solver fvSolution/PIMPLE control
solvePrimaryRegion has been replaced by the more general and useful controls:

    models          : Enable the fvModels
    thermophysics   : Enable thermophysics (energy and optional composition)
    flow            : Enable flow (pressure/velocity system)

which also replace the fvSolution/PIMPLE control frozenFlow present in some
solvers.  These three controls can be used in various combinations to allow for
example only the fvModels to be evaluated, e.g. in

$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel

PIMPLE
{
    models          yes;
    thermophysics   no;
    flow            no;
    .
    .
    .

so that only the film is solved.  Or during the start-up of a case it might be
beneficial to run the pressure-velocity system for a while without updating
temperature which can be achieved by switching-off thermophysics.  Also the
behaviour of the previous frozenFlow switch can be reproduced by switching flow
off with the other two switches on, allowing for example reactions, temperature
and composition update without flow.
2021-05-31 10:45:16 +01:00
2a38355945 compressibleInterFoam: Minor improvements to the VoFClouds and VoFSurfaceFilm fvModels 2021-05-26 08:45:14 +01:00
178828a921 codedBase: Merged with CodedBase to simplify and rationalise the implementation 2021-05-19 17:59:52 +01:00
40bc30c0f7 multiphaseEulerFoam: wallBoiling: Corrections to tabulated thermo
The themo tables used in wallBoiling have had their Cp/Cv values
corrected, and have been coarsened and reduced in size to bound only the
operating point of the wallBoiling tutorials. They have also been moved
to $FOAM_TUTORIALS/resources/thermoData.

The correction to thermophysical properties has improved the stability
of these cases. As a result it has been possible to reduce the amount of
under-relaxation used in the wall modelling.
2021-05-18 13:52:16 +01:00
0510053f61 tutorials: Removed obsolete patch ordering and transform entries
Resolves bug report: http://bugs.openfoam.org/view.php?id=3672
2021-05-14 09:06:18 +01:00
d47d266246 tutorials/multiphase/compressibleInterFoam/laminar/cylinder: Reduced write frequency 2021-05-13 17:45:41 +01:00
276e4452d7 compressibleInterFoam::pEqn: Add fvModels contribution to the continuity correction after phase-fraction filtering
The phase-fraction filtering of the compressibility terms is present to avoid
spurious phase-change due to numerical noise.  The fvModels contribution may
cause physical phase-change due to cavitation, boiling, transfer from film or
VoF even where none of the phase is present and hence must be added after the
compressibility filtering.
2021-05-13 16:17:44 +01:00
707fb6d849 compressibleInterFoam: Added the Lagrangian fvModel VoFClouds
With VoFClouds and VoFSurfaceFilm compressibleInterFoam supports Lagrangian
clouds which can impinge on walls forming a film which in turn can transfer to
the VoF when the film is thick enough to resolve.  The new tutorial case

tutorials/multiphase/compressibleInterFoam/laminar/cylinder

is provided to demonstrate this functionality.

Direct transfer of droplets to the VoF phase is not yet supported but will be
added later.
2021-05-13 10:33:56 +01:00
40d3dbbd02 lagrangian: Moved composition modelling into the thermo cloud
The thermo parcel now supports thermophysical property modelling. This
particle does not store phase or specie fractions so it only provides a
single phase with a uniform composition. Additional specification is
required in the cloud subModel configuration in order to select the
specie. For example:

    compositionModel singlePhaseMixture;

    singlePhaseMixtureCoeffs
    {
        phases
        (
            solid
            {
                CaCO3   1;
            }
        );
    }
2021-05-12 14:42:23 +01:00
845d5b16e3 transformPoints: Generalised to apply a sequence of transformations
This makes usage of transformPoints the same as for
surfaceTransformPoints. Transformations are supplied as a string and are
applied in sequence.

Usage
    transformPoints "\<transformations\>" [OPTION]

    Supported transformations:
      - "translate=<translation vector>"
        Translational transformation by given vector
      - "rotate=(<n1 vector> <n2 vector>)"
        Rotational transformation from unit vector n1 to n2
      - "Rx=<angle [deg] about x-axis>"
        Rotational transformation by given angle about x-axis
      - "Ry=<angle [deg] about y-axis>"
        Rotational transformation by given angle about y-axis
      - "Rz=<angle [deg] about z-axis>"
        Rotational transformation by given angle about z-axis
      - "Ra=<axis vector> <angle [deg] about axis>"
        Rotational transformation by given angle about given axis
      - "scale=<x-y-z scaling vector>"
        Anisotropic scaling by the given vector in the x, y, z
        coordinate directions

    Example usage:
        transformPoints \
            "translate=(-0.05 -0.05 0), \
            Rz=45, \
            translate=(0.05 0.05 0)"
2021-05-11 10:06:45 +01:00
ef0dced356 compressibleInterFoam: Created run-time loadable library for VoFSurfaceFilm
Now the VoFSurfaceFilm library is optionally loaded at run-time for cases that
require surface film by adding the optional "libs" entry in controlDict:

libs            ("libVoFSurfaceFilm.so");

See tutorials/multiphase/compressibleInterFoam/laminar/plateFilm
2021-05-10 13:45:56 +01:00
6c48cd55dd tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution: Removed deprecated pMax/MinFactor entries 2021-04-28 18:59:55 +01:00
4b65112182 tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere: Updated water Prandtl number
and removed unused files.

Resolves patch request https://bugs.openfoam.org/view.php?id=3666
2021-04-27 10:35:14 +01:00
ab7d010a9a fvConstraints: Added limitPressure which replaces pressureControl.limit
To provide more flexibility, extensibility, run-time modifiability and
consistency the handling of optional pressure limits has been moved from
pressureControl (settings in system/fvSolution) to the new limitPressure
fvConstraint (settings in system/fvConstraints).

All tutorials have been updated which provides guidance when upgrading cases but
also helpful error messages are generated for cases using the old settings
providing specific details as to how the case should be updated, e.g. for the
tutorials/compressible/rhoSimpleFoam/squareBend case which has the pressure
limit specification:

SIMPLE
{
...
    pMinFactor      0.1;
    pMaxFactor      2;
...

generates the error message

--> FOAM FATAL IO ERROR:
Pressure limits should now be specified in fvConstraints:

limitp
{
    type       limitPressure;

    minFactor  0.1;
    maxFactor  2;
}

file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution/SIMPLE from line 41 to line 54.
2021-04-27 10:25:28 +01:00
f0d6051815 tutorials: Fixes to TDAC cases
Properties have been removed that are set in the standard TDAC ".cfg"
file, and ".orig" files have been used to better ensure that cleanCase
restores the original state. Sandia has also had it's TDAC parameters
slightly tweaked for stability.
2021-04-20 17:25:19 +01:00
8547ae173f chemistryReductionMethods: Change dictionaries to lists
The "initialSet" and "fuelSpecies" settings for chemistry reduction
methods now have to be formatted as lists, rather than dictionaries.
This is so that the settings in the TDAC configuration files can be
overridden in a case without the dictionaries being merged.
2021-04-20 17:14:30 +01:00
6054ea53b9 multiphaseInterFoam: Added a simple RAS tutorial 2021-04-09 16:17:37 +01:00
66387d3aa5 tutorials/incompressible/simpleFoam/pitzDaily/0/f: Corrected header
Resolves bug-report http://bugs.openfoam.org/view.php?id=3657
2021-04-08 15:13:33 +01:00
693b2d5b0c tutorials/multiphase/interFoam/laminar/damBreakWithObstacle: Removed test fvConstraints 2021-04-06 14:41:40 +01:00
8a5ee8aac1 MomentumTransportModels: Library builds of multiphase models
The MomentumTransportModels library now builds of a standard set of
phase-incompressible and phase-compressible models. This replaces most
solver-specific builds of these models.

This has been made possible by the addition of a new
"dynamicTransportModel" interface, from which all transport classes used
by the momentum transport models now derive. For the purpose of
disambiguation, the old "transportModel" has also been renamed
"kinematicTransportModel".

This change has been made in order to create a consistent definition of
phase-incompressible and phase-compressible MomentumTransportModels,
which can then be looked up by functionObjects, fvModels, and similar.

Some solvers still build specific momentum transport models, but these
are now in addition to the standard set. The solver does not build all
the models it uses.

There are also corresponding centralised builds of phase dependent
ThermophysicalTransportModels.
2021-03-30 13:27:20 +01:00
227734ddf8 transform: Standardised the Rx, Ry, Rz and Ra rotational tranformations
so that they operate in the conventional manner in a right-handed coordinate
system:

//- Rotational transformation tensor about the x-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Rx(const scalar& omega)

//- Rotational transformation tensor about the y-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Ry(const scalar& omega)

//- Rotational transformation tensor about the z-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Rz(const scalar& omega)

//- Rotational transformation tensor about axis a by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Ra(const vector& a, const scalar omega)
2021-03-30 13:11:48 +01:00
0d679d926a surfaceTransformPoints: Updated to use the new transformer class
Description
    Transform (translate, rotate, scale) a surface.

Usage
    \b surfaceTransformPoints "\<transformations\>" \<input\> \<output\>
    Supported transformations:
      - \par translate=<translation vector>
        Translational transformation by given vector
      - \par rotate=(\<n1 vector\> \<n2 vector\>)
        Rotational transformation from unit vector n1 to n2
      - \par Rx=\<angle [deg] about x-axis\>
        Rotational transformation by given angle about x-axis
      - \par Ry=\<angle [deg] about y-axis\>
        Rotational transformation by given angle about y-axis
      - \par Rz=\<angle [deg] about z-axis\>
        Rotational transformation by given angle about z-axis
      - \par Ra=\<axis vector\> \<angle [deg] about axis\>
        Rotational transformation by given angle about given axis
      - \par scale=\<x-y-z scaling vector\>
        Anisotropic scaling by the given vector in the x, y, z
        coordinate directions

    Example usage:
        surfaceTransformPoints \
            "translate=(-0.586 0 -0.156), \
            Ry=3.485, \
            translate=(0.586 0 0.156)" \
            constant/geometry/w3_orig.stl constant/geometry/w3.stl
2021-03-29 16:14:48 +01:00
45dca30c51 surfaceTransformPoints: Generalised to apply a sequence of transformations
The transformation sequence is specified like a substitution string used by

Description
    Transform (translate, rotate, scale) a surface.

    The rollPitchYaw option takes three angles (degrees):
    - roll (rotation about x) followed by
    - pitch (rotation about y) followed by
    - yaw (rotation about z)

    The yawPitchRoll does yaw followed by pitch followed by roll.

Usage
    \b surfaceTransformPoints "\<transformations\>" \<input\> \<output\>

    Example usage:
        surfaceTransformPoints \
            "translate=(-0.586 0 -0.156), \
            rollPitchYaw=(0 -3.485 0), \
            translate=(0.586 0 0.156)" \
            constant/geometry/w3_orig.stl constant/geometry/w3.stl
2021-03-28 13:36:50 +01:00
0eafc13419 surfaceFilmModels::standardPhaseChange: Corrected energy transfer to the primary region
Assuming the heat required to cause the phase change is provided by the film the
energy transferred with the mass to the primary region corresponds to vapour
at the film surface temperature.
2021-03-24 08:10:02 +00:00
76e07b0da6 surfaceFilmModels: Replaced the simplistic constant heat capacity thermodynamics with rhoThermo
The constant heat capacity hacked thermo in surfaceFilmModels and the
corresponding transfer terms in Lagrangian have been replaced by the standard
OpenFOAM rhoThermo which provides a general handling of thermo-physical
properties, in particular non-constant heat capacity.  Further rationalisation
of liquid and solid properties has also been undertaken in support of this work
to provide a completely consistent interface to sensible and absolute enthalpy.

Now for surfaceFilmModels the thermo-physical model and properties are specified
in a constant/<region>/thermophysicalProperties dictionary consistent with all
other types of continuum simulation.

This significantly rationalises, simplifies and generalises the handling of
thermo-physical properties for film simulations and is a start at doing the same
for Lagrangian.
2021-03-21 23:04:40 +00:00
da288597e2 tutorials: Replaced semiImplicitSource with more specific fvModels 2021-03-19 09:43:24 +00:00
8d707b48c6 fvModels: Added heatSource model
This model applies a heat source. It requires either the power, Q, or
the power per unit volume, q, to be specified.

Example usage:

    heatSource
    {
        type            heatSource;

        selectionMode   cellSet;
        cellSet         heater;

        Q               1e6;
    }
2021-03-19 09:43:24 +00:00
4442ce54a5 fvModels: interRegionHeatTransfer: Rationalisation
There is now just one inter-region heat transfer model, and heat
transfer coefficient models are selected as sub-models. This has been
done to permit usage of the heat transfer models in other contexts.

Example usage:

    interRegionHeatTransfer
    {
        type            interRegionHeatTransfer;

        interRegionHeatTransferCoeffs
        {
            nbrRegion       other;

            interpolationMethod cellVolumeWeight;
            master          true;

            semiImplicit    no;

            type            constant;

            AoV             200;
            htc             10;
        }
    }
2021-03-19 09:43:24 +00:00
0e4663e530 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-03-17 14:21:21 +00:00
76cfa3d136 applyBoundaryLayer: Improved the calculation of omega 2021-03-17 14:20:56 +00:00
4865cd18c5 multiphaseEulerFoam: mixerVessel2D: Made fully incompressible
This now serves as an example of a multiphaseEulerFoam case that
requires pressure referencing.
2021-03-17 08:42:03 +00:00
762fb48ddf multiphaseEulerFoam: Use pressureControl
pMin and pMax settings are now available in multiphaseEulerFoam in the
PIMPLE section of the system/fvOptions file. This is consistent with
other compressible solvers. The pMin setting in system/phaseProperties
is no longer read, and it's presence will result in a warning.
2021-03-17 08:42:03 +00:00
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
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