Commit Graph

57 Commits

Author SHA1 Message Date
07a640f216 Updated to OpenFOAM-6 2018-07-07 19:44:36 +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
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
88a218ce84 treeBoundBox: Removed unecessary randomisation
Tree bound boxes are expanded asymmetrically to reduce the liklihood of
octree faces aliging with mesh faces and edges. The asymmetry is now
generated using hard-coded irrational numbers, rather than using a
random generator.

The asymmetry was effectively already hard coded. The random numbers are
only pseudo random, so the same numbers were being applied to the bound
boxes every time. This change simply removes the overhead of creating
the generator, and also gets rid of some duplicated code.
2018-06-11 11:01:11 +01:00
7a0155f5a9 Added Description to surfaceFeatures and surfaceFeatureExtract 2018-05-31 09:03:52 +01:00
aea8dc0516 tutorials: Updated to use surfaceFeatures rather than the deprecated surfaceFeatureExtract 2018-05-29 19:18:53 +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
aaed6290d0 surfaceFeatures: New version of surfaceFeatureExtract with simplied controls
Surfaces are specified as a list and the controls applied to each, e.g. in the
rhoPimpleFoam/RAS/annularThermalMixer tutorial:

    surfaces
    (
        "AMI.obj"
        "shaft.obj"
        "wall.obj"
        "statorBlades.obj"
        "rotorBlades.obj"
    );

    includedAngle   150;  // Identifes a feature when angle
                      // between faces < includedAngle
    trimFeatures
    {
        minElem         10;   // minimum edges within a feature
    }

    writeObj        yes;  // writes out _edgeMesh.obj files to view features

If different controls are required for different surfaces multiple
sub-dictionaries can be used:

    AMIsurfaces
    {
        surfaces
        (
            "AMI.obj"
        );

        includedAngle   140;  // Identifes a feature when angle
                          // between faces < includedAngle
        trimFeatures
        {
            minElem         8;   // minimum edges within a feature
        }

        writeObj        yes;  // writes out _edgeMesh.obj files to view features
    }

    otherSurfaces
    {
        surfaces
        (
            "shaft.obj"
            "wall.obj"
            "statorBlades.obj"
            "rotorBlades.obj"
        );

        includedAngle   150;  // Identifes a feature when angle
                          // between faces < includedAngle
        trimFeatures
        {
            minElem         10;   // minimum edges within a feature
        }

        writeObj        yes;  // writes out _edgeMesh.obj files to view features
    }

Existing feature edge files corresponding to particular surfaces can be specified using
the "files" association list:

    surfaces
    (
        "AMI.obj"
        "shaft.obj"
        "wall.obj"
        "statorBlades.obj"
        "rotorBlades.obj"
    );

    files
    (
        "AMI.obj" "constant/triSurface/AMI.obj.eMesh";
    );

    includedAngle   150;  // Identifes a feature when angle
                      // between faces < includedAngle
    trimFeatures
    {
        minElem         10;   // minimum edges within a feature
    }

    writeObj        yes;  // writes out _edgeMesh.obj files to view features
2018-04-20 15:23:28 +01:00
1b0e09faf0 surfaceFeatureExtract: Moved feature edge editing functions to the surfaceFeatures class 2018-04-17 20:38:15 +01:00
ded92d5951 surfaceFeatureExtract: Updated included files 2018-04-17 00:22:03 +01:00
2730fbad5c surfaceFeatureExtract: Further refactoring to move the extract surface closeness functionality
to triSurfaceMesh
2018-04-17 00:16:12 +01:00
ed5f44e7e8 surfaceFeatureExtract: Refactoring surface closeness functions 2018-04-12 07:42:25 +01:00
3e1ab675f6 surfaceFeatureExtract: Refactored pointIndexHitList functionality into corresponding core classes 2018-04-10 23:08:56 +01:00
a908847b9c surfaceFeatureExtract: Refactored core line and edge functions corresponding classes 2018-04-10 21:52:44 +01:00
21d5267b6f surfaceFeatureExtract: Refactor core functionality into core classes and libraries 2018-04-06 20:15:28 +01:00
43b35a5173 triangle, triFace, face: Rationalized normal for consistency with the rest of OpenFOAM
For compatibility with all the mesh and related classes in OpenFOAM The 'normal'
function of the 'triangle', 'triFace' and 'face' classes now returns the unit
normal vector rather than the vector area which is now provided by the 'area'
function.
2018-04-06 13:57:36 +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
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
672d3058ea surfaceFeatureExtract: Changed the internalAngleTolerance to 80deg 2018-01-19 20:16:36 +00:00
3e761d6a41 foamyHexMesh: Added cell sizing based on local surface closeness
First run the surfaceFeatureExtract with the "closeness" option enabled in the
surfaceFeatureExtractDict to extract the surface closeness point field

    // Out put the closeness of surface elements to other surface elements.
    closeness               yes;

Then enable cell sizing based on local surface closeness by specifying the
"internalCloseness" options in the foamyHexMeshDict e.g.

motionControl
{
    defaultCellSize             4;

    minimumCellSizeCoeff        0.1;
    maxSmoothingIterations      100;
    maxRefinementIterations     2;

    shapeControlFunctions
    {
        geometry
        {
            type                        searchableSurfaceControl;
            priority                    1;
            mode                        inside;

            surfaceCellSizeFunction     nonUniformField;

            cellSizeCalculationType     automatic;

            curvature                   false;
            curvatureFile               dummy;
            featureProximity            false;
            featureProximityFile        dummy;
            internalCloseness           true;
            internalClosenessFile       geometry.internalPointCloseness;
            internalClosenessCellSizeCoeff 25;
            curvatureCellSizeCoeff      0;
            maximumCellSizeCoeff        1;
            cellSizeFunction            uniform;
        }
    }
}
2018-01-14 12:05:38 +00:00
cc4d4433b8 messageStream: Added support for suppressing the printing of log header
This generalizes and replaces the previous "noBanner" option provided by argList
and is extended to include the messages printed by Time.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2782
2017-12-06 11:58:35 +00: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
f1240a853c surfaceFind: output region/zone number of found face 2017-06-02 21:02:01 +01:00
da6b1bf361 Surface utilities: standardised argument naming and ordering
for input and output surface files
2017-05-12 14:43:10 +01:00
b0d13b51d8 surfaceLambdaMuSmooth: Added meshTools to link 2017-04-21 16:50:20 +01:00
37cd5434a6 Merged the edgeMesh library into the meshTools library 2017-04-21 10:38:53 +01:00
7656c076c8 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
cf89a3094a Updated and simplified the Doxygen documentation 2016-06-20 21:20:28 +01:00
017903cb85 Remove/replace deprecated functions and classes 2016-06-20 09:39:02 +01:00
7b75d81269 Rationalized Doxygen documentation of command-line options 2016-06-17 09:11:58 +01:00
4500971827 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
a8bf4be58a Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
8c4f6b8fcb Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
6a27f7af46 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
287603474a vector::zero -> Zero 2016-04-16 18:34:41 +01:00
09ba40bf26 Updated header 2016-04-04 13:53:51 +01:00
3358c056e6 surfaceMeshConvert: Reinstated missing error messages 2016-04-04 13:53:20 +01:00
44c73bfbe1 Made all template declarations consistent using 'class' rather than 'typename' 2016-03-22 15:02:55 +00:00
055a113f10 SquareMatrix, SymmetricSquareMatrix: Changed the constructor from size to require only n
This avoids the need to check that the m and n dimensions are the same.
2016-03-22 14:13:48 +00:00
c13421b10a Matrix: Added (i, j) addressing to allow support for addressing blocks of the matrix
This change brings OpenFOAM into line with the standard matrix
addressing in other C++ libraries for better interoperability.
2016-03-20 19:44:29 +00:00
04e8de2cf0 transformPoints, surfaceTransformPoints: Updated quaternion construction from Euler-angles
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2024
2016-03-14 16:40:35 +00:00
c544bec896 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
7859083246 OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
2016-02-26 17:31:28 +00:00
5552674fc7 surfaceCoarsen: Changed List<::... to List< ::... for gcc-4.5 2016-02-21 09:03:39 +00:00
94c05a1e6c Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
36f2d69888 Update code to use the simpler C++11 template syntax 2016-01-10 19:20:16 +00:00