7768 Commits

Author SHA1 Message Date
c3f131e816 Function1s::Polynomial: Simplification
The coefficients in the polynomial are now specified in order of
increasing exponent, starting from the constant coefficient (i.e., zero
exponent). Exponents are no longer specified. This better fits the
definition of a polynomial, and it prevents the strange scenario when if
exponents are given as a vector or tensor or similar then the units of
the coefficients are not the same across the different components.

For example, polynomial y = -1 + x^2 + 2x^3 can be specified as:

    <name>  polynomial (-1 0 1 2);

Or, alternatively:

    <name>
    {
        type    polynomial;
        coeffs  (-1 0 1 2);
    }
2024-04-29 22:02:22 +01:00
f28110ae94 UniformDimensionedField: Added support for oldTime 2024-04-29 21:17:59 +01:00
3aba7ea46f dimensionSets: Added dimRate = dimless/dimTime 2024-04-29 21:17:34 +01:00
0081c6a3e2 swirlInletVelocity, swirlFlowRateInletVelocity: Consistent specification
Both these boundary conditions now support specification of the radial
and tangential components as a function of time and radius, or
alternatively the tangential component as a time-varying rotational
speed.

The cylindricalInletVelocity condition has been superseeded by
swirlInletVelocity and has therefore been removed.
2024-04-26 15:15:34 +01:00
187b795713 Function2s: Added 'function1', 'product' and 'radial'
The 'function1' function returns the result of a Function1 using just
one of the arguments given to the function2. The function1 is specified
as value1 or value2, depending on which argument it is to be evaluated
with. E.g.:

    <name>
    {
        type            function1;
        value2          table
        (
            (0.00 (0 0 0))
            (0.35 (0 0 1))
            (0.71 (0 0 0))
        );
    }

The 'product' function returns the product of two independent
Function1-s of the two input arguments, again specified as value1 and
value2. For example, to scale a table of vectors in the first argument
with a ramp in the second argument:

    <name>
    {
        type            product;
        value1<vector>  table
        (
            (0.00 (0 0 0))
            (0.25 (1 0 0))
            (0.50 (0 0 0))
        );
        value2<scalar>
        {
            type        linearRamp;
            start       1;
            duration    4;
        }
    }

Note that only one type specification (the <vector>/<scalar>/... part)
is needed in general for the value entries, and no type specifications
are needed if the function is scalar.

The 'radial' function returns a Function1 of the magnitude of the
two-dimensional vector with components equal to the input arguments.
E.g.:

    <name>
    {
        type            radial;
        value           table
        (
            (0.00 (0 0 0))
            (0.35 (0 0 1))
            (0.71 (0 0 0))
        );
    }
2024-04-26 15:15:34 +01:00
42456c3ce9 timeVaryingMappedFvPatchField: Standardise constructors 2024-04-26 11:29:13 +01:00
73feebd5f4 logFile: New prototype log file class for functionObjects etc.
to write integral data into a table in the postProcessing directory.
2024-04-25 15:32:21 +01:00
d5285f23e5 snappyHexMesh: Rationalised #includes 2024-04-24 15:28:07 +01:00
2f4081dc15 timeControlFunctionObject: Removed unused optional control 2024-04-24 15:27:29 +01:00
7fbd730f2a PatchInjection: Fixed number of injected parcels for small timesteps
Resolves bug report https://bugs.openfoam.org/view.php?id=4071
2024-04-23 08:40:41 +01:00
5b389288e7 dimensionedType: Removed unused read method 2024-04-23 08:40:38 +01:00
f789a4f530 shapeToCell: Changed keyword type -> shape
to avoid clash with the set type, e.g. in topoSetDict

actions
(
    {
        action  new;
        type    cellZoneSet;
        name    c0;
        source  shapeToCell;
        shape   hex;
    }
);

the entry "shape hex" selects the hex cell shape.
2024-04-22 13:52:52 +01:00
6a3c7ab502 dimensionedType: Reinstated backwards-compatibility reading the name of named dimensionedTypes 2024-04-22 13:38:53 +01:00
28e5556864 refinementRegions: Updated triSurfacePointScalarField constructor call 2024-04-22 11:53:28 +01:00
59f30e8de1 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2024-04-19 20:54:32 +01:00
f9ac53aab4 bin/foamFind: added '-edit' option to open file in a text editor
The editor must be specified by configuring the EDITOR environment
variable. For example to use the 'gedit' editor, the following entry
could be added to the user's .bashrc file:

export EDITOR=gedit
2024-04-19 20:53:00 +01:00
dce39ffbd2 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-04-19 18:22:12 +01:00
3dc7e13b27 polyBoundaryMesh: Removed unnecessary patch face ordering check 2024-04-19 18:21:37 +01:00
29360be8cd Function1s, Function2s: Remove unnecessary read methods and improve const-ness 2024-04-19 14:22:57 +01:00
2e9e37d67c bin/foamFind: fixed typo in header 2024-04-19 09:17:06 +01:00
92c83f5c1c test/dictionary/testCalc: Added a file name construction example 2024-04-18 18:05:49 +01:00
57cb8b2c59 foamSearch: Updated call to foamDictionary for absolute paths 2024-04-18 15:24:24 +01:00
3ce8a35029 tutorials: Use seven element dimension sets as standard 2024-04-18 13:48:59 +01:00
26f9c794b4 dimensionedType: Permit reading dimensions after the value in all contexts 2024-04-18 13:37:10 +01:00
c2ec1037d9 createEngineZones: Disabled parallel operation which requires further development 2024-04-18 09:07:45 +01:00
8bd14164ad utilities removeFaces and createEngineZones: Replaced Pout with Info 2024-04-18 08:27:49 +01:00
3bd79f0447 bash_completion: Added reorderPatches 2024-04-17 17:38:33 +01:00
161710acd1 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-04-17 17:38:26 +01:00
6e754fd650 extrudeToRegionMesh: moved setting the mesh instance to after the deletion of empty patches 2024-04-17 17:37:42 +01:00
b85aebb250 dimensionSet: Remove #include dependence on Field 2024-04-17 16:22:38 +01:00
347cf0e9e2 GeometricVectorField: Added normalised and perpendicular unary functions 2024-04-17 16:22:38 +01:00
4707bc917e reorderPatches: New utility to reorder patches
corresponding to a give order, another case or another region.

Description
    Utility to reorder the patches of a case

    The new patch order may be specified directly as a list of patch names
    following the -patchOrder option or from the boundary file of a reference
    case specified using the -referenceCase option with or without the
    -referenceRegion option.

    This utility run either serial or parallel but either way the reference
    case boundary file is read from the constant directory.

Usage
    \b reorderPatches

    Options:
      - \par -patchOrder \<patch names\>
        Specify the list of patch names in the new order.

      - \par -referenceCase \<case path\>
        Specify the reference case path

      - \par -referenceRegion \<name\>
        Specify an alternative mesh region for the reference case.
        If -referenceCase is not specified the current case is used.

      - \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.
2024-04-17 16:15:10 +01:00
441d7f1243 snappyHexMesh::meshRefinement: Correct mesh instance for overwrite
Must be done just before write to correct the instance in case it has changed
due to call to reorderPatches to remove zero-sized patches.
2024-04-17 15:16:12 +01:00
86a9c41c21 tutorials: Removed redundant fluxRequired entries 2024-04-17 15:15:38 +01:00
261d2aac60 randomGenerator: Added functions to return fields of samples 2024-04-17 09:39:40 +01:00
f582eff8a7 patchIntersection, nonConformalMappedPolyFacesFvsPatchLabelField: Fixes for 64-bit labels 2024-04-16 16:14:56 +01:00
08870e4560 PhysicalPropertiesThermo, mirrorMesh, renumberMesh: Clang compilation fixes 2024-04-16 16:14:56 +01:00
d5880573c2 randomGenerator: Added IO
This means that, if it is deemed necessary, a sub-model can save the
state of its random generator and then recover that state on restart.
2024-04-16 16:14:56 +01:00
ad9bfa4c3c token: Added support for reading and writing integers of specific sizes 2024-04-16 16:14:56 +01:00
d34d9b93cc distributions::standardNormal: Added to replace functions in randomGenerator 2024-04-16 16:14:56 +01:00
1d05b224cb randomGenerator: Renamed Random 2024-04-16 16:14:56 +01:00
f0c63237aa multiphaseEuler: Corrected printing of interface names 2024-04-16 16:14:56 +01:00
30a25219d7 polyMesh::reorderPatches: Update time instance for the mesh
so that the mesh with the changed boundary is written into a new time directory
if time has changed.
2024-04-16 15:11:14 +01:00
615d72a17d PtrListDictionary::set: Remove key from hash table if the pointer is null 2024-04-16 12:17:02 +01:00
e5f48bfca6 functionObjects: Added single patch option to functionObjects that operate on patches
functionObjects layerAverage, nearWallFields, wallHeatFlux, wallHeatTransferCoeff,
wallShearStress and forcesBase now support both the 'patches' option for which a
list of regular expressions to select the patches is specified and the new simple
'patch' option for which a single patch name is specified.
2024-04-15 14:18:50 +01:00
95cb22b8bf multiphaseEuler::cellPressureCorrector: Removed redundant code 2024-04-15 09:50:27 +01:00
dfb816c511 foamPostProcess: Load the modular solver library before constructing the mesh
to ensure all the solver specific patch types are available when the mesh is
constructed.
2024-04-13 09:44:01 +01:00
5a9681c693 mappedPatchBaseBase: Added actual patch type to diagnostic message 2024-04-13 09:43:27 +01:00
a4929ccbbc polyMesh: Updated searching for boundary, cells, cellZones, faceZones and pointZones files
These files are now searched for starting at the current time and back in time
to constant but stopping at the most recent polyMesh directory containing faces,
i.e. the most recent topological specification of the mesh.  Zones which cannot
be found are set empty rather than requiring zone files to be present containing
an empty list.
2024-04-12 13:43:05 +01:00
5ed8fd320c cellZone: Added typedef to access the cellZones type 2024-04-11 13:40:11 +01:00