Commit Graph

5552 Commits

Author SHA1 Message Date
1502ad7b17 dynamicMeshDict: Updated alphaPhi0.water -> alphaPhi.water 2021-08-03 17:11:02 +01:00
84b3a3dfef scotchDecomp: Added call to SCOTCH_randomReset
// Reset the seed of the pseudo-random generator used by the graph
    // partitioning routines of the libScotch library. Two consecutive calls to
    // the same libScotch partitioning routines, and separated by a call to
    // SCOTCH randomReset, will always yield the same results, as if the
    // equivalent standalone Scotch programs were used twice, independently,
    SCOTCH_randomReset();
2021-08-03 17:10:36 +01:00
a3e21c6bce tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling: Simplified directory structure 2021-07-31 22:05:42 +01:00
8e978d6f21 regionModels::thermalBaffleModel: Moved the thermalBaffleModel base-class out of the thermalBaffleModels namespace
The OpenFOAM convention is to keep the model-base class in the parent
rather than the models namespace to simplify construction:

    Foam::regionModels::thermalBaffleModel::New

rather than

    Foam::regionModels::thermalBaffleModels::thermalBaffleModel::New
2021-07-31 07:57:06 +01:00
2529739218 twoPhaseMixture: Removed redundant code 2021-07-30 21:30:42 +01:00
4f969432ad VoFTurbulenceDamping: New fvModel to apply turbulence damping at the VoF interface
Provided for use with mixture turbulence models in interFoam and
compressibleInterFoam.

Class
    Foam::fv::VoFTurbulenceDamping

Description
    Free-surface turbulence damping function

    Adds an extra source term to the mixture or phase epsilon or omega
    equation to reduce turbulence generated near a free-surface.  The
    implementation is based on

    Reference:
    \verbatim
        Frederix, E. M. A., Mathur, A., Dovizio, D., Geurts, B. J.,
        & Komen, E. M. J. (2018).
        Reynolds-averaged modeling of turbulence damping
        near a large-scale interface in two-phase flow.
        Nuclear engineering and design, 333, 122-130.
    \endverbatim

    but with an improved formulation for the coefficient \c A appropriate for
    unstructured meshes including those with split-cell refinement patterns.
    However the dimensioned length-scale coefficient \c delta remains and must
    be set appropriatly for the case by performing test runs and comparing with
    known results.  Clearly this model is far from general and more research is
    needed in order that \c delta can be obtained directly from the interface
    flow and turbulence conditions.

Usage
    Example usage:
    \verbatim
    VoFTurbulenceDamping
    {
        type    VoFTurbulenceDamping;

        libs    ("libVoFTurbulenceDamping.so");

        // Interface turbulence damping length scale
        // This is a required input as described in section 3.3 of the paper
        delta   1e-4;

        // phase   water; // Optional phase name
    }
    \endverbatim
2021-07-30 17:25:36 +01:00
65ef2cf331 physicalProperties: Standardised incompressible and compressible solver fluid properties
to provide a single consistent code and user interface to the specification of
physical properties in both single-phase and multi-phase solvers.  This redesign
simplifies usage and reduces code duplication in run-time selectable solver
options such as 'functionObjects' and 'fvModels'.

* physicalProperties
  Single abstract base-class for all fluid and solid physical property classes.

  Physical properties for a single fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties' dictionary.

  Physical properties for a phase fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties.<phase>' dictionary.

  This replaces the previous inconsistent naming convention of
  'transportProperties' for incompressible solvers and
  'thermophysicalProperties' for compressible solvers.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the
  'physicalProperties' dictionary does not exist.

* phaseProperties
  All multi-phase solvers (VoF and Euler-Euler) now read the list of phases and
  interfacial models and coefficients from the
  'constant/<region>/phaseProperties' dictionary.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the 'phaseProperties'
  dictionary does not exist.  For incompressible VoF solvers the
  'transportProperties' is automatically upgraded to 'phaseProperties' and the
  two 'physicalProperties.<phase>' dictionary for the phase properties.

* viscosity
  Abstract base-class (interface) for all fluids.

  Having a single interface for the viscosity of all types of fluids facilitated
  a substantial simplification of the 'momentumTransport' library, avoiding the
  need for a layer of templating and providing total consistency between
  incompressible/compressible and single-phase/multi-phase laminar, RAS and LES
  momentum transport models.  This allows the generalised Newtonian viscosity
  models to be used in the same form within laminar as well as RAS and LES
  momentum transport closures in any solver.  Strain-rate dependent viscosity
  modelling is particularly useful with low-Reynolds number turbulence closures
  for non-Newtonian fluids where the effect of bulk shear near the walls on the
  viscosity is a dominant effect.  Within this framework it would also be
  possible to implement generalised Newtonian models dependent on turbulent as
  well as mean strain-rate if suitable model formulations are available.

* visosityModel
  Run-time selectable Newtonian viscosity model for incompressible fluids
  providing the 'viscosity' interface for 'momentumTransport' models.

  Currently a 'constant' Newtonian viscosity model is provided but the structure
  supports more complex functions of time, space and fields registered to the
  region database.

  Strain-rate dependent non-Newtonian viscosity models have been removed from
  this level and handled in a more general way within the 'momentumTransport'
  library, see section 'viscosity' above.

  The 'constant' viscosity model is selected in the 'physicalProperties'
  dictionary by

      viscosityModel  constant;

  which is equivalent to the previous entry in the 'transportProperties'
  dictionary

      transportModel  Newtonian;

  but backward-compatibility is provided for both the keyword and model
  type.

* thermophysicalModels
  To avoid propagating the unnecessary constructors from 'dictionary' into the
  new 'physicalProperties' abstract base-class this entire structure has been
  removed from the 'thermophysicalModels' library.  The only use for this
  constructor was in 'thermalBaffle' which now reads the 'physicalProperties'
  dictionary from the baffle region directory which is far simpler and more
  consistent and significantly reduces the amount of constructor code in the
  'thermophysicalModels' library.

* compressibleInterFoam
  The creation of the 'viscosity' interface for the 'momentumTransport' models
  allows the complex 'twoPhaseMixtureThermo' derived from 'rhoThermo' to be
  replaced with the much simpler 'compressibleTwoPhaseMixture' derived from the
  'viscosity' interface, avoiding the myriad of unused thermodynamic functions
  required by 'rhoThermo' to be defined for the mixture.

  Same for 'compressibleMultiphaseMixture' in 'compressibleMultiphaseInterFoam'.

This is a significant improvement in code and input consistency, simplifying
maintenance and further development as well as enhancing usability.

Henry G. Weller
CFD Direct Ltd.
2021-07-30 17:19:54 +01:00
4aacb80bae wmake/rules: Removed temporary -fno-tree-slp-vectorize gcc option
introduced to work-around bug in the gcc-11.1 optimiser which is fixed in
gcc-11.2

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101634
2021-07-28 11:37:02 +01:00
254b99357d tutorials: Updated for changes to topoSet 2021-07-27 17:03:53 +01:00
6a657c4338 topoSet: Rationalised the name keyword for zones and patches
For a set to zone conversion the name of the zone is now specified with the
'zone' keyword.

For a patch to set conversion the name of the patch is now specified with the
'patch' keyword.

Backward-compatibility is supported for both these changes.

Additionally the file name of a searchableSurface file is specified with the
'file' keyword.  This should be 'surface' but that keyword is currently and
confusingly used for the surface type rather than name and this cannot be
changed conveniently while maintaining backward compatibility.
2021-07-27 15:44:08 +01:00
ff36c94456 tutorials: Corrected #includeFunc usage of flow rate functions 2021-07-27 14:37:58 +01:00
15a27fee87 topoSet: the sourceInfo sub-dictionary of the topoSetDict actions is now optional
and only needed if there is a name clash between entries in the source
specification and the set specification, e.g. "name":

    {
        name    rotorCells;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name    cylinder;
        }
    }
2021-07-27 14:07:37 +01:00
6cc34206c3 patchFluxToFace: New topoSetSource to select patch faces according to the flux direction
Description
    A topoSetSource to select patch faces according to the flux direction.

Usage
    Example topoSetDict to generate faceSets for inflow and outflow faces
    on the outlet patch:
    \verbatim
    actions
    (
        {
            action  new;
            type    faceSet;
            name    inflow;
            source  patchFluxToFace;
            sourceInfo
            {
                field       phi;
                patch       outlet;
                inflow      true;
            }
        }

        {
            action  new;
            type    faceSet;
            name    outflow;
            source  patchFluxToFace;
            sourceInfo
            {
                field       phi;
                patch       outlet;
                inflow      false;
            }
        }
    );
    \endverbatim
2021-07-26 16:54:13 +01:00
976de0baf5 topoSetSources: Removed redundant code 2021-07-26 16:48:14 +01:00
47bb18c20f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-07-23 19:27:17 +01:00
8d887e0a86 Completed the replacement of setSet with topoSet
topoSet is a more flexible and extensible replacement for setSet using standard
OpenFOAM dictionary input format rather than the limited command-line input
format developed specifically for setSet.  This replacement allows for the
removal of a significant amount of code simplifying maintenance and the addition
of more topoSet sources.
2021-07-23 19:22:50 +01:00
a6c59e00b2 multiphaseEulerFoam: Renamed CoulaloglouTavlaridesCoalescence to CoulaloglouTavlarides
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-07-23 16:20:31 +01:00
8f76bfcb42 splitMeshRegions: Remove surfaceField zero hack
now that fvMeshSubset correctly maps surfaceField boundary patch values
2021-07-21 17:26:50 +01:00
37108ec2ee wmake: Added support for the new OneAPI Intel compiler
The icx and icpx Intel compilers are selected by

WM_COMPILER=Icx

These compilers are based on the Clang front-end and hence the configuration
files are based on and nearly identical to those for Clang.

Support for the new OneAPI compilers replaces the now deprecated Intel icc, icpc
compilers.
2021-07-20 16:51:09 +01:00
e2e88c3058 Function1s::Table: Added access functions
to enable tables to be constructed from the components of existing tables with
value transformations.
2021-07-19 14:16:08 +01:00
689ea4224f Updated dates 2021-07-15 15:35:22 +01:00
6b31a866d7 Corrected headers 2021-07-15 15:34:07 +01:00
b5184a9e90 doc/Guides: Updated version-9 2021-07-15 14:08:22 +01:00
d83c873f93 Resolve warning messages generated by Gcc-11 and Clang-12 2021-07-15 10:10:28 +01:00
25d274736f MeshZones: Renamed ZoneMesh to MeshZones 20210715 2021-07-14 14:10:28 +01:00
bf6734ff4e plateHole: use a file-based graphUniform function object 2021-07-14 13:46:43 +01:00
e9733e50ba functionObjects: Renamed streamLine and streamLines to streamlines 2021-07-14 10:35:02 +01:00
bf3c2e7ba9 tutorials: Removed unnecessary and unused files
Removed the combustion/reactingFoam/Lagrangian/counterFlowFlame2DLTS
case as it was originally a consistency check between reactingFoam and
reactingParcelFoam. It is not necessary now these solvers have been
combined.

Removed an unused fvModels file in the
reactingFoam/Lagrangian/simplifiedSiwek tutorial.
2021-07-14 10:35:02 +01:00
98b90398f1 tutorials: Updated for new preconfigurations 2021-07-14 10:35:02 +01:00
5d0d9a4fa3 postProcess: Improve usability of packaged function objects
Packaged function objects can now be deployed equally effectively by
(a) using a locally edited copy of the configuration file, or by
(b) passing parameters as arguments to the global configuration file.

For example, to post-process the pressure field "p" at a single location
"(1 2 3)", the user could first copy the "probes" packaged function
object file to their system directory by calling "foamGet probes". They
could then edit the file to contain the following entries:

    points ((1 2 3));
    field  p;

The function object can then be executed by the postProcess application:

    postProcess -func probes

Or it can be called at run-time, by including from within the functions
section of the system/controlDict file:

    #includeFunc probes

Alternatively, the field and points parameters could be passed as
arguments either to the postProcess application by calling:

    postProcess -func "probes(points=((1 2 3)), p)"

Or by using the #includeFunc directive:

    #includeFunc probes(points=((1 2 3)), p)

In both cases, mandatory parameters that must be either edited or
provided as arguments are denoted in the configuration files with
angle-brackets, e.g.:

    points  (<points>);

Many of the packaged function objects have been split up to make them
more specific to a particular use-case. For example, the "surfaces"
function has been split up into separate functions for each surface
type; "cutPlaneSurface", "isoSurface", and "patchSurface". This
splitting means that the packaged functions now only contain one set of
relevant parameters so, unlike previously, they now work effectively
with their parameters passed as arguments. To ensure correct usage, all
case-dependent parameters are considered mandatory.

For example, the "streamlines" packaged function object has been split
into specific versions; "streamlinesSphere", "streamlinesLine",
"streamlinesPatch" and "streamlinesPoints". The name ending denotes the
seeding method. So, the following command creates ten streamlines with
starting points randomly seeded within a sphere with a specified centre
and radius:

    postProcess -func "streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1)"

The equivalent #includeFunc approach would be:

    #includeFunc streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1)

When passing parameters as arguments, error messages report accurately
which mandatory parameters are missing and provide instructions to
correct the format of the input. For example, if "postProcess -func
graphUniform" is called, then the code prints the following error message:

    --> FOAM FATAL IO ERROR:

    Essential value for keyword 'start' not set
    Essential value for keyword 'end' not set
    Essential value for keyword 'nPoints' not set
    Essential value for keyword 'fields' not set

    In function entry:
        graphUniform

    In command:
        postProcess -func graphUniform

    The function entry should be:
        graphUniform(start = <point>, end = <point>, nPoints = <number>, fields = (<fieldNames>))

    file: controlDict/functions/graphUniform from line 15 to line 25.

As always, a full list of all packaged function objects can be obtained
by running "postProcess -list", and a description of each function can
be obtained by calling "foamInfo <functionName>". An example case has
been added at "test/postProcessing/channel" which executes almost all
packaged function objects using both postProcess and #includeFunc. This
serves both as an example of syntax and as a unit test for maintenance.
2021-07-14 10:32:49 +01:00
0b68176c60 functionObjects: fieldsExpression: Type flexibility and new operations
The fieldsExpression function has been generalised to work with a
general operator. Existing functions "add" and "subtract" have been made
to use this system, and two new operations, "multiply" and "divide",
have been added.

The functions can now handle multiple types in both input and output. A
multiply (outer product) operation on two vectors and a scalar will
result in a tensor. If the operation chain is not supported (e.g.,
division by a vector) then a warning will be generated.

In addition, a "uniform" function has been added, which will create a
uniform geometric field of a given type with specified dimensions and
calculated boundary conditions. This is mostly useful for testing
purposes and for conveniently creating simple input fields for the
operation functions described above. The function can be called by
postProcess as follows:

    postProcess -func "uniform(fieldType=volScalarField, name=length, dimensions=[m], value=2)"
2021-07-13 16:53:40 +01:00
056cc20f34 functionObjects: surfaceFieldValue, volFieldValue: Various improvements
A number of changes have been made to the surfaceFieldValue and
volFieldValue function objects to improve their usability and
performance, and to extend them so that similar duplicate functionality
elsewhere in OpenFOAM can be removed.

Weighted operations have been removed. Weighting for averages and sums
is now triggered simply by the existence of the "weightField" or
"weightFields" entry. Multiple weight fields are now supported in both
functions.

The distinction between oriented and non-oriented fields has been
removed from surfaceFieldValue. There is now just a single list of
fields which are operated on. Instead of oriented fields, an
"orientedSum" operation has been added, which should be used for
flowRate calculations and other similar operations on fluxes.

Operations minMag and maxMag have been added to both functions, to
calculate the minimum and maximum field magnitudes respectively. The min
and max operations are performed component-wise, as was the case
previously.

In volFieldValue, minMag and maxMag (and min and mag operations when
applied to scalar fields) will report the location, cell and processor
of the maximum or minimum value. There is also a "writeLocation" option
which if set will write this location information into the output file.
The fieldMinMax function has been made obsolete by this change, and has
therefore been removed.

surfaceFieldValue now operates in parallel without accumulating the
entire surface on the master processor for calculation of the operation.
Collecting the entire surface on the master processor is now only done
if the surface itself is to be written out.
2021-07-13 16:51:33 +01:00
e00316c7be foamInfo: lists models of the same family as a specified model
For example, 'foamInfo RosinRammler' includes in the output:
Model
    This appears to be the 'RosinRammler' model of the 'distributionModels' family.
    The models in the 'distributionModels' family are:
    + exponential
    + fixedValue
    + general
    + massRosinRammler
    + multiNormal
    + normal
    + RosinRammler
    + uniform
2021-07-11 13:23:24 +01:00
52ec3c0bef Function1::Constant: Corrected backward-compatibility support
Resolves bug-report https://bugs.openfoam.org/view.php?id=3693
2021-07-09 16:09:38 +01:00
cfd11c035b createBafflesDict: removed matchTolerance entries since they default to 1e-4 2021-07-08 12:14:00 +01:00
9ed9cdde08 foamNewFunctionObject: included volFields.H since it is commonly needed 2021-07-08 11:55:06 +01:00
407ad7ca9e foamNewApp: added an example createFields.H file 2021-07-08 11:53:07 +01:00
8c44964f60 timeStep function object: added description and categorised consistently 2021-07-07 12:02:24 +01:00
d190d86c82 Function1::UniformTable1/NonUniformTable1: Corrected documentation 2021-07-07 10:23:43 +01:00
6b2dfd218a scripts: Replaced 'cp -r' with the POSIX compliant 'cp -R' 2021-07-06 17:41:08 +01:00
013bc08399 Moved tutorials/IO -> test/IO
The tutorials/IO/fileHandler case is a set of simple test for fileHandler not a
tutorial
2021-07-06 14:46:15 +01:00
163eb1c0ef tutorials/combustion/buoyantReactingFoam/RAS/smallPoolFire3D/Allrun: Added reconstructPar 2021-07-06 11:34:53 +01:00
e494779c85 lagrangian: ParticleTracks: Bug fix to write 2021-07-06 08:08:30 +01:00
cce3e1b1d0 systemDict: Include region in the default directory for the -dict option
With this change both of the following commands are equivalent:

    topoSet -region air -dict topoSetDict1
    topoSet -region air -dict system/air/topoSetDict1

I.e., if the system/<regionName> path is not specified then it is
assumed.
2021-07-06 08:08:30 +01:00
500f1ee9f4 tutorials reconstructParMesh: Removed redundant -mergeTol option 2021-07-05 22:38:13 +01:00
fa23a1d5bd IOobject: Omit the 'version' entry in the 'FoamFile' header if the stream version is the currentVersion 2021-07-05 15:55:45 +01:00
abe505ffaf tutorials/compressible/rhoSimpleFoam/squareBendLiq: Added setting to test sensibleEnthalpy 2021-07-05 15:36:23 +01:00
d2d1c83f35 solvers: Added -listFvConstraints option
for example

    pisoFoam -listFvConstraints

prints

    fvConstraints
    7
    (
    fixedTemperatureConstraint
    fixedValueConstraint
    limitPressure
    limitTemperature
    limitVelocity
    meanVelocityForce
    patchMeanVelocityForce
    )
2021-07-05 15:08:29 +01:00
0389d98f10 surfaceFeatureExtract: Redirect script to surfaceFeatures
to avoid further confusion from users migrating from very old OpenFOAM versions.

The surfaceFeatureExtract utility has been superseded and replaced by by the
more general surfaceFeatures utility.

surfaceFeatures reads a surfaceFeaturesDict input file with a much
simpler, more convenient format.  Example surfaceFeaturesDict files
can be found in the tutorial and template cases, e.g. located as
follows:
find \$FOAM_TUTORIALS -name surfaceFeaturesDict
find \$FOAM_ETC -name surfaceFeaturesDict
2021-07-05 09:04:53 +01:00
78977d3259 systemDict: Added support for system as the default directory for the -dict option
With this change both

    blockMesh -dict fineBlockMeshDict
    blockMesh -dict system/fineBlockMeshDict

are supported, if the system/ path is not specified it is assumed
20210703
2021-07-02 21:05:47 +01:00