Commit Graph

116 Commits

Author SHA1 Message Date
02fc637645 coupledPolyPatch: Separated ordering from transformation controls
which will allow the transformation calculation functionality to be moved into
cyclic patches.
2019-12-31 20:24:52 +00:00
03207b1538 Coupled patch transformations: Removed the hideous and unphysical non-uniform transformation support
The implementation of the optional non-uniform transformations in coupled
patches was based on transform property lists which could be either length 0 for
no transformation, 1 for uniform transformation or n-faces for non-uniform
transformation.  This complexity was maintenance nightmare but kept to support
the hack in the original film implementation to partially work around the
conservation error.  Now that film has been re-implemented in fully mass
conservative form this unphysical non-uniform transformation support is no
longer needed and the coupled patch transformations have been completely
refactored to be simpler and more rational with single values for the
transformation properties and boolians to indicate which transformations are
needed.
2019-12-25 11:26:30 +00:00
5eaf74c3a4 dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
2019-11-27 14:56:32 +00:00
81fca4c43a Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
2019-10-18 11:46:20 +01:00
e599162b09 Utilities: standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-19 17:53:10 +01:00
8e9f692aa4 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-13 21:26:33 +01:00
fc4d7b92c3 Corrected documentation comment for disabled copy constructors 2019-05-29 15:58:42 +01:00
9140984cf4 Added "= delete" to disabled bitwise copy constructors and assignment operators
Currently these deleted function declarations are still in the private section
of the class declarations but will be moved by hand to the public section over
time as this is too complex to automate reliably.
2019-05-28 15:26:45 +01:00
30bea84fac C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
Replaced all uses of complex Xfer class with C++11 "move" constructors and
assignment operators.  Removed the now redundant Xfer class.

This substantial changes improves consistency between OpenFOAM and the C++11 STL
containers and algorithms, reduces memory allocation and copy overhead when
returning containers from functions and simplifies maintenance of the core
libraries significantly.
2019-05-25 17:40:39 +01:00
3cbb932be8 Added support for patch manipulation of pointFields
e.g. during createBaffles

Added a test application and test case for meshTools: test/fvMeshTools

Patch contributed by Mattijs Janssens
2019-04-12 18:44:32 +01:00
a1a225c504 dynamicFvMesh: Rationalised the handling and caching of the dynamicMeshDict
The base dynamicFvMesh now reads and stores the dynamicMeshDict and motion
solver receive it as a constructor argument.

Also rationalised the motionSolver diffusivity classes in which storing the
faceDiffusivity field provided no advantage; now it is created and returned on
demand.
2019-03-21 10:58:31 +00:00
111cdf3a65 solutionControl: Renaming and improved final logic
The sub-loops of the solution control are now named more consistently,
with ambiguously named methods such as finalIter replaced with ones
like finalPimpleIter, so that it is clear which loop they represent.

In addition, the final logic has been improved so that it restores state
after a sub-iteration, and so that sub-iterations can be used on their
own without an outer iteration in effect. Previously, if the
non-orthogonal loop were used outside of a pimple/piso iteration, the
final iteration would not execute with final settings.
2019-02-15 16:55:11 +00:00
66c26af922 mesh manipulation utilities: Rationalized field handling and added -noFields option 2019-01-08 21:10:19 +00:00
6dc48b62d9 Changed tmp<volField> and tmp<surfaceField> construction to use the new simpler "New" method
avoiding unnecessary database registration of temporary fields
2018-12-21 18:37:13 +00:00
146a59e46c GeometricField: Temporary fields are no longer registered on the database by default
Registration occurs when the temporary field is transferred to a non-temporary
field via a constructor or if explicitly transferred to the database via the
regIOobject "store" methods.
2018-12-20 11:00:37 +00:00
d57d36b30e subsetMesh: Added -noFields option
With the -noFields option the mesh is subset but the fields are not changed.
This is useful when the field fields have been created to correspond to the mesh
after the mesh subset.
2018-07-31 18:14:47 +01:00
9d185f2cb1 POSIX: Unifying checking for ".gz" and ".orig" variants 2018-07-17 16:53:21 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
025e48373b fileHandler: Added flush method
This method waits until all the threads have completed IO operations and
then clears any cached information about the files on disk. This
replaces the deactivation of threading by means of zeroing the buffer
size when writing and reading of a file happen in sequence. It also
allows paraFoam to update the list of available times.

Patch contributed by Mattijs Janssens
Resolves bug report https://bugs.openfoam.org/view.php?id=2962
2018-06-27 15:25:20 +01:00
786318cabd utilities: Centralized annotated utility dictionaries to etc/caseDicts/annotated 2018-06-11 17:20:08 +01:00
2e1825a50f utilities: Remove unused case related options 2018-06-11 15:21:34 +01:00
d0609cd6ae mirrorMesh: Added "-dict" option
Updated and simplified tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega
case to use mirrorMesh -dict
2018-05-30 18:38:50 +01:00
fd25d2a6e0 splitMeshRegions: Improved region naming
Changed the default region name from "domain" to "region" for consistency with
the rest of OpenFOAM.

Changed the multiple default region numbering to start from 1 rather than 0
because the top-level mesh in the case directory is always named "region0".

Changed the default region numbering to only relate to the default named regions
and does not increment for explicitly named regions.  This avoids a naming
dependency on the default and named region order.

Added new option "-defaultRegionName <name>"
to specify the base name of the unspecified regions, defaults to "region"
2018-05-30 14:00:23 +01:00
0c4562422d transformPoints: Added -allRegions option
With the -allRegions option all the regions specified in the
constant/regionProperties are transformed.
2018-05-15 14:48:19 +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
484c16a5da stitchMesh: Do not write the meshModifiers file with the "overwrite" option 2018-04-24 14:04:26 +01:00
8a9bbb9a73 Corrected typos in comment: "the the" -> "the" 2018-03-25 12:09:00 +01: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
c7a5f740d8 renumberMesh: Added -noFields option to avoid renumbering the fields when not necessary 2018-02-18 21:34:11 +00:00
d66059aac1 createBaffles: Changed the "noFields" createBafflesDict switch to "fields"
Now the fields are updated corresponding to the mesh change only if the optional
"fields" switch is set true.
2018-02-16 23:04:45 +00:00
0286d5f21c mergeOrSplitBaffles: Added -fields option
Without -fields specified mergeOrSplitBaffles now manipulates the mesh only and
with the -fields option also updates the fields corresponding to the mesh change.
2018-02-16 23:03:31 +00:00
019c2c08dc Corrected spelling in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2844
2018-02-13 22:17:53 +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
0248dd81e3 Corrected comments: inbetween -> in between 2018-02-13 16:38:41 +00:00
fc2b2d0c05 OpenFOAM: Rationalized the naming of scalar limits
In early versions of OpenFOAM the scalar limits were simple macro replacements and the
names were capitalized to indicate this.  The scalar limits are now static
constants which is a huge improvement on the use of macros and for consistency
the names have been changed to camel-case to indicate this and improve
readability of the code:

    GREAT -> great
    ROOTGREAT -> rootGreat
    VGREAT -> vGreat
    ROOTVGREAT -> rootVGreat
    SMALL -> small
    ROOTSMALL -> rootSmall
    VSMALL -> vSmall
    ROOTVSMALL -> rootVSmall

The original capitalized are still currently supported but their use is
deprecated.
2018-01-25 09:46:37 +00:00
49c13cf5c2 createBaffles: Create slave baffles on coupled patches 2017-11-29 15:30:35 +00:00
b1d04b9f71 createBaffles: Corrected warning about internalFacesOnly setting 2017-11-22 14:45:23 +00:00
000401acba mirrorMesh: Updated Make/options 2017-10-27 15:20:08 +01:00
19da21ed93 mirrorMesh: Added support for cellLevel and pointLevel to support dynamic mesh refinement
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2712
2017-10-27 14:58:26 +01:00
644253773f mergePolyMesh: Added check for zero patches in the master mesh
Patch contributed by Jakub Benda
Resolves bug-report https://bugs.openfoam.org/view.php?id=2727
2017-10-18 16:24:08 +01:00
f53f52a691 createPatch: writing the cyclic match OBJ files is now optional
The new optional switch 'writeCyclicMatch' can be set to 'true' to enable the writing of
the cyclic match OBJ files; defaults to 'false'.

Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2685
2017-09-09 23:00:27 +01:00
1081f8c046 setSet: Add ncurses to link-line if available
Resolves potential issue linking with readline on systems where readline has
ncurses support enabled.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2642
2017-08-01 09:42:21 +01:00
c6f365f6cc refineMesh: Correct parallel operation
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2621
2017-07-22 22:39:40 +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
72277ed677 Standardized names of extrude2DMesh and polyDualMesh application source files 2017-05-14 15:44:48 +01:00
d05ef92a47 Other utilities: standardised argument naming for files 2017-05-12 15:16:29 +01:00
1e6c9a0a54 Updated UPstream::commsTypes to use the C++11 enum class 2017-03-10 19:54:55 +00:00
a402896d50 setsToZones: Add support for multi-region cases
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2437
2017-01-19 08:17:54 +00:00
3d5e4c924b Make/options: Added -lscotchDecomp where appropriate
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2410
2016-12-27 15:26:53 +00:00