Commit Graph

7057 Commits

Author SHA1 Message Date
d1cb137266 dictionary: Convenient programmatic construction
Variadic constructors have been added to dictionary to facilitate
convenient construction in code, including within a #codeStream entry.
The constructors take an even number of arguments, alternating between
the key and the corresponding value. The values may, themselves, be
dictionaries constructed in the same way. This means that the code
directly maps to the resulting nested dictionary structure.

For example, the following code stream entry:

    #codeStream
    {
        code
        #{
            writeEntry
            (
                os,
                "dict",
                dictionary
                (
                    "s", 1,
                    "wl", wordList({"apples", "oranges"}),
                    "subDict", dictionary
                    (
                        "v", vector(2, 3, 4),
                        "t", tensor(5, 6, 7, 8, 9, 10, 11, 12, 13),
                        "ll", labelList(10, -1)
                    )
                )
            );
        #};
    }

Expands to the following:

    dict
    {
        s               1;
        wl              2 ( apples oranges );
        subDict
        {
            v               ( 2 3 4 );
            t               ( 5 6 7 8 9 10 11 12 13 );
            ll              10 { -1 };
        }
    }
2023-06-20 09:28:26 +01:00
b7a5680f5e src/MomentumTransportModels/incompressible/RAS: Updated table addition for foamToC 2023-06-19 20:48:19 +01:00
01ea17f452 fvMesh: Register V, Sf, magSf, C and Cf fields
required modification of fvMeshDistributors to ensure these sliced fields are
deleted before distribution.
2023-06-19 19:53:47 +01:00
58f7c8c9e6 bash_completion: foamToC -table lists second level tables with partial completion 2023-06-19 18:55:25 +01:00
578428c59a bash_completion: customised completion for foamToC 2023-06-19 10:02:10 +01:00
debd293832 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-06-16 21:36:54 +01:00
ef85d538e9 Changed stabilisation from rootVSmall to small for to avoid FPEs with extended precision 2023-06-16 21:36:05 +01:00
98ac903969 multiphaseEuler: Make energy predictor compatible with stationary phases 2023-06-16 16:23:56 +01:00
025b96e217 tutorials/multicomponentFluid/verticalChannel: Corrected lagrangian mass flow rate 2023-06-16 15:22:57 +01:00
f1be983cda tutorials/multicomponentFluid/verticalChannel/system/particleTracksDict: Added setFormat entry 2023-06-16 15:05:45 +01:00
4339f18314 tutorials/legacy/incompressible/dnsFoam/boxTurb16: Reinstated graphFormat entry 2023-06-16 15:05:22 +01:00
04dd989911 Time: Removed graphFormat
setFormat no longer defaults to the value of graphFormat optionally set in
controlDict and must be set in the functionObject dictionary.

boundaryFoam, financialFoam and pdfPlot still require a graphFormat entry in
controlDict but this is now read directly rather than by Time.
2023-06-16 14:51:30 +01:00
561e20036b foamToC: Updated documentation 2023-06-16 13:55:15 +01:00
29fb55b24b fvMesh: Stabilise magSf with rootVSmall rather than vSmall
for running cases NCC in extended precision
2023-06-16 13:22:25 +01:00
f8074234c0 Updates for extended precision operation 2023-06-16 10:01:52 +01:00
9ef6fc70f0 doc/Doxygen/Doxyfile: Updated to include modular and legacy solvers 2023-06-16 10:00:15 +01:00
cafe173bf7 Function1,Function2: Updated run-time selection table construction to add to foamToC
With this change foamToC now includes Function1 and Function2 entries, thus

    foamToC -table Function1

prints

    Tables of type Function1
        avTypeFunction1
        labelFunction1
        scalarFunction1
        sphericalTensorFunction1
        symmTensorFunction1
        tensorFunction1
        trvTypeFunction1
        vectorFunction1

and

    foamToC -table scalarFunction1

prints

    Contents of table scalarFunction1, base type Function1:
        NSRDS0                                  libspecie.so
        NSRDS1                                  libspecie.so
        NSRDS14                                 libspecie.so
        NSRDS2                                  libspecie.so
        NSRDS3                                  libspecie.so
        NSRDS4                                  libspecie.so
        NSRDS5                                  libspecie.so
        NSRDS6                                  libspecie.so
        NSRDS7                                  libspecie.so
        coded                                   libOpenFOAM.so
        constant                                libOpenFOAM.so
        exponentialSqrRamp                      libOpenFOAM.so
        halfCosineRamp                          libOpenFOAM.so
        integratedNonUniformTable               libspecie.so
        laminarBL                               libfiniteVolume.so
        linearRamp                              libOpenFOAM.so
        nonUniformTable                         libOpenFOAM.so
        none                                    libOpenFOAM.so
        one                                     libOpenFOAM.so
        polynomial                              libOpenFOAM.so
        quadraticRamp                           libOpenFOAM.so
        quarterCosineRamp                       libOpenFOAM.so
        quarterSineRamp                         libOpenFOAM.so
        reverseRamp                             libOpenFOAM.so
        scale                                   libOpenFOAM.so
        sine                                    libOpenFOAM.so
        square                                  libOpenFOAM.so
        squarePulse                             libOpenFOAM.so
        table                                   libOpenFOAM.so
        tableFile                               libOpenFOAM.so
        turbulentBL                             libfiniteVolume.so
        uniform                                 libOpenFOAM.so
        uniformTable                            libOpenFOAM.so
        zero                                    libOpenFOAM.so
2023-06-15 20:59:10 +01:00
1ceae1c889 foamInfo: improved searching for models 2023-06-15 15:23:51 +01:00
0c4722a15d fvModels::filmCloudTransfer: Added a bool to keep track of the state of the transferred fields
This resolves a parallel transfer issue and a potential mesh consistency issue
following mesh topology change.
2023-06-15 11:38:37 +01:00
b6c34fd361 etc/config.sh/bash_completion: Updated 20230615 2023-06-14 19:34:01 +01:00
602d6b20d0 foamToC: the -allLibs option is now the default, -noLibs disables loading all libraries
the -solver option also disables the default loading of all libraries, instead
loading just the specified solver module library and dependencies.

It is generally more useful to load all the libraries when searching for model,
boundary condition etc. rather than having to list specific libraries to search
unless only the contents of the standard libraries loaded into a solver module
are to be searched, in which case the -solver option can be used.
2023-06-14 19:25:00 +01:00
09a2da22b2 functionObject::timeControl: Added runTimes option to execute/write at specified list of run times
With
    executeControl  runTimes;
    executeTimes    (0.1 0.2 0.3);

the functionObject will be executed at 0.1s, 0.2s and 0.3s only.

With
    writeControl    runTimes;
    writeTimes      (0.1 0.2 0.3);

the functionObject will write at 0.1s, 0.2s and 0.3s only.
2023-06-14 17:31:52 +01:00
3eed5c0c99 lagrangian: InjectionModel: Time-varying parcel flow rate
The parcelsPerSecond control can now be specified as a time-varying
function. This provides additional control over the temporal
distribution of injected parcels, which may be advantageous if, for
example, the mass flow rate varies significantly. It also enables
variable flow rates of particulates in cases which have a fixed number
of particles per parcel.
2023-06-13 16:59:05 +01:00
0fa46ef28a controlDict: Added optional 'beginTime' entry
for cases started or restarted from some arbitrary time without a corresponding
<time>/uniform/time dictionary to set the beginTime to the logical start of the
simulation.  Setting beginTime to 0 for example ensures that write times,
functionObject evaluations and writes etc. occur at intervals starting from 0
rather than the arbitrary startTime.
2023-06-13 15:54:57 +01:00
aa89c7806e timeControl: Moved timeToNextWrite functionality from timeControlFunctionObject
to simplify the interface and make it more extensible
2023-06-13 15:54:09 +01:00
618d9d33b2 controlDict: the optional graphFormat entry is now used as the default for all setFormat entries
Foam::graph superseded by the more general Foam::setWriter reducing code
maintenance overhead, simplifying usage and further development.
2023-06-12 17:14:37 +01:00
1e9e0c141b checkMesh: Added the region name to the postProcessing directory for the output from writeSets option 2023-06-12 12:21:34 +01:00
c1e0dbcfc5 fvMeshTopoChanger::meshToMesh: Added check for 'repeat' and 'cycle' options 2023-06-09 17:49:26 +01:00
2a39553e28 fvMeshTopoChanger::meshToMesh: Added support for repeating and cycling the set of meshes
Description
    fvMeshTopoChanger which maps the fields to a new mesh or sequence of meshes

    which can optionally be mapped to repeatedly for example in multi-cycle
    engine cases or cycled through for symmetric forward and reverse motion.

Usage
    \table
        Property  | Description                   | Required | Default value
        libs      | Libraries to load             | no       |
        times     | List of times for the meshes  | yes      |
        repeat    | Repetition period             | no       |
        cycle     | Cycle period                  | no       |
        begin     | Begin time for the meshes     | no       | Time::beginTime()
        timeDelta | Time tolerance used for time -> index | yes      |
    \endtable

    Examples of the mesh-to-mesh mapping for the multi-cycle
    tutorials/incompressibleFluid/movingCone case:
    \verbatim
    topoChanger
    {
        type    meshToMesh;

        libs    ("libmeshToMeshTopoChanger.so");

        times   (0.0015 0.003);

        cycle   #calc "1.0/300.0";
        begin   0;

        timeDelta 1e-6;
    }
    \endverbatim
2023-06-09 17:30:51 +01:00
5233335924 thermophysicalModels: Permit wildcard names of thermo dictionaries
This can be useful when reusing thermo configurations across multiple
setups. In one simulation, the fluid might be entirely air, and in
another there might be additional pollutant or fuel species. This could
be defined without changing the species' thermo enties as follows:

    "(mixture|air)"
    {
        specie
        {
            molWeight   28.9;
        }
        thermodynamics
        {
            Hf          0;
            Cv          724.8;
        }
        transport
        {
            mu          1.84e-05;
            Pr          0.7;
        }
    }

This was semi-supported before, but it lead to the wrong name (i.e., the
wildcard string) being stored in the base specie class. Now the name is
passed through the thermo constructors, so it is always correct.
2023-06-08 16:00:14 +01:00
f25278f9e2 thermophysicalModels: Removed unused selector-like methods 2023-06-08 16:00:13 +01:00
11063398b4 tutorials/multiRegion/CHT/wallBoiling: Updated to use the new cell-momentum algorithm in multiphaseEuler
see commit a8cb8a61da
2023-06-08 13:19:40 +01:00
163d1b5fbb Reaction: Removed unnecessary construction of thermo database 2023-06-07 16:59:56 +01:00
36e8344429 functionObjects::checkMesh: New functionObject to check mesh changes
Class
    Foam::functionObjects::checkMesh

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.

    Example of checkMesh specification:
    \verbatim
    checkMesh
    {
        type            checkMesh;
        libs            ("libutilityFunctionObjects.so");

        executeControl  timeStep;
        executeInterval 10;
    }
    \endverbatim
    or using the standard configuration file:
    \verbatim
    #includeFunc checkMesh(executeInterval=10)
    \endverbatim

Can be used with any solver supporting mesh-motion, in particular the movingMesh
solver module, to check the mesh quality following morphing and/or topology
change.
2023-06-06 18:36:46 +01:00
08544446e8 Time, functionObjectList: Refactored to simplify construction and switching-off functionObjects 2023-06-06 08:17:52 +01:00
6b1278b544 fvMeshTopoChangersMeshToMesh: Changed the construction of the timeIndices to int64_t 2023-06-05 20:42:13 +01:00
7040dabb80 fvMeshTopoChangersMeshToMesh: Changed the timeIndex hash to int64_t
to increase the maximum run-time.
2023-06-05 20:32:31 +01:00
89858fc997 fvMeshTopoChangersMeshToMesh: Reinstate meshToMeshAdjustTimeStepFunctionObject if controlDict is changed 2023-06-05 14:33:58 +01:00
bfd68059d8 incompressibleFluid::moveMesh: removed unused #include 2023-06-02 16:36:38 +01:00
339807e860 ThermophysicalTransportModels::Fickian,MaxwellStefan: Changed Dm_, Dii_ and jexp_ to on-demand
to avoid the need to call predict() in the constructor and ensure they are
available when required between mesh change and predict().

Also instantiated Fickian and MaxwellStefan multicomponent diffusion models for
multiphaseEuler.
2023-06-02 16:34:01 +01:00
db7ea4c3db foamToC: Added support for pattern searching using a regular expression
e.g. the simple exact match search

    foamToC -allLibs -search VoFTurbulenceDamping

generates:

    VoFTurbulenceDamping is in table
        fvModel                                 libVoFTurbulenceDamping.so

but the regular expression search

    foamToC -allLibs -search "VoF.*"

generates the results for all names in all tables containing the sub-string "VoF":

    VoFCavitation is in table
        fvModel                                 libVoFCavitation.so
    VoFSolidificationMeltingSource is in table
        fvModel                                 libVoFSolidificationMeltingSource.so
    VoFClouds is in table
        fvModel                                 libVoFClouds.so
    VoFFilmTransfer is in table
        fvModel                                 libfilmVoFTransfer.so
    VoFTurbulenceDamping is in table
        fvModel                                 libVoFTurbulenceDamping.so
2023-06-02 14:31:06 +01:00
0b8c17d8c1 functionObject,fvModel,fvConstraint: Added automatic library loading
If the libs entry is not provided and the name of the library containing the
functionObject, fvModel or fvConstraint corresponds to the type specified the
corresponding library is automatically loaded, e.g. to apply the
VoFTurbulenceDamping fvModel to an incompressibleVoF simulation the following
will load the libVoFTurbulenceDamping.so library automatically and instantiate
the fvModel:

turbulenceDamping
{
    type            VoFTurbulenceDamping;

    delta           1e-4;
}
2023-06-01 20:31:16 +01:00
2561212f56 string: Added remove(const char) member functions
which remove all occurrences of the specified character
2023-06-01 11:50:58 +01:00
4cc975464c isothermalFilm::momentumTransport: now protected again rather than private 2023-06-01 11:02:54 +01:00
0821d52c3c isothermalFilm: Moved momentumTransport construction to after public data initialisation
This ensures that public film specific geometry is available for the calculation
of gradients which may be used during momentumTransport construction.
2023-06-01 09:54:54 +01:00
22ec4b7d6d momentumTransportModels::lambdaThixotropic: removed calcNu call during construction
to avoid dependency on data not yet available.
2023-05-31 23:21:58 +01:00
0d9438e3c6 tutorials/compressibleVoF: Removed unused pMin entry from phaseProperties 2023-05-31 16:59:32 +01:00
1ad425ff58 bash_completion: Updated 2023-05-31 15:12:00 +01:00
9c3da550df etc/config.sh/csh: Removed settings for gcc-4.?.?
gcc-4.?.? is no longer supported as it is not C++14 standard compliant.
2023-05-31 14:48:39 +01:00
1d78434bee functionObjects::interfaceHeight: Corrected parallel operation 2023-05-31 11:51:38 +01:00