Commit Graph

101 Commits

Author SHA1 Message Date
a3fd68eed0 tutorials: shellAndTubeHeatExchanger: Update due to change in snappyHexMesh writeFlags 2019-02-12 11:35:31 +00:00
c59c82ac0e radiationModels: Relocation, namespace changes, and fixed Qdot access
The radiation modelling library has been moved out of
thermophysicalProperties into the top-level source directory. Radiation
is a process, not a property, and belongs alongside turbulence,
combustion, etc...

The namespaces used within the radiation library have been made
consistent with the rest of the code. Selectable sub-models are in
namespaces named after their base classes. Some models have been
renamed remove the base type from the suffix, as this is unnecessary.
These renames are:

    Old name:                       New name:

    binaryAbsorptionEmission        binary
    cloudAbsorptionEmission         cloud
    constantAbsorptionEmission      constant
    greyMeanAbsorptionEmission      greyMean/greyMeanCombustion
    greyMeanSolidAbsorptionEmission greyMeanSolid
    wideBandAbsorptionEmission      wideBand/wideBandCombustion

    cloudScatter                    cloud
    constantScatter                 constant

    mixtureFractionSoot             mixtureFraction

Some absorption-emission models have been split into versions which do
and don't use the heat release rate. The version that does has been
given the post-fix "Combustion" and has been moved into the
combustionModels library. This removes the dependence on a registered
Qdot field, and makes the models compatible with the recent removal of
that field from the combustion solvers.
2019-02-11 08:38:56 +00:00
6d4960e36c chtMultiRegionFoam: Added shell-and-tube heat exchanger tutorial
This tutorial serves as a reference of how to create a multi-region
mesh with layer addition.

The multiRegionHeater tutorial and it's variants have been removed as
the geometry is not meaningful and the functionality is now all
represented elsewhere.
2019-02-04 12:27:11 +00:00
7203f20283 chtMultiRegionFoam: Added radiation to reverseBurner tutorial 2019-02-04 09:18:37 +00:00
b292fc6d8d radiation: Changed to dictionary constructors for dimensioned types
This allows coefficients of the constantAbsorptionEmission and
constantScatter to be entered as pure numbers, with the name and
dimensions set automatically, rather than having to specify them
manually.
2019-02-04 09:18:37 +00:00
dc25f10202 combustionModels: Added Qdot function object
This function object writes out the heat release rate field for a
combustion model. This is useful for solvers where combustion is
optional, and which do not therefore write out the heat release rate by
default; e.g., chtMultiRegionFoam and reactingTwoPhaseEulerFoam.
2019-01-24 10:10:05 +00:00
a0850290b3 chtMultiRegionFoam: Improvements to reverseBurner tutorial
The tutorial has been converted from two-dimensions to a wedge and the
flow has been swirl stabilised. The turbulence parameters have been made
physical. The transport schemes have been increased to second order. The
reaction mechanism has been changed to one from a publically accessible
reference. The gas thermodynamics have been made incompressible, and the
pressure offset around zero, which improves the behaviour of the
pressure solution.
2019-01-24 09:01:52 +00:00
14aad10fa4 tutorials: Improvements to reacting case setups
Added headers to all reactions files to prevent warnings in paraview.
Added references for known mechanisms. Removed unused reaction and
thermophysical property files.
2019-01-22 15:53:11 +00:00
e033aca111 streamlines: Updated tutorials for new caseDicts 2018-12-18 09:18:20 +00:00
ee443e201f Rationalised the handling of "Final" solver and relaxation factor settings
Now for transient simulations "Final" solver settings are required for ALL
equations providing consistency between the solution of velocity, energy,
composition and radiation properties.

However "Final" relaxation factors are no longer required for fields or
equations and if not present the standard value for the variable will be
applied.  Given that relaxation factors other than 1 are rarely required for
transient runs and hence the same for all iterations including the final one
this approach provide simpler input while still providing the flexibility to
specify a different value for the final iteration if required.  For steady cases
it is usual to execute just 1 outer iteration per time-step for which the
standard relaxation factors are appropriate, and if more than one iteration is
executed it is common to use the same factors for both.  In the unlikely event
of requiring different relaxation factors for the final iteration this is still
possible to specify via the now optional "Final" specification.
2018-11-17 19:42:23 +00:00
0f422c2a54 thermophysicalModels: Changed constFluidEThermoPhysics and constEThermoPhysics to use eConstThermo rather than hConstThermo
to avoid the need to evaluate departure functions and simplify evaluation of the
temperature.  In general it makes more sense to use and e/Cv based
thermodynamics when solving for internal energy rather than h/Cp and have
convert between the energy forms.

All related tutorials and test cases have also been updated.
2018-10-25 10:45:45 +01:00
f9971f80d7 thermophysicalModels::equationOfState: Completed departure functions for all except adiabaticPerfectFluid
Changed liquid thermo from sensibleEnthalpy to sensibleInternalEnergy in
tutorials.  It is generally more convergent and stable to solve for internal
energy if the fluid is incompressible or weakly compressible.
2018-10-19 10:31:42 +01:00
77dd7556c9 offsetCylinder: New tutorial to demonstrate the generalizedNewtonian laminarModel
with the CrossPowerLaw viscosityModel
2018-10-05 11:28:34 +01:00
adea51c53c water/thermophysicalProperties: Changed equation of state to perfectFluid 2018-08-12 19:04:43 +01:00
d627582dd6 combustionModel: Removed the deprecated "active" switch.
To switch-off combustion choose the "noCombustion" model selected with the name
"none" in the combustionProperties file:

combustionModel none;
2018-07-26 10:55:10 +01:00
ab31777e9c radiation: Removed the redundant "radiation off" switch from radiationProperties
To switch-off radiation set

    radiationModel  none;

in radiationProperties which instantiates "null" model that does not read any
data or coefficients or evaluate any fields.
2018-07-25 08:10:30 +01:00
fb4cb6e57a tutorials::coolingSphere/Allclean: avoid extended regular expressions in grep
Solves grep problem on Slackware 14.2

Patch contributed by Lorenzo Trevisan
Resolves patch request https://bugs.openfoam.org/view.php?id=3012
2018-07-24 11:48:08 +01:00
fdbf3c134f Rationalized dictionary and configuration file headers 2018-07-09 15:40:05 +01:00
e8bb954fb0 Corrected functionObject configuration file headers 2018-07-09 12:28:56 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
019ae8bab3 tutorials: Changed compressed ascii output to binary to improve IO performance
also rationalized the writeCompression specification
2018-06-27 15:25:52 +01:00
3ef4c803cd sampledSet: Consistent renaming, documentation, and code maintenance
The sampled sets have been renamed in a more explicit and consistent
manner, and two new ones have also been added. The available sets are as
follows:

    arcUniform: Uniform samples along an arc. Replaces "circle", and
    adds the ability to sample along only a part of the circle's
    circumference. Example:

        {
            type        arcUniform;
            centre      (0.95 0 0.25);
            normal      (1 0 0);
            radial      (0 0 0.25);
            startAngle  -1.57079633;
            endAngle    0.52359878;
            nPoints     200;
            axis        x;
        }

    boundaryPoints: Specified point samples associated with a subset of
    the boundary. Replaces "patchCloud". Example:

        {
            type        boundaryPoints;
            patches     (inlet1 inlet2);
            points      ((0 -0.05 0.05) (0 -0.05 0.1) (0 -0.05 0.15));
            maxDistance 0.01;
            axis        x;
        }

    boundaryRandom: Random samples within a subset of the boundary.
    Replaces "patchSeed", but changes the behaviour to be entirely
    random. It does not seed the boundary face centres first. Example:

        {
            type        boundaryRandom;
            patches     (inlet1 inlet2);
            nPoints     1000;
            axis        x;
        }

    boxUniform: Uniform grid of samples within a axis-aligned box.
    Replaces "array". Example:

        {
            type    boxUniform;
            box     (0.95 0 0.25) (1.2 0.25 0.5);
            nPoints (2 4 6);
            axis    x;
        }

    circleRandom: Random samples within a circle. New. Example:

        {
            type        circleRandom;
            centre      (0.95 0 0.25);
            normal      (1 0 0);
            radius      0.25;
            nPoints     200;
            axis        x;
        }

    lineFace: Face-intersections along a line. Replaces "face". Example:

        {
            type        lineFace;
            start       (0.6 0.6 0.5);
            end         (0.6 -0.3 -0.1);
            axis        x;
        }

    lineCell: Cell-samples along a line at the mid-points in-between
    face-intersections. Replaces "midPoint". Example:

        {
            type        lineCell;
            start       (0.5 0.6 0.5);
            end         (0.5 -0.3 -0.1);
            axis        x;
        }

    lineCellFace: Combination of "lineFace" and "lineCell". Replaces
    "midPointAndFace". Example:

        {
            type        lineCellFace;
            start       (0.55 0.6 0.5);
            end         (0.55 -0.3 -0.1);
            axis        x;
        }

    lineUniform: Uniform samples along a line. Replaces "uniform".
    Example:

        {
            type        lineUniform;
            start       (0.65 0.3 0.3);
            end         (0.65 -0.3 -0.1);
            nPoints     200;
            axis        x;
        }

    points: Specified points. Replaces "cloud" when the ordered flag is
    false, and "polyLine" when the ordered flag is true. Example:

        {
            type        points;
            points      ((0 -0.05 0.05) (0 -0.05 0.1) (0 -0.05 0.15));
            ordered     yes;
            axis        x;
        }

    sphereRandom: Random samples within a sphere. New. Example:

        {
            type        sphereRandom;
            centre      (0.95 0 0.25);
            radius      0.25;
            nPoints     200;
            axis        x;
        }

    triSurfaceMesh: Samples from all the points of a triSurfaceMesh.
    Replaces "triSurfaceMeshPointSet". Example:

        {
            type        triSurfaceMesh;
            surface     "surface.stl";
            axis        x;
        }

The headers have also had documentation added. Example usage and a
description of the control parameters now exists for all sets.

In addition, a number of the algorithms which generate the sets have
been refactored or rewritten. This was done either to take advantage of
the recent changes to random number generation, or to remove ad-hoc
fixes that were made unnecessary by the barycentric tracking algorithm.
2018-06-21 08:41:44 +01:00
bb44438fc6 bin/tools/pre-commit-hook: Added banner check for case files
Also fixed the formatting of the banners in the tutorials
2018-06-19 14:20:57 +01:00
89f1053f82 Code style: Fixed formatting of banners 2018-06-19 12:01:50 +01:00
2bd229df02 tutorials: Added the new Allmesh scripts 2018-06-10 17:40:12 +01:00
4e0f49a858 tutorials: Rationalized the naming of the meshing script when it is separated from Allrun to Allmesh 2018-06-10 16:08:36 +01:00
0813f80ebd tutorials: removed redundant entries from snappyHexMeshDict files 2018-06-09 14:26:11 +01:00
7c3732aa5a meshQualityDict: 'master' dictionary relocated to 'etc/caseDicts/mesh/generation' 2018-06-09 14:18:16 +01:00
5aeb17d9e7 heatExchanger tutorial: removed unnecessary creation of empty baffle patch 2018-06-09 13:26:38 +01:00
35326ba39b reconstructParMesh: Added -allRegions option 2018-06-01 10:41:14 +01:00
1c62b8f488 tutorials: Removed runApplication from foamDictionary calls
runApplication isn't needed for foamDictionary as it doesn't log
anything of consequence. Using runApplication leads to false unconfirmed
completion warnings in the test loop as foamDictionary does not generate
an end statement.
2018-05-31 21:59:42 +01:00
2b07f4377a coolingSphere: removed redundant entries in fvSolution 2018-05-31 13:55:09 +01:00
081193b277 chtMultiRegionFoam: Simplified multiRegionHeaterRadiation tutorial
Same changes as commit a963f82d, but for the radiation variant
2018-05-31 10:50:24 +01:00
a963f82dbf chtMultiRegionFoam: Simplified multiRegionHeater tutorial
The changeDictonary setup has been removed and replaced with a more
typical boundary condition setup. Dictionary variables and wildcards
have been used to reduce repetition of the simulation parameters.
2018-05-30 16:49:26 +01:00
147762bbc3 coolingSphere: updated Allclean and removed unnecessary files 2018-05-30 15:48:41 +01:00
5eb746c6c1 foamSetupCHT: setup application for conjugate heat transfer cases
with accompanying coolingSphere tutorial example.
2018-05-30 15:42:43 +01:00
ec65627a28 chtMultiRegionFoam: Simplified snappyMultiRegionHeater tutorial
The tutorial now also demonstrates how to run a multi-region CHT case
completely in parallel. If run-time post processing was being utilised
there would be no need for reconstruction at any point.
2018-05-30 14:30:01 +01:00
aea8dc0516 tutorials: Updated to use surfaceFeatures rather than the deprecated surfaceFeatureExtract 2018-05-29 19:18:53 +01:00
bf52a98e09 tutorials::Allrun: getApplication -> $(getApplication) 2018-05-28 22:20:07 +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
d8954d4370 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-16 23:10:09 +00:00
df6e2da2dd OpenFOAM field reading: Automated the handling of <field>.orig files
Now if a <field> file does not exist first the compressed <field>.gz file is
searched for and if that also does not exist the <field>.orig file is searched
for.

This simplifies case setup and run scripts as now setField for example can read
the <field>.orig file directly and generate the <field> file from it which is
then read by the solver.  Additionally the cleanCase function used by
foamCleanCase and the Allclean scripts automatically removed <field> files if
there is a corresponding <field>.orig file.  So now there is no need for the
Allrun scripts to copy <field>.orig files into <field> or for the Allclean
scripts to explicitly remove them.
2018-02-14 17:42:14 +00:00
719d567a62 chtMultiRegionFoam: Added heatedDuct tutorial
This is a CHT case which uses snappyHexMesh. It is a tutorial, in the
traditional sense, in that it has been designed for training purposes.
It does not rely on changeDictionary, surface utilities, or extensive
scripting.

This work was supported by Colin Moughton, at Strix
2018-02-12 14:33:08 +00:00
283f8b7dc8 chtMultiRegionFoam: SIMPLE operation and transonic switch
Multi-region PIMPLE controls have been applied to the chtMultiRegionFoam
solver, and a transonic option has been implemented.

The new PIMPLE controls let the solver operate SIMPLE mode. The
utilisation of library solution and convergence control functionality
has significantly reduced the amount of code in the solver. The
chtMultiRegionSimpleFoam solver has also been made obsolete, and has
therefore been removed.

A few changes will be necessary to convert an existing
chtMultiRegionSimpleFoam case to chtMultiRegionFoam. All the SIMPLE
sub-dictionaries in the system/<regions>/fvSolution will need to be
renamed PIMPLE. The system/fvSolution file will also need an empty
PIMPLE sub-dictionary. In addition, additional "<variable>Final" solver
and relaxation entries will be needed. For a steady case, adding a
wildcard ending, ".*", to the variable names should be sufficient.

Solution parameters appropriate for a steady case are shown below:

    solvers
    {
        "p_rgh.*"
        {
            solver           GAMG;
            tolerance        1e-7;
            relTol           0.01;
            smoother         DIC;
            maxIter          10;
        }

        "(U|h|e|k|epsilon).*"
        {
            solver           PBiCGStab;
            preconditioner   DILU;
            tolerance        1e-7;
            relTol           0.1;
        }
    }

    PIMPLE
    {
        // ...
    }

    relaxationFactors
    {
        fields
        {
            "p_rgh.*"       0.7;
        }
        equations
        {
            "U.*"           0.5;
            "(h|e).*"       0.3;
            "(k|epsilon).*" 0.2;
        }
    }

This work was supported by Fabian Buelow, at Evonik
Tobias Holzmann provided cases for testing the convergence controls
2018-02-01 19:13:48 +00:00
8b44230384 MRF tutorials: Change rotor velocity boundary condition to fixedValue
Using the noSlip boundary condition for rotating wall in an MRF region
interferes with post-processing by resetting the wall velocity to 0 rather than
preserving the value set by the MRF zone.
2018-01-05 15:13:46 +00:00
233d8dea12 reactionThermo: Select singleComponentMixture as pureMixture
A pureMixture can now be specified in a reacting solver. This further
enhances compatibility between non-reacting and reacting solvers.

To achieve this, mixtures now have a typeName function of the same form
as the lower thermodyanmic models. In addition, to avoid name clashes,
the reacting thermo make macros have been split into those that create
entries on multiple selection tables, and those that just add to the
reaction thermo table.
2017-12-18 08:39:28 +00:00
18f4d60690 chtMultiRegionFoam: Added reverseBurner tutorial
This tutorial demonstrates chtMultiRegionFoam's combustion capability
2017-12-18 08:39:28 +00:00
7c237a59d0 chtMultiRegionFoam: Added support for reactions
chtMultiRegionFoam now supports reaction/combustion modelling in fluid
regions in the same way as reactingFoam.
2017-12-18 08:39:04 +00:00
8c5f4b36f8 tutorials: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:47:34 -05: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