Commit Graph

85 Commits

Author SHA1 Message Date
4b01e40a93 Dictionaries: use 'e' rather than 'E' in exponential floating point numbers 2021-06-15 18:25:51 +01:00
926ba22b74 refineMesh: Rationalised and standardised the coordinate axes naming to e1, e2 and e3
the previous naming tan1, tan2, normal was non-intuitive and very confusing.

It was not practical to maintain backward compatibility but all tutorials and
example refineMeshDict files have been updated to provide examples of the
change.
2021-06-15 16:08:55 +01:00
be9fb841a1 snappyHexMesh: Simplified and rationalised the region refinement level specification
The inside or outside region refinement level is now specified using the simple
"level <level>" entry in refinementRegions e.g.

    refinementRegions
    {
        refinementBox
        {
            mode    inside;
            level   5;
        }
    }

rather than

    refinementRegions
    {
        refinementBox
        {
            mode    inside;
            levels  ((1E15 5));
        }
    }

where the spurious "1E15" number is not used and the '((...))' is unnecessary clutter.
2021-06-15 13:20:44 +01:00
0e13649996 surfaceFeatures: Consistent plane specification for subsetting
Specifying a plane with which to subset feature edges is now done using
the same dictionary syntax used elsewhere in OpenFOAM. For example, in
system/surfaceFeaturesDict:

    subsetFeatures
    {
        // Include only edges that intersect the plane
        plane
        {
            planeType       pointAndNormal;
            point           (0 0 0);
            normal          (1 0 0);
        }

        ...
    }
2021-02-18 09:09:53 +00:00
66c62e9296 searchableSurface: Renamed geometry directory triSurface -> geometry
Originally the only supported geometry specification were triangulated surfaces,
hence the name of the directory: constant/triSurface, however now that other
surface specifications are supported and provided it is much more logical that
the directory is named accordingly: constant/geometry.  All tutorial and
template cases have been updated.

Note that backward compatibility is provided such that if the constant/geometry
directory does not exist but constant/triSurface does then the geometry files
are read from there.
2021-02-04 13:51:48 +00:00
9e947d1644 topoSet: Renamed point entries for cylinder sources
End points of topoSet cylinder sources should now be specified as
"point1" and "point2", which is consistent with other parts of the code.

The previous keywords, "p1" and "p2" have been retained for backwards
compatibility but may be removed in future.
2021-01-14 08:33:57 +00:00
4c08b463fd snappyHexMesh::shellSurfaces: Added support for span refinement based on internal or external "closeness"
The closeness option in surfaceFeatures set in surfaceFeaturesDict, e.g.

    closeness
    {
        // Output the closeness of surface points to other surface elements.
        pointCloseness          yes;
    }

calculates and writes both the internal and external surface "closeness"
measures either of which could be used to set the span refinement in
snappyHexMesh depending on which side of the surface is being meshed which is
specified with either refinement mode "insideSpan" or "externalSpan", e.g. in
the tutorials/mesh/snappyHexMesh/pipe case the inside of the pipe is meshed and
refined based on the internal span using the following specification:

    refinementRegions
    {
        pipeWall
        {
            mode insideSpan;
            levels ((1000 2));
            cellsAcrossSpan 40;
        }
    }
2020-03-18 18:06:55 +00:00
fbe98c6e84 surfaceFeatures: Added optional input of maximum angle between opposite points considered close
To handle the additional optional specification for the closeness calculation
these settings are now is a sub-dictionary of surfaceFeaturesDict, e.g.

    closeness
    {
        // Output the closeness of surface elements to other surface elements.
        faceCloseness           no;

        // Output the closeness of surface points to other surface elements.
        pointCloseness          yes;

        // Optional maximum angle between opposite points considered close
        internalAngleTolerance  80;
        externalAngleTolerance  80;
    }
2020-03-16 19:29:28 +00:00
ea3e891dab tutorials/mesh/snappyHexMesh/pipe: Calculate closeness from the pipe wall only 2020-01-27 15:14:11 +00:00
509f15a0c5 snappyHexMesh: Added new experimental region refinement strategy based on the local span
In the new tutorial mesh/snappyHexMesh/pipe the pipe diameter changes by a factor
of 2 but the number of cells across the pipe is specified to be constant along
the length using the new "span" refinement mode in which the number of cells
across the span is set to be at least 40:

    refinementRegions
    {
        pipe
        {
            mode span;
            levels ((1000 2));  // Maximum distance and maximum level
            cellsAcrossSpan 40;
        }
    }

This operates in conjunction with the "pointCloseness" option in surfaceFeatures
which writes a surfacePointScalarField of the local span of the domain.  Note
that the behaviour of this option is critically dependent on the quality of this
field and the surface may need to be re-triangulated more isotropically to
ensure the "pointCloseness" is accurate and representative of the domain and the
required mesh distribution.
2020-01-24 15:19:38 +00:00
26c0b39729 tutorials/mesh/foamyHexMesh/mixerVessel: Removed pending further development of foamyHexMesh
The mixerVessel case is currently fragile and needs some improvement along with
further development of foamyHexMesh to mesh reliably.
2020-01-15 23:33:25 +00:00
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
76ba65be69 tutorials: Clean up geometry resources
A surface geometry file should be stored in
$FOAM_TUTORIALS/resources/geometry if it is used in multiple cases,
otherwise it should be stored locally to the case. This change enforces
that across all tutorials.
2019-11-01 12:32:33 +00:00
5acfe8b20a reactingMixture: Rationalised the reading of the species thermo and reactions
which are now read directly from the thermophysicalProperties dictionary for
consistency with non-reacting mixture thermodynamics.  The species thermo and
reactions lists can still be in separate files if convenient and included into
the thermophysicalProperties file using the standard dictionary #include.
2019-08-02 22:47:45 +01:00
802f3c1c22 tutorials/mesh/snappyHexMesh: Corrected links 2019-07-05 15:33:59 +01:00
682caa71b1 Revert "snappyHexMesh: Changed the default for the writing of pointLevels and cellLevels files in the polyMesh directory"
This reverts commit 799db4d958.
2019-02-12 09:41:00 +00:00
799db4d958 snappyHexMesh: Changed the default for the writing of pointLevels and cellLevels files in the polyMesh directory
These files are now only written if the "refinement" write flag is set:

writeFlags
(
    .
    .
    .
    refinement
);
2019-01-30 17:50:23 +00:00
c5db440298 dynamicMeshDict: standardised indentation 2019-01-23 11:45:23 +00:00
01763b037d Allmesh scripts: removed unused variables and legacy syntax 2018-11-23 18:41:55 +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
fdbf3c134f Rationalized dictionary and configuration file headers 2018-07-09 15:40:05 +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
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
247378332d Relocated etc/caseDicts/foamyHexMeshDict -> etc/caseDicts/mesh/generation/foamyHexMeshDict 2018-06-10 22:44:58 +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
564757bfc6 foamyQuadMesh: Removed execution of removed tutorial 2018-06-01 11:58:23 +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
f46fad4343 blockMesh tutorials: set deltaT to 1 2018-03-12 09:40:17 +00:00
1d38ceb900 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-15 22:59:56 +00:00
d2d99bb7a5 tutorials: blockMesh: Added missing face projections to pipe tutorial 2017-12-14 12:59:15 +00:00
46704f121b interFoam: Merged dynamic mesh functionality of interDyMFoam into interFoam
and replaced interDyMFoam with a script which reports this change.

The interDyMFoam tutorials have been moved into the interFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-30 23:56:42 +00:00
f18ffee22e tutorials: Put the foamyHexMesh flange tutorial back in the test loop 2017-10-06 11:46:33 +01:00
85cdd78143 foamyHexMesh: Corrected surface utility calls in mixerVessel tutorial 2017-09-19 08:38:37 +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
793aa95738 tutorials/mesh/foamy.*Mesh::Allrun: Only run if FOAMY_HEX_MESH set 2017-07-25 17:37:06 +01:00
53a524a280 Simplified scalar(0.0) -> scalar(0) and scalar(1.0) -> scalar(1) 2017-07-21 17:37:37 +01:00
8c5f4b36f8 tutorials: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:47:34 -05:00
da6b1bf361 Surface utilities: standardised argument naming and ordering
for input and output surface files
2017-05-12 14:43:10 +01:00
0a32d8a11e tutorials/mesh/blockMesh/pipe: Corrected constant/triSurface -> constant/geometry 2017-04-20 12:51:23 +01:00
9801c25788 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00
79a050573b tutorials/multiphase: Removed unnecessary specification of name and dimensions for transport properties 2017-03-31 17:11:30 +01:00
abc50e214c thermophysicalModels: Changed specie thermodynamics from mole to mass basis
The fundamental properties provided by the specie class hierarchy were
mole-based, i.e. provide the properties per mole whereas the fundamental
properties provided by the liquidProperties and solidProperties classes are
mass-based, i.e. per unit mass.  This inconsistency made it impossible to
instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
transport solvers on liquidProperties.  In order to combine VoF with film and/or
Lagrangian models it is essential that the physical propertied of the three
representations of the liquid are consistent which means that it is necessary to
instantiate the thermodynamics packages on liquidProperties.  This requires
either liquidProperties to be rewritten mole-based or the specie classes to be
rewritten mass-based.  Given that most of OpenFOAM solvers operate
mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
is more consistent and efficient if the low-level thermodynamics is also
mass-based.

This commit includes all of the changes necessary for all of the thermodynamics
in OpenFOAM to operate mass-based and supports the instantiation of
thermodynamics packages on liquidProperties.

Note that most users, developers and contributors to OpenFOAM will not notice
any difference in the operation of the code except that the confusing

    nMoles     1;

entries in the thermophysicalProperties files are no longer needed or used and
have been removed in this commet.  The only substantial change to the internals
is that species thermodynamics are now "mixed" with mass rather than mole
fractions.  This is more convenient except for defining reaction equilibrium
thermodynamics for which the molar rather than mass composition is usually know.
The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
equilibriumFlameT utilities in which the species thermodynamics are
pre-multiplied by their molecular mass to effectively convert them to mole-basis
to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
equilibriumCO

    // Reactants (mole-based)
    thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();

    // Oxidant (mole-based)
    thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
    thermo N2(thermoData.subDict("N2")); N2 *= N2.W();

    // Intermediates (mole-based)
    thermo H2(thermoData.subDict("H2")); H2 *= H2.W();

    // Products (mole-based)
    thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
    thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
    thermo CO(thermoData.subDict("CO")); CO *= CO.W();

    // Product dissociation reactions

    thermo CO2BreakUp
    (
        CO2 == CO + 0.5*O2
    );

    thermo H2OBreakUp
    (
        H2O == H2 + 0.5*O2
    );

Please report any problems with this substantial but necessary rewrite of the
thermodynamic at https://bugs.openfoam.org

Henry G. Weller
CFD Direct Ltd.
2017-02-17 11:22:14 +00:00
c007fcdbfe Renamed searchableCurve -> searchableExtrudedCircle
to clarify purpose.

Patch contributed by Mattijs Janssens
2016-12-09 16:30:46 +00:00
2eac40eac6 dynamicMotionSolverListFvMesh: New mesh-motion solver supporting multiple moving regions
e.g. the motion of two counter-rotating AMI regions could be defined:

dynamicFvMesh   dynamicMotionSolverListFvMesh;

solvers
(
    rotor1
    {
        solver solidBody;

        cellZone        rotor1;

        solidBodyMotionFunction  rotatingMotion;
        rotatingMotionCoeffs
        {
            origin        (0 0 0);
            axis          (0 0 1);
            omega         6.2832; // rad/s
        }
    }

    rotor2
    {
        solver solidBody;

        cellZone        rotor2;

        solidBodyMotionFunction  rotatingMotion;
        rotatingMotionCoeffs
        {
            origin        (0 0 0);
            axis          (0 0 1);
            omega         -6.2832; // rad/s
        }
    }
);

Any combination of motion solvers may be selected but there is no special
handling of motion interaction; the motions are applied sequentially and
potentially cumulatively.

To support this new general framework the solidBodyMotionFvMesh and
multiSolidBodyMotionFvMesh dynamicFvMeshes have been converted into the
corresponding motionSolvers solidBody and multiSolidBody and the tutorials
updated to reflect this change e.g. the motion in the mixerVesselAMI2D tutorial
is now defined thus:

dynamicFvMesh   dynamicMotionSolverFvMesh;

solver solidBody;

solidBodyCoeffs
{
    cellZone        rotor;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin        (0 0 0);
        axis          (0 0 1);
        omega         6.2832; // rad/s
    }
}
2016-12-01 15:57:15 +00:00
2dc141d571 paraFoam -block: Added support for vertex and block names
Patch contributed by Mattijs Janssens
2016-11-04 17:29:02 +00:00