189 Commits

Author SHA1 Message Date
8b11d6a27d src/parallel/decompose: Corrected handling of sentinel files 2024-05-24 16:39:09 +01:00
81dd264963 wmake: Fix removal of lnInclude during build of mpi-dependent libraries 2024-05-24 14:00:11 +01:00
3521d9889a wmake/wmakeLnInclude: removed echo redirections to stderr 2024-05-21 14:16:56 +01:00
9ed591b6bb src/parallel/decompose: Rationalised the Allwmake and Allclean scripts
so that each .*Decomp library can be compiled individually.
2024-05-17 20:26:15 +01:00
69ec807f59 wmakeLnInclude: Don't link to files in sub-libraries 2023-09-14 17:21:05 +01:00
70290b3e2d wmkdep: Corrected string reallocation for a very uncommon special case
Resolves bug-report https://bugs.openfoam.org/view.php?id=3995
2023-07-12 10:27:06 +01:00
2b3b820c90 Corrected duplicate word and it's typos 2023-07-11 11:02:47 +01:00
33fc67203a wmake: Prevent Clang warning about Foam::move vs std::move 2023-04-12 11:31:28 +01:00
9e51bb48ce foamyHexMesh, foamyQuadMesh: Removed pending funding for further development and maintenance 2023-01-06 22:23:59 +00:00
968e60148a New modular solver framework for single- and multi-region simulations
in which different solver modules can be selected in each region to for complex
conjugate heat-transfer and other combined physics problems such as FSI
(fluid-structure interaction).

For single-region simulations the solver module is selected, instantiated and
executed in the PIMPLE loop in the new foamRun application.

For multi-region simulations the set of solver modules, one for each region, are
selected, instantiated and executed in the multi-region PIMPLE loop of new the
foamMultiRun application.

This provides a very general, flexible and extensible framework for complex
coupled problems by creating more solver modules, either by converting existing
solver applications or creating new ones.

The current set of solver modules provided are:

isothermalFluid
    Solver module for steady or transient turbulent flow of compressible
    isothermal fluids with optional mesh motion and mesh topology changes.

    Created from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam solvers but
    without the energy equation, hence isothermal.  The buoyant pressure
    formulation corresponding to the buoyantFoam solver is selected
    automatically by the presence of the p_rgh pressure field in the start-time
    directory.

fluid
    Solver module for steady or transient turbulent flow of compressible fluids
    with heat-transfer for HVAC and similar applications, with optional
    mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of the
    energy equation from the rhoSimpleFoam, rhoPimpleFoam and buoyantFoam
    solvers, thus providing the equivalent functionality of these three solvers.

multicomponentFluid
    Solver module for steady or transient turbulent flow of compressible
    reacting fluids with optional mesh motion and mesh topology changes.

    Derived from the isothermalFluid solver module with the addition of
    multicomponent thermophysical properties energy and specie mass-fraction
    equations from the reactingFoam solver, thus providing the equivalent
    functionality in reactingFoam and buoyantReactingFoam.  Chemical reactions
    and/or combustion modelling may be optionally selected to simulate reacting
    systems including fires, explosions etc.

solid
    Solver module for turbulent flow of compressible fluids for conjugate heat
    transfer, HVAC and similar applications, with optional mesh motion and mesh
    topology changes.

    The solid solver module may be selected in solid regions of a CHT case, with
    either the fluid or multicomponentFluid solver module in the fluid regions
    and executed with foamMultiRun to provide functionality equivalent
    chtMultiRegionFoam but in a flexible and extensible framework for future
    extension to more complex coupled problems.

All the usual fvModels, fvConstraints, functionObjects etc. are available with
these solver modules to support simulations including body-forces, local sources,
Lagrangian clouds, liquid films etc. etc.

Converting compressibleInterFoam and multiphaseEulerFoam into solver modules
would provide a significant enhancement to the CHT capability and incompressible
solvers like pimpleFoam run in conjunction with solidDisplacementFoam in
foamMultiRun would be useful for a range of FSI problems.  Many other
combinations of existing solvers converted into solver modules could prove
useful for a very wide range of complex combined physics simulations.

All tutorials from the rhoSimpleFoam, rhoPimpleFoam, buoyantFoam, reactingFoam,
buoyantReactingFoam and chtMultiRegionFoam solver applications replaced by
solver modules have been updated and moved into the tutorials/modules directory:

modules
├── CHT
│   ├── coolingCylinder2D
│   ├── coolingSphere
│   ├── heatedDuct
│   ├── heatExchanger
│   ├── reverseBurner
│   └── shellAndTubeHeatExchanger
├── fluid
│   ├── aerofoilNACA0012
│   ├── aerofoilNACA0012Steady
│   ├── angledDuct
│   ├── angledDuctExplicitFixedCoeff
│   ├── angledDuctLTS
│   ├── annularThermalMixer
│   ├── BernardCells
│   ├── blockedChannel
│   ├── buoyantCavity
│   ├── cavity
│   ├── circuitBoardCooling
│   ├── decompressionTank
│   ├── externalCoupledCavity
│   ├── forwardStep
│   ├── helmholtzResonance
│   ├── hotRadiationRoom
│   ├── hotRadiationRoomFvDOM
│   ├── hotRoom
│   ├── hotRoomBoussinesq
│   ├── hotRoomBoussinesqSteady
│   ├── hotRoomComfort
│   ├── iglooWithFridges
│   ├── mixerVessel2DMRF
│   ├── nacaAirfoil
│   ├── pitzDaily
│   ├── prism
│   ├── shockTube
│   ├── squareBend
│   ├── squareBendLiq
│   └── squareBendLiqSteady
└── multicomponentFluid
    ├── aachenBomb
    ├── counterFlowFlame2D
    ├── counterFlowFlame2D_GRI
    ├── counterFlowFlame2D_GRI_TDAC
    ├── counterFlowFlame2DLTS
    ├── counterFlowFlame2DLTS_GRI_TDAC
    ├── cylinder
    ├── DLR_A_LTS
    ├── filter
    ├── hotBoxes
    ├── membrane
    ├── parcelInBox
    ├── rivuletPanel
    ├── SandiaD_LTS
    ├── simplifiedSiwek
    ├── smallPoolFire2D
    ├── smallPoolFire3D
    ├── splashPanel
    ├── verticalChannel
    ├── verticalChannelLTS
    └── verticalChannelSteady

Also redirection scripts are provided for the replaced solvers which call
foamRun -solver <solver module name> or foamMultiRun in the case of
chtMultiRegionFoam for backward-compatibility.

Documentation for foamRun and foamMultiRun:

Application
    foamRun

Description
    Loads and executes an OpenFOAM solver module either specified by the
    optional \c solver entry in the \c controlDict or as a command-line
    argument.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamRun [OPTION]

      - \par -solver <name>
        Solver name

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

    Example usage:
      - To run a \c rhoPimpleFoam case by specifying the solver on the
        command line:
        \verbatim
            foamRun -solver fluid
        \endverbatim

      - To update and run a \c rhoPimpleFoam case add the following entries to
        the controlDict:
        \verbatim
            application     foamRun;

            solver          fluid;
        \endverbatim
        then execute \c foamRun

Application
    foamMultiRun

Description
    Loads and executes an OpenFOAM solver modules for each region of a
    multiregion simulation e.g. for conjugate heat transfer.

    The region solvers are specified in the \c regionSolvers dictionary entry in
    \c controlDict, containing a list of pairs of region and solver names,
    e.g. for a two region case with one fluid region named
    liquid and one solid region named tubeWall:
    \verbatim
        regionSolvers
        {
            liquid          fluid;
            tubeWall        solid;
        }
    \endverbatim

    The \c regionSolvers entry is a dictionary to support name substitutions to
    simplify the specification of a single solver type for a set of
    regions, e.g.
    \verbatim
        fluidSolver     fluid;
        solidSolver     solid;

        regionSolvers
        {
            tube1             $fluidSolver;
            tubeWall1         solid;
            tube2             $fluidSolver;
            tubeWall2         solid;
            tube3             $fluidSolver;
            tubeWall3         solid;
        }
    \endverbatim

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

Usage
    \b foamMultiRun [OPTION]

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

    Example usage:
      - To update and run a \c chtMultiRegion case add the following entries to
        the controlDict:
        \verbatim
            application     foamMultiRun;

            regionSolvers
            {
                fluid           fluid;
                solid           solid;
            }
        \endverbatim
        then execute \c foamMultiRun
2022-08-04 21:11:35 +01:00
4aacb80bae wmake/rules: Removed temporary -fno-tree-slp-vectorize gcc option
introduced to work-around bug in the gcc-11.1 optimiser which is fixed in
gcc-11.2

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101634
2021-07-28 11:37:02 +01:00
37108ec2ee wmake: Added support for the new OneAPI Intel compiler
The icx and icpx Intel compilers are selected by

WM_COMPILER=Icx

These compilers are based on the Clang front-end and hence the configuration
files are based on and nearly identical to those for Clang.

Support for the new OneAPI compilers replaces the now deprecated Intel icc, icpc
compilers.
2021-07-20 16:51:09 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
1156a55669 wmake/makefiles/files: Updated comments 2020-12-11 07:51:52 +00:00
66131bcd16 wmake: Simplified using -q option on grep 2020-12-10 16:31:40 +00:00
cffe943d8d wmake/rules: Removed the now redundant CPP definitions 2020-12-10 11:12:14 +00:00
a918deda09 wmake/makefiles/files: Preserve the indentation of the source file lines in Make/files 2020-12-10 08:24:28 +00:00
848ec1cd97 wmake: Simplified and standardised the Make/files files
cpp is no longer used to pre-process Make/files files allowing standard make '#'
syntax for comments, 'ifdef', 'ifndef' conditionals etc.  This is make possible
by automatically pre-pending SOURCE += to each of the source file names in
Make/files.

The list of source files compile can be specified either as a simple list of
files in Make/files e.g.

    # Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT
    # to use stat (=timestamps) instead of inotify
    fileMonitor.C

    ifdef SunOS64
        dummyPrintStack.C
    else
        printStack.C
    endif

    LIB = $(FOAM_LIBBIN)/libOSspecific

or

or directly as the SOURCE entry which is used in the Makefile:

    SOURCE = \
        adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
        adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
        adjointShapeOptimizationFoam.C

    EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In either form make syntax for comments and conditionals is supported.
2020-12-10 08:09:49 +00: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
ff766fe6ac wmake: Added support for gmake directives in Make/files
The list of source files compile can now be specified either as a simple list of
files in Make/files e.g.

adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C
adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C
adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

or directly as the SOURCE entry which is used in the Makefile:

SOURCE = \
    adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
    adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
    adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In both cases the Make/files is first parsed by cpp to handle #if, #ifdef
etc. directives but in the latter form gmake directives like ifeq can be also be
used to optionally select files to compile, typically using

SOURCE += anotherFile.C

statements.
2020-12-08 19:10:21 +00:00
067ab99f0f wmkdep: terminate sourcePath string explicitly
Resolves bug-report https://bugs.openfoam.org/view.php?id=3550
2020-09-18 13:55:37 +01:00
f98d878457 OpenFOAM: Rationalised naming convention for file path
pathName, pathname -> filePath
2020-09-14 11:27:05 +01:00
e603417ef7 bin/tools/foamGenerateBashCompletion: Improved robustness of bracket parsing
Also minor formatting changes
2020-07-30 16:47:29 +01:00
0257ab1459 Updated to C++14 standard
gcc version 5 and above and clang version 3.4 and above fully support the C++14
standard and the compilation rules of OpenFOAM-dev now require this support
allowing for further development and maintenance to benefit from the additional
language features provided in C++14.
2020-07-23 15:31:07 +01:00
077138942f Intel MPI configuration: Updated for versions 19 and higher
Resolves feature request https://bugs.openfoam.org/view.php?id=3519
2020-07-11 17:20:25 +01:00
ed9e420ea1 wmake: added rules for linuxArm64Gcc to compile on aarch64 (Arm-based) processors.
No code change was required to compile OpenFOAM on Arm using the Gcc compiler.
2020-06-24 16:01:49 +01:00
6268e426d7 wmake/rules/General/moc: Updated
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 15:20:57 +01:00
7dd592ff40 boost: Corrected include path 2020-06-09 09:27:56 +01:00
83bd225910 foamyHexMesh: Updated to compile against CGAL 5.0+
CGAL and Boost are now used header-only. The minimum supported version
of CGAL is now 4.9.
2020-05-08 11:24:58 +01:00
c32d7ea592 wmkdep: Removed a file search optimisation which can generate the incorrect path
if there is more than one search directory containing the same file name.
2019-10-02 14:30:04 +01:00
e684cc1c3a wmkdep: Added the source file directory to the directory search list 2019-07-25 18:03:48 +01:00
94642ba4d9 etc/bashrc: Added better handling for symbolic links in the WM_PROJECT_DIR path
Patch contributed by Bruno Santos
2019-07-22 14:36:20 +01:00
5e7895daf0 wmake/rules/General/mplibINTELMPI64: Updated paths for recent releases of Intel MPI 2019-07-19 23:38:05 +01:00
9980357df1 wmake: use expandPath to expand $PWD to handle symlinks
Resolves patch request https://bugs.openfoam.org/view.php?id=3301
2019-07-02 11:58:04 +01:00
51a8b15afe Renamed MVAPICH2 -> MV2MPI for consistency with the MPI implementation naming convention
Resolves patch request https://bugs.openfoam.org/view.php?id=3153
2019-01-28 09:52:41 +00:00
d95d68d7be Removed support for ancient platforms IA64 and SGIN32 2018-12-21 18:35:20 +00:00
fd08eae933 Replaced mplib with mplibDummy for consistency with the dummy Pstream 2018-08-16 21:11:40 +01:00
583043b0e3 Moved -lpthread to wmake/rules/General/mplib 2018-08-16 13:30:04 +01:00
bce53f1758 Rationalising the mplib files and reinstating support for compiling without MPI 2018-08-16 12:26:16 +01:00
50f5c22c87 wmake/rules: Removed duplicate mplib.* files 2018-08-15 17:27:32 +01:00
5e8593c171 wmake/rules/linux.*Gcc: added -fuse-ld=bfd
to avoid problems on systems which use the gold linker by default.

Resolves request https://bugs.openfoam.org/view.php?id=3006
2018-07-17 23:06:45 +01:00
71a4e548df Updated git hooks to check new header format 2018-07-09 16:59:03 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
89f1053f82 Code style: Fixed formatting of banners 2018-06-19 12:01:50 +01:00
ee4ed5d942 wmake: Correct issues introduced during updates for shellcheck
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2983
2018-06-17 20:42:36 +01:00
6db30e661c wmakeLnIncludeAll: Add support for -IlnInclude
Resolves bug-report https://bugs.openfoam.org/view.php?id=2925
2018-05-11 14:40:24 +01:00
0cca225762 wmake.*: Improved robustness and portability using shellcheck 2018-05-03 21:49:07 +01:00
3c000dabec wmake, wmakeLnIncludeAll: Automated the creation of the lnInclude directories based on dependency
Now lnInclude are created as required by the presence of entries in the EXE_INC
variable in the Make/options file.  This removes the need for calling
wmakeLnInclude in various Allwmake files to ensure the existence of the
lnInclude directories prior to compilation of dependent libraries.
2018-05-03 15:59:50 +01:00
3be5e695ec wmkdep: Updated documentation 2018-05-02 09:43:59 +01:00
9ffc025b08 wmkdep: Simplified file scanning for dependencies avoiding too many open files
This change ensures only one include file is open at a time by storing the
included files on a dynamic list rather than scanning the tree and holding a
list of open buffers.  This new approach is a bit faster and avoids the "too
many open files" error on machines with low limits on the number of file
descriptors allocated to users.
2018-05-01 11:12:38 +01:00