Commit Graph

4647 Commits

Author SHA1 Message Date
7ec1023376 domainDecompositon: Fix to the ordering of non-conformal mapped walls 2024-10-25 13:55:09 +01:00
d19b858ec2 distributions::standardNormal: Prevent call of log with zero value
Resolves bug report https://bugs.openfoam.org/view.php?id=4167
2024-10-24 13:03:00 +01:00
e971fc5fd6 fvMeshStitcher: Fixes for cases with multiple NCC-s
A number of bugs have been fixed relating to cases in which multiple NCC
patches are locally edge-connected, and/or are edge-connected across a
processor boundary.
2024-10-24 11:30:01 +01:00
a00b947c1d unitConversion: Fixed format of non-named units
Non-named unit conversions are now written in a single set of square
brackets, with colons used to separate the sets of exponents and
multipliers. So, for example, a named unit conversion of [rpm] gets
converted to a non-named [0 0 -1 0 0 0 0 : 0 1 : 0.10472] (i.e.,
[time^-1 : angle : 0.10472]).

Previously, multiple sets of square brackets were used to separate the
sections, so the above example would have been written as
[0 0 -1 0 0 0 0][0 1][0.10472]. The problem with this is that '][' is
not distinguished in the token parser from '] ['. Combined with the fact
that the later sections are optional, this makes reading pairs or lists
of these objects impossible. The new format is, by comparison,
unambiguously delimited in all contexts.

This change may break the restart of a case in which unit conversion
entries have been written out. It is unlikely to require modification to
an initial configuration as named unit conversion entries (such as [rpm]
and [MPa] and [l/min]) are unaffected.
2024-10-03 11:54:56 +01:00
855365b951 fvMeshStitcher: Update the event index of modified fields
This prevents inconsistent field data being cached.

Note that the stitcher still does not cause old-time fields to be
stored. Stitching is not considered an update (in time) to a field's
value. It is a pure mapping, and it applies similarly to both current
and old-time fields.

Resolves bug report https://bugs.openfoam.org/view.php?id=4155
2024-09-24 15:10:26 +01:00
4bcbc28400 mappedPatchBase: Fix for patches with a single face
Resolves bug report https://bugs.openfoam.org/view.php?id=4152

Patch contributed by Timo Niemi, VTT.
2024-09-17 19:47:06 +01:00
2853f9ddfd movingMappedWallVelocity: Fix calculation of mapped shear velocity 2024-09-11 17:00:52 +01:00
f1068151ee functionObjects::residuals: Write into directory of the start time
This restores the output to that prior to commit 0829dbdf, but retains
the bug fix from that commit.
2024-09-04 16:30:22 +01:00
fb0e5201d2 functionObjects::residuals: Prevent exectution at the start
Residuals are only available once some equations have been solved, so it
is not valid for this function to execute until the end of the first
timestep.

This also prevents a bug in which the residuals function trggers the
construction of a Residuals mesh object during the writing of the file
header. This only happens on the master process, and therefore leads to
the master having more objects in its database than the other processes.
If this results in the object table being resized then this can change
the iteration order, which can in turn break mapping procedures (in NCC,
topology change, mesh-to-mesh mapping, ...) which rely on fields being
accessed from the database in a consistent order.
2024-08-07 11:54:49 +01:00
74a1c352b2 surfaceFieldValue: Added the ability to specify multiple patches
The 'select' control can now take the value 'patches' in which case a
'patches' control will be used to specify a list of patches, rather than
just a single patch. The 'patches' and 'patch' controls now also both
support wildcards.
2024-08-07 11:16:03 +01:00
1bb564c77e dictionary::changeKeyword: Convert newKeyword to word before updating the iterator name
This change allows non-pattern keywords to be changed into pattern keywords
without generating a stripInvalid error.
2024-07-30 17:32:00 +01:00
d76e1b4974 distributions::tabulated: Corrected documentation 2024-07-30 11:27:55 +01:00
b4edb74dcf multiphaseEuler: Uniquely name fields to prevent duplicate registration 2024-07-30 11:27:55 +01:00
6ebeb96563 dynamicCodeContext: Lookup variables from the context dictionary
codeStream (#calc etc.) creates a local sub-dictionary in which to expand the
code so variable lookup needs to be checked with respect to the context
dictionary rather than with respect to the code sub-dictionary.  With this
change the following test/dictionary/testCalc #calc example now works:

    a   1.1;

    d
    {
        b   4.8;
    }

    // Access to higher-level sub-entries using the "../" operators, e.g.
    f
    {
        g #calc "$a / $../d/b";
    }
2024-07-26 11:15:56 +01:00
44bfb5ac43 unitConversion: Fix bug preventing checking of dimensionless units 2024-07-25 12:47:27 +01:00
65b4d33620 fvMeshStitcher: Fix incompatibility with CrankNicolson 2024-07-16 08:15:51 +01:00
17d0158143 COxidationIntrinsicRate: Corrected effectiveness factor
Resolve bug report https://bugs.openfoam.org/view.php?id=4111
2024-07-10 16:03:30 +01:00
c59e5ce983 Updated for OpenFOAM-12 2024-07-06 16:02:47 +01:00
53a1bfa3fd Documentation: Updated for Doxygen 1.11.0 2024-07-06 14:47:50 +01:00
041b21a95e Documentation: Updated for Doxygen 1.11.0 2024-07-06 14:10:15 +01:00
5babe5c67c Documentation: Updated for Doxygen 1.11.0
Typos in documentation strings corrected with the aid of codespell
2024-07-06 10:32:56 +01:00
dab3104d4c functionObjects::specieFlux: New functions to calculate specie fluxes
These functions calculate the specie-flux and write it as a
surfaceScalarField called 'specie<Type>Flux(<specieName>)'. There are
three such functions; specieAdvectiveFlux and specieDiffusiveFlux return
the advective and diffusive parts of the flux, respectively, and
specieFlux returns the total combined flux.

Example of function object specification:

    specieFlux
    {
        type    specieFlux; // specieAdvectiveFlux, specieDiffusiveFlux
        libs    ("libfieldFunctionObjects.so");
        field   NH3;
    }

Or, using the standard configuration:

    #includeFunc specieFlux(NH3)
2024-07-04 14:54:59 +01:00
51a2337718 stopAtTimeStep: Read minDeltaT in user time or with specified units
Resolves bug report https://bugs.openfoam.org/view.php?id=4106
2024-07-02 14:35:44 +01:00
aaa2c25b81 functionObjects::turbulenceFields: improved documentation of optional prefix entry
See https://bugs.openfoam.org/view.php?id=4108
2024-07-02 14:17:07 +01:00
cb5d40932a contactAngleModels: Corrected handling of contact angle conversion from degrees to radians 2024-06-28 17:22:21 +01:00
d85398b6e0 triIntersect: Handle rare edge case of src-point-tgt-tri intersection 2024-06-28 14:12:21 +01:00
34ac423c6d omega, Function1s::omega: Updated documentation
The option to specify rpm as the keyword is deprecated in favour of
specifying omega with a unit conversion from [rpm]. The documentation
for the omega input classes have been updated to reflect this.
2024-06-28 09:29:49 +01:00
d61ea84ebb Updated rpm entries to omega with an [rpm] unit specification
This is a more convenient, consistent and flexible approach to specifying
rotational speed.
2024-06-27 17:38:22 +01:00
928db2bdce DynamicField: Added size and value constructors 2024-06-27 13:04:15 +01:00
5c245974c3 symmTransform: Added bool and label transform overloads 2024-06-26 14:34:53 +01:00
8bf9afff11 Time: Removed the deprecated timeName() function
use name() instead.
2024-06-26 11:38:49 +01:00
10c1f27e06 Time: Changed FatalError in the time precision update to Warning
Due to rounding to the nearest value it is possible for the updated time name to
predate the previous time name after a precision change, for example as a
consequence of a sudden reduction in time-step.  This is not an error and should
not cause the run to stop but the user is warned about the temporary anomaly in
the printing of time.
2024-06-26 11:10:47 +01:00
b3b1b5b6da fvModels::propellerDisk: Disk momentum source which approximates a propeller based on a propeller curve
The fvModels directory has been reorganised into separate libraries to make it
easier to add and maintain new complex models such as the propellerDisk.

Class
    Foam::fv::propellerDisk

Description
    Disk momentum source which approximates a propeller based on a given
    propeller curve.

    Reference:
    \verbatim
        Hough, G. R., & Ordway, D. E. (1964).
        The generalized actuator disk.
        Developments in theoretical and applied mechanics, 2, 317-336.
    \endverbatim

Usage
    Example usage:
    \verbatim
    diskSource
    {
        type            propellerDisk;

        selectionMode   cellZone;
        cellZone        propeller;

        diskNormal      (1 0 0);    // Normal direction of the disk

        n               26.03;      // Rotation speed [1/s]

        dPropeller      0.203;      // Propeller diameter
        dHub            0.039179;   // Hub diameter

        propellerCurve
        {
            type table;

            //   J     Kt     Kq
            values
            (
                (0.10 (0.3267 0.03748))
                (0.15 (0.3112 0.03629))
                (0.20 (0.2949 0.03500))
                (0.25 (0.2777 0.03361))
                (0.30 (0.2598 0.03210))
                (0.35 (0.2410 0.03047))
                (0.40 (0.2214 0.02871))
                (0.45 (0.2010 0.02682))
                (0.50 (0.1798 0.02479))
                (0.55 (0.1577 0.02261))
                (0.60 (0.1349 0.02027))
                (0.65 (0.1112 0.01777))
                (0.70 (0.0867 0.01509))
                (0.75 (0.0614 0.01224))
                (0.80 (0.0353 0.00921))
            );
        }
    }
    \endverbatim
2024-06-25 16:34:41 +01:00
81a3c90646 fvMeshToFvMesh: Debug writing of target coverage 2024-06-25 11:15:50 +01:00
ed6e57a103 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2024-06-25 10:23:46 +01:00
97d4443134 decompositionMethods::zoltan: Free string storage allocated by strdup 2024-06-25 10:23:02 +01:00
bb26f49cd8 omega1: Fix writing of time units
Resolves bug report https://bugs.openfoam.org/view.php?id=4103
2024-06-25 08:46:20 +01:00
03bfaaa4fa fvModels: phaseChange: Corrections
The form of the sensible energy/enthalpy transfer and the sign of the
latent heat contribution have both been corrected
2024-06-21 16:41:42 +01:00
adfc80c412 decompositionMethods::zoltan: Added support for processors contaning zero cells
This update allows Zoltan to be used by snappyHexMesh to redistribute the mesh
after refinement and sub-setting even if some processors loose all their cells
in the process.
2024-06-21 14:54:35 +01:00
2f7185d73a lagrangian/basic/indexedParticle: Remove unused particle and cloud type 2024-06-21 13:16:46 +01:00
530213570c lagrangian/basic/IOPosition: Removed unused member data 2024-06-20 12:17:34 +01:00
e713214192 functionObjects::layerAverage: Removed unused member data 2024-06-20 09:04:35 +01:00
e82a184f1a polyMesh: Subdirectory for mesh objects
Poly-mesh mesh objects are now in a subdirectory of the polyMesh
directory. The cpuLoad object has been made a polyMesh object, rather
than an fvMesh object, in order to remove the dependence on the finite
volume library. This has, in turn, removed the base lagrangian library's
dependence on finite volume.
2024-06-19 20:44:03 +01:00
4751a775bc mappedPatchBase: Corrected copy construct of reMapAfterMove 2024-06-19 13:57:48 +01:00
bbc3931846 fvModels::viscousHeating: New fvModel to add the viscous heating source to the total energy equation
Note that this fvModel provides the missing conservative redistribution term for
the viscous heating, the main part of the viscous heating effect is provided by
the inclusion of the kinetic energy equation in the internal energy equation to
form the total energy equation.
2024-06-19 12:39:31 +01:00
7a58f30c56 conformedFvPatchField: Forward evaluations to the original patch
This enables the correct solution of FV-motion fields during mesh
updates when the mesh is in an unstitched state.

Resolves bug report https://bugs.openfoam.org/view.php?id=4101
2024-06-19 10:51:49 +01:00
3cdec1dc56 decompositionMethods::parMetis: Added support for processors contaning zero cells
ParMETIS cannot handle processors containing no cells, a fatal error is
generated, to work around this limitation a special communicator is created
containing only those processors which have cells and ParMETIS called only for
those processors.

This update allows ParMETIS to be used by snappyHexMesh to redistribute the mesh
after refinement and sub-setting even if some processors loose all their cells
in the process.
2024-06-18 19:24:30 +01:00
16f82f2da0 meshObjects: Formalise support for multiple named meshObjects of the same type 2024-06-14 19:03:02 +01:00
587c44fba7 atmBoundaryLayer: Corrected examples
Resolves bug report https://bugs.openfoam.org/view.php?id=4097
2024-06-13 14:46:43 +01:00
ba42eb5248 Fixes for compiling with 64 bit labels
Resolves bug report https://bugs.openfoam.org/view.php?id=4098
2024-06-13 13:51:14 +01:00