Commit Graph

265 Commits

Author SHA1 Message Date
3682e7ad9d Added support for gcc-8.1 2018-05-08 19:57:47 +01:00
87e32ab499 Code style: Updated line comments to start with a space
//This is a comment   ->   // This is a comment
2018-05-01 11:57:50 +01:00
785a7d9e3f cyclicRepeatAMI: New constraint patch type
A new constraint patch has been added which permits AMI coupling in
cyclic geometries. The coupling is repeated with different multiples of
the cyclic transformation in order to achieve a full correspondence.
This allows, for example, a cylindrical AMI interface to be used in a
sector of a rotational geometry.

The patch is used in a similar manner to cyclicAMI, except that it has
an additional entry, "transformPatch". This entry must name a coupled
patch. The transformation used to repeat the AMI coupling is taken from
this patch. For example, in system/blockMeshDict:

boundary
(
    cyclic1
    {
        type cyclic;
        neighbourPatch cyclic2;
        faces ( ... );
    }

    cyclic2
    {
        type cyclic;
        neighbourPatch cyclic1;
        faces ( ... );
    }

    cyclicRepeatAMI1
    {
        type cyclicRepeatAMI;
        neighbourPatch cyclicRepeatAM2;
        transformPatch cyclic1;
        faces ( ... );
    }

    cyclicRepeatAMI2
    {
        type cyclicRepeatAMI;
        neighbourPatch cyclicRepeatAMI1;
        transformPatch cyclic1;
        faces ( ... );
    }

    // other patches ...
);

In this example, the transformation between cyclic1 and cyclic2 is used
to define the repetition used by the two cyclicRepeatAMI patches.
Whether cyclic1 or cyclic2 is listed as the transform patch is not
important.

A tutorial, incompressible/pimpleFoam/RAS/impeller, has been added to
demonstrate the functionality. This contains two repeating AMI pairs;
one cylindrical and one planar.

A significant amount of maintenance has been carried out on the AMI and
ACMI patches as part of this work. The AMI methods now return
dimensionless weights by default, which prevents ambiguity over the
units of the weight field during construction. Large amounts of
duplicate code have also been removed by deriving ACMI classes from
their AMI equivalents. The reporting and writing of AMI weights has also
been unified.

This work was supported by Dr Victoria Suponitsky, at General Fusion
2018-04-30 09:23:52 +01:00
8dcfc9e9f8 streamLine: Added option to track in both directions
Streamlines can now be tracked in both directions from the set of
initial locations. The keyword controlling this behaviour is
"direction", which can be set to "forward", "backward" or "both".

This new keyword superseeds the "trackForward" entry, which has been
retained for backwards compatibility.
2018-04-09 08:36:16 +01:00
c41efee594 Added support for the MVAPICH2 MPI implementation 2018-03-07 21:32:19 +00:00
1073607cb0 Corrected spelling and typo's in comments
Resolves bug report https://bugs.openfoam.org/view.php?id=2845
2018-03-05 20:14:28 +00:00
e08128781e functionObjects::turbulenceIntensity: New functionObject which writes the turbulenceIntensity field
Description
    Evaluates and writes the turbulence intensity field 'I'.

    The turbulence intensity field 'I' is the root-mean-square of the turbulent
    velocity fluctuations normalised by the local velocity magnitude:
    \f[
        I \equiv \frac{\sqrt{\frac{2}{3}\, k}}{U}
    \f]
    To avoid spurious extrema and division by 0 I is limited to 1 where the
    velocity magnitude is less than the turbulent velocity fluctuations.

    Example of function object specification:
    \verbatim
    functions
    {
        .
        .
        .
        turbulenceIntensity
        {
            type        turbulenceIntensity;
            libs        ("libfieldFunctionObjects.so");
        }
        .
        .
        .
    }
    \endverbatim

    or using the standard configuration file:
    \verbatim
    functions
    {
        .
        .
        .
        #includeFunc turbulenceIntensity
        .
        .
        .
    }
    \endverbatim
2018-03-02 14:32:29 +00:00
fe1fade8cb Corrected spelling in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2844
2018-02-13 20:39:56 +00:00
0b399ad7c1 etc/controlDict::DebugSwitches::specie: Set default to 0
pending an update to the JANAF polynomials for the chemFoam tutorials
2018-02-10 22:45:07 +00:00
5f384182dc etc/controlDict::DebugSwitches::specie: Set default to 1
to check Tcommon is the same for all specie JANAF polynomials
2018-02-07 17:04:05 +00:00
08d5fce8ca chemistryModel: Added new option to specify the initial ODE integration time-step
In constant/chemistryProperties in addition to the specification of the initial
ODE integration time-step used at the start of the run:

    initialChemicalTimeStep 1e-12;

this time step may now also be specified for every chemistry integration by
setting the optional entry maxChemicalTimeStep, e.g.

    maxChemicalTimeStep 1e-12;
2018-02-01 11:27:31 +00:00
d82cc36c5a OpenFOAM: Added support for extended precision scalar
OpenFOAM can now be compiled with single, double or long double scalars by
setting the WM_PRECISION_OPTION environment variable to either SP, DP or LP
respectively.

On most 64bit systems long double is stored as 128bit but computed in the
floating point hardware to 80bit.  Due to the increased storage compared to
double precision cache and memory access is significantly more time consuming
causing a slow-down of floating point intensive operations by a factor of 2 to
3.
2018-01-29 15:03:13 +00:00
d008fe4468 timeFunctionObject: New functionObject which writes run, CPU and clock time
and optionally the CPU and clock times per time step.

Example of function object specification:
time
{
    type            time;

    libs            ("libutilityFunctionObjects.so");

    writeControl    timeStep;
    writeInterval   1;

    perTimeStep     no;
}

Adding

    #includeFunc time

to the functions list in the controlDict of the motorBike tutorial generates

0               1.190000e+00    1
1               1.640000e+00    1
2               1.940000e+00    2

Enabling the optional writing of the CPU and clock time per time step is
straight forward:

    #includeFunc time(perTimeStep=yes)
2018-01-23 10:10:10 +00:00
0309a2c7cf jobInfo: changed writeJobInfo control to write the jobInfo.<pid> file in the case directory
When etc/controlDict::writeJobInfo is set to 1 jobInfo.<pid> files are written
to the case directory containing a summary of the execution of the job containing

startDate
startTime
userName
foamVersion
code
argList
currentDir
PPID
PGID
foamBuild
root
case
nProcs

When the job completes the following additional entries are written:

cpuTime
endDate
endTime
termination

The original etc/controlDict::writeJobInfo control has been renamed writeJobControl and when set
to 1 writes the ~/OpenFOAM/jobControl/runningJobs and finishedJobs files for job control.
2018-01-19 20:09:32 +00:00
a2ac77bdb1 wallHeatTransferCoeff functionObject: Added configuration file 2017-12-13 10:23:13 +00:00
e85eb48ba7 Removed legacy scripts rm~all and rmcore
Also resolves bug-report https://bugs.openfoam.org/view.php?id=2780
2017-12-05 15:28:54 +00:00
e1645856f8 foamyHexMesh: Switched off output of all the secondary meshes 2017-11-13 08:31:59 +00:00
c2835a450b functionObjects::ddt: New functionObject which calculates and writes the Eulerian time derivative of a field
Based on patch contributed by Tobias Holzmann
Resolves feature-request https://bugs.openfoam.org/view.php?id=2525
2017-11-05 10:58:07 +00:00
cf074d3689 foamyHexMesh: Set no refinement iterations in global dictionary 2017-10-06 11:46:33 +01:00
c85daee12c paraFoam: Added support for wildcards in etc/paraFoam::defaultFields
Specifying default fields for complex and multi-phase cases is simplified and
generalized by using wildcards to select sets of related field names, e.g.

    defaultFields (p p_rgh U "U\..*" T "T\..*" "alpha\..*");

selects the velocity, temperature and phase-fraction fields of all phases in
addition to the pressure fields.
2017-10-04 15:23:06 +01:00
4ece2ccf3d paraFoam: Add support for specifying the patch types loaded by default
The default patch types specified in the new defaultPatchTypes entry of the
etc paraFoam configuration dictionaries:

    defaultPatchTypes (patch wall);

Wildcards are supported, for example to specify that all patches loaded simply set
defaultPatchTypes to

    defaultPatchTypes (".*");
2017-10-04 13:53:12 +01:00
10b289245f paraFoam: Added configuration file to set default fields loaded on start-up
The new default paraFoam configuration is in the files OpenFOAM-dev/etc/paraFoam
containing the entry

    defaultFields (U p p_rgh T alpha.water alpha.air);

specifying the set of fields which are loaded by default if available.  This
setting maybe overridden by providing additional paraFoam configuration files in
any of the OpenFOAM etc directories searched, listed using

    foamEtcFile -list

e.g.

    ~/.OpenFOAM/dev
    ~/.OpenFOAM
    ~/OpenFOAM/site/dev
    ~/OpenFOAM/site
    ~/OpenFOAM/OpenFOAM-dev/etc

The new configurable set of default fields loaded replaces the original hard-coded default of
"p" and "U" and is much more convenient for current OpenFOAM usage.
2017-10-02 16:15:44 +01:00
db6495986b Added icoUncoupledKinematicCloud packaged function object 2017-09-07 17:42:29 +01:00
278da33fbe Upgraded cmake to 3.9.0
Resolves bug-report https://bugs.openfoam.org/view.php?id=2648
2017-08-04 11:47:59 +01:00
254ff361e6 CGAL: Upgraded to 4.10 2017-07-28 08:24:28 +01:00
384f9a5cf6 CGAL: Upgraded to 4.10 2017-07-27 14:38:35 +01:00
84e27cb356 etc/bashrc: Updated to support ksh and zsh
Resolves bug-report https://bugs.openfoam.org/view.php?id=2636
2017-07-27 14:13:34 +01:00
68089dd574 paraFoam: Updated ParaView to version 5.4.0
ParaView has been updated to version 5.4.0. The C++ panel has been
deleted and replaced with a panel based on the new(er) XML API. This
reader works for ParaView-4.0.1 and newer. The ParaView 3 reader remains
unchanged.

Update issues have also been fixed. All the time directories are now
scanned for fields and clouds when filling the selection lists. This
stops fields from disappearing when the time is changed. The scan is
only done on startup and when the refresh button is pressed.

The list of available Lagrangian fields also now shows a combined set of
all the clouds. Previously, only fields from the first cloud were shown.
If a field does not apply to all the clouds, ParaView will display it's
name in the dropdown menu with a "(partial)" qualifier.

Some undocumented and incomplete bits of code, which were not being
compiled, have been removed.
2017-07-21 12:05:57 +01:00
fe3587305b etc/templates: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:51:34 -05:00
c3fd351234 flowRateFaceZone packaged function object: corrected Description 2017-07-13 10:49:41 -05:00
9baf360c4d Revert "interfaceHeight function object: added preconfigured file in etc"
This reverts commit 5436668030.
2017-07-13 10:44:20 -05:00
5436668030 interfaceHeight function object: added preconfigured file in etc 2017-07-13 10:40:23 -05:00
1888b122cc Bash [TAB] completion: deleted stray chars 2017-07-08 14:30:28 +01:00
de10a28729 Bash [TAB] completion: support for -fileHandler and -time 2017-07-08 13:31:13 +01:00
61e9686651 Upgraded to OpenMPI-2.1.1 2017-07-07 18:02:39 +01:00
7c301dbff4 Parallel IO: New collated file format
When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
mesh(es) has historically been stored in multiple files within separate
directories for each processor.  Processor directories are named 'processorN',
where N is the processor number.

This commit introduces an alternative "collated" file format where the data for
each decomposed field (and mesh) is collated into a single file, which is
written and read on the master processor.  The files are stored in a single
directory named 'processors'.

The new format produces significantly fewer files - one per field, instead of N
per field.  For large parallel cases, this avoids the restriction on the number
of open files imposed by the operating system limits.

The file writing can be threaded allowing the simulation to continue running
while the data is being written to file.  NFS (Network File System) is not
needed when using the the collated format and additionally, there is an option
to run without NFS with the original uncollated approach, known as
"masterUncollated".

The controls for the file handling are in the OptimisationSwitches of
etc/controlDict:

OptimisationSwitches
{
    ...

    //- Parallel IO file handler
    //  uncollated (default), collated or masterUncollated
    fileHandler uncollated;

    //- collated: thread buffer size for queued file writes.
    //  If set to 0 or not sufficient for the file size threading is not used.
    //  Default: 2e9
    maxThreadFileBufferSize 2e9;

    //- masterUncollated: non-blocking buffer size.
    //  If the file exceeds this buffer size scheduled transfer is used.
    //  Default: 2e9
    maxMasterFileBufferSize 2e9;
}

When using the collated file handling, memory is allocated for the data in the
thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
is allocated.  If the data exceeds this size, the write does not use threading.

When using the masterUncollated file handling, non-blocking MPI communication
requires a sufficiently large memory buffer on the master node.
maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
data exceeds this size, the system uses scheduled communication.

The installation defaults for the fileHandler choice, maxThreadFileBufferSize
and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
the case controlDict file, like other parameters.  Additionally the fileHandler
can be set by:
- the "-fileHandler" command line argument;
- a FOAM_FILEHANDLER environment variable.

A foamFormatConvert utility allows users to convert files between the collated
and uncollated formats, e.g.
    mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated

An example case demonstrating the file handling methods is provided in:
$FOAM_TUTORIALS/IO/fileHandling

The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
2017-07-07 11:39:56 +01:00
1b377dd439 interfaceHeight: Improved the description 2017-06-30 12:08:00 +01:00
d13285cf90 postProcessing: packaged interfaceHeight function object 2017-06-29 23:14:46 +01:00
4cb47940e0 Bash [TAB] completion: fix for filenames with odd chars
Resolves bug-report https://bugs.openfoam.org/view.php?id=2571
2017-06-26 13:03:51 +01:00
7bdbab7f4e Rationalize the "pos" function
"pos" now returns 1 if the argument is greater than 0, otherwise it returns 0.
This is consistent with the common mathematical definition of the "pos" function:

https://en.wikipedia.org/wiki/Sign_(mathematics)

However the previous implementation in which 1 was also returned for a 0
argument is useful in many situations so the "pos0" has been added which returns
1 if the argument is greater or equal to 0.  Additionally the "neg0" has been
added which returns 1 if if the argument is less than or equal to 0.
2017-06-22 14:32:18 +01:00
ad780c1e21 Bash [TAB] completion: enabled for new -list* options
see commit a4e755c0dc
2017-06-13 19:02:35 +01:00
0d1c622906 codedFvOptionTemplate: updated 'setValue' to 'constrain'
Resolves bug-report https://bugs.openfoam.org/view.php?id=2579
2017-06-13 16:52:16 +01:00
2fc10e20bb compressibleInflowOutflow template case: added missing wallDist in fvSchemes 2017-06-04 12:33:22 +01:00
97585eac40 Bash Completion: re-enabled directory completion for scripts, e.g. wmake 2017-06-02 19:44:16 +01:00
9213944091 Bash [TAB] completion: enabled for scripts in wmake/ dir 2017-05-31 19:28:28 +01:00
d759f685ec Bash [TAB] completion: enabled for scripts in bin/ dir 2017-05-30 19:33:05 +01:00
11c0e19b0b postProcessing: reverted isosurface function to use isoSurface algorithm 2017-05-19 15:20:08 +01:00
e3fe02296e doxyDocDirs: Added support for HTTP servers
In addition to local Doxygen HTML directories an optional HTTP server directory
may be specified:

Documentation
{
    docBrowser      "firefox";
    doxyDocDirs
    (
        "$WM_PROJECT_USER_DIR/html"
        "~OpenFOAM/html"
        "$WM_PROJECT_DIR/doc/Doxygen/html"
        "http://cpp.openfoam.org/dev"
    );
    doxySourceFileExt "_8C.html";
}

from which the Doxygen documentation files may be obtained so now the "-doc"
command-line option may be used even if if Doxygen has not been run locally,
e.g.

pimpleFoam -doc
2017-05-15 15:33:51 +01:00
90f39e0d89 Added Bash [TAB] completion to all OpenFOAM applications
When typing OpenFOAM commands, the bash completion system will
complete option names, e.g. -help, -parallel, etc.  After typing an
option that includes an argument, e.g. -case <dir>, completion will
adjust to the type of argument, e.g. present directories if the
argument is a directory.  Similarly, for applications with mandarory
file arguments, file (and directory) names will appear on the
completion list.
2017-05-14 10:53:27 +01:00
7e04e6b55f Reinstated operation of "-doc" and "-srcDoc"
Changed Doxyfile to generate descriptive names for the HTML files.
Added "-file" option to firefox to read the HTML file name from the command line.
2017-05-12 18:35:50 +01:00