Commit Graph

6606 Commits

Author SHA1 Message Date
c7a69ef828 meshTools/nonConformal: Minor reorganisation 2023-02-28 08:12:26 +00:00
ed83890ec9 meshTools/mappedPatches: Put mesh change functions under correct heading 2023-02-28 08:12:25 +00:00
ea8a922ee8 tutorials/modules/CHT: Removed unnecessary files and entries 2023-02-26 19:45:15 +00:00
a004189e35 tutorials::extrudeMeshDict: Corrected object name 2023-02-26 19:44:48 +00:00
2177ce50dd applications/solvers/modules: Replaced include compressibleMomentumTransportModel.H rather than compressibleMomentumTransportModels.H 2023-02-26 11:59:24 +00:00
d8766935ec emptyFvsPatchField::map: Updated mapper argument 2023-02-26 09:46:25 +00:00
a838fa9a91 ThermophysicalTransportModels: separated macros in makeThermophysicalTransportModel
to allow tables for specific types of ThermophysicalTransportModel to be
created, i.e. laminar, RAS or LES rather than always creating all three.
2023-02-25 23:14:37 +00:00
6cac79b47b Reorganised linkage to avoid link errors from foamToC -allLibs 2023-02-24 22:40:12 +00:00
b97d24a372 fvPatch: Changed the deltaCoeffs() to virtual to allow special override 2023-02-24 15:38:17 +00:00
83e5c45764 contactAngleModels: New contact angle models library
used in the alphaContactAngleFvPatchScalarField boundary condition to replace
the need to derive specialised versions for different contact angle evaluation
methods.  This simplifies the code and provides a reusable system which could be
applied to other multiphase contact angle boundary conditions.
2023-02-24 15:35:25 +00:00
edbff308b4 patchToPatchInterpolation, interpolateSplineXY: Removed
These are not used anywhere. interpolateSplineXY's functionality can be
achieved with a table function1, and patchToPatchInterpolation has been
superseded at least twice; first by AMI and then by patchToPatch/NCC.
2023-02-23 08:33:17 +00:00
a432c3f6df src/finiteVolume/cfdTools: Removed unused code
Solver modules have replaced code that was previously shared between
solvers by means of #include-ing header files. Some of these headers are
now unused and have been removed. Others are only now used in a single
solver and have been moved into that solver.
2023-02-22 16:28:53 +00:00
a35fed405e fluidSolver: Accumulate continuity errors on final iteration only
This prevents temporarily high errors relating to unconverged state from
being added to the total and reported
2023-02-22 15:47:49 +00:00
aeadea4377 Standardised name of area-per-unit-volume to Av
This change applies to diameter models within the multiphaseEuler
module, heat transfer fvModels, and the LopesdaCosta porosity and
turbulence models.

User input changes have been made backwards-compatible, so existing
AoV/a/Sigma/... entries and fields should continue to work.
2023-02-22 12:58:14 +00:00
88cabc8d1d tests: multiphaseEuler: Updated functions entryName keyword to name 2023-02-22 12:41:01 +00:00
a535ff7c9a codedFunctionObject: Read executeAtStart control 2023-02-22 12:03:02 +00:00
218868e57b reaction: Delay lookup of area-per-unit-volume fields
This permits the creation of area-per-unit-volume fields with coded
function objects or similar, which construct after the chemistry system.
2023-02-22 12:02:58 +00:00
b95b6a0afd lagrangian: PatchCollisionDensity: Corrected number-density fields 2023-02-21 16:12:16 +00:00
e6b517a1e3 functionObjects: uniform, fieldsExpression: Support for dimensioned fields 2023-02-21 12:55:16 +00:00
1321112963 ThermalPhaseChangePhaseSystem: Changes to latent heat handling
Latent heat evaluation has been changed to calculate both sides' heats
similarly using the interface temperature, rather than using bulk
quantities on the "upwind" side of the mass transfer process
(latentHeatScheme::symmetric vs latentHeatScheme::upwind).

The transfer of heat has been changed so that it is calculated from the
mass transfer rate rather than the heat transfer coefficients and
temperatures (latentHeatTransfer::mass vs latentHeatTransfer::heat).

These changes were found to improve stability characteristics in some
boiling cases, and in general should be more energy conservative and
less dependent on the accuracy of the interfacial temeprature solution.

Patch contributed by Juho Peltola, VTT.
2023-02-17 15:18:13 +00:00
7e36d7621d bash_completion: Updated 2023-02-17 15:14:10 +00:00
cd5acd5ed2 foamToVtk: Changed -poly option to -polyhedra
The new option takes a value indicating which cell types should be
written out as polyhedra. The values are as follows:

      none: No polyhedral cells are written. Cells which match specific
            shapes (hex, pyramid, prism, ...) are written as their
            corresponding VTK cell types. Arbitrary polyhedral cells
            that do not match a specific shape are decomposed into
            tetrahedra.

 polyhedra: Only arbitrary polyhedral cells are written as a VTK
            polyhedron. Cells that match specific shapes are written as
            their corresponding VTK cell types.

       all: All cells are written as a VTK polyhedron.

The default is 'none', which retains the previous default behaviour.
2023-02-17 15:11:20 +00:00
c802985a2d Test-patchToPatch: Added -region and -sourceRegion options 2023-02-16 15:15:30 +00:00
2cf966de89 tutorials: Examples of mapFieldsPar usage
Two pitzDaily variants have been added; pitzDailySteadyMappedToPart, and
pitzDailySteadyMappedToRefined. These demonstrate usage of workflows
which involve mapping between cases with mapFieldsPar.

The pitzDailySteadyMappedToPart case demonstrates mapping onto a small
section of the mesh; in this case in the vicinity of the the corner of
the backstep. This mesh is not consistent with the source data, so
fields are required in the zero directory and cutting patches are used
to specify the properties at the inlets.

The pitzDailySteadyMappedToRefined case demonstrates mapping onto a
geometrically similar case with a different mesh density. This mesh is
consistent with the source, so no fields are needed and no cutting
patches are used. This case does, however, perturb the geometry of the
block mesh a bit, so that some of the refined case is not overlapping
the original case. This provides a test of the stabilisation
procedures within the mesh-to-mesh mapping functions.
2023-02-16 15:15:24 +00:00
9175fb13fd meshToMesh: Stabilisation
Stabilisation has been added to the mapping of fields between consistent
meshes. This means that if part of the target mesh is found not to
connect with the source mesh, then its values will be set by propagating
a value from the closest part of the target mesh did successfully
connect to the source. This propagation is achieved by means of a mesh
wave.

This stabilisation applies to both cell and patch fields, and any and
all ancillary fields that may be being stored by the patch boundary
conditions. It applies to the mapping performed by both mapFieldsPar and
the run-time mapping meshToMesh topology changer.

This fixes the previous situation in mapping between consistent meshes
in which target elements which did not connect to the source would be
given an undefined value, which would cause either a floating point
error, or (worse) incorrect operation.
2023-02-16 11:12:36 +00:00
2c247c3e8f meshTools/algorithms/PatchEdgeFaceWave: Added point object with data 2023-02-16 11:12:36 +00:00
f95eb5fd11 meshToMesh, mapFieldsPar: Rationalisation
Cell-to-cell interpolation has been moved to a hierarchy separate from
meshToMesh, called cellsToCells. The meshToMesh class is now a
combination of a cellsToCells object and multiple patchToPatch objects.
This means that when only cell-to-cell interpolation is needed a basic
cellsToCells object can be selected.

Cell-to-cell and vol-field-to-vol-field interpolation now has two well
defined sets of functions, with a clear distinction in how weights that
do not sum to unity are handled. Non-unity weights are either
normalised, or a left-over field is provided with which to complete the
weighted sum.

The left-over approach is now consistently applied in mapFieldsPar,
across both the internal and patch fields, if mapping onto an existing
field in the target case. Warning are now generated for invalid
combinations of settings, such as mapping between inconsistent meshes
without a pre-existing target field.

All mapping functions now take fields as const references and return tmp
fields. This avoids the pattern in which non-const fields are provided
which relate to the source, and at some point in the function transfer
to the target. This pattern is difficult to reason about and does not
provide any actual computational advantage, as the fields invariably get
re-allocated as part of the process anyway.

MeshToMesh no longer stores the cutting patches. The set of cutting
patches is not needed anywhere except at the point of mapping a field,
so it is now supplied to the mapping functions as an argument.

The meshToMesh topology changer no longer supports cutting patch
information. This did not previously work. Cutting patches either get
generated as calculated, or they require a pre-existing field to specify
their boundary condition. Neither of these options is suitable for a
run-time mesh change.

More code has been shared with patchToPatch, reducing duplication.
2023-02-16 11:12:36 +00:00
c8f177e453 streamlines: Protected operation agaist no streamlines being generated 2023-02-16 11:12:36 +00:00
9410d84a7e cutPoly: Documentation fixes 2023-02-16 10:30:18 +00:00
77b0299beb WallLocation: Corrected earlier compilation fix 2023-02-15 12:50:29 +00:00
04407a4d59 WallLocation: Fix for Clang 2023-02-15 09:21:18 +00:00
ffe32b0ade MRFZone: Added special treatment of fixed flux BCs for multiphaseEuler 2023-02-14 20:45:39 +00:00
8374856d4f compressible::alphatWallBoilingWallFunction: Fix to Jakob number 2023-02-14 08:49:37 +00:00
602c909bcb patchDistWave, fvPatchDistWave: Simplified wall location structure 2023-02-10 17:02:28 +00:00
f862b5142d solvers::multiphaseEuler: Reorganised thermophysicalPredictor
To ensure transport consistency between the composition and energy both must be
included in the optional energy corrector loop.
2023-02-10 12:49:35 +00:00
029f58f433 multiphaseEuler: sphericalDiffusiveMassTransfer: Removed unused Lewis number setting 2023-02-09 16:49:34 +00:00
bffbfeb8ec decomposePar: Corrected indexing bug 2023-02-09 16:24:26 +00:00
a430d032f5 MRF: Made compatible with non-conformal couplings (NCC)
MRF requires mapping from a given set of polyMesh cells and faces to
internal and boundary faces of the finite volume system. It therefore
has to use the polyBFacePatches and polyBFacePatchFaces maps in order to
be compatible with NCC. This has been implemented, and now MRF should be
fully compatible with NCC.
2023-02-09 09:56:48 +00:00
d913607f3d tutorials/modules/incompressibleVoF/damBreakWithObstacle: Added relaxation for stability 2023-02-08 19:16:09 +00:00
61c1d096a5 tutorials/modules/incompressibleVoF/sloshingTank3D3DoF: Set pressure reference to 0 2023-02-07 17:07:17 +00:00
0d49a11326 fvMeshTopoChangersRefiner: The correctFluxes entry in dynamicMeshDict is now optional
Solvers ensure fluxes are maintained and updated correctly after topology change
and it no longer the responsibility of fvMeshTopoChangersRefiner to attempt
this.
2023-02-07 17:05:45 +00:00
d89d88f62e solvers::incompressibleVoF: Ensure pressure reference is set for closed domains 2023-02-07 17:04:52 +00:00
d1cb329706 tutorials: movingCone: Corrected and simplified
The '-region' option has been leveraged to significantly simplify the
meshing and decomposition in the movingCone cases. These cases have also
been corrected to restore the variation in decomposition between the
different meshes, which is important for thoroughly testing the patch
field mapping. The shockFluid case has also had its duration extended a
little in order to span the final mesh mapping time.
2023-02-07 16:14:30 +00:00
d4980f71d6 decomposePar: Removed left over -dict option 2023-02-07 16:14:30 +00:00
6ac8680e8c PDRFoamAutoRefine: Removed
The method to update phi in PDRFoamAutoRefine has been superseded by rhoUf in
all other compressible solvers and PDRFoam needs to be updated, requiring
funding.  PDRFoamAutoRefine is no longer maintained.
2023-02-07 14:58:02 +00:00
c4523d4147 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-02-07 14:23:36 +00:00
c41f303c30 solvers::twoPhaseVoFSolver: Register alphaPhiCorr0.<phase1> for redistribution 2023-02-07 14:23:06 +00:00
38e8e7916a fvPatchField, fvsPatchField, pointPatchField: Generalised in-place mapping
The patch field 'autoMap' and 'rmap' functions have been replaced with a
single 'map' function that can used to do any form of in-place
patch-to-patch mapping. The exact form of mapping is now controlled
entirely by the mapper object.

An example 'map' function is shown below:

    void nutkRoughWallFunctionFvPatchScalarField::map
    (
        const fvPatchScalarField& ptf,
        const fvPatchFieldMapper& mapper
    )
    {
        nutkWallFunctionFvPatchScalarField::map(ptf, mapper);

        const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
            refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);

        mapper(Ks_, nrwfpsf.Ks_);
        mapper(Cs_, nrwfpsf.Cs_);
    }

This single function replaces these two previous functions:

    void nutkRoughWallFunctionFvPatchScalarField::autoMap
    (
        const fvPatchFieldMapper& m
    )
    {
        nutkWallFunctionFvPatchScalarField::autoMap(m);
        m(Ks_, Ks_);
        m(Cs_, Cs_);
    }

    void nutkRoughWallFunctionFvPatchScalarField::rmap
    (
        const fvPatchScalarField& ptf,
        const labelList& addr
    )
    {
        nutkWallFunctionFvPatchScalarField::rmap(ptf, addr);

        const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf =
            refCast<const nutkRoughWallFunctionFvPatchScalarField>(ptf);

        Ks_.rmap(nrwfpsf.Ks_, addr);
        Cs_.rmap(nrwfpsf.Cs_, addr);
    }

Calls to 'autoMap' should be replaced with calls to 'map' with the same
mapper object and the patch field itself provided as the source. Calls
to 'rmap' should be replaced with calls to 'map' by wrapping the
addressing in a 'reverseFvPatchFieldMapper' (or
'reversePointPatchFieldMapper') object.

This change simplifies the creation of new patch fields and hence
improves extensibility. It also provides more options regarding general
mapping strategies between patches. Previously, general abstracted
mapping was only possible in 'autoMap'; i.e., from a patch to itself.
Now, general mapping is possible between different patches.
2023-02-07 14:11:27 +00:00
53dc33d25e src/Allwmake: Reorganised lagrangian 2023-02-06 08:14:14 +00:00
bd866111b7 polyCellSet,fvCellSet: Updated documentation 2023-02-04 13:26:34 +00:00