Commit Graph

7369 Commits

Author SHA1 Message Date
ab2fb72761 createRegionMesh.H, createRegionMeshNoChangers.H: New include files to construct a region mesh 2024-01-26 10:03:24 +00:00
9886fea313 BasicThermo::Cp: volScalarField reference optimisations
Now that BasicThermo::Cp returns a volScalarField reference because Cp is cached
in BasicThermo code calling Cp can hold a reference rather than a copy for
efficiency.
2024-01-25 13:55:57 +00:00
357662688d alphatJayatillekeWallFunctionFvPatchScalarField: Updated to evaluate the heat-flux from the temperature gradient
rather than from the energy gradient, consistent with the current form of energy
equations in OpenFOAM solvers in which diffusive thermal transport is
temperature gradient based with a semi-implicit energy gradient correction term.
20240124
2024-01-24 18:44:43 +00:00
5e64111838 bin/tools/RunFunctions: Added check to runApplication and runParallel
to issue an error message if the application argument is not provided.
2024-01-23 12:19:41 +00:00
60acc3a845 etc/caseDicts/functions/functions: Template functions file for foamGet
Executing the command

    foamGet functions

in a case copies the etc/caseDicts/functions/functions template file into the
system directory.
2024-01-23 10:15:42 +00:00
8eb0cc00b1 etc/templates: Updated the system/functions files 2024-01-22 12:29:50 +00:00
ea61fac290 dictionary: Removed unused historical scoped variable lookup code 2024-01-22 12:09:38 +00:00
361de39e28 tutorials/multiRegion/CHT/coolingSphere: Deleted unused system/functions file 2024-01-22 12:09:11 +00:00
aaec85827a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-01-21 17:47:49 +00:00
f47c94d5a6 functionEntries/calcEntry: Added support for variable lookup from sub-dictionaries with the need for '!'
For example in test/dictionary/testCalc:

a   1.1;
.
.
.
// Access to sub-entries using the "/" operator, e.g.
d
{
    b   4.8;
}
e   #calc "$a / $d/b";
2024-01-21 17:45:32 +00:00
364fef68f9 e.g.
a   1.1;

// Access to sub-entries using the "/" operator, e.g.
d
{
    b   4.8;
}
e   #calc "$a / $d/b";
2024-01-21 17:35:03 +00:00
8331934c8c tutorials: removed blank lines left over from transferring the functions entry to the functions file 2024-01-21 10:50:32 +00:00
c018244305 mergeMeshes: Reinstated reading of the controlDict of added cases
to set the time and other case controls.  This is possible and reliable now that
the functionObject specifications are in a separate functions file which is not
read.
2024-01-21 09:31:12 +00:00
d308752ea4 blockMesh: Removed unused -noFunctionObjects option 2024-01-21 09:30:55 +00:00
8402bc3de2 potentialFoam: Replaced the -withFunctionObjects option with -functionObjects
and removed the unused -noFunctionObjects option.
2024-01-21 09:27:12 +00:00
06df35268f foamListTimes: Removed unused -noFunctionObjects option 2024-01-21 09:23:03 +00:00
a1eb8898d6 tutorials: Moved the functions entry from controlDict into a functions file 2024-01-20 23:43:10 +00:00
e99466059f potentialFoam: Removed the unused -noFunctionObjects option 2024-01-20 14:47:53 +00:00
de363dde05 functionObjectList: Moved the functions entry from controlDict into a functions file
for consistency with fvModels and fvConstraints, to simplify code and case
maintenance and to avoid the potentially complex functions entries being
unnecessarily parsed by utilities for which functionObject evaluation is
disabled.

The functions entry in controlDict is still read if the functions file is not
present for backward-compatibility, but it is advisable to migrate cases to use
the new functions file.
2024-01-20 14:46:28 +00:00
f47e1b0bab mergeMeshes: Extended to merge lists of meshes
Description
    Merges meshes without stitching.

Usage
    \b mergeMeshes [OPTION]

    Options:
      - \par -doc
        Display the documentation in browser

      - \par -srcDoc
        Display the source documentation in browser

      - \par -help
        Print the usage

      - \par -case \<dir\>
        Select a case directory instead of the current working directory

      - \par -region \<name\>
        Specify an alternative mesh region.

      - \par -addRegions "'(region1 region2 ... regionN)'"
        Specify list of region meshes to merge.

      - \par -addCases "'(\"casePath1\" \"casePath2\" ... \"casePathN\")'"
        Specify list of case meshes to merge.

      - \par -addCaseRegions "'((\"casePath1\" region1) (\"casePath2\" region2)"
        Specify list of case region meshes to merge.
20240117
2024-01-17 19:03:05 +00:00
a671b738c9 MPPIC: Removed moment averaging method
Resolves bug report https://bugs.openfoam.org/view.php?id=4047
2024-01-17 16:04:35 +00:00
11b2951a79 Prevent warnings from Gcc 13.2.1 and Clang 17.0.6 2024-01-16 14:09:38 +00:00
2f724bdc91 multiphaseEuler::phaseModel: Changed the phase-fraction field construction to work around a problem with Clang
The Clang compiler does not use std::move to transfer the result of the ternary
operator into the phase-fraction field resulting in it not being registered to
the database.  To work around this limitation/bug the ternary operator is now
provided with tmp fields the result of which is passed with an IOobject to the
final field constructor to ensure it is registered and the IO options set
correctly.
2024-01-12 15:18:07 +00:00
ddeaa566ef coded: Permit both untyped and typed substitutions
Coded functionality now supports basic un-typed substitutions from the
surrounding dictionary. For example:

    value 1.2345;

    #codeExecute
    {
        scalar s = $value;
        ...
    };

It also now supports the more functional typed substitutions, such as:

    direction (1 0 0);

    #codeExecute
    {
        vector v = $<vector>direction;
        ...
    };

These substitutions are now possible in all code blocks. Blocks with
access to the dictionary (e.g., #codeRead) will do a lookup which will
not require re-compilation if the value is changed. Blocks without
access to the dictionary will have the value directly substituted, and
will require recompilation when the value is changed.
2024-01-10 15:41:57 +00:00
97f88d4991 uniformInletOutletFvFieldSource: Corrected documentation 2024-01-09 15:19:24 +00:00
1218bd08ee epsilonWallFunction, omegaWallFunction: Reimplementation of "corner" weighting
These wall functions modify the turbulent properties (epsilon or omega,
and G) in the adjacent cells. When a cell has multiple wall faces, a
weighting process is used to combine the values from the different
walls. This weighting process has been rewritten and centralised into a
common base class. It is now based on an area-weighted average and is
applied to the fields in an order-independent manner. It is now fully
consistent with multiple simultaneous non-conformal connections.
2024-01-09 11:47:47 +00:00
53ddbda670 solutionControl: Added finalIter_ initialisation
Resolves bug-report https://bugs.openfoam.org/view.php?id=4045
2024-01-09 10:09:34 +00:00
144f75d65c truncatedConeCell, hemisphereToCell: New cell topoSetSources
Cell sets based on hemisphere and truncated cone geometries.

Example usage:

hemisphereToCell:
{
    name c1;
    type cellSet;
    action new;
    source hemisphereToCell;
    centre  (0 0.01 0);
    radius 0.008;
    axis (0 1 0);
}

truncatedConeToCell:
{
    name c2;
    type cellSet;
    action new;
    source truncatedConeToCell;
    point1  (0 0.05 0);
    point2  (0 0.06 0);
    radius1  0.001;
    radius2  0.006;
}

Patch contributed by Bulut Tekgül, Wärtsilä Finland.
2024-01-05 17:19:16 +00:00
17dd64112a MeshZones: Added findIndices
//- Find and return the zone indices for all matches
        labelList findIndices(const wordRe&) const;

It may also be useful to provide versions taking a list of word or wordRe which
will be added as required.
2024-01-04 16:48:32 +00:00
d5869d7413 pointDist: Added optional maximum distance parameter
such that the point-edge wave can be stopped when the distance from the
originating surface exceeds the specified maximum if distances beyond this are
of no interest as is the case for rigid-body motion with a specified outer
distance.  Stopping the point-edge in this manner can significantly speed-up the
calculation, particularly in parallel as the number of expensive communications
is reduced.
2024-01-04 15:01:33 +00:00
6945fc3b0a HashList: Optimise for repeated usage with different sizes 20240104 2024-01-04 10:37:55 +00:00
ffc09d830b HashList: Clear entire table on resizeAndClear 2024-01-04 10:37:55 +00:00
57aa5ffc0a fluentUnitNumbers.txt: Corrected accidental edit 2024-01-02 21:15:21 +00:00
62d5798ad7 triIntersect: Prevent generation of partial topology for failed intersections 2023-12-28 12:08:31 +00:00
4ec2510b59 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-12-25 13:42:16 +00:00
69da8f3d7b stitchMesh: Replacement utility based on the new patchIntersection algorithm
The mergePatchPairs functionality in blockMesh also now uses patchIntersection.

The new mergePatchPairs and patchIntersection replaces the old, fragile and
practically unusable polyTopoChanger::slidingInterface functionality the removal
of which has allowed the deletion of a lot of other ancient and otherwise unused
clutter including polyTopoChanger, polyMeshModifier, polyTopoChange::setAction
and associated addObject/*, modifyObject/* and removeObject/*.  This
rationalisation paves the way for the completion of the update of zone handling
allowing mesh points, faces and cells to exist in multiple zones which is
currently not supported with mesh topology change.

Application
    stitchMesh

Description
    Utility to stitch or conform pairs of patches,
    converting the patch faces either into internal faces
    or conformal faces or another patch.

Usage
    \b stitchMesh (\<list of patch pairs\>)

    E.g. to stitch patches \c top1 to \c top2 and \c bottom1 to \c bottom2
        stitchMesh "((top1 top2) (bottom1 bottom2))"

    Options:
      - \par -overwrite \n
        Replace the old mesh with the new one, rather than writing the new one
        into a separate time directory

      - \par -region \<name\>
        Specify an alternative mesh region.

      - \par -fields
        Update vol and point fields

      - \par -tol
        Merge tolerance relative to local edge length (default 1e-4)

See also
    Foam::mergePatchPairs
2023-12-25 13:32:39 +00:00
061e6d8180 turbulentMixingLengthFrequencyFvScalarFieldSource: Corrected value 2023-12-22 16:00:03 +00:00
602347f6c1 prghUniformTotalPressureFvPatchScalarField: Added p_rgh variant of the time-varying uniform pressure BC
Patch contributed by Stanislau Stasheuski, Aalto University.
2023-12-22 12:20:46 +00:00
73a3fbe446 patchToPatches::intersection: Fix error part calculation for reversed targets 2023-12-21 19:26:43 +00:00
431c58d3fe triIntersect: Fix edge case where source is entirely within target 2023-12-21 19:26:43 +00:00
3a909790fe Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-12-21 16:31:57 +00:00
68342a46a1 meshCheck::checkGeometry,checkTopology: Now cell and face sets are written only if the setWriter is valid 2023-12-21 16:18:39 +00:00
d600bd11e4 triIntersect: Move stabilisation in to geometry construction
Source-point-to-target-triangle projections might be done in order to
determine the location outside of the target triangle, as well as the
location inside. Forcing the source point inside the target triangle is
therefore only appropriate when constructing the intersection geometry.
2023-12-21 12:57:55 +00:00
705a4999bd triIntersect: Stabilise source-point-to-target-triangle projections 2023-12-21 10:38:07 +00:00
f9b4027b05 vtkWriteOps: Protect against float overflow 2023-12-21 10:38:07 +00:00
cd133a28f5 fvMeshTopoChangers::refiner: Fix hang in parallel
This has required switching the order of dependence of the fvMesh
geometry (i.e., Sf, Cf, and C), and the interpolation weights. The
weights are now considered dependent on the geometry fields, and the
geometry fields must therefore construct without reference to the
weights.
2023-12-21 10:38:07 +00:00
20f5235ecf Renamed ID() -> Index()
Index is a better name to describe a label index than ID which may be an
integer, word or other means of identification.
2023-12-20 18:39:55 +00:00
7df07d2660 tutorials: Updated for the changes to triSurfaceMesh 2023-12-20 18:13:55 +00:00
a99155d0f0 Renamed IDs() -> Indices()
Indices is a better name to describe label indices than IDs which may be an
integers, words or other means of identification.
2023-12-20 14:29:23 +00:00
2057174b55 fvMeshStitcher: New stabilisation calculation
This calculation more carefully constructs the direction of the area
stabilisation so as to ensure that it does not oppose the area being
stabilised. This prevents the creation of faces with zero area.

Resolves bug report https://bugs.openfoam.org/view.php?id=4040
2023-12-20 13:52:50 +00:00