369 Commits

Author SHA1 Message Date
f4db98dd0d foamGet: fixed bug in commit 3b72908b 2024-12-19 12:36:56 +00:00
ce94118bbc foamGenerateBashCompletion: customise the -region option 2024-12-12 17:39:48 +00:00
3b72908bd8 foamGet: added -region option
to copy files into a specified region sub-directory
2024-12-12 17:35:39 +00:00
4ce83bd477 foamVTKSeries: simplify the script.
Thanks for Clemens Goessnitzer for suggested changes
2024-08-13 14:21:12 +01:00
bb6f2ab003 bin/foamVTKSeries: fix for multiple VTK files in same time directory 2024-08-05 10:43:16 +01:00
91320321f5 bin/foamVTKSeries: new script which generates '.vtk.series' files
which can be opened in ParaView, for it to interpret series of VTK files
generated by OpenFOAM post-processing.  This script supercedes the
'foamSequenceVTKFiles' script which generates a directory of indexed
soft-links which is no longer needed.  'foamSequenceVTKFiles' is
nevertheless maintained for workflow backward-compatibility.
2024-08-05 08:50:37 +01:00
2da4528add foamSequenceVTKFiles: generates a .vtk.series file to maintain time
in a sequence of VTK files.  Instead of loading a group of VTK which
uses their index as time, the respective .vtk.series file can be loaded
which relates each file to the correct time.
2024-07-29 14:44:51 +01:00
858aab68ad foamUnits: replaced hard coded search directory 2024-07-18 15:27:18 +01:00
c59e5ce983 Updated for OpenFOAM-12 2024-07-06 16:02:47 +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
970b6ff7d7 paraFoam: Corrected error message 2024-07-02 14:30:22 +01:00
d7d83a923a bin/foamCleanPath: updated to support path names with spaces 2024-07-01 09:18:41 +01:00
5ec32f5701 bin/foamFind: fixed -help option 2024-06-28 14:25:19 +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
4fd55976d5 bash_completion: updated 2024-06-27 12:47:43 +01:00
e4abe3d588 bin/foamUnits: Describes units and their conversions
for input parameters in OpenFOAM, e.g.

+ to list available units:
  foamUnits -list
+ to provide information about the [mm] unit:
  foamUnits mm
+ to provide information about the [thermalConductivity] dimensions:
  foamUnits -dimension thermalConductivity
+ to provide information about all units:
  foamUnits -all
+ to provide information about all dimensions:
  foamUnits -all -dimension
2024-06-27 12:46:58 +01:00
ffa58374db foamMonitor: Added specific treatment of optional units after the column names
Resolves bug-report https://bugs.openfoam.org/view.php?id=4088
2024-06-06 16:42:10 +01:00
48fcb7f6d1 etc: Explicit control of decomposition and ParaView installation type
*** Note that this commit depends on a corresponding change in
ThirdParty-dev. Ensure that both repositories are up to date before
re-building OpenFOAM.

New environment variables have been added to explicitly control the
installation type of the thirdparty decomposition libraries and of the
ParaView visualiation software. These are set in the etc/bashrc and can
be overridden in a ~/.OpenFOAM/<version>/prefs.sh file or similar.

The variables relating to the decomposition libraries are SCOTCH_TYPE,
METIS_TYPE, PARMETIS_TYPE and ZOLTAN_TYPE, and they can take values of
none, system, or ThirdParty. In the case of ThirdParty, a
<library>_VERSION variable can also be specified. If the version is not
specified then the configuration will search for a source directory, and
if multiple such directories are found then the one with the highest
version number will be used.

The variable relating to ParaView is ParaView_TYPE, and this can be
similarly be set to none, system, or ThirdParty, and ParaView_VERSION
can also be specified when the type is ThirdParty. If the version is not
specified then the installation with the highest version number will be
used.

An example  ~/.OpenFOAM/dev/prefs.sh file, in which all decomposition
libraries are enabled, and the Scotch and ParaView versions are
explicitly set, is as follows:

    export SCOTCH_TYPE=ThirdParty
    export SCOTCH_VERSION=7.0.3
    export METIS_TYPE=ThirdParty
    export PARMETIS_TYPE=ThirdParty
    export ZOLTAN_TYPE=ThirdParty

    export ParaView_TYPE=ThirdParty
    export ParaView_VERSION=5.11.2

*** Note that if version numbers are not set then the configuration will
search for a decomposition source directory, but it will search for a
ParaView installation directory. This is because decomposition libraries
are built as part of OpenFOAM's ./Allwmake, but ParaView is not. This
distinction remains. If a local compilation of ParaView is needed, then
'./makeParaView -version X.XX.X' should be called explicitly in the
third party directory prior to building OpenFOAM.

The name of the third party directory can now also be independently set.
This simplifies some packaging processes in that it permits third party
to be located within the OpenFOAM installation directory and therefore
bundled into the same binary package.
2024-06-06 15:20:19 +01:00
300648735d foamCleanPath: do not remove standard directories on PATH 2024-06-06 12:35:47 +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
2e9e37d67c bin/foamFind: fixed typo in header 2024-04-19 09:17:06 +01:00
57cb8b2c59 foamSearch: Updated call to foamDictionary for absolute paths 2024-04-18 15:24:24 +01:00
1c6d785c1c foamFind: script to find files in OpenFOAM and optionally process the contents
by printing their contents or lines which match a search string.

Usage: ${0##*/} [OPTIONS] <filename>
options:
  -a | -applications     search for the file from the \$FOAM_APP directory
  -d | -dir <dir>        specify search directory
  -f | -files            find wmake 'files' file associated with searched file
  -h | -help             help
  -i | -isearch <string> searches files for a <string>, case insensitive
  -m | -modules          search for the file from the \$FOAM_MODULES directory
  -n | -numbers          print line numbers with file output
  -o | -options          find wmake 'options' file associated with searched file
  -p | -print            print the file(s)
  -s | -search <string>  searches files for a <string>, case sensitive
  -t | -tutorials        search for the file from the \$FOAM_TUTORIALS directory

Finds one or more files in OpenFOAM and optionally processes the contents by:
+ printing the file ('-print' option);
+ printing lines within the file matching a search string ('-search' option).

With source code files, can locate the 'files' and 'options' files associated
with their compilation using 'wmake'.

By default, files are searched from the src (\$FOAM_SRC) directory.
Alternatively the '-dir' option allows the user to specify the search directory
The '-applications', '-modules' and '-tutorials' options specifically set the
search path to the \$FOAM_APP, \$FOAM_MODULES and \$FOAM_TUTORIALS directories,
respectively.

Examples:
    foamFind -print wallHeatFlux.C | less
    + click space bar to scroll down
    + enter line number (after ":") to jump to line
    + enter "/text" to search for "text" (or any other string)

    foamFind -applications -isearch "momentumtransport" -options fluid.C
    foamFind -numbers -search laminar BirdCarreau.C
2024-04-05 13:28:41 +01:00
b77e086295 foamGet: clean the pruneFiles function 2024-03-07 11:47:59 +00:00
de422504ba foamGet: remove caseDicts/postProcessing from search path 2024-03-07 11:44:49 +00:00
869cd86bb0 foamMonitor: only delete the temporary file when trapping on EXIT 2024-02-18 17:17:21 +00:00
9252d0c067 foamMonitor: new options to select columns, flip graphs and display once
foamMonitor has new options to select columns of data, plot the data on
x-axis and the independent variable on y-axis, and to display a single
graph without refreshing periodically. It also now terminates cleanly,
removing the gnuplot processes behind it.

New options:
  -columns  | -c <cols>  display specfied columns, comma-separated, e.g. 2,4
  -flip     | -f         plot data on x-axis, independent variable on y-axis
  -once     | -o         print a graph one time without refreshing
2024-02-15 21:40:50 +00:00
7d65e66b86 multiValveEngine: New fvMeshMover for multi-valve IC engine mesh motion
This mesh mover facilitates explicit node translation based on scaled distance
functions for the providing smooth deformation of the mesh to accommodate the
motion piston and multiple valves present in IC engines.   and run-time mesh-to-mesh mapping used to avoid
extreme mesh distortion and support the necessary topology changes that occur at
valve closure.

Highlighted features include:

* Piston motion based on user-defined functions, with options for standard crank
  and connecting rod motion.
* Valve motion based on user-provided lift data or table.
* Support for linerPatches, slidingPatches, and frozenZones.
* Non-conformal coupled (NCC) interfaces can be used to provide better control
  of the mesh-motion around valves
* Run-time mesh-to-mesh mapping used to avoid extreme mesh distortion and
  support the necessary topology changes that occur at valve closure
* Control over mesh motion per moving object including motion parameters and layer
  thickness.

Description from the multiValveEngine.H file:

    A mesh mover using explicit node translation based on scaled distance
    functions per moving object. The mover supports any number of valves
    together with piston motion and following features:

    - Piston motion: Function1 of user-time, may be set to
      crankConnectingRodMotion for standard crank and connecting rod motion.

    - Valve motion: Function1, may be set to table if the valve lift date is
      provided in the form of a table.

    - Smooth mesh motion between a moving object and other patches.

    - linerPatches: the set of patches corresponding to the cylinder liner
      Used by createEngineZones

    - slidingPatches: a set of patches along which mesh is allowed
      to deform. For example, on the cylinder liner, it is desired to
      slide mesh nodes while piston is moving.

    - frozenZones: list of pointZones the points of which are frozen,
      i.e. do not move.

    - Run-time clearance estimation based on patch-to-patch distances printed.

    - Supports cellSet and cellZone definitions to restrict mesh motion.

    - Supports domains with nonConformalCoupling (NCC) interfaces,
      enabling e.g. nodes to slide along with the interface.

    - Closing the valve can be achieved by meshToMesh mapping onto a new
      grid with closed valve geometry at user given time.

    - Mesh motion can be controlled per moving object by setting:

        - patches: list of patches defining the object.

        - motion: a Function1 which returns the object position
          as a function of time.

        - movingZones: list of pointZones the points of which move with the
          object.

        - maxMotionDistance: a distance away from the moving object
          after nodes are not allowed to move. (Default inf.)

        - movingFrozenLayerThickness: thickness of layer in which points move
          with the moving object. (Default 0)

        - staticFrozenLayerThickness: thickness of layer in which points
          are fixed with respect to static patches (e.g. walls). (Default 0)

        - cosineScaling: a switch whether nodal translation is weighted by
          its distance from the moving object. The objective is to yield less
          deformation near the moving object and sustain e.g. boundary layer.
          (Default no, i.e. linear weighting)

        - fractionalTravelInterval: fraction of the stroke travelled after
          which the cached motion scaling weights are recalculated

        For valve object only:

            - minLift: a minimum valve lift value after considered closed.

    Some of the above parameters are highlighted in a given schematic
    piston-valve configuration w.r.t entries used to control piston motion.
    Furthermore, an example dictionary entries are provided below.

                      |             |         |             |
                      |             |         |             |
                      |             |    S    |             |
                      |             |    T    |             |
                      |             |    E    |             |
                      |             |    M    |             |
                     /              |         |              \
                    /               |         |               \
                   /                |         |                \
     _____________/                 |         |                 \_____________
    |        :                      |         |                      :        |
    |        :      /```````````````           ```````````````\      :        |
    |        :     /                VALVE HEAD                 \     :        |
    | L      :    /_____________________________________________\    :        |
    | I      :                         /\                            :        |
    | N      :                         || staticFrozenLayerThickness :        |
    | E      : NCC (optional)          \/ (w.r.t. piston motion)     :        |
    | R      :                      ``````````                       :        |
    |        :                                                       :        |
    |        :                                                       :        |
    |........:.......................................................:........|
    |        :                         /\                            :        |
    |        :                         || movingFrozenLayerThickness :        |
    |________:_________________________\/____________________________:________|
                                       PISTON

    \verbatim
    mover
    {
        type                multiValveEngine;
        libs                ("libfvMeshMoversMultiValveEngine.so");

        frozenZones         (frozenZone1 frozenZone2);

        slidingPatches
        (
            liner
            valveStem
            "nonCouple.*"
        );

        linerPatches        (liner);

        piston
        {
            patches             (piston);
            axis                (0 0 1);

            motion
            {
                type                crankConnectingRodMotion;

                conRodLength        1e3;
                stroke              1.0;
            }

            // Move the points in the piston bowl with the piston
            movingZones         (pistonBowl);

            // Optional
            maxMotionDistance    1e30;
            movingFrozenLayerThickness  0;
            staticFrozenLayerThickness  0;

            fractionalTravelInterval    0.1;

            cosineScaling       yes;
        }

        valves
        {
            iv
            {
                patches     (valveHead);
                axis        (0 0 1);

                // Optional
                maxMotionDistance   1e30;
                movingFrozenLayerThickness  0;
                staticFrozenLayerThickness  0;

                fractionalTravelInterval    0.1;

                cosineScaling       yes;

                minLift     0.001;

                motion
                {
                    type    table;
                    values
                    (
                        (0      0)
                        (480    0.1)
                        (720    0)
                    );
                    // For multi-cycle simulations, use repeat
                    outOfBounds     repeat;
                    interpolationScheme linear;
                }
            }
        }
    }
    \endverbatim

    Note:
      The implementation utilises pointDist objects for distance computation,
      resulting distance fields do not propagate through NCC interfaces.  Hence,
      there should be no horizontal NCC interface separating piston from
      cylinder head as it would result in potentially ill defined mesh
      deformation. Due to same feature, in a schematic case setup above, valve
      motion affects only cells between NCC patches even though no cellSet is
      explicitly defined.

SourceFiles
    multiValveEngine.C

Patch contributed by:
* Heikki Kahila, Wärtsilä Finland: Original implementation
* Bulut Tekgül, Wärtsilä Finland: Testing, cleanup, help with refactoring
* Henry Weller, CFD Direct: Refactoring, generalisation, optimisation and
  merging into OpenFOAM
2024-02-13 21:30:49 +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
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
757bdea30d bin/.*Foam redirection scripts: Updated tutorial paths 2023-12-10 16:09:20 +00:00
deda3aa6a3 bin/tools/foamLog.db: Added deltaT 2023-10-26 10:35:02 +01:00
7e11d9b578 bin/tools/CleanFunctions::cleanCase: Added deletion of the logs directory generated by foamLog 2023-10-26 10:06:29 +01:00
597121a4a7 multiphaseEuler: Library reorganisation
This change makes multiphaseEuler more consistent with other modules and
makes its sub-libraries less inter-dependent. Some left-over references
to multiphaseEulerFoam have also been removed.
2023-09-15 14:45:26 +01:00
8d54ad9ebc foamCreateVideo: correct framerate with ffmpeg 2023-09-14 20:10:57 +01:00
ea594573b8 bash_completion: updated 2023-08-29 18:16:56 +01:00
cce5bc9e40 HookFunctions: Prevent expansion prior to command evaluation 2023-08-09 16:29:00 +01:00
2d39211826 foamExec: Improve correctness of splitting and check for envsubst 2023-07-21 09:11:07 +01:00
19d08671d2 foamExec: Support commands with wildcards and environment variables
The following commands are now possible. Note that the '$' sigil on the
FOAM_TUTORIALS environment variable has been escaped with '\' to prevent
it from being expanded to nothing in the outer/interactive shell.

    ~/OpenFOAM/OpenFOAM-dev/bin/foamExec ls \$FOAM_TUTORIALS/*
    ~/OpenFOAM/OpenFOAM-dev/bin/foamExec cp -r \$FOAM_TUTORIALS/incompressibleFluid/pitzDaily .
2023-07-18 15:02:08 +01:00
cf06107c8b dnsFoam: replaced by the incompressibleFluid solver module with the OUForce fvModel
The bin/dnsFoam redirection script is provided to help users update dnsFoam
cases.
2023-07-16 19:50:57 +01:00
9fbb298204 test/dictionary: Added more dictionary tests and examples
All dictionaries are expanded using foamDictionary -expand
2023-07-04 13:44:37 +01:00
d6c6e99201 bash_completion: improved handling of '-solver', '-table' and '-func' options 2023-06-23 13:09:03 +01:00
3c7f34ff0d foamGenerateBashCompletion: Added -solvers to foamToC 2023-06-20 13:15:04 +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
1ceae1c889 foamInfo: improved searching for models 2023-06-15 15:23:51 +01:00
ca72b0a963 fvPatchFields: Removed all fvPatchFields requiring user specified data from the null-constructor table
This avoids potential hidden run-time errors caused by solvers running with
boundary conditions which are not fully specified.  Note that "null-constructor"
here means the constructor from patch and internal field only, no data is
provided.

Constraint and simple BCs such as 'calculated', 'zeroGradient' and others which
do not require user input to fully specify their operation remain on the
null-constructor table for the construction of fields with for example all
'calculated' or all 'zeroGradient' BCs.

A special version of the 'inletOutlet' fvPatchField named 'zeroInletOutlet' has
been added in which the inlet value is hard-coded to zero which allows this BC
to be included on the null-constructor table.  This is useful for the 'age'
functionObject to avoid the need to provide the 'age' volScalarField at time 0
unless special inlet or outlet BCs are required.  Also for isothermalFilm in
which the 'alpha' field is created automatically from the 'delta' field if it is
not present and can inherit 'zeroInletOutlet' from 'delta' if appropriate.  If a
specific 'inletValue' is require or other more complex BCs then the 'alpha'
field file must be provided to specify these BCs as before.

Following this improvement it will now be possible to remove the
null-constructors from all fvPatchFields not added to the null-constructor
table, which is most of them, thus reducing the amount of code and maintenance
overhead and making easier and more obvious to write new fvPatchField types.
2023-05-27 16:56:10 +01:00
8795f42eee lagrangian: InjectionModel: Corrected documentation/examples 2023-05-23 15:52:53 +01:00
34c0e8b45b surfaceFilmModels: Superseded by the new isothermalFilm and film solver modules
The new general multi-region framework using the isothermalFilm and film solver
modules and executed with foamMultiRun is a much more flexible approach to the
inclusion of liquid films in simulations with the support for coupling to other
regions of various types e.g. gas flows, Lagrangian clouds, VoF, CHT etc.  This
has all been achieved with a significant reduction in the number of lines of
code and significant improvements in code structure, readability and
maintainability.
2023-05-17 16:01:48 +01:00
2085f63705 foamCloneCase: do not copy Uf files 2023-05-12 09:29:46 +01:00