Commit Graph

595 Commits

Author SHA1 Message Date
cf552e6343 utilities: Rationalised and standardised the handling of the -dict option 2021-03-05 13:42:46 +00: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
a2eda110f8 foamyHexMesh: Removed unused merge distance 2021-01-19 14:38:49 +00:00
9e740b286f reconstructParMesh, fvMeshDistribute: Removed all geometric point merging
Geometric point merging has an inherent chance of failure that occurs
when a mesh contains valid distinct points that are closer together than
the supplied tolerance. It is beneficial to avoid such merging whenever
possible.

reconstructParMesh does not need explicit point merging any more. Points
may be duplicated temporarily when processor meshes are combined which
share points and edges but not faces. Ultimately, however,
reconstructParMesh reconstructs the entire mesh so everything eventually
gets face-connected and all point duplications get resolved.

fvMeshDistribute requires point-merging, as the entire mesh is not
constructed. However, since 5d4c8f5d, this process has been purely
topological and has not relied on any of the geometric merging processes
triggered by utilised code.

As such, all geometric point merging operations and tolerances have been
removed from these two implementations, as well as in lower level code
in faceCoupleInfo and polyMeshAdder. faceCoupleInfo has also had support
for face and edge splits removed as this was not being used. This change
will have improved the robustness of both reconstruction and
redistributuon and has greatly reduced the total amount of code
involved.

The only geometric tolerance-based matching still being performed by
either of these processes is as a result of coupled patch ordering in
fvMeshDistribute. It is possible that this is not necessary either
(though at present coupled patch ordering is certainly needed
elsewhere). This warrants further investigation.
2021-01-06 11:32:54 +00:00
0a053fc5fe extrudeMesh: Added -dict option 2020-12-10 16:31:18 +00:00
848ec1cd97 wmake: Simplified and standardised the Make/files files
cpp is no longer used to pre-process Make/files files allowing standard make '#'
syntax for comments, 'ifdef', 'ifndef' conditionals etc.  This is make possible
by automatically pre-pending SOURCE += to each of the source file names in
Make/files.

The list of source files compile can be specified either as a simple list of
files in Make/files e.g.

    # Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT
    # to use stat (=timestamps) instead of inotify
    fileMonitor.C

    ifdef SunOS64
        dummyPrintStack.C
    else
        printStack.C
    endif

    LIB = $(FOAM_LIBBIN)/libOSspecific

or

or directly as the SOURCE entry which is used in the Makefile:

    SOURCE = \
        adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
        adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
        adjointShapeOptimizationFoam.C

    EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In either form make syntax for comments and conditionals is supported.
2020-12-10 08:09:49 +00:00
30e6e02d29 wmake: Removed the cpp processing of the Make/options file
so that it can be included directly into the wmake Makefile to allow full
support of gmake syntax, variables, functions etc.

The Make/files file handled in the same manner as the Make/options file if it
contains the SOURCE entry otherwise it is first processed by cpp for backward
compatibility.
2020-12-09 13:35:14 +00:00
f85dbc557f polyBoundaryMesh: Update indices in neighbour patches on reorder 2020-12-02 11:01:55 +00:00
eb29342dbe radiationModels: Added errors when used in unsupported transforming geometries 2020-11-25 11:19:35 +00:00
c716ff78be viewFactorsGen: Added test for transforming patches and issue an error 2020-11-24 15:06:17 +00:00
93a0dd2f99 foamDictionary: Updated examples to 'slash' syntax which is the new default 2020-11-17 14:14:42 +00:00
4e183e33d4 Function1::Table: simplified and rationalised
TableBase, TableFile and Table now combined into a single simpler Table class
which handle both the reading of embedded and file data using the generalised
TableReader.  The new EmbeddedTableReader handles the embedded data reading
providing the functionality of the original Table class within the same
structure that can read the data from separate files.

The input format defaults to 'embedded' unless the 'file' entry is present and
the Table class is added to the run-time selection table under the name 'table'
and 'tableFile' which provides complete backward comparability.  However it is
advisable to migrate cases to use the new 'table' entry and all tutorial cases
have been updated.
2020-11-16 23:48:47 +00:00
37ebdfe36e Function1::TableReader: Added EmbeddedTableReader so that TableFile can read embedded table data 2020-11-16 21:01:41 +00:00
fbadc20773 nutUTabulatedWallFunctionFvPatchScalarField: Removed redundant code
The current rough wall functions cover most requirements and there is no clear
need to maintain nutUTabulatedWallFunctionFvPatchScalarField and associated
clutter.
2020-11-13 16:17:45 +00:00
2f4f358411 foamToVTK: Minor rationalisation to improve maintainability 2020-11-11 12:25:03 +00:00
93357284db vtk: Write VERTICES section in point-only files
This improves paraview's handling of VTK files which only contain
points. It means the points are visible without glyph-ing, and provides
the necessary input for some filters to operate correctly.
2020-11-11 11:21:51 +00:00
e1e3d30f73 Typo correction. 2020-11-09 21:30:16 +00:00
21ab9958be Adding check for template material availability. 2020-11-09 17:20:22 +00:00
bf10406cf7 Corrected file formatting 2020-10-30 12:38:15 +00:00
48c06ad843 PVReaders: Remove old libvtkPV* libraries during build or clean
This is to make sure the old paths do not get linked in preference,
which could cause errors on updating
2020-10-13 08:29:09 +01:00
48cc85c19b setWaves: Fix typo in documentation 2020-10-07 10:10:07 +01:00
fe5e403cf9 surfaceMeshConvert,surfaceMeshConvert,surfaceMeshImport: Updated coordinateSystem support 2020-09-29 16:10:06 +01:00
560fb1a64b foamDictionary: Ignore function name in substitution list
so that foamDictionary conveniently supports the same format as the #includeFunc
argument list, e.g.

foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage

The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
2020-09-20 09:28:20 +01:00
560db98b34 dictionary: Standardised and centralised the argument list parser
to simplify maintenance
2020-09-19 15:52:09 +01:00
ad33cc2cc8 functionObject: Added support for scoped keyword lookup in the argument list
functions
{
    #includeFunc        singleGraph(setConfig/axis = y)
    .
    .
    .
}
2020-09-18 21:39:40 +01:00
312a56e7e3 foamDictionary: Extended the -set option to support a substitution list
e.g.

    foamDictionary -set '(purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime)' controlDict

or

    foamDictionary -set 'purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime' controlDict

are equivalent to

    foamDictionary -entry purgeWrite -set 3 controlDict
    foamDictionary -entry maxDeltaT -set 0.1 controlDict
    foamDictionary -entry functions/rho/writeControl -set writeTime controlDict
2020-09-18 18:25:51 +01:00
ea036dfec8 foamDictionary: Set expanded dictionary format to ascii 2020-09-14 12:13:09 +01:00
abac2a03f5 PVReaders: Moved vtk libraries into $PV_PLUGIN_PATH
The vtk libraries are not fully independent of the paraview
installation, so in order to have multiple valid compilations of the
PVReaders (which is useful for testing) we need multiple versions of
these libraries, too. So, these libraries have been put into
$PV_PLUGIN_PATH, which is a paraview-version-specific subdirectory of
$FOAM_LIBBIN.
2020-09-11 11:50:18 +01:00
ec858fe59d foamListTimes: Corrected operation of -rm option when using collated fileHandler 2020-09-03 14:31:27 +01:00
a7f185eec2 foamListTimes: Added support for the collated fileHandler
Resolves bug-report https://bugs.openfoam.org/view.php?id=3541
2020-09-03 12:08:18 +01:00
def4772281 Documentation: Centred the Class Declaration comment
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-08-28 13:28:58 +01:00
d82d47c74b regIOobject.H: Rationalised includes 2020-08-21 08:40:47 +01:00
1eab1b7ffe tutorials/lagrangian/.../verticalChannel*: Updated particle tracks configuration
Resolves bug report https://bugs.openfoam.org/view.php?id=3528
2020-08-06 14:32:58 +01:00
37db7718ac foamListTimes: Added -withFunctionEntries option to execute functionEntries 2020-07-30 13:52:54 +01:00
0257ab1459 Updated to C++14 standard
gcc version 5 and above and clang version 3.4 and above fully support the C++14
standard and the compilation rules of OpenFOAM-dev now require this support
allowing for further development and maintenance to benefit from the additional
language features provided in C++14.
2020-07-23 15:31:07 +01:00
ccd45f53a6 foamyQuadMesh: Prevent indexing beyond end of face-vertices array 2020-07-07 16:19:51 +01:00
517270e215 foamDictionary: Removed documentation for the unused -case option
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
2020-06-04 10:19:06 +01:00
83bd225910 foamyHexMesh: Updated to compile against CGAL 5.0+
CGAL and Boost are now used header-only. The minimum supported version
of CGAL is now 4.9.
2020-05-08 11:24:58 +01:00
4c2fae3d06 thermophysicalModels: Added new tabulated equation of state, thermo and transport models
using the new nonUniformTable to interpolate between the values vs temperature
provided.  All properties (density, heat capacity, viscosity and thermal
conductivite) are considered functions of temperature only and the equation of
state is thus incompressible.  Built-in mixing rules corresponding to those in
the other thermo and transport models are not efficient or practical for
tabulated data and so these models are currently only instantiated for the pure
specie/mixture rhoThermo package but a general external mixing method will be
added in the future.

To handle reactions the Jacobian function dKcdTbyKc has been rewritten to use
the Gstd and S functions directly removing the need for the miss-named dGdT
function and hence removing the bugs in the implementation of that function for
some of the thermo models.  Additionally the Hc() function has been renamed
Hf() (heat of formation) which is more commonly used terminology and consistent
with the internals of the thermo models.
2020-05-05 20:33:45 +01:00
fe89082f73 thermophysicalModels: Centralised instantiation macros
All models that require templating on the thermodynamic model, including
the thermodynamic models themselves, are now instantiated using a
centralised set of variadic macros. Seven macros exist to instantiate
models for different classes of thermodynamics model. These are:

   forGases:          All model combinations valid for gases

   forCommonGases:    The most commonly used gas models

   forAbsoluteGases:  A limited selection of gas models with absolute
                      forms of energy, for use with Xi-combustion models

   forLiquids:        All model combinations valid for liquids

   forCommonLiquids:  The most commonly used liquid models

   forPolynomials:    Model combinations with properties fitted to
                      polynomials

   forSolids:         All model combinations valid for solids

All the *ThermoPhysics typedefs have been removed, as this system was
fundamentally not extensible. The enormous lists of thermodynamic
instantiations that existed for reaction thermos, chemistry models,
tabulation methods, etc..., were extremely difficult to read and reason
about what combinations are valid under what circumstances. This change
centralises those decisions, makes them concise and readable, and makes
them consistent across the entire codebase.

Soot model selection has now been brought up to date in line with
chemistry, combustion, and others. The angle-bracketed part of the name
is no longer necessary; this information is determined directly from the
existing thermo model. So, now to select a mixture-fraction soot model,
the entry is simply:

    sootModel   mixtureFraction;

Rather than:

    sootModel   mixtureFraction<rhoReactionThermo,gasHThermoPhysics>;

The only place in which *ThermoPhysics typedefs are still required in
the selection name is in the thermalBaffle1D boundary condition. Here
there is no thermo model from which to determine a name. This eventually
needs resolving either by adding a selection mechanism similar to that
of the thermo packages themselves, or by removing this boundary
condition in favour of the (non-1D) thermal baffle boundary condition
and region model.
2020-04-30 14:16:08 +01:00
6e43847f5e extrudeMesh: Ensure the polyTopoChange runs on all processors if edge collaping has occurred on any
Resolves bug-report https://bugs.openfoam.org/view.php?id=3486
2020-04-22 10:40:55 +01:00
6557788618 foamListTimes: disable controlDict function entries
avoids warning and error messages from the processing of the functions entry in
controlDict which unlikely to be needed for foamListTimes.
2020-04-16 18:10:43 +01:00
9fabb9b002 paraview: Upgrade to 5.8.0
PVReaders now support compilation against ParaView version 5.7.0 and
greater. All references to ParaView versions less than 4.0.0 have been
removed.

Based on a patch contributed by CFD Support
2020-04-16 13:45:37 +01:00
de66b1be68 MomentumTransportModels: Update of the TurbulenceModels library for all flow types
providing the shear-stress term in the momentum equation for incompressible and
compressible Newtonian, non-Newtonian and visco-elastic laminar flow as well as
Reynolds averaged and large-eddy simulation of turbulent flow.

The general deviatoric shear-stress term provided by the MomentumTransportModels
library is named divDevTau for compressible flow and divDevSigma (sigma =
tau/rho) for incompressible flow, the spherical part of the shear-stress is
assumed to be either included in the pressure or handled separately.  The
corresponding stress function sigma is also provided which in the case of
Reynolds stress closure returns the effective Reynolds stress (including the
laminar contribution) or for other Reynolds averaged or large-eddy turbulence
closures returns the modelled Reynolds stress or sub-grid stress respectively.
For visco-elastic flow the sigma function returns the effective total stress
including the visco-elastic and Newtonian contributions.

For thermal flow the heat-flux generated by thermal diffusion is now handled by
the separate ThermophysicalTransportModels library allowing independent run-time
selection of the heat-flux model.

During the development of the MomentumTransportModels library significant effort
has been put into rationalising the components and supporting libraries,
removing redundant code, updating names to provide a more logical, consistent
and extensible interface and aid further development and maintenance.  All
solvers and tutorials have been updated correspondingly and backward
compatibility of the input dictionaries provided.

Henry G. Weller
CFD Direct Ltd.
2020-04-14 20:44:22 +01:00
7f5144312e Renamed turbulenceProperties -> momentumTransport
Following the generalisation of the TurbulenceModels library to support
non-Newtonian laminar flow including visco-elasticity and extensible to other
form of non-Newtonian behaviour the name TurbulenceModels is misleading and does
not properly represent how general the OpenFOAM solvers now are.  The
TurbulenceModels now provides an interface to momentum transport modelling in
general and the plan is to rename it MomentumTransportModels and in preparation
for this the turbulenceProperties dictionary has been renamed momentumTransport
to properly reflect its new more general purpose.

The old turbulenceProperties name is supported for backward-compatibility.
2020-04-10 17:17:37 +01: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
66397001c2 regionModels::kinematicSingleLayer: Rationalised and simplified the handling of the film surface and wall velocities 2020-03-06 15:49:59 +00:00
2d3b02c130 primitiveMeshGeometry, polyMeshGeometry: Removed unused code
The utilised static parts of polyMeshGeometry are now part of a
polyMeshCheck namespace. Everything else has been removed, as they were
unused, out of date, and/or duplicated elsewhere.
2020-02-13 14:33:18 +00:00
acdbf45534 Moved OBJstream into src/fileFormats/obj 2020-01-29 17:17:36 +00:00