Commit Graph

7222 Commits

Author SHA1 Message Date
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
42e71682cc modules/isothermalFluid: Consistent handling of rhoU_0 and rhoUf_0 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
0ed84ff137 compressibleVoF,multiphaseEuler: Renamed compressibility dilatation dgdt to vDot
Currently in compressibleVoF vDot contains only the compressibility dilatation
effect whereas in multiphaseEuler the effect of sources are also included but
this will be refactored shortly so that the handling of mass sources and
compressibility is consistent between VoF and Euler-Euler solvers.

The previously hard-coded 1e-4 division stabilisation used when linearising vDot
for bounded semi-implicit solution of the phase-fractions is now an optional
user-input with keyword vDotResidualAlpha, e.g. in multiphaseEuler:

solvers
{
    "alpha.*"
    {
        nAlphaCorr          1;
        nAlphaSubCycles     2;
        vDotResidualAlpha   1e-6;
    }
    .
    .
    .
2023-11-03 13:19:52 +00:00
7ec1e2f1a5 twoPhaseSolver::alphaPredictor: Ensure the Crank-Nicolson blended alpha1 has the same BCs as alpha1
so that compressive interpolations schemes such as PLIC and MPLIC can handle the
BCs appropriately.
2023-11-02 17:10:01 +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
cf4149f42f tutorials/incompressibleVoF/propeller: Added run-time post processing 2023-11-02 10:10:07 +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 20231027 2023-10-26 10:35:47 +01:00
deda3aa6a3 bin/tools/foamLog.db: Added deltaT 2023-10-26 10:35:02 +01:00
7e11d9b578 bin/tools/CleanFunctions::cleanCase: Added deletion of the logs directory generated by foamLog 2023-10-26 10:06:29 +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
819c9388f1 tutorials/incompressibleFluid/cavity: Removed constant/polyMesh 2023-10-23 08:57:24 +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
fc6f887566 foamToEnsightParts: Updated to include the sampling library 2023-10-19 16:04:06 +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
738f205ac8 waveSpectra::JONSWAP: Made the peaked-ness parameter (gamma) user-specifiable 2023-10-19 10:25:21 +01:00
f0380a5cae meshTools/cellQuality: Removed unused quality calculations 2023-10-19 10:19:30 +01:00
d34fc474d0 surfMesh/Make/files: minor simplification 2023-10-18 17:38:52 +01:00
dc3df9ff4b sampling: Calls to writeOBJ superseded by OBJstream::write 2023-10-18 17:37:27 +01:00
58f5d5ed5f checkMesh::checkTopology: Moved the allGeometry specific output into checkGeometry 2023-10-18 14:55:49 +01:00
c0da2a5eff waveModels: New irregular wave model
This model builds up phase fraction and velocity fields from multiple
first-order waves, sampled from a selectable wave spectrum.

Usage:

    Property  | Description                   | Required? | Default
    ----------+-------------------------------+-----------+-------------
    depth     | The water depth [m]           | no        | great
    spectrum  | The wave spectrum             | yes       |
    n         | The number of times to sample | yes       |
              | the spectrum                  |           |
    span      | The fractional range across   | no        | (0.01 0.99)
              | which to sample the spectrum  |           |
    setFormat | The format with which to plot | no        | none
              | the spectrum                  |           |

Example specification in constant/waveProperties:

    waves
    (
        irregular
        {
            spectrum    PiersonMoskowitz; // or JONSWAP

            PiersonMoskowitzCoeffs
            {
                U19_5       15;
            }

            JONSWAPCoeffs
            {
                U10         10;
                F           200e3;
            }

            n           16;
            span        (0.01 0.99);
        }
    );
2023-10-18 14:35:35 +01:00
7ffe72fd34 checkMesh: Updated to use the new meshCheck namespace functions 2023-10-18 14:25:35 +01:00
5472ce5327 primitiveMeshCheck: Moved the primitiveMesh check function into the meshCheck namespace 2023-10-18 14:08:55 +01:00
f602206d69 primitiveMeshCheck, polyMeshCheck: Combined into a single meshCheck namespace 2023-10-18 12:50:46 +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
c857c4f641 polyMesh: Moved check member functions into polyMeshCheck 2023-10-18 12:09:27 +01:00
df94b08579 primitiveMesh: Removed unused virtual function 2023-10-18 12:09:02 +01:00
aaeb6e5f3d src/sampling/sampledSet/writers: Add nl at end of raw, csv and gplt files 2023-10-18 10:11:23 +01:00
95110422a2 multiphaseEuler: Only request pressure from moving phases 2023-10-16 19:42:57 +01:00