Commit Graph

525 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
c1edb022b0 foamDictionary: Disabled functionEntry expansion by default
functionEntry expansion is enabled for dictionary expansion with the -expand
option.  The disableFunctionEntries option is no longer needed and has been removed.
2019-11-19 11:42:33 +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
c1820f19d3 postProcessing::noise: Improved robustness of the uniform time-step check 2019-10-31 14:48:31 +00:00
ba49dfa991 Reactions: Removed "Reaction" from the end of the reaction names
This part of the name is unnecessary, as it is clear from context that
the name refers to a reaction. The selector has been made backwards
compatible so that old names will still read successfuly.
2019-10-25 10:37:13 +01:00
7ab73932cf Function1: Generalisation and removal of unused code
Function1 has been generalised in order to provide functionality
previously provided by some near-duplicate pieces of code.

The interpolationTable and tableReader classes have been removed and
their usage cases replaced by Function1. The interfaces to Function1,
Table and TableFile has been improved for the purpose of using it
internally; i.e., without user input.

Some boundary conditions, fvOptions and function objects which
previously used interpolationTable or other low-level interpolation
classes directly have been changed to use Function1 instead. These
changes may not be backwards compatible. See header documentation for
details.

In addition, the timeVaryingUniformFixedValue boundary condition has
been removed as its functionality is duplicated entirely by
uniformFixedValuePointPatchField.
2019-10-23 13:13:53 +01: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
216cb0f0fe chemkinToFoam: Added -lchemistryModel 2019-09-11 11:46:57 +01:00
107b5d161d patchSummary: Added printing of the actual patchField types
Now for the wall in the simpleFoam pitzDaily tutorial case the following
patchField types are printed

group   : wall
    scalar              v2              v2WallFunction
    scalar              nut             nutkWallFunction
    scalar              k               kqRWallFunction
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           omegaWallFunction
    scalar              f               fWallFunction
    scalar              epsilon         epsilonWallFunction
    vector              U               noSlip

instead of

group   : wall
    scalar              v2              generic
    scalar              nut             generic
    scalar              k               generic
    scalar              nuTilda         zeroGradient
    scalar              p               zeroGradient
    scalar              omega           generic
    scalar              f               generic
    scalar              epsilon         generic
    vector              U               noSlip
2019-09-08 16:39:45 +01:00
cbae0c8cc0 foamDictionary: Improved handling of header for binary files 2019-09-07 20:55:23 +01:00
43566c7f40 particleTracks, steadyParticleTracks: Write the tracks into the <case>/VTK directory
when running serial or parallel as the tracks are reconstructed automatically.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3333
2019-08-22 22:29:23 +01:00
54509a7968 mixtureAdiabaticFlameT: Add conversion of volume fraction to mass fractions 2019-08-22 18:54:42 +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
7350f07582 foamDictionary: improved checking for FoamFile 2019-08-19 09:20:05 +01:00
0b6346c721 keyType: Added proper type handling and formalised construction from the string types
Rationalised IO of keyType so the internal structure is not duplicated in
if-else structures in dictionary::entry.
2019-08-17 10:57:22 +01:00
c8f4487a07 Removed unused private data members 2019-08-16 17:56:59 +01:00
3f7c575816 foamDictionary: Avoid expanding the first entry when checking for FoamFile 2019-08-16 15:23:37 +01:00
3192d64875 dictionary: Rationalised the handling of dictionary variable
by introducing a new specialised type, variable, derived from word with
additional valid characters.  This avoids some complex type-juggling in the
parser and keyType in which string was used to represent either a string or a
variable.
2019-08-15 09:16:45 +01:00
33d6d49321 foamDictionary: Simplified the handling of the dictionary file type
Also added the header separator comment for serial operation.
2019-08-08 15:41:44 +01:00
9bbc338b3e foamDictionary: Set the type of the dictionary to that specified in the header 2019-08-08 10:27:51 +01:00
0dbeb66ba9 foamDictionary: Improved parallel operation
When running in parallel the decomposed dictionary files are read from the
case directory in either un-collated or collated format and changed dictionaries
written in the form specified by the selected fileHandler.

The instance directory of the dictionary file is obtained from the file path
argument, e.g.

    mpirun -np 4 foamDictionary 0.5/U \
        -entry boundaryField.movingWall.value \
        -set "uniform (2 0 0)" -parallel
2019-08-07 16:22:15 +01:00
2bd1913fd2 foamDictionary: Added support for reading files as case IOdictionary in parallel
If the -case option is specified time is created from the case
system/controlDict enabling support for parallel operation, e.g.

mpirun -np 4 \
    foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
    -set "uniform (2 0 0)" \
    -parallel

This will read and modify the 0/U field file from the processor directories even
if it is collated.  To also write the 0/U file in collated format the collated
fileHandler can be specified, e.g.

mpirun -np 4 \
    foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
    -set "uniform (2 0 0)" \
    -fileHandler collated -parallel

This provides functionality for field manipulation equivalent to that provided
by the deprecated changeDictionary utility but in a more flexible and efficient
manner and with the support of fileHandlers for collated parallel operation.
2019-08-06 19:20:51 +01:00
509133ecbb ReactionList: Simplified and rationalised
so that it can be used as the container for the reaction system in reactingMixture.
2019-08-03 09:22:43 +01: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
4baf73b54d reactingMixture: use the foamChemistryReader directly rather than chemistryReader::New
This formalises the flexible and extensible OpenFOAM thermodynamics and reaction
format as the direct input to OpenFOAM solvers.  The CHEMKIN format is still
supported by first converting to the OpenFOAM format using the chemkinToFoam
utility.
2019-08-02 14:47:37 +01:00
53e8458153 foamToVTK: Added support for vol internal fields 2019-07-20 20:16:18 +01:00
853aab18cf foamFormatConvert: Fixed region handling for lagrangian data 2019-07-18 11:37:56 +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
67d3a8dc1b paraFoam: Added support to read vol internal fields
This is useful to visualise sources which are created as
volScalarField::Internal, e.g. the turbulence generation term for models like
kEpsilon in which it is named kEpsilon:G.
2019-07-15 22:26:34 +01:00
b7c0646ed9 PVFoamReader: Added support for visualising surfaceFields
To avoid additional clutter in the interface volFields, surfaceFields and
pointFields are now selected from a single fields selection box consistent with
the single directory with guaranteed unique names in which they are stored.

Note that when visualising the "phi" flux fields that these are extensive, the
value depends directly on the face area, so unless the mesh is uniform
interpolated continuous colour plots are not physical or informative.

Based on proposal contributed by Mattijs Janssens
2019-07-15 11:16:35 +01:00
163324d837 foamDictionary: Added support for the new dictionary "slash" syntax
Maintains backward compatibility with the current "dot" syntax.
2019-07-11 19:43:40 +01:00
4915a13260 mapFields: Corrected FOAM_CASE_NAME -> FOAM_CASENAME 2019-07-02 17:03:14 +01:00
e599162b09 Utilities: standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-19 17:53:10 +01:00
213319ae30 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-19 15:01:35 +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
0889ff91c7 graphField: Moved graphs directory into postProcessing 2019-05-20 10:43:36 +01:00
4f7f488f22 directFieldMapper, setSizeFieldMapper: new specialised field mappers for decomposition and reconstruction
Using the new field mapper framework it is now possible to create specialised
mappers rather than creating a fatter and fatter interface in the base mapper.
This approach is far more extensible, comprehensible and maintainable.
2019-05-09 22:12:44 +01:00
af45bd636d regIOobject: changed the "valid" argument name to "read" for read function and "write" for write functions
This clarifies the purpose which is to indicate that the object should be read
or written on this particular processor rather than it is or is not valid.
2019-04-27 10:46:57 +01:00
cd656fbf9b postChannel: Moved postChannelDict from constant to system
Resolves https://bugs.openfoam.org/view.php?id=3224
2019-04-18 11:03:56 +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