Commit Graph

421 Commits

Author SHA1 Message Date
69da8f3d7b stitchMesh: Replacement utility based on the new patchIntersection algorithm
The mergePatchPairs functionality in blockMesh also now uses patchIntersection.

The new mergePatchPairs and patchIntersection replaces the old, fragile and
practically unusable polyTopoChanger::slidingInterface functionality the removal
of which has allowed the deletion of a lot of other ancient and otherwise unused
clutter including polyTopoChanger, polyMeshModifier, polyTopoChange::setAction
and associated addObject/*, modifyObject/* and removeObject/*.  This
rationalisation paves the way for the completion of the update of zone handling
allowing mesh points, faces and cells to exist in multiple zones which is
currently not supported with mesh topology change.

Application
    stitchMesh

Description
    Utility to stitch or conform pairs of patches,
    converting the patch faces either into internal faces
    or conformal faces or another patch.

Usage
    \b stitchMesh (\<list of patch pairs\>)

    E.g. to stitch patches \c top1 to \c top2 and \c bottom1 to \c bottom2
        stitchMesh "((top1 top2) (bottom1 bottom2))"

    Options:
      - \par -overwrite \n
        Replace the old mesh with the new one, rather than writing the new one
        into a separate time directory

      - \par -region \<name\>
        Specify an alternative mesh region.

      - \par -fields
        Update vol and point fields

      - \par -tol
        Merge tolerance relative to local edge length (default 1e-4)

See also
    Foam::mergePatchPairs
2023-12-25 13:32:39 +00:00
20f5235ecf Renamed ID() -> Index()
Index is a better name to describe a label index than ID which may be an
integer, word or other means of identification.
2023-12-20 18:39:55 +00:00
a99155d0f0 Renamed IDs() -> Indices()
Indices is a better name to describe label indices than IDs which may be an
integers, words or other means of identification.
2023-12-20 14:29:23 +00:00
6a361d675d PDRMesh: Added support for generic patches
Required now that activeBaffleVelocity and activePressureForceBaffleVelocity
have been moved into PDRFoam.
2023-12-16 17:38:03 +00:00
621740e90b polyBoundaryMesh::findPatchID,findPatchIDs: renamed findIndex,findIndices
Index is a better name to describe a label index than ID which may be an
integer, word or other means of identification.
2023-12-16 13:27:12 +00:00
77f0b172a9 MeshZones: Renamed findZoneID -> findIndex
Index is a better name to describe a label index than ID which may be an
integer, word or other means of identification.
2023-12-15 22:25:02 +00:00
a362774c1d collapseEdges: Reinstated 2023-12-14 23:06:47 +00:00
b9fe7df344 polyTopoChange: New library containing the mesh topology change functionality
from the original dynamicMesh library, now separated into polyTopoChange and motionSolvers
2023-12-14 14:08:45 +00:00
db706b574b motionSmoother: New library separated from dynamicMesh topology changers 2023-12-14 13:41:50 +00:00
0949b7aa43 polyTopoChanger::attachDetach: Removed unusable and unmaintained code 2023-12-14 10:29:38 +00:00
826fa2db61 polyTopoChange: Removed most unnecessary setAction clutter 2023-12-13 15:33:45 +00:00
f1a70fab7e polyTopoChange: Removed used and deprecated functionality 2023-12-13 13:46:03 +00:00
a315ddf370 polyTopoChanger: Simplified pending removal
The legacy fvMeshTopoChangersMovingCone removed, replaced by the more general
mesh mapping approach, see tutorials incompressibleFluid/movingCone and
shockFluid/movingCone.
2023-12-12 20:24:12 +00:00
fb21aac461 src/dynamicMesh: Reorganised and rationalised in preparation for significant rewrite 2023-12-12 16:14:50 +00:00
39373be263 perfectInterface: Replaced setAction polyModifyFace with the simpler modifyFace 2023-12-12 13:59:36 +00:00
0faea5a8f8 mergeBaffles: Corrected documentation 2023-12-08 11:15:06 +00:00
9966350d7e extrudeMesh: Corrected region option and made consistent with other mesh utilities
Resolves bug-report https://bugs.openfoam.org/view.php?id=4035

Patch contributed by Stanislau Stasheuski, Aalto University.
2023-11-16 16:19:45 +00:00
02c28dda6a utilities: Fix warnings about readUpdate enumeration comparisons 2023-11-08 15:04:37 +00:00
9af6bd527a fvMeshStitcher: Compatibility with run-time distribution
A number of fixes have been made in order to make non-conformal cyclic
patches compatible with run-time distribution.

A tutorial case, incompressibleVoF/rotatingCube, has been added which
demonstrates simultaneous usage of motion, non-conformal couplings,
adaptive refinement and load-balancing.
2023-11-03 14:03:53 +00:00
4ab9979305 checkMesh, functionObjects::checkMesh: Updated and made consistent
Now both the checkMesh utility and functionObject operate in the same manner
with the same controls, executing the same checkGeometry and checkTopology
functions from the new meshCheck library.  The controls have been updated and
made more consistent and flexible, in particular by the addition of optional
user specification for the non-orthogonality and skewness error thresholds:

Application
    checkMesh

Description
    Checks validity of a mesh.

Usage
    \b checkMesh [OPTION]

    Options:
      - \par noTopology
        Skip checking the mesh topology

      - \par -allTopology
        Check all (including non finite-volume specific) addressing

      - \par -allGeometry
        Check all (including non finite-volume specific) geometry

      - \par -meshQuality
        Check against user defined (in \a system/meshQualityDict) quality
        settings

      - \par -region \<name\>
        Specify an alternative mesh region.

      - \par -writeSurfaces
        Reconstruct cellSets and faceSets of problem faces and write to
        postProcessing directory.

      - \par -surfaceFormat <format>
        Format used to write the cellSets and faceSets surfaces
        e.g. vtk or ensight.

      - \par -writeSets
        Reconstruct pointSets of problem points nd write to
        postProcessing directory.

      - \par -setFormat <format>
        Format used to write the pointSets
        e.g. vtk or ensight.

      - \par -nonOrthThreshold <threshold value in degrees>
        Threshold in degrees for reporting non-orthogonality errors,
        default: 70"

      - \par -skewThreshold <threshold value>
        Threshold for reporting skewness errors, default: 4.

Class
    Foam::functionObjects::checkMesh

Description
    Executes primitiveMesh::checkMesh(true) every execute time for which the
    mesh changed, i.e. moved or changed topology.

    Useful to check the correctness of changing and morphing meshes.

Usage
    \table
        Property      | Description               | Required     | Default value
        type          | type name: checkMesh      | yes          |
        noTopology    | Skip checking the mesh topology | no     | false
        allTopology   | Check all addressing      | no           | false
        allGeometry   | Check all geometry        | no           | false
        writeSurfaces | Reconstruct and write problem faces | no | false
        surfaceFormat | Format for problem faceSets | no         | vtk
        writeSets     | Reconstruct and write problem points | no | false
        setFormat     | Format used to write the problem pointSets | no | vtk
        nonOrthThreshold | Threshold for non-orthogonality errors | no | 70 deg
        skewThreshold | Threshold for reporting skewness errors | no | 4
    \endtable

    Example of checkMesh specification:
    \verbatim
    checkMesh
    {
        type            checkMesh;
        libs            ("libutilityFunctionObjects.so");

        executeControl  timeStep;
        executeInterval 10;

        allGeometry     true;
        allTopology     true;

        writeSurfaces   true;
        surfaceFormat   vtk;

        writeSets       true;
        setFormat       vtk;
    }
    \endverbatim

    or using the standard configuration file:

    \verbatim
    #includeFunc checkMesh(executeInterval=10, allGeometry=true)
    \endverbatim
2023-10-24 14:36:35 +01:00
6628666770 dynamicMeshCheck merged into meshCheck 2023-10-20 17:46:04 +01:00
a5f0b5310a motionSmootherAlgoCheck: Moved to the new meshCheck library 2023-10-20 12:32:25 +01:00
096200c6b6 primitiveMeshCheck, polyMeshCheck: Moved to meshCheck library 2023-10-19 18:19:38 +01:00
715dcd97d0 meshCheck: New library for mesh checking functions
Used by the checkMesh utility and functionObject
2023-10-19 15:00:28 +01:00
58f5d5ed5f checkMesh::checkTopology: Moved the allGeometry specific output into checkGeometry 2023-10-18 14:55:49 +01:00
7ffe72fd34 checkMesh: Updated to use the new meshCheck namespace functions 2023-10-18 14:25:35 +01:00
46f829761a Renamed namespace polyMeshCheck -> meshCheck
This namespace is to be used for both primitiveMesh, polyMesh and fvMesh
checking functions.
2023-10-18 12:39:04 +01:00
2fae9768ef checkMesh::checkGeometry: Updated for changes to polyMeshCheck 2023-10-18 12:13:53 +01:00
0433bd3e00 genericFields: Library reorganisation and reduce duplication 2023-08-25 09:46:40 +01:00
795d408dce extrudeMesh, splitMeshRegions: Removed the redundant writing of dummy fvSchemes and fvSolution files 2023-07-15 21:56:07 +01:00
2b3b820c90 Corrected duplicate word and it's typos 2023-07-11 11:02:47 +01:00
0657826ab9 Replaced all remaining addTimeOptions.H includes with the more flexible timeSelector 2023-06-23 15:24:06 +01:00
1e9e0c141b checkMesh: Added the region name to the postProcessing directory for the output from writeSets option 2023-06-12 12:21:34 +01:00
08544446e8 Time, functionObjectList: Refactored to simplify construction and switching-off functionObjects 2023-06-06 08:17:52 +01:00
ca72b0a963 fvPatchFields: Removed all fvPatchFields requiring user specified data from the null-constructor table
This avoids potential hidden run-time errors caused by solvers running with
boundary conditions which are not fully specified.  Note that "null-constructor"
here means the constructor from patch and internal field only, no data is
provided.

Constraint and simple BCs such as 'calculated', 'zeroGradient' and others which
do not require user input to fully specify their operation remain on the
null-constructor table for the construction of fields with for example all
'calculated' or all 'zeroGradient' BCs.

A special version of the 'inletOutlet' fvPatchField named 'zeroInletOutlet' has
been added in which the inlet value is hard-coded to zero which allows this BC
to be included on the null-constructor table.  This is useful for the 'age'
functionObject to avoid the need to provide the 'age' volScalarField at time 0
unless special inlet or outlet BCs are required.  Also for isothermalFilm in
which the 'alpha' field is created automatically from the 'delta' field if it is
not present and can inherit 'zeroInletOutlet' from 'delta' if appropriate.  If a
specific 'inletValue' is require or other more complex BCs then the 'alpha'
field file must be provided to specify these BCs as before.

Following this improvement it will now be possible to remove the
null-constructors from all fvPatchFields not added to the null-constructor
table, which is most of them, thus reducing the amount of code and maintenance
overhead and making easier and more obvious to write new fvPatchField types.
2023-05-27 16:56:10 +01:00
74a63a08e4 mappedExtrudedPatchBase: Support patchToPatch coupling
This completes commit 381e0921 and permits patches on the "top" of
extruded regions to determine the point locations opposite as well as
the face centres and areas. This means that patches with dissimilar
meshes can now be coupled via the patchToPatch interpolation engine.

A few fixes have also been applied to extrudeToRegionMesh to make the
intrude option compatibile with extrusion into internal faces and
between opposing zones/sets/patches. The 'shadow' entries used for
extrusion inbetween opposing zones/sets/patches have also been renamed
to 'opposite' for consistency with the patch names and patch types
entries; e.g.,

    faceZones           (fz1 fz3);
    oppositeFaceZones   (fz2 fz4); // <-- was 'faceZonesShadow'

    faceSets            (fs1 fs3);
    oppositeFaceSets    (fs2 fs4); // <-- was 'faceSetsShadow'

    patches             (p1 p3);
    oppositePatches     (p2 p4); // <-- was 'patchesShadow'
2023-05-09 11:06:40 +01:00
f850266cdf extrudeToRegionMesh: Added 'intrude' option
With the new film implementation the single cell layer film region is extruded
into (overlapping with) the primary/fluid region which can now be generated with
extrudeToRegionMesh using the new 'intrude' option, e.g. for the
tutorials/modules/multiRegion/film/splashPanel case the extrudeToRegionMeshDict
contains:

region          film;

patches         (film);

extrudeModel    linearNormal;

intrude         yes;

adaptMesh       no;

patchTypes      (mappedExtrudedWall);
patchNames      (film);

regionPatchTypes   (filmWall);
regionPatchNames   (wall);

regionOppositePatchTypes    (mappedFilmSurface);
regionOppositePatchNames    (surface);

nLayers         1;

expansionRatio  1;

linearNormalCoeffs
{
    thickness       0.002;
}
2023-05-02 17:22:03 +01:00
8f3d044b6a filmToVoFTransfer: Updated to lookup VoFtoFilmTransfer from any position in the fvModels 2023-04-26 21:01:30 +01:00
5e8d1ff99e createBaffles: Fixed owner/neighbour indexing bug when operating in parallel
Resolves bug report https://bugs.openfoam.org/view.php?id=3970
2023-04-13 17:09:29 +01:00
67e692b5a8 foamRun, foamMultiRun: Pre-load the solver libraries before the mesh/meshes are constructed
to ensure that any solver-specific patch types are available before mesh construction.
2023-03-07 13:18:33 +00:00
25dd524c84 generic.*Patch: Moved to new genericPatches library
genericPatches is linked into mesh generation and manipulation utilities but not
solvers so that the solvers now check for the availability of the specified
patch types.  Bugs in the tutorials exposed by this check have been corrected.
2023-03-03 09:03:47 +00:00
390c588cd4 mappedExtrudedPatchBase: New base class for extruded patches
mappedExtrudedPolyPatch and mappedExtrudedWallPolyPatch are now derived from mappedExtrudedPatchBase
2023-03-02 20:25:22 +00:00
c7c8c0fa46 extrudeToRegionMesh: Added options to set the name and type of the generated patches
e.g. in extrudeToRegionMeshDict:

// Generate the region named film
region          film;

// from the patch extrudeWall
patches         (extrudeWall);

// generating mapped patches for the extruded region
adaptMesh       yes;

// New options:

// Set the type of the mapped patch on the existing mesh to mappedWall ...
patchTypes      (mappedWall);

// ... and name to wall
patchNames      (wall);

// Set the type of the mapped patch on the region mesh to mappedFilmWall ...
regionPatchTypes   (mappedFilmWall);

// ... and name to wall
regionPatchNames   (wall);

// Set the type of the opposite patch on the region mesh to empty ...
regionOppositePatchTypes    (empty);

// ... and name to empty
regionOppositePatchNames    (empty);

All the above entries are optional and if not present the previous behaviour is
reproduced.
2023-02-28 15:43:37 +00:00
4dbc23c141 ListOps::identity -> identityMap
to avoid confusion with the tensor identity.
2023-02-03 17:12:31 +00:00
0e22a7a807 applications/utilities/mesh/generation/Allwmake: Removed, no longer required 2023-02-01 16:43:08 +00:00
099505df9c zeroDimensionalFvMesh: New utility to create zero dimensional mesh
This utility can be run with no arguments or configuration, and will
create a unit cube mesh with empty patches on all sides.
2023-01-31 15:09:18 +00:00
260a8502f0 solvers::movingMesh: New solver module to move the mesh
Executes the mover, topoChanger and distributor specified in the
dynamicMeshDict.

Replaces the moveMesh and earlier moveDynamicMesh utilities.
2023-01-27 14:27:52 +00:00
104be8eae9 Corrected typos 2023-01-24 22:01:34 +00:00
9e51bb48ce foamyHexMesh, foamyQuadMesh: Removed pending funding for further development and maintenance 2023-01-06 22:23:59 +00:00
20c7c7c21a Resolve warning messages generated by Clang-15 2023-01-03 11:26:15 +00:00