Commit Graph

7252 Commits

Author SHA1 Message Date
5659e372f3 modules/solid: Calculate DiNum before mesh update
This is consistent with the fluid solvers, and prevents failures
associated with using fields that haven't yet been updated or corrected
following mesh changes
2023-11-29 14:46:35 +00:00
f6f55caf02 Removed "<modelType>Type type" tautology in selection error messages 2023-11-28 16:40:42 +00:00
01d0af39be multiphaseEuler: Added Prandtl heat transfer model
This simple model creates a heat transfer coefficient in proportion with
the corresponding drag model's momentum transfer coefficient. A
user-defined Prandtl number and a harmonic average of the phases'
specific heats are used to specify the constant of proportionality.

This model has no physical basis. It exists primarily for testing
purposes. It has the advantage of being applicable to any interface,
including those representing segregated configurations.

Example usage:

    heatTransfer
    {
        gas_segregatedWith_liquid
        {
            type            Prandtl;
            Pr              0.7;
        }
    }
2023-11-28 12:39:34 +00:00
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
ec8e9b6e6e tutorials/XiFluid/kivaTest: Reverted dynamicMeshDict
Resolves bug-report https://bugs.openfoam.org/view.php?id=4036
2023-11-19 16:52:02 +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
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
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
89c8187135 decomposePar: Create nonConformalProcessorCyclic fields
Previously this was creating simple processorCyclic fields on the
nonConformalProcessorCyclic patches using a patchType override. The fact
that this worked is an encouraging indication of the system's
robustness, but it is more logical to create a field which directly
corresponds to the underlying patch type.
2023-11-08 11:50:41 +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
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