Commit Graph

129 Commits

Author SHA1 Message Date
b0dbdd4a61 foamDictionary: Added new options to rename entries
Either single entries renamed using the -entry option with -rename:

    -entry <entryName> -rename <newName>

or a list of entries can be renamed using the -rename <newNames> option:

    -rename "<entryName0>=<newName0>, <entryName1>=<newName1>..."
2024-02-13 15:47:48 +00:00
ab2fb72761 createRegionMesh.H, createRegionMeshNoChangers.H: New include files to construct a region mesh 2024-01-26 10:03:24 +00:00
06df35268f foamListTimes: Removed unused -noFunctionObjects option 2024-01-21 09:23:03 +00:00
da2b4690c8 foamToC: Updated option documentation 2023-12-13 15:34:28 +00:00
03ec16135a fvMesh: Added independent readUpdateState enumeration
This lets calling code determine the difference between a polyMesh
topology change and a re-stitch. This prevents unnecessary
post-processing output in a few cases when using NCC; most notably the
generation of cellProc fields by reconstructPar.
2023-11-08 14:43:52 +00:00
fae2367fb2 foamToC: Ensure there is a space after long entry names when printing tables 2023-09-06 12:03:48 +01:00
0433bd3e00 genericFields: Library reorganisation and reduce duplication 2023-08-25 09:46:40 +01:00
6d9bc62fa9 foamDictionary: Added -output option
to specify the path name of the output dictionary to which the expanded and/or
changed dictionary is written.

Usage: foamDictionary [OPTIONS] <dictionary file>
options:
  -add <value>      Add a new entry
  -case <dir>       specify alternate case directory, default is the cwd
  -dict             Set, add or merge entry from a dictionary.
  -diff <dict>      Write differences with respect to the specified dictionary
  -entry <name>     report/select the named entry
  -expand           Read the specified dictionary file and expand the macros
                    etc.
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -includes         List the #include/#includeIfPresent files to standard output
  -keywords         list keywords
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -merge <value>    Merge entry
  -noFunctionObjects
                    do not execute functionObjects
  -output <path name>
                    Path name of the output dictionary
  -parallel         run in parallel
  -remove           Remove the entry.
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -set <value>      Set entry value, add new entry or apply list of
                    substitutions
  -value            Print entry value
  -writePrecision <label>
                    Write with the specified precision
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

manipulates dictionaries
2023-08-10 21:24:44 +01:00
89db32a3a7 foamDictionary: Corrected handling of the -case option
Now if the -case option is specified the dictionary path provided is treated as
relative to the case path, e.g.

foamDictionary -expand -case shockFluid/shockTube system/controlDict
2023-08-10 20:28:54 +01:00
805a7de6d9 dictionary: Removed support for the deprecated "dot" syntax
to simplify maintenance and extension of the current "slash" syntax.
2023-07-11 15:22:44 +01:00
e0fddef530 foamDictionary: Corrected documentation formatting for Doxygen 2023-07-06 23:07:31 +01:00
835ef31a1d foamDictionary: Moved the dictionary tests/examples to applications/test/dictionary 2023-07-03 13:38:37 +01:00
0657826ab9 Replaced all remaining addTimeOptions.H includes with the more flexible timeSelector 2023-06-23 15:24:06 +01:00
3460364ef2 foamToC: Added -solvers option
which lists the solver modules:

Contents of table solver:
    XiFluid                                 libXiFluid.so
    compressibleMultiphaseVoF               libcompressibleMultiphaseVoF.so
    compressibleVoF                         libcompressibleVoF.so
    film                                    libfilm.so
    fluid                                   libfluid.so
    functions                               libfunctions.so
    incompressibleDenseParticleFluid        libincompressibleDenseParticleFluid.so
    incompressibleDriftFlux                 libincompressibleDriftFlux.so
    incompressibleFluid                     libincompressibleFluid.so
    incompressibleMultiphaseVoF             libincompressibleMultiphaseVoF.so
    incompressibleVoF                       libincompressibleVoF.so
    isothermalFilm                          libisothermalFilm.so
    isothermalFluid                         libisothermalFluid.so
    movingMesh                              libmovingMesh.so
    multicomponentFluid                     libmulticomponentFluid.so
    multiphaseEuler                         libmultiphaseEuler.so
    shockFluid                              libshockFluid.so
    solid                                   libsolid.so
    solidDisplacement                       libsolidDisplacement.so

This is equivalent to

    foamToC -table solver
2023-06-20 13:06:40 +01:00
561e20036b foamToC: Updated documentation 2023-06-16 13:55:15 +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
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
4b91dc790f foamToC: Added -listAllLibs option
Now the -allLibs option loads all the libraries without listing them to reduce
the amount of output when it is not needed and the new -listAllLibs option loads
all the libraries and lists them as they are loaded which may be useful to find
libraries which do not load due to duplicate entries for example.
2023-05-04 10:54:12 +01:00
d5023b907f applications/utilities: Replaced fvCFD.H with appropriate include files 2023-04-01 18:59:28 +01:00
87b606c45e foamDictionary.C: fixed typo 2023-03-14 11:33:17 +00:00
3a269eb3d7 #includeModel, #includeConstraint: New dictionary directives
#includeModel includes an fvModel configuration file into the fvModels file
 #includeConstraint includes an fvModel configuration file into the fvConstraints file

These operate in the same manner as #includeFunc does for functionObjects and
search the etc/caseDicts/fvModels and etc/caseDicts/fvConstraints directories
for configuration files and apply optional argument substitution.

Class
    Foam::functionEntries::includeFvModelEntry

Description
    Specify a fvModel dictionary file to include, expects the
    fvModel name to follow with option arguments (without quotes).

    Searches for fvModel dictionary file in user/group/shipped
    directories allowing for version-specific and version-independent files
    using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/fvModels
      - ~/.OpenFOAM/caseDicts/fvModels
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvModels
      - $WM_PROJECT_SITE/etc/caseDicts/fvModels
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvModels
      - $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvModels
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/fvModels

    The optional field arguments included in the name are inserted in 'field' or
    'fields' entries in the fvModel dictionary and included in the name
    of the fvModel entry to avoid conflict.

    Examples:
    \verbatim
        #includeModel clouds
        #includeModel surfaceFilms
    \endverbatim

    Other dictionary entries may also be specified using named arguments.

See also
    Foam::includeFvConstraintEntry
    Foam::includeFuncEntry

Class
    Foam::functionEntries::includeFvConstraintEntry

Description
    Specify a fvConstraint dictionary file to include, expects the
    fvConstraint name to follow with option arguments (without quotes).

    Searches for fvConstraint dictionary file in user/group/shipped
    directories allowing for version-specific and version-independent files
    using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/fvConstraints
      - ~/.OpenFOAM/caseDicts/fvConstraints
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvConstraints
      - $WM_PROJECT_SITE/etc/caseDicts/fvConstraints
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvConstraints
      - $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvConstraints
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/fvConstraints

    The optional field arguments included in the name are inserted in 'field' or
    'fields' entries in the fvConstraint dictionary and included in the name
    of the fvConstraint entry to avoid conflict.

    Examples:
    \verbatim
        #includeConstraint limitPressure(minFactor=0.1, maxFactor=2)
        #includeConstraint limitTemperature(min=101, max=1000)
    \endverbatim
    or for a multiphase case:
    \verbatim
        #includeConstraint limitLowPressure(min=1e4)
        #includeConstraint limitTemperature(phase=steam, min=270, max=2000)
        #includeConstraint limitTemperature(phase=water, min=270, max=2000)
    \endverbatim

    Other dictionary entries may also be specified using named arguments.

See also
    Foam::includeFvModelEntry
    Foam::includeFuncEntry
2023-01-30 18:59:07 +00:00
9e51bb48ce foamyHexMesh, foamyQuadMesh: Removed pending funding for further development and maintenance 2023-01-06 22:23:59 +00:00
ed7e703040 Time::timeName(): no longer needed, calls replaced by name()
The timeName() function simply returns the dimensionedScalar::name() which holds
the user-time name of the current time and now that timeName() is no longer
virtual the dimensionedScalar::name() can be called directly.  The timeName()
function implementation is maintained for backward-compatibility.
2022-11-30 15:53:51 +00:00
f5cf1d8020 foamDictionary: Added -case option to investigate usefulness and if there are problems 2022-09-15 19:21:08 +01:00
80d869974e foamToC: Only print the table base-type if it differs from the table name 2022-08-08 18:38:34 +01:00
49af47bbf2 foamToC: Added printing of the libraries for table entries for specific options
-functionObjects  List functionObjects
  -fvConstraints    List fvConstraints
  -fvModels         List fvModels
  -scalarBCs        List scalar field boundary conditions (fvPatchField<scalar>)
  -vectorBCs        List vector field boundary conditions (fvPatchField<vector>)

e.g.

    foamToC -fvModels -allLibs

now prints:

fvModels:
Contents of table fvModel, base type fvModel:
    VoFClouds                               libVoFClouds.so
    VoFSurfaceFilm                          libVoFSurfaceFilm.so
    VoFTurbulenceDamping                    libVoFTurbulenceDamping.so
    accelerationSource                      libfvModels.so
    actuationDiskSource                     libfvModels.so
    buoyancyEnergy                          libfvModels.so
    buoyancyForce                           libfvModels.so
    clouds                                  liblagrangianParcel.so
    coded                                   libfvModels.so
    compressible::VoFTurbulenceDamping      libcompressibleVoFTurbulenceDamping.so
    effectivenessHeatExchangerSource        libfvModels.so
    explicitPorositySource                  libfvModels.so
    heatSource                              libfvModels.so
    heatTransfer                            libfvModels.so
    interRegionExplicitPorositySource       libfvModels.so
    interRegionHeatTransfer                 libfvModels.so
    interfaceTurbulenceDamping              libmultiphaseEulerFoamFvModels.so
    isotropicDamping                        libfvModels.so
    massSource                              libfvModels.so
    phaseLimitStabilisation                 libfvModels.so
    phaseTurbulenceStabilisation            libmultiphaseEulerFoamFvModels.so
    radialActuationDiskSource               libfvModels.so
    radiation                               libradiationModels.so
    rotorDisk                               libfvModels.so
    semiImplicitSource                      libfvModels.so
    sixDoFAccelerationSource                libfvModels.so
    solidEquilibriumEnergySource            libfvModels.so
    solidificationMeltingSource             libfvModels.so
    surfaceFilm                             libsurfaceFilmModels.so
    verticalDamping                         libfvModels.so
    volumeFractionSource                    libfvModels.so
2022-08-08 18:04:56 +01:00
beb9e22d3c Libraries: Resolved various library dependency issues to ensure foamToC can load ALL libraries
without error or warning and hence populate ALL the run-time selection tables of
contents.
2022-08-08 13:34:34 +01:00
f978ff34ef foamToC: New run-time selection table of contents printing and interrogation utility
The new solver modules cannot provide the equivalent functionality of the -list
options available in the solver applications so foamToC has been developed as a
better, more general and flexible alternative, providing a means to print any or
all run-time selection tables in any or all libraries and search the tables for
any particular entries and print which library files the corresponding tables
are in, e.g.

foamToC -solver fluid -table fvPatchScalarField

Contents of table fvPatchScalarField, base type fvPatchField:
    advective                               libfiniteVolume.so
    calculated                              libfiniteVolume.so
    codedFixedValue                         libfiniteVolume.so
    codedMixed                              libfiniteVolume.so
    compressible::alphatJayatillekeWallFunctionlibthermophysicalTransportModels.so
    compressible::alphatWallFunction        libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<eConstSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<ePowerSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::turbulentTemperatureCoupledBaffleMixedlibthermophysicalTransportModels.so
    compressible::turbulentTemperatureRadCoupledMixedlibthermophysicalTransportModels.so
    .
    .
    .

foamToC -solver fluid -search compressible::alphatWallFunction
compressible::alphatWallFunction is in tables
    fvPatchField
        fvPatchScalarField                      libthermophysicalTransportModels.so

and the very useful -allLibs option allows ALL libraries to be searched to find
in which table and which library file a particular model in in for example:

foamToC -allLibs -search phaseTurbulenceStabilisation
Loading libraries:
    libtwoPhaseSurfaceTension.so
    libcv2DMesh.so
    libODE.so
    .
    .
    .
phaseTurbulenceStabilisation is in tables
    fvModel                                 libmultiphaseEulerFoamFvModels.so

Application
    foamToC

Description
    Run-time selection table of contents printing and interrogation.

    The run-time selection tables are populated by the optionally specified
    solver class and any additional libraries listed in the \c -libs option or
    all libraries using the \c -allLibs option.  Once populated the tables can
    be searched and printed by a range of options listed below.  Table entries
    are printed with the corresponding library they are in to aid selection
    and the addition of \c libs entries to ensure availability to the solver.

Usage
    \b foamToC [OPTION]
      - \par -solver \<name\>
        Specify the solver class

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries to load

      - \par -allLibs
        Load all libraries

      - \par switches,
        List all available debug, info and optimisation switches

      - \par all,
        List the contents of all the run-time selection tables

      - \par tables
        List the run-time selection table names (this is the default action)

      - \par table \<name\>
        List the contents of the specified table or the list sub-tables

      - \par search \<name\>
        Search for and list the tables containing the given entry

      - \par scalarBCs,
        List scalar field boundary conditions (fvPatchField<scalar>)

      - \par vectorBCs,
        List vector field boundary conditions (fvPatchField<vector>)

      - \par functionObjects,
        List functionObjects

      - \par fvModels,
        List fvModels

      - \par fvConstraints,
        List fvConstraints

    Example usage:
      - Print the list of scalar boundary conditions (fvPatchField<scalar>)
        provided by the \c fluid solver without additional libraries:
        \verbatim
            foamToC -solver fluid -scalarBCs
        \endverbatim

      - Print the list of RAS momentum transport models provided by the
        \c fluid solver:
        \verbatim
            foamToC -solver fluid -table RAScompressibleMomentumTransportModel
        \endverbatim

      - Print the list of functionObjects provided by the
        \c multicomponentFluid solver with the libfieldFunctionObjects.so
        library:
        \verbatim
            foamToC -solver multicomponentFluid \
                -libs '("libfieldFunctionObjects.so")' -functionObjects
        \endverbatim

      - Print a complete list of all run-time selection tables:
        \verbatim
            foamToC -allLibs -tables
            or
            foamToC -allLibs
        \endverbatim

      - Print a complete list of all entries in all run-time selection tables:
        \verbatim
            foamToC -allLibs -all
        \endverbatim
2022-08-04 21:48:59 +01:00
3995456979 parallelProcessing: Various improvements
boundaryProcAddressing has been removed. This has not been needed for a
long time. decomposePar has been optimised for mininum IO, rather than
minimum memory usage. decomposePar has also been corrected so that it
can decompose sequences of time-varying meshes.
2022-03-10 20:31:30 +00:00
3ef3e96c3f Time: Added run-time selectable userTime option
replacing the virtual functions overridden in engineTime.

Now the userTime conversion function in Time is specified in system/controlDict
such that the solver as well as all pre- and post-processing tools also operate
correctly with the chosen user-time.

For example the user-time and rpm in the tutorials/combustion/XiEngineFoam/kivaTest case are
now specified in system/controlDict:

userTime
{
    type     engine;
    rpm      1500;
}

The default specification is real-time:

userTime
{
    type     real;
}

but this entry can be omitted as the real-time class is instantiated
automatically if the userTime entry is not present in system/controlDict.
2021-10-19 09:09:01 +01:00
b9123328fb typeIOobject: Template typed form of IOobject for type-checked object file and header reading
used to check the existence of and open an object file, read and check the
header without constructing the object.

'typeIOobject' operates in an equivalent and consistent manner to 'regIOobject'
but the type information is provided by the template argument rather than via
virtual functions for which the derived object would need to be constructed,
which is the case for 'regIOobject'.

'typeIOobject' replaces the previous separate functions 'typeHeaderOk' and
'typeFilePath' with a single consistent interface.
2021-08-12 10:12:03 +01:00
25d274736f MeshZones: Renamed ZoneMesh to MeshZones 2021-07-14 14:10:28 +01:00
61f3662b0a foamDictionary: Added writePrecision option 2021-04-30 09:14:44 +01:00
bf7ac24e9f foamDictionary: Improved the -set "<substitutions>" option
Multiple substitutions can be made using the convenient -set "<substitutions>"
option which combines the selection of the entries with the substitutions made
on them using the same argument syntax used by #includeFunc, e.g.

    foamDictionary system/controlDict -set "startTime=2000, endTime=3000"
2021-03-28 13:32:37 +01:00
30e6e02d29 wmake: Removed the cpp processing of the Make/options file
so that it can be included directly into the wmake Makefile to allow full
support of gmake syntax, variables, functions etc.

The Make/files file handled in the same manner as the Make/options file if it
contains the SOURCE entry otherwise it is first processed by cpp for backward
compatibility.
2020-12-09 13:35:14 +00:00
93a0dd2f99 foamDictionary: Updated examples to 'slash' syntax which is the new default 2020-11-17 14:14:42 +00:00
560fb1a64b foamDictionary: Ignore function name in substitution list
so that foamDictionary conveniently supports the same format as the #includeFunc
argument list, e.g.

foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage

The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
2020-09-20 09:28:20 +01:00
560db98b34 dictionary: Standardised and centralised the argument list parser
to simplify maintenance
2020-09-19 15:52:09 +01:00
ad33cc2cc8 functionObject: Added support for scoped keyword lookup in the argument list
functions
{
    #includeFunc        singleGraph(setConfig/axis = y)
    .
    .
    .
}
2020-09-18 21:39:40 +01:00
312a56e7e3 foamDictionary: Extended the -set option to support a substitution list
e.g.

    foamDictionary -set '(purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime)' controlDict

or

    foamDictionary -set 'purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime' controlDict

are equivalent to

    foamDictionary -entry purgeWrite -set 3 controlDict
    foamDictionary -entry maxDeltaT -set 0.1 controlDict
    foamDictionary -entry functions/rho/writeControl -set writeTime controlDict
2020-09-18 18:25:51 +01:00
ea036dfec8 foamDictionary: Set expanded dictionary format to ascii 2020-09-14 12:13:09 +01:00
ec858fe59d foamListTimes: Corrected operation of -rm option when using collated fileHandler 2020-09-03 14:31:27 +01:00
a7f185eec2 foamListTimes: Added support for the collated fileHandler
Resolves bug-report https://bugs.openfoam.org/view.php?id=3541
2020-09-03 12:08:18 +01:00
37db7718ac foamListTimes: Added -withFunctionEntries option to execute functionEntries 2020-07-30 13:52:54 +01:00
517270e215 foamDictionary: Removed documentation for the unused -case option
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
2020-06-04 10:19:06 +01:00
6557788618 foamListTimes: disable controlDict function entries
avoids warning and error messages from the processing of the functions entry in
controlDict which unlikely to be needed for foamListTimes.
2020-04-16 18:10:43 +01:00
d8209247b1 foamDictionary: Allow functionEntry expansion with -entry option
Resolves bug-report https://bugs.openfoam.org/view.php?id=3422
2020-01-07 21:25:09 +00:00
c1edb022b0 foamDictionary: Disabled functionEntry expansion by default
functionEntry expansion is enabled for dictionary expansion with the -expand
option.  The disableFunctionEntries option is no longer needed and has been removed.
2019-11-19 11:42:33 +00:00
107b5d161d patchSummary: Added printing of the actual patchField types
Now for the wall in the simpleFoam pitzDaily tutorial case the following
patchField types are printed

group   : wall
    scalar              v2              v2WallFunction
    scalar              nut             nutkWallFunction
    scalar              k               kqRWallFunction
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           omegaWallFunction
    scalar              f               fWallFunction
    scalar              epsilon         epsilonWallFunction
    vector              U               noSlip

instead of

group   : wall
    scalar              v2              generic
    scalar              nut             generic
    scalar              k               generic
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           generic
    scalar              f               generic
    scalar              epsilon         generic
    vector              U               noSlip
2019-09-08 16:39:45 +01:00
cbae0c8cc0 foamDictionary: Improved handling of header for binary files 2019-09-07 20:55:23 +01:00