Commit Graph

7270 Commits

Author SHA1 Message Date
2bc91ecff0 phaseScalarTransport: Improved interface and documentation
This function now looks up an alphaPhi field by default and exits with
an error if the field cannot be found. In order to solve for alphaPhi a
new 'solveAlphaPhi' switch has to be set.

The documentation has been updated to reflect the fact that the VoF
solvers now store all the alphaPhi fluxes necessary for a in-phase
equation to be constructed.

The phaseScalarTransport function has been added to the damBreakLaminar
tutorial.
2023-12-06 12:54:33 +00:00
e1d6448fcf twoPhaseSolver: Store the flux of the non-solved-for phase
This flux is needed for boundary conditions, post-processing and
Euler-Euler-like sub-models and functions
2023-12-06 12:09:31 +00:00
a9605357dd intersectionPatchToPatch: Fix for single precision 2023-12-05 12:01:19 +00:00
54508595bc intersectionPatchToPatch: Prevent generation of zero interpolation weights 2023-12-05 11:54:43 +00:00
6628a49daf tutorials: Updated for standardised thermo property names 2023-12-01 17:13:22 +00:00
abe43a9532 thermo: Standardise property names and remove molar functions
All property functions in the low-level templated thermo property
implementations and the high-level virtual interfaces have been made
consistent. All energies and enthalpies are lower case to denote that
they are specific quantities. Molar functions have been removed as these
are no longer used anywhere.
2023-12-01 17:11:59 +00:00
5ab61c60de basicThermo: Make molar mass available to basic thermos 2023-12-01 16:54:08 +00:00
71493091de wallDist: Changed from TopoChangeableMeshObject to DeletableMeshObject
The nearWallDist MeshObject is now deleted on mesh-change rather than updated
which is more efficient for cases with multiple mesh changes, e.g. motion,
stitching and mapping by avoiding unnecessary updates.

As a consequence of this change the wallDist::y() volScalarField reference
should not be cached across mesh changes so the turbulence models now obtain the
y field as required from the new momentumTransportModel::y() function, the
original near-wall distance function is now named momentumTransportModel::yb()
to clarify that it is the wall distance of the boundary cells.
2023-12-01 16:30:01 +00:00
6fec3e009c nearWallDist: Changed from TopoChangeableMeshObject to DeletableMeshObject
The nearWallDist MeshObject is now deleted on mesh-change rather than updated
which is more efficient for cases with multiple mesh changes, e.g. motion,
stitching and mapping by avoiding unnecessary updates.
2023-12-01 10:29:29 +00:00
8cc8d11b2e Renamed UpdateableMeshObject -> TopoChangeableMeshObject
To clarify that these MeshObjects are updated on any topology change, either
local (e.g. mesh refinement/unrefinement) or mesh-to-mesh mapping.
2023-11-30 20:20:56 +00:00
c8cf725d25 Renamed PatchMeshObject -> RepatchableMeshObject
to clarify the purpose of this MeshObject and provide better consistency between
the name and operation.
2023-11-30 18:18:14 +00:00
b3faf97e55 MeshObjects::TopologicalMeshObject: Replaced by MoveableMeshObject with a dummy movePoints function
It is simpler and more consistent to declare topological mesh objects as
moveable with a dummy movePoints function so that they remain unchanged if the
mesh moves without topology change.  This allows the TopologicalMeshObject to be
removed altogether, the base MeshObjects type now being DeletableMeshObject
which are deleted on mesh change.
2023-11-30 17:20:06 +00:00
fa1de84f8f volPointInterpolation: Changed MeshObject type to DeletableMeshObject
volPointInterpolation is now deleted on mesh-change rather than updated which is
more efficient for cases with multiple mesh changes, e.g. motion, stitching and
mapping by avoiding unnecessary updates.
2023-11-30 15:30:51 +00:00
2e821754cb MeshObjects: Renamed GeometricMeshObject -> DeletableMeshObject
to make it clear that MeshObjects of this type are deleted from the cache on any
mesh change, movement, topological, mapping or redistribution.
2023-11-30 14:33:44 +00:00
7538366a7b massTransferBase: Prohibit changing phases at run-time 2023-11-30 11:53:59 +00:00
23a7ede0c3 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-11-29 18:13:12 +00:00
06ecc011b3 functionObjects::checkMesh: Added stopAt option
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
        stopAt        | Stops the run if any mesh checks fail   | no | endTime
    \endtable

    The optional \c stopAt option may be set to
    - endTime     : Continue running on error
    - noWriteNow  : Stops the run on error without write
    - writeNow    : Stops the run on error and writes fields
    - nextWrite   : Stops the run at the next write time on error

    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;

        stopAt          writeNow;
    }
    \endverbatim

    or using the standard configuration file:

    \verbatim
    #includeFunc checkMesh(executeInterval=10, allGeometry=true)
    \endverbatim
2023-11-29 18:12:05 +00:00
acf5159377 fvPatchDistWave: Permit initialising the wave from non-conformal patches 2023-11-29 14:50:46 +00:00
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