Commit Graph

238 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
0ad918f659 surfaceFilmModels: Rewritten in mass conservative form
All of the film transport equations are now formulated with respect to the film
volume fraction in the region cell layer rather than the film thickness which
ensures mass conservation of the film even as it flows over curved surfaces and
around corners.  (In the previous formulation the conservation error could be as
large as 15% for a film flowing around a corner.)

The film Courant number is now formulated in terms of the film cell volumetric
flux which avoids the stabilised division by the film thickness and provides a
more reliable estimate for time-step evaluation.  As a consequence the film
solution is substantially more robust even though the time-step is now
significantly higher.  For film flow dominated problem the simulations now runs
10-30x faster.

The inconsistent extended PISO controls have been replaced by the standard
PIMPLE control system used in all other flow solvers, providing consistent
input, a flexible structure and easier maintenance.

The momentum corrector has been re-formulated to be consistent with the momentum
predictor so the optional PIMPLE outer-corrector loop converges which it did not
previously.

nonuniformTransformCyclic patches and corresponding fields are no longer needed
and have been removed which paves the way for a future rationalisation of the
handling of cyclic transformations in OpenFOAM to improve robustness, usability
and maintainability.

Film sources have been simplified to avoid the need for fictitious boundary
conditions, in particular mappedFixedPushedInternalValueFvPatchField which has
been removed.

Film variables previously appended with an "f" for "film" rather than "face"
have been renamed without the unnecessary and confusing "f" as they are
localised to the film region and hence already directly associated with it.

All film tutorials have been updated to test and demonstrate the developments
and improvements listed above.

Henry G. Weller
CFD Direct Ltd.
2019-12-12 10:34:08 +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
d987648ef4 dictionary label lookup: simplified syntax using the type templated lookup function
Replaced
    readLabel(dict.lookup("name"))
with
    dict.lookup<label>("name)
2019-11-27 11:38:59 +00:00
16d810c5fe ideasUnvToFoam: added region option
This allows mesh conversion of several UNV files into region meshes of a
multi-region case.

Patch contributed by Tobias Holzmann
2019-11-12 09:28:51 +00:00
4e6695e32d Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3372
2019-10-18 11:57:11 +01:00
81fca4c43a Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
2019-10-18 11:46:20 +01:00
2b0c5028a4 Corrected typos in comments and in name of solidEquilibriumEnergySource fvOption
Patch contributed by Timo Niemi, VTT.
Resolves bug report https://bugs.openfoam.org/view.php?id=3369
2019-10-14 09:21:43 +01:00
c61a66fc00 fluent.*ToFoam: Added support for ';' in schemes expressions
Resolves feature request https://bugs.openfoam.org/view.php?id=3330
2019-08-19 11:06:54 +01:00
c8f4487a07 Removed unused private data members 2019-08-16 17:56:59 +01:00
0c66eb9f94 finiteVolume: Use the GeometricField::New method to construct temporary fields
Avoids database registration of temporary fields, simplifies the code and
improves maintainability.
2019-07-18 09:32:12 +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
00ae415b71 Added copy constructors to classes with copy assignment operator defined
and copy assignment operator for classes with a copy constructor

This is often described as the rule of 3 (or rule of 5 in C++11 if move
constructors and assignment operators are also defined) and makes good sense in
ensuring consistency.  For classes in which the default bitwise copy constructor
or assignment operator are appropriate these are now specified explicitly using
the "= default" keyword if the other is explicitly defined fulfilling the rule
of 3 without the need to define the body of the function.
2019-06-05 23:32:22 +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
cd8aee2d76 PrimitivePatch: Simplified templating 2019-01-21 09:08:03 +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
6faadcb45c Removed the unnecessary ".0" from dimensionedScalar constructors 2018-12-19 14:24:41 +00:00
95815460c0 Comment spelling corrections 2018-11-28 10:24:26 +00:00
11eaf751d3 distanceSurface, sampledCuttingPlane, foamyHexMeshBackgroundMesh: Updated for new isoSurface implementation 2018-11-13 14:50:08 +00:00
0b99b5af1a sampling: Removed deprecated isoSurfaceCell 2018-11-13 12:14:13 +00:00
85cdf55073 conformalVoronoiMesh: Fixed processor patch reordering 2018-10-05 16:06:26 +01:00
0cdea3c64e gambitToFoam: Removed \file statement in header 2018-09-07 16:35:34 +01:00
26478060e0 Created .C files corresponding to the <application>.L files for Doxygen and -doc option
Resolves bug-report https://bugs.openfoam.org/view.php?id=3070
2018-09-07 15:07:19 +01:00
e750f2555c src/OpenFOAM: Rationalised use of enumerations by using the C++11 scoped form
for Time, treeBoundBox, indexedOctree, dynamicIndexedOctree, CirculatorBase
2018-08-31 16:11:16 +01:00
4f533d3c36 src/OpenFOAM: Rationalised use of enumerations by using the C++11 scoped form
for triangle intersection.
2018-08-27 20:48:18 +01:00
8ed92de98c src/OpenFOAM: Rationalised use of enumerations by using the C++11 scoped form
for

    db/functionObjects/timeControl/timeControl.H: timeControls
    primitives/bools/Switch/Switch.H: class switchType
    primitives/strings/fileName/fileName.H: fileType
    primitives/strings/wordRe/wordRe.H: compOption
2018-08-25 07:26:51 +01: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
8662f99ac1 Corrected typos in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=3017
2018-07-31 17:11:21 +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
b45c527ae3 refineWallLayer: Added -region option 2018-06-22 13:52:29 +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
002e7d7b06 Random: Replaced drand48 with an in-class implementation
This is faster than the library functionality that it replaces, as it
allows the compiler to do inlining. It also does not utilise any static
state so generators do not interfere with each other. It is also faster
than the the array lookup in cachedRandom. The cachedRandom class
therefore offers no advantage over Random and has been removed.
2018-06-11 11:01:11 +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
49f853110b applications/utilities: Removed duplicate dictionaries 2018-06-10 17:39:21 +01:00
a6e159ae5f Make/options: Rationalized the layout of the EXE_INC statements 2018-06-10 17:11:22 +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