Commit Graph

948 Commits

Author SHA1 Message Date
456b7e31ee vtkPVFoamVolFields, semiImplicitSource: Use VolInternalField<Type> to simplify code 2022-12-07 11:55:53 +00:00
966f015082 Further code simplification: Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> -> VolField<Type> 2022-12-02 22:31:21 +00:00
2f4dd4fe27 Code simplification: GeometricField<Type, fvPatchField, volMesh> -> VolField<Type>
Using the VolField<Type> partial specialisation of
GeometricField<Type, fvPatchField, volMesh>
simplifies the code and improves readability.
2022-12-02 22:04:45 +00:00
fe368d5332 Code simplification: GeometricField<Type, fvsPatchField, surfaceMesh> -> SurfaceField<Type>
Using the SurfaceField<Type> partial specialisation of
GeometricField<Type, fvsPatchField, surfaceMesh>
simplifies the code and improves readability.
2022-12-02 19:02:15 +00:00
e84300d124 Code simplification: GeometricField<Type, pointPatchField, pointMesh> -> PointField<Type>
Using the PointField<Type> partial specialisation of GeometricField<Type,
pointPatchField, pointMesh> simplified the code and improves readability.
2022-12-02 15:24:50 +00:00
5f7993dab4 Replaced inconsistently named local typedefs with VolField, SurfaceField and PointField
making the code more consistent and readable.
2022-12-02 10:54:21 +00:00
ed7e703040 Time::timeName(): no longer needed, calls replaced by name()
The timeName() function simply returns the dimensionedScalar::name() which holds
the user-time name of the current time and now that timeName() is no longer
virtual the dimensionedScalar::name() can be called directly.  The timeName()
function implementation is maintained for backward-compatibility.
2022-11-30 15:53:51 +00:00
723f522c51 cutPoly: New polyhedral cutting routines and isoSurface algorithm
A set of routines for cutting polyhedra have been added. These can cut
polyhedral cells based on the adjacent point values and an iso-value
which defines the surface. The method operates directly on the
polyhedral cells; it does not decompose them into tetrahedra at any
point. The routines can compute the cut topology as well as integrals of
properties above and below the cut surface.

An iso-surface algorithm has been added based on these polyhedral
cutting routines. It is significantly more robust than the previous
algorithm, and produces compact surfaces equivalent to the previous
algorithm's maximum filtering level. It is also approximately 3 times
faster than the previous algorithm, and 10 times faster when run
repeatedly on the same set of cells (this is because some addressing is
cached and reused).

This algorithm is used by the 'isoSurface', 'distanceSurface' and
'cutPlane' sampled surfaces.

The 'cutPlane' sampled surface is a renaming of 'cuttingPlane' to make
it consistent with the corresponding packaged function. The name
'cuttingPlane' has been retained for backwards compatibility and can
still be used to select a 'cutPlane' surface. The legacy 'plane' surface
has been removed.

The 'average' keyword has been removed from specification of these
sampled surfaces as cell-centred values are no longer used in the
generation of or interpolation to an iso-surface. The 'filtering'
keyword has also been removed as it relates to options within the
previous algorithm. Zone support has been reinstated into the
'isoSurface' sampled surface. Interpolation to all these sampled
surfaces has been corrected to exactly match the user-selected
interpolation scheme, and the interpolation procedure no longer
unnecessarily re-generates data that is already available.
2022-11-23 16:56:23 +00:00
052a4803f0 regionModels: Refactored to remove the now redundant regionModel base class 2022-11-23 14:23:12 +00:00
4cc5f8e964 decomposePar: Fix distribution of uniform data in collated cases 2022-11-11 11:10:46 +00:00
095f4b03f1 checkMesh: Added writing of NCC coverage
If checkMesh is executed with the -allGeometry option, then surface
files containing the NCC coverage will now be written out. Coverage is
the ratio between coupled area magnitude and total area magnitude. This
is useful for locating parts of the boundary mesh that are in error.
Errors (such as folds and pinches) typically manifest as a coverage
value that deviates significantly from a value of one.

This is comparable to the writing of AMI patches's weight sums, which
also used to occur when the -allGeometry option was selected.
2022-11-01 10:42:13 +00:00
6b2748887a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-27 11:59:39 +01:00
5fd17d3292 setFields: Added time options -constant, -latestTime, -noZero, -time
in particular to support setting constant property fields in the constant
directory.

Usage: setFields [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -latestTime       select the latest time
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <time>      specify a single time value to select
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage
2022-10-27 11:57:41 +01:00
704b65f8de triangle, tetrahedron: Consolidate circumCircle/Sphere functions 2022-10-27 08:52:14 +01:00
a7155a7e0a decomposePar, reconstructPar: Catch decomposition of overridden cyclics
Patch fields on cyclic patches which have overridden the cyclic
constraint using a "patchType cyclic;" setting cannot be decomposed.
OpenFOAM does not have processor variants of jumpCyclic,
porousBafflePressure, etc... Using these conditions in a decomposed case
requires the cyclic to be constrained to a single processor.

This change catches this problem in decomposePar and reconstructPar and
raises a fatal error, rather than continuing and silently converting
these overridden boundary conditions to a standard processorCyclic patch
field.

Resolves bug report https://bugs.openfoam.org/view.php?id=3916
2022-10-21 09:17:14 +01:00
cd7405e30a extrudeToRegionMesh: Fixed issues associated with extruding from baffles 2022-10-18 16:13:35 +01:00
03b0619ee1 lagrangian: Support meshToMesh mapping
Lagrangian is now compatible with the meshToMesh topology changer. If a
cloud is being simulated and this topology changer is active, then the
cloud data will be automatically mapped between the specified sequence
of meshes in the same way as the finite volume data. This works both for
serial and parallel simulations.

In addition, mapFieldsPar now also supports mapping of Lagrangian data
when run in parallel.
2022-10-18 12:06:54 +01:00
5b11f5a833 functionObjects: Standardised file paths for functions applied to regions
Function objects now write to the following path when applied to a
non-default region of a multi-region case:

    postProcessing/<regionName>/<functionName>/<time>/

Previously the order of <regionName> and <functionName> was not
consistent between the various function objects.

Resolves bug report https://bugs.openfoam.org/view.php?id=3907
2022-10-13 11:28:26 +01:00
475e7494be chemkinToFoam: Added -precision option
to allow the write precision to be increased if necessary, the default is 10.
2022-10-08 20:20:33 +01:00
f4ac5f8748 AMIInterpolation, cyclicAMI: Removed
AMIInterpolation and cyclicAMI have been superseded by patchToPatch and
nonConformalCoupled, respectively.

The motivation behind this change is explained in the following article:

    https://cfd.direct/openfoam/free-software/non-conformal-coupling/

Information about how to convert a case which uses cyclicAMI to
nonConformalCoupled can be found here:

    https://cfd.direct/openfoam/free-software/using-non-conformal-coupling/
2022-09-22 10:05:41 +01:00
4c223b8aee particle: Removed polyMesh reference
This reference represents unnecessary storage. The mesh can be obtained
from tracking data or passed to the particle evolution functions by
argument.

In addition, removing the mesh reference makes it possible to construct
as particle from an Istream without the need for an iNew class. This
simplifies stream-based transfer, and makes it possible for particles to
be communicated by a polyDistributionMap.
2022-09-21 16:31:40 +01:00
50aac13df5 typeGlobal, typeGlobalFile: Changed to trait structure
This allows for partial specialisation, so the different variants of the
global IO containers do not need the function to be overloaded for each
contained type. This also fixes an ommission in providing overloads of
these functions for some of the global IO containers.

Resolves bug report https://bugs.openfoam.org/view.php?id=3890
2022-09-20 16:39:05 +01:00
fef0206bdb IOList, GlobalIOList, CompactIOList: Templated on container type
This reduces duplication and inconsistency between the List, Field, Map,
and PtrList variants. It also allows for future extension to other
container types such as DynamicList.
2022-09-16 09:16:58 +01:00
70ae051511 surfaceMeshConvertTesting: Removed
This is a leftover piece of unnecessary test code. Use surfaceConvert
for triangulated surfaces or surfaceMeshConvert for polygonal surfaces.
2022-09-16 08:24:04 +01:00
f5cf1d8020 foamDictionary: Added -case option to investigate usefulness and if there are problems 2022-09-15 19:21:08 +01:00
e8ac5f424e mergePoints: Removed unused point merging code 2022-09-14 08:21:08 +01:00
8d229041dd mappedPatchBase: Separated into mapped and mappedInternal
The mappedPatchBase has been separated into a type which maps from
another patch (still called mappedPatchBase) and one that maps from
internal cell values (mappedInternalPatchBase). This prevents the user
needing to specify settings for mapping procedures that are not being
used, and potentially don't even make sense given the context in which
they are being applied. It also removes a lot of fragile logic and error
states in the mapping engine and its derivatives regarding the mode of
operation. Mapping from any face in the boundary is no longer supported.

Most region-coupling mapping patches are generated automatically by
utilities like splitMeshRegions and extrudeToRegionMesh. Cases which
create region-coupling mapped patches in this way will likely require no
modification.

Explicitly user-specified mapping will need modifying, however. For
example, where an inlet boundary is mapped to a downstream position in
order to evolve a developed profile. Or if a multi-region simulation is
constructed manually, without using one of the region-generating
utilities.

The available mapped patch types are now as follows:

  - mapped: Maps values from one patch to another. Typically used for
    inlets and outlets; to map values from an outlet patch to an inlet
    patch in order to evolve a developed inlet profile, or to permit
    flow between regions. Example specification in blockMesh:

        inlet
        {
            type    mapped;
            neighbourRegion region0;  // Optional. Defaults to the same
                                      // region as the patch.
            neighbourPatch outlet;
            faces   ( ... );
        }

    Note that any transformation between the patches is now determined
    automatically. Alternatively, it can be explicitly specified using
    the same syntax as for cyclic patches. The "offset" and "distance"
    keywords are no longer used.

  - mappedWall: As mapped, but treated as a wall for the purposes of
    modelling (wall distance). No transformation. Typically used for
    thermally coupling different regions. Usually created automatically
    by meshing utilities. Example:

        fluid_to_solid
        {
            type    mappedWall;
            neighbourRegion solid;
            neighbourPatch solid_to_fluid;
            method  intersection;     // The patchToPatch method. See
                                      // below.
            faces   ( ... );
        }

  - mappedExtrudedWall: As mapped wall, but with corrections to account
    for the thickness of an extruded mesh. Used for region coupling
    involving film and thermal baffle models. Almost always generated
    automatically by extrudeToRegionMesh (so no example given).

  - mappedInternal: Map values from internal cells to a patch. Typically
    used for inlets; to map values from internal cells to the inlet in
    order to evolve a developed inlet profile. Example:

        inlet
        {
            type    mappedInternal;
            distance 0.05;            // Normal distance from the patch
                                      // from which to map cell values
            //offset  (0.05 0 0);     // Offset from the patch from
                                      // which to map cell values
            faces   ( ... );
        }

    Note that an "offsetMode" entry is no longer necessary. The mode
    will be inferred from the presence of the distance or offset
    entries. If both are provided, then offsetMode will also be required
    to choose which setting applies.

The mapped, mappedWall and mappedExtrudedWall patches now permit
specification of a "method". This selects a patchToPatch object and
therefore determines how values are transferred or interpolated between
the patches. Valid options are:

  - nearest: Copy the value from the nearest face in the neighbouring
    patch.

  - matching: As nearest, but with checking to make sure that the
    mapping is one-to-one. This is appropriate for patches that are
    identically meshed.

  - inverseDistance: Inverse distance weighting from a small stencil of
    nearby faces in the neighbouring patch.

  - intersection: Weighting based on the overlapping areas with faces in
    the neighbouring patch. Equivalent to the previous AMI-based mapping
    mode.

If a method is not specfied, then the pre-existing approach will apply.
This should be equivalent to the "nearest" method (though in most such
cases, "matching" is probably more appropriate). This fallback may be
removed in the future once the patchToPatch methods have been proven
robust.

The important mapped boundary conditions are now as follows:

  - mappedValue: Maps values from one patch to another, and optionally
    modify the mapped values to recover a specified average. Example:

        inlet
        {
            type    mappedValue;
            field   U;                // Optional. Defaults to the same
                                      // as this field.
            average (10 0 0);         // The presence of this entry now
                                      // enables setting of the average,
                                      // so "setAverage" is not needed
            value   uniform 0.1;
        }

  - mappedInternalValue: Map values from cells to a patch, and
    optionally specify the average as in mappedValue. Example:

        inlet
        {
            type    mappedValue;
            field   k;                // Optional. Defaults to the same
                                      // as this field.
            interpolationScheme cell;
            value   uniform 0.1;
        }

  - mappedFlowRateVelocity: Maps the flow rate from one patch to
    another, and use this to set a patch-normal velocity. Example:

        inlet
        {
            type    mappedFlowRate;
            value   uniform (0 0 0);
        }

Of these, mappedValue and mappedInternalValue can override the
underlying mapped patch's settings by additionally specifying mapping
information (i.e., the neighbourPatch, offset, etc... settings usually
supplied for the patch). This also means these boundary condtions can be
applied to non-mapped patches. This functionality used to be provided
with a separate "mappedField" boundary condition, which has been removed
as it is no longer necessary.

Other mapped boundary conditions are either extremely niche (e.g.,
mappedVelocityFlux), are always automatically generated (e.g.,
mappedValueAndPatchInternalValue), or their usage has not changed (e.g.,
compressible::turbulentTemperatureCoupledBaffleMixed and
compressible::turbulentTemperatureRadCoupledMixed). Use foamInfo to
obtain further details about these conditions.
2022-09-09 10:03:58 +01:00
8d0088243b mappedPatches, extrudeMesh: Rationalised directory structures 2022-09-02 08:25:34 +01:00
b07feb9858 extrudeToRegionMesh: Added option to extrude patches
This greatly simplifies most setups in which it is a patch (or patches)
of the original mesh which are extruded. It prevents the need for a
topoSet configuration to convert the patch into a zone or set.
2022-08-30 11:20:12 +01:00
94cf816b9d extrudeToRegionMesh: Detect and report invalidly extruded edges 2022-08-26 16:57:59 +01:00
8c13ec4a8a polyPatch: Removed unnecessary constructors and clone functions
Poly patches should not hold non-uniform physical data that needs
mapping on mesh changes (decomposition, reconstruction, topology change,
etc ...). They should only hold uniform data that can be user-specified,
or non-uniform data that can be constructed on the fly from the poly
mesh.

With the recent changes to mappedPatchBase and extrudeToRegionMesh, this
has now been consistenly enforced, and a number of incomplete
implementations of poly patch mapping have therefore been removed.
2022-08-26 14:43:32 +01:00
381e0921f8 extrudeToRegionMesh: Rationalisation
An extruded region is now contiguous even when specified with multiple
face zones. Edges that border faces in different zones now extrude into
internal faces, rather than a pair of boundary faces. Different zones
now result only in different mapped patches in the extruded and primary
meshes. This means a mesh can be created for a single contiguous
extruded region spanning multiple patches. This might be necessary if,
for example, a film region is needed across multiple walls with
differing thermal boundary conditions.

Disconnected extruded regions can still be constructed by running the
extrudeToRegionMesh utility muiliple times.

The mapped patches created to couple the extruded regions now have
symmetric names similar to those created by splitMeshRegions. For
example, if the mapped patch in the primary region is called
"region0_to_extrudedRegion_f0", then the corresponding patch in the
extruded region is called "extrudedRegion_to_region0_f0" (f0, in this
example is the face zone from which the region was extruded).

Offsetting of the top patch is now handled automatically by a new
mappedExtrudedWallPolyPatch. This refers to the bottom patch and
automatically calculates the sampling offsets by doing a wave across the
extruded mesh layers. This prevents the need to store the offsets in the
patch itself, and makes it possible for the patch to undergo mesh
changes without adding additional functions to the polyPatch (mapping
constructors, autoMap and rmap methods, etc ...).
2022-08-26 14:42:01 +01:00
ceac941f4c createNonConformalCouples: Support patchType overrides
Field settings can now be specified within
createNonConformalCouplesDict. This allows for patchType overrides; for
example to create a jump condition over the coupling.

An alternate syntax has been added to facilitate this. If patch fields
do not need overriding then the old syntax can be used where patches
that are to be coupled are specified as a pair of names; e.g.:

    fields      yes;

    nonConformalCouples
    {
        fan
        {
            patches         (fan0 fan1);
            transform       none;
        }
    }

If patch fields do need overriding, then instead of the "patches" entry,
separate "owner" and "neighbour" sub-dictionaries should be used. These
can both contain a "patchFields" section detailing the boundary
conditions that apply to the newly created patches:

    fields      yes;

    nonConformalCouples
    {
        fan
        {
            owner
            {
                patch       fan0;

                patchFields
                {
                    p
                    {
                        type        fanPressureJump;
                        patchType   nonConformalCyclic;
                        jump        uniform 0;
                        value       uniform 0;
                        jumpTable   polynomial 1((100 0));
                    }
                }
            }

            neighbour
            {
                patch       fan1;

                patchFields
                {
                    $../../owner/patchFields;
                }
            }

            transform       none;
        }
    }

In this example, only the pressure boundary condition is overridden on
the newly created non-conformal cyclic. All other fields will have the
basic constraint type (i.e., nonConformalCyclic) applied.
2022-08-10 16:26:18 +01:00
b1d6e64d02 createNonConformalCouples: Put non-conformal couple settings in a sub dictionary
Settings for the individual non-conformal couples can now be put in a
"nonConformalCouples" sub-dictionary of the
system/createNonConformalCouplesDict. For example:

    fields  no;

    nonConformalCouples // <-- new sub-dictionary
    {
        nonConformalCouple_none
        {
            patches         (nonCouple1 nonCouple2);
            transform       none;
        }

        nonConformalCouple_30deg
        {
            patches         (nonCoupleBehind nonCoupleAhead);
            transform       rotational;
            rotationAxis    (-1 0 0);
            rotationCentre  (0 0 0);
            rotationAngle   30;
        }
    }

This permits settings to be #include-d from files that themselves
contain sub-dictionaries without the utility treating those
sub-dictionaries as if they specify a non-conformal coupling. It also
makes the syntax more comparable to that of createBafflesDict.

The new "nonConformalCouples" sub-dictionary is optional, so this change
is backwards compatible. The new syntax is recommended, however, and all
examples have been changed accordingly.
2022-08-10 16:25:54 +01:00
65b7979147 foanToVTK: Compatibility with NCC
foamToVTK now supports cases with non-conformal patches. These are
excluded from the final output because their faces do not correspond to
anything in the conformal polyMesh.

In addition, patches are now excluded due to type or selection
consistently, regardless of the presence of the -allPatches option.
2022-08-10 11:28:05 +01:00
80d869974e foamToC: Only print the table base-type if it differs from the table name 2022-08-08 18:38:34 +01:00
49af47bbf2 foamToC: Added printing of the libraries for table entries for specific options
-functionObjects  List functionObjects
  -fvConstraints    List fvConstraints
  -fvModels         List fvModels
  -scalarBCs        List scalar field boundary conditions (fvPatchField<scalar>)
  -vectorBCs        List vector field boundary conditions (fvPatchField<vector>)

e.g.

    foamToC -fvModels -allLibs

now prints:

fvModels:
Contents of table fvModel, base type fvModel:
    VoFClouds                               libVoFClouds.so
    VoFSurfaceFilm                          libVoFSurfaceFilm.so
    VoFTurbulenceDamping                    libVoFTurbulenceDamping.so
    accelerationSource                      libfvModels.so
    actuationDiskSource                     libfvModels.so
    buoyancyEnergy                          libfvModels.so
    buoyancyForce                           libfvModels.so
    clouds                                  liblagrangianParcel.so
    coded                                   libfvModels.so
    compressible::VoFTurbulenceDamping      libcompressibleVoFTurbulenceDamping.so
    effectivenessHeatExchangerSource        libfvModels.so
    explicitPorositySource                  libfvModels.so
    heatSource                              libfvModels.so
    heatTransfer                            libfvModels.so
    interRegionExplicitPorositySource       libfvModels.so
    interRegionHeatTransfer                 libfvModels.so
    interfaceTurbulenceDamping              libmultiphaseEulerFoamFvModels.so
    isotropicDamping                        libfvModels.so
    massSource                              libfvModels.so
    phaseLimitStabilisation                 libfvModels.so
    phaseTurbulenceStabilisation            libmultiphaseEulerFoamFvModels.so
    radialActuationDiskSource               libfvModels.so
    radiation                               libradiationModels.so
    rotorDisk                               libfvModels.so
    semiImplicitSource                      libfvModels.so
    sixDoFAccelerationSource                libfvModels.so
    solidEquilibriumEnergySource            libfvModels.so
    solidificationMeltingSource             libfvModels.so
    surfaceFilm                             libsurfaceFilmModels.so
    verticalDamping                         libfvModels.so
    volumeFractionSource                    libfvModels.so
2022-08-08 18:04:56 +01:00
beb9e22d3c Libraries: Resolved various library dependency issues to ensure foamToC can load ALL libraries
without error or warning and hence populate ALL the run-time selection tables of
contents.
2022-08-08 13:34:34 +01:00
73ad954f78 pimpleNoLoopControl: added moveMeshOuterCorrectors 2022-08-07 14:54:00 +01:00
4b2c27b709 foamPostProcess: Added -lgenericPatchFields 2022-08-05 15:17:57 +01:00
f978ff34ef foamToC: New run-time selection table of contents printing and interrogation utility
The new solver modules cannot provide the equivalent functionality of the -list
options available in the solver applications so foamToC has been developed as a
better, more general and flexible alternative, providing a means to print any or
all run-time selection tables in any or all libraries and search the tables for
any particular entries and print which library files the corresponding tables
are in, e.g.

foamToC -solver fluid -table fvPatchScalarField

Contents of table fvPatchScalarField, base type fvPatchField:
    advective                               libfiniteVolume.so
    calculated                              libfiniteVolume.so
    codedFixedValue                         libfiniteVolume.so
    codedMixed                              libfiniteVolume.so
    compressible::alphatJayatillekeWallFunctionlibthermophysicalTransportModels.so
    compressible::alphatWallFunction        libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<eConstSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<ePowerSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::turbulentTemperatureCoupledBaffleMixedlibthermophysicalTransportModels.so
    compressible::turbulentTemperatureRadCoupledMixedlibthermophysicalTransportModels.so
    .
    .
    .

foamToC -solver fluid -search compressible::alphatWallFunction
compressible::alphatWallFunction is in tables
    fvPatchField
        fvPatchScalarField                      libthermophysicalTransportModels.so

and the very useful -allLibs option allows ALL libraries to be searched to find
in which table and which library file a particular model in in for example:

foamToC -allLibs -search phaseTurbulenceStabilisation
Loading libraries:
    libtwoPhaseSurfaceTension.so
    libcv2DMesh.so
    libODE.so
    .
    .
    .
phaseTurbulenceStabilisation is in tables
    fvModel                                 libmultiphaseEulerFoamFvModels.so

Application
    foamToC

Description
    Run-time selection table of contents printing and interrogation.

    The run-time selection tables are populated by the optionally specified
    solver class and any additional libraries listed in the \c -libs option or
    all libraries using the \c -allLibs option.  Once populated the tables can
    be searched and printed by a range of options listed below.  Table entries
    are printed with the corresponding library they are in to aid selection
    and the addition of \c libs entries to ensure availability to the solver.

Usage
    \b foamToC [OPTION]
      - \par -solver \<name\>
        Specify the solver class

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries to load

      - \par -allLibs
        Load all libraries

      - \par switches,
        List all available debug, info and optimisation switches

      - \par all,
        List the contents of all the run-time selection tables

      - \par tables
        List the run-time selection table names (this is the default action)

      - \par table \<name\>
        List the contents of the specified table or the list sub-tables

      - \par search \<name\>
        Search for and list the tables containing the given entry

      - \par scalarBCs,
        List scalar field boundary conditions (fvPatchField<scalar>)

      - \par vectorBCs,
        List vector field boundary conditions (fvPatchField<vector>)

      - \par functionObjects,
        List functionObjects

      - \par fvModels,
        List fvModels

      - \par fvConstraints,
        List fvConstraints

    Example usage:
      - Print the list of scalar boundary conditions (fvPatchField<scalar>)
        provided by the \c fluid solver without additional libraries:
        \verbatim
            foamToC -solver fluid -scalarBCs
        \endverbatim

      - Print the list of RAS momentum transport models provided by the
        \c fluid solver:
        \verbatim
            foamToC -solver fluid -table RAScompressibleMomentumTransportModel
        \endverbatim

      - Print the list of functionObjects provided by the
        \c multicomponentFluid solver with the libfieldFunctionObjects.so
        library:
        \verbatim
            foamToC -solver multicomponentFluid \
                -libs '("libfieldFunctionObjects.so")' -functionObjects
        \endverbatim

      - Print a complete list of all run-time selection tables:
        \verbatim
            foamToC -allLibs -tables
            or
            foamToC -allLibs
        \endverbatim

      - Print a complete list of all entries in all run-time selection tables:
        \verbatim
            foamToC -allLibs -all
        \endverbatim
2022-08-04 21:48:59 +01:00
4001d2ef7f foamPostProcess: General replacement for postProcess supporting the new solver modules
Application
    foamPostProcess

Description
    Execute the set of functionObjects specified in the selected dictionary
    (which defaults to system/controlDict) or on the command-line for the
    selected set of times on the selected set of fields.

    The functionObjects are either executed directly or for the solver
    optionally specified as a command-line argument.

Usage
    \b foamPostProcess [OPTION]
      - \par -dict <file>
        Read control dictionary from specified location

      - \par -solver <name>
        Solver name

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries loaded

      -\par -region <name>
        Specify the region

      - \par -func <name>
        Specify the name of the functionObject to execute, e.g. Q

      - \par -funcs <list>
        Specify the names of the functionObjects to execute, e.g. '(Q div(U))'

      - \par -field <name>
        Specify the name of the field to be processed, e.g. U

      - \par -fields <list>
        Specify a list of fields to be processed,
        e.g. '(U T p)' - regular expressions not currently supported

      - \par -time <ranges>
        comma-separated time ranges - eg, ':10,20,40:70,1000:'

      - \par -latestTime
        Select the latest time

      - \par -list
        List the available configured functionObjects

    Example usage:
      - Print the list of available configured functionObjects:
        \verbatim
            foamPostProcess -list
        \endverbatim

      - Execute the functionObjects specified in the controlDict of the
        fluid region for all the available times:
        \verbatim
            foamPostProcess -region fluid
        \endverbatim

      - Execute the functionObjects specified in the controlDict
        for the 'fluid' solver in the 'cooling' region for the latest time only:
        \verbatim
            foamPostProcess -solver fluid -region cooling -latestTime
        \endverbatim

A postProcess redirection script is provided for backward-compatibility.
2022-08-04 21:46:28 +01:00
968e60148a New modular solver framework for single- and multi-region simulations
in which different solver modules can be selected in each region to for complex
conjugate heat-transfer and other combined physics problems such as FSI
(fluid-structure interaction).

For single-region simulations the solver module is selected, instantiated and
executed in the PIMPLE loop in the new foamRun application.

For multi-region simulations the set of solver modules, one for each region, are
selected, instantiated and executed in the multi-region PIMPLE loop of new the
foamMultiRun application.

This provides a very general, flexible and extensible framework for complex
coupled problems by creating more solver modules, either by converting existing
solver applications or creating new ones.

The current set of solver modules provided are:

isothermalFluid
    Solver module for steady or transient turbulent flow of compressible
    isothermal fluids with optional mesh motion and mesh topology changes.

    Created from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam solvers but
    without the energy equation, hence isothermal.  The buoyant pressure
    formulation corresponding to the buoyantFoam solver is selected
    automatically by the presence of the p_rgh pressure field in the start-time
    directory.

fluid
    Solver module for steady or transient turbulent flow of compressible fluids
    with heat-transfer for HVAC and similar applications, with optional
    mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of the
    energy equation from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam
    solvers, thus providing the equivalent functionality of these three solvers.

multicomponentFluid
    Solver module for steady or transient turbulent flow of compressible
    reacting fluids with optional mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of
    multicomponent thermophysical properties energy and specie mass-fraction
    equations from the reactingFoam solver, thus providing the equivalent
    functionality in reactingFoam and buoyantReactingFoam.  Chemical reactions
    and/or combustion modelling may be optionally selected to simulate reacting
    systems including fires, explosions etc.

solid
    Solver module for turbulent flow of compressible fluids for conjugate heat
    transfer, HVAC and similar applications, with optional mesh motion and mesh
    topology changes.

    The solid solver module may be selected in solid regions of a CHT case, with
    either the fluid or multicomponentFluid solver module in the fluid regions
    and executed with foamMultiRun to provide functionality equivalent
    chtMultiRegionFoam but in a flexible and extensible framework for future
    extension to more complex coupled problems.

All the usual fvModels, fvConstraints, functionObjects etc. are available with
these solver modules to support simulations including body-forces, local sources,
Lagrangian clouds, liquid films etc. etc.

Converting compressibleInterFoam and multiphaseEulerFoam into solver modules
would provide a significant enhancement to the CHT capability and incompressible
solvers like pimpleFoam run in conjunction with solidDisplacementFoam in
foamMultiRun would be useful for a range of FSI problems.  Many other
combinations of existing solvers converted into solver modules could prove
useful for a very wide range of complex combined physics simulations.

All tutorials from the rhoSimpleFoam, rhoPimpleFoam, buoyantFoam, reactingFoam,
buoyantReactingFoam and chtMultiRegionFoam solver applications replaced by
solver modules have been updated and moved into the tutorials/modules directory:

modules
├── CHT
│   ├── coolingCylinder2D
│   ├── coolingSphere
│   ├── heatedDuct
│   ├── heatExchanger
│   ├── reverseBurner
│   └── shellAndTubeHeatExchanger
├── fluid
│   ├── aerofoilNACA0012
│   ├── aerofoilNACA0012Steady
│   ├── angledDuct
│   ├── angledDuctExplicitFixedCoeff
│   ├── angledDuctLTS
│   ├── annularThermalMixer
│   ├── BernardCells
│   ├── blockedChannel
│   ├── buoyantCavity
│   ├── cavity
│   ├── circuitBoardCooling
│   ├── decompressionTank
│   ├── externalCoupledCavity
│   ├── forwardStep
│   ├── helmholtzResonance
│   ├── hotRadiationRoom
│   ├── hotRadiationRoomFvDOM
│   ├── hotRoom
│   ├── hotRoomBoussinesq
│   ├── hotRoomBoussinesqSteady
│   ├── hotRoomComfort
│   ├── iglooWithFridges
│   ├── mixerVessel2DMRF
│   ├── nacaAirfoil
│   ├── pitzDaily
│   ├── prism
│   ├── shockTube
│   ├── squareBend
│   ├── squareBendLiq
│   └── squareBendLiqSteady
└── multicomponentFluid
    ├── aachenBomb
    ├── counterFlowFlame2D
    ├── counterFlowFlame2D_GRI
    ├── counterFlowFlame2D_GRI_TDAC
    ├── counterFlowFlame2DLTS
    ├── counterFlowFlame2DLTS_GRI_TDAC
    ├── cylinder
    ├── DLR_A_LTS
    ├── filter
    ├── hotBoxes
    ├── membrane
    ├── parcelInBox
    ├── rivuletPanel
    ├── SandiaD_LTS
    ├── simplifiedSiwek
    ├── smallPoolFire2D
    ├── smallPoolFire3D
    ├── splashPanel
    ├── verticalChannel
    ├── verticalChannelLTS
    └── verticalChannelSteady

Also redirection scripts are provided for the replaced solvers which call
foamRun -solver <solver module name> or foamMultiRun in the case of
chtMultiRegionFoam for backward-compatibility.

Documentation for foamRun and foamMultiRun:

Application
    foamRun

Description
    Loads and executes an OpenFOAM solver module either specified by the
    optional \c solver entry in the \c controlDict or as a command-line
    argument.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamRun [OPTION]

      - \par -solver <name>
        Solver name

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries loaded

    Example usage:
      - To run a \c rhoPimpleFoam case by specifying the solver on the
        command line:
        \verbatim
            foamRun -solver fluid
        \endverbatim

      - To update and run a \c rhoPimpleFoam case add the following entries to
        the controlDict:
        \verbatim
            application     foamRun;

            solver          fluid;
        \endverbatim
        then execute \c foamRun

Application
    foamMultiRun

Description
    Loads and executes an OpenFOAM solver modules for each region of a
    multiregion simulation e.g. for conjugate heat transfer.

    The region solvers are specified in the \c regionSolvers dictionary entry in
    \c controlDict, containing a list of pairs of region and solver names,
    e.g. for a two region case with one fluid region named
    liquid and one solid region named tubeWall:
    \verbatim
        regionSolvers
        {
            liquid          fluid;
            tubeWall        solid;
        }
    \endverbatim

    The \c regionSolvers entry is a dictionary to support name substitutions to
    simplify the specification of a single solver type for a set of
    regions, e.g.
    \verbatim
        fluidSolver     fluid;
        solidSolver     solid;

        regionSolvers
        {
            tube1             $fluidSolver;
            tubeWall1         solid;
            tube2             $fluidSolver;
            tubeWall2         solid;
            tube3             $fluidSolver;
            tubeWall3         solid;
        }
    \endverbatim

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamMultiRun [OPTION]

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries loaded

    Example usage:
      - To update and run a \c chtMultiRegion case add the following entries to
        the controlDict:
        \verbatim
            application     foamMultiRun;

            regionSolvers
            {
                fluid           fluid;
                solid           solid;
            }
        \endverbatim
        then execute \c foamMultiRun
2022-08-04 21:11:35 +01:00
5196e09fe2 Rationalised reactionThermo -> multicomponentThermo
Now that the reaction system, chemistry and combustion models are completely
separate from the multicomponent mixture thermophysical properties package that
supports them it is inconsistent that thermo is named reactionThermo and the
name multicomponentThermo better describes the purpose and functionality.
2022-07-29 14:38:05 +01:00
fbd6702697 postProcess: Stitch non-conformal couples on first time
This has required implementation of finer control of stitching in the
fvMesh read constructor and readUpdate methods. Stitching is now
controlled independently of the mesh changers. Full-geometric stitching
is now always the default unless explicitly overridden in the calls to
fvMesh's read methods.
2022-07-28 16:35:09 +01:00
426060e318 fvMeshStitcher: Stitch when necessary for postProcessing 2022-07-27 11:15:16 +01:00
83cb9e2bd6 fvMesh: Return topo change on update if re-stitched 2022-07-26 10:18:04 +01:00
dafe3fa004 decomposePar, reconstructPar: Renamed cellDist to cellProc
The cellProc field is the field of cell-processor labels.

The names "distribution" and "dist" have been removed as these are
ambiguous in relation to other forms of distribution and to distance.
2022-07-22 09:46:34 +01:00
c3ab704513 reconstructPar: Reconstruct the mesh
The reconstructPar utility now reconstructs the mesh if and when it is
necessary to do so. The reconstructParMesh utility is therefore no
longer necessary and has been removed.

It was necessary/advantagous to consolidate these utilities into one
because in the case of mesh changes it becomes increasingly less clear
which of the separate utilities is responsible for reconstructing data
that is neither clearly physical field nor mesh topology; e.g., moving
points, sets, refinement data, and so on.
2022-07-22 09:46:33 +01:00
2db5626304 createNonConformalCouples: Added -fields option
When this option is enabled, non-conformal boundary conditions will be
added to all the fields. It enables exactly the same behaviour as the
"fields" entry that is available when using this utility with a settings
dictionary (system/createNonConformalCouplesDict).
2022-07-21 08:57:32 +01:00