Commit Graph

4312 Commits

Author SHA1 Message Date
3a6f9029d3 massTransferBase: Renamed mDotByV to mDot 2023-11-24 14:30:42 +00:00
77eec2cda3 MultiRegionRefs, MultiRegionUList, MultiRegionList: Centralised region prefixing
These classes permit any PtrList of region-associated objects (meshes,
solvers, domainDecompositions, ...) to prefix the region name to the log.

At present these classes are used by decomposePar and reconstructPar
only. The foamMultiRun solver still handles its own prefixing.
2023-11-23 10:35:18 +00:00
14abee15e0 pointDist: Rationalised, simplified and renamed externalPointEdgePoint -> pointEdgeDist
to make the pointDist implementation more comprehensible and easier to maintain.
2023-11-22 18:36:32 +00:00
836ce9a302 solutionControl: Added finalIteration function to replace the data class
The final iteration state is now available from the solutionControl class via
the new finalIteration() static function, replacing the old data class from
which fvMesh was derived.  This approach is simpler, more reliable and easier to
extend and reduces the clutter associated with fvMesh.
2023-11-17 15:30:56 +00:00
7280983710 fvMeshStitcher: Rename non-conform to unconform and remove unused data 2023-11-17 09:13:57 +00:00
3b8581adff fvMeshStitcher: Fix bug in surface velocity handling 2023-11-17 08:58:10 +00:00
7dec67e9d7 Residuals: Updated from a GeometricMeshObject to a UpdateableMeshObject
so that the stack of residuals is maintained following any kind of mesh change.

Resolves bug-report https://bugs.openfoam.org/view.php?id=4034
2023-11-16 14:30:47 +00:00
c73a9eaace Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-11-16 14:30:36 +00:00
9bdb279d4d pointDist: Generalised to use a labelHashSet of patches and a labelHashSet of pointZones
This allows the distance from either or both boundary and internal points to be
calculated with a single consistent interface.
2023-11-16 14:28:45 +00:00
410167884a nonConformal: Documentation and disambiguate base patch access 2023-11-16 12:51:07 +00:00
27df14cd67 zeroDimensionalMassSourceBase: Fix for 64 bit labels 2023-11-15 14:25:50 +00:00
4ce4b5b0f9 pTraits: Added nan (not-a-number) to floating point types 2023-11-15 13:25:33 +00:00
7afc28270a fieldMappers: Consistency betwen map and map-in-place 2023-11-14 13:59:04 +00:00
89e395b11c fieldMapper: Removed hasUnmapped
This is not used anywhere. This logic can and should be kept internal to
the mapper. Eventually what will be needed is additional interface to
allow calling code to provide appropriate values to set on unmapped
elements, if there are any. The calling code, however, should not need
to know if any such unmapped elements are actually present.
2023-11-14 12:10:11 +00:00
79ab17131e forwardFieldMapper: Rationalisation
The directFieldMapper has been renamed to forwardFieldMapper, and
instances where generalFieldMapper was used instead of a more simple
forward/direct type have been removed.
2023-11-14 10:19:00 +00:00
fbc3a122c5 meshCheck::checkTopology: Multiple disconnected region sets now only written for allTopology
NCC cases have multiple disconnected regions that polyMesh topology checking
considers a potential error and meshCheck::checkTopology can generate diagnostic
cell and point sets relating to these regions but these are now only written if
allTopology is set true to remove unnecessary clutter when checking the mesh at
run-time for moving mesh cases using the checkMesh functionObject.
2023-11-10 20:42:28 +00:00
ad1f953f6a UPtrList: Added append for consistency with PtrList 2023-11-10 20:42:01 +00:00
ee6f23ab57 coupledTemperatureFvPatchScalarField: Added map and reset hooks 2023-11-10 15:21:11 +00:00
4a653ae9e3 meshCheck/checkGeometry: Corrected argument order 2023-11-10 15:03:41 +00:00
cef86f598a fieldMapper: Simplification
The patch-specific mapper interfaces, fvPatchFieldMapper and
pointPatchFieldMapper, have been removed as they did not do anything.
Patch mapping constructors and functions now take a basic fieldMapper
reference.

An fvPatchFieldMapper.H header has been provided to aid backwards
compatability so that existing custom boundary conditions continue to
compile.
2023-11-10 14:46:05 +00:00
02c28dda6a utilities: Fix warnings about readUpdate enumeration comparisons 2023-11-08 15:04:37 +00:00
03ec16135a fvMesh: Added independent readUpdateState enumeration
This lets calling code determine the difference between a polyMesh
topology change and a re-stitch. This prevents unnecessary
post-processing output in a few cases when using NCC; most notably the
generation of cellProc fields by reconstructPar.
2023-11-08 14:43:52 +00:00
b6d1d308d6 porosityModel, sampledIsoSurfaceSurface: Removed unused multi cellZone support
This reduces the code complexity and allows for a future plan to make zones
dynamic rather than a static fixed indexed list.
2023-11-08 14:37:29 +00:00
d76e5468d4 MeshZones: Added swap function for mesh-to-mesh mapping
Allows the number of zones to change between meshes while preserving existing
zones so that pointers and references to those zones remain valid.
2023-11-07 16:56:25 +00:00
b5f2cf3bbb Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-11-03 20:37:23 +00:00
73f8eac6b2 pointDist: Changed the internalPoints lists to const 2023-11-03 20:36:49 +00:00
9c43f536e9 lagrangian: InjectionModel: Fix false inaccurate location warnings 2023-11-03 15:29:02 +00:00
4681d37a65 Added src/dynamicMesh/pointDist 2023-11-03 14:54:14 +00:00
97c87a0aee pointDist: Generalisation of patchPointDist with support for sets of patch and internal points
Now the distance to patches and sets of fixed internal points can conveniently
be calculated using an efficient pointEdgeWave:

        //- Construct from mesh and set of patches and points
        pointDist
        (
            const pointMesh& pMesh,
            const labelHashSet& patchIDs,
            const pointField& points
        );

        //- Construct from mesh, set of patches,
        //  sets of internal points for which the distance is 0
        //  and points
        pointDist
        (
            const pointMesh& pMesh,
            const labelHashSet& patchIDs,
            const UPtrList<labelList>& internalPoints,
            const pointField& points
        );

providing more flexibility in mesh-movers to distinguish between fixed and
moving points.
2023-11-03 14:48:07 +00:00
8532e768d0 fvMeshStitcher: Correction to old-time mesh flux updates 2023-11-03 14:03:53 +00:00
542caa5fbe surfaceToVolVelocity: Handle old-time field names 2023-11-03 14:03:53 +00:00
0cf048143e conformedFvsPatchField: Fix for topology change 2023-11-03 14:03:53 +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
6202193233 MPLIC: Corrected typos 2023-11-02 16:15:41 +00:00
d5128c39bc MPLIC: Corrected typo 2023-11-02 15:34:40 +00:00
e880ec1c4f extrudeModels::cylindricalRadial: New cylindrical radial extrusion model
Renamed extrudeModels::radial -> extrudeModels::sphericalRadial as this
specifically extrudes spherically.
2023-11-02 14:54:48 +00:00
a77f747e20 motionSolvers: Fixes to solid body solvers to support distribution 2023-11-02 10:10:02 +00:00
2f4ef2abba fvMeshStitcher: Prevent storage of internal surface fields for mapping
This reduces the memory usage of the stitching operation, and simplifies
its interaction with other mesh changers.

The storage of separate original and non-conformal field parts is now
done within a new "conformal" boundary condition. This condition
internally stores two boundary conditions; one for the original patch
values, and one for the non-conformal part. The conformal condition
replaces the condition applied to the original patch on un-stitch when
the non-conformal boundaries are removed. The data stored in the
conformal condition is then used to restore the previous conditions
during the re-stitch process.

This conformal condition supports mapping of various types. This means
both original and non-conformal boundary data gets mapped automatically
as a result of other mesh changes such as automatic refinement.
2023-11-02 09:32:31 +00:00
bc0d74cbc5 distributions::unintegrable: Formatting 2023-11-02 09:32:31 +00:00
9a71ee54b7 foamRun: Ensure PIMPLE outer loop parameters are re-read if fvSolution changed 2023-11-01 15:30:08 +00:00
a0be2ea16e waveSpectra::JONSWAP: Updated for single-precision 2023-10-26 10:35:47 +01:00
2eb23ba723 polyMeshCheckQuality: Minor simplification 2023-10-25 14:43:48 +01:00
f4c43f6c6e meshCheck: General code improvement 2023-10-25 12:48:17 +01:00
089ad4c3b4 dynamicMesh: Improved interoperability
Consistency changes have been made that ensure that mesh motion,
topology change (refinement), load balancing, mesh-to-mesh-mapping, and
non-conformal stitching can all be run simultaneously.

The only remaining limitation relates to the use of second order time
schemes. It is not possible to use these schemes if both motion and
topology change are in operation. The accuracy and validity of a second
order scheme is also compromised by the case of frequent topology
changes.
2023-10-25 11:05:32 +01:00
13a25388ee polyMeshCheck: Removed deprecated and unused check functions 2023-10-24 18:47:46 +01: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
cfe7fc040b dynamicMeshCheck: Moved to the new meshCheck library 2023-10-20 10:59:12 +01:00
096200c6b6 primitiveMeshCheck, polyMeshCheck: Moved to meshCheck library 2023-10-19 18:19:38 +01:00