Commit Graph

161 Commits

Author SHA1 Message Date
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
dcf4d0c505 Function1: Implemented integral evaluations
Integral evaluations have been implemented for all the ramp function1-s,
as well as the sine and square wave. Bounds handling has also been added
to the integration of table-type functions.

In addition, the sine wave "t0" paramater has been renamed "start" for
consistency with the ramp functions.
2019-10-22 08:31:29 +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
1a54b2ecfc lagrangian: distributionModels: Cumulative general distribution
The general distribution has been extended to accept cumulative
distribution data, by means of a "cumulative" switch. The calculation of
the mean value has also been corrected for this distribution, and
additional header documentation and parameter checking has been added.

In addition, the distribution models now all print some basic
information (min, max and mean) into the log file to help in checking
that the specification is correct.

Patch contributed by Timo Niemi, VTT.
2019-08-16 11:42:38 +01:00
329852dcba applications/test/dictionary: Added comments to the new test dictionaries 2019-07-10 19:41:17 +01:00
b3d61748a6 dictionary: Added support for directly reading entries from other dictionary files
In order to avoid conflict with the use of ':' in model-specific fields,
e.g. "thermo:rho", in the "slash" syntax the '!' character is now used to refer
to the top-level dictionary.

If there is a part of the keyword before the '!' then this is taken to be the
file name of the dictionary from which the entry will be looked-up using the
part of the keyword after the '!'.

For example, given a dictionary file named testSlashDict2:

internalField 5.6;

active
{
    type            fixedValue;
    value.air       $internalField;
}

it is now possible to read entries from it directly in the dictionary file testSlashDict:

external
{
    value $testSlashDict2!active/value.air;
}

active2
{
    $testSlashDict2!active;
}

which expands to

external
{
    value           5.6;
}

active2
{
    type            fixedValue;
    value.air       5.6;
}
2019-07-10 15:13:56 +01:00
a7b8425690 dictionary: Added experimental "slash" syntax
A new optional "slash" scoping syntax is now provided which is more intuitive
than the current "dot" syntax as it corresponds to the common directory/file
access syntax used in UNIX, and avoids limitations of the "dot" (see below)
e.g.

internalField 3.4;

active
{
    type            fixedValue;
    value.air       $internalField;
}

inactive
{
    type            anotherFixedValue;

    value           $../active/value.air;
    anotherValue    $:active/value.air;

    sub
    {
        value           $../../active/value.air;
        anotherValue    $:active/value.air;
    }
}

"U.*"
{
    solver GAMG;
}

e.air
{
    // This does expand
    $U.air;
}

"#inputSyntax slash;" selects the new "slash" syntax.
"../" refers to the parent directory.
":" refers to the top-level directory.

The corresponding dictionary using the current "dot" syntax is

internalField 3.4;

active
{
    type            fixedValue;
    value.air       $internalField;
}

inactive
{
    type            anotherFixedValue;

    value           $..active.value.air;
    anotherValue    $:active.value.air;

    sub
    {
        value           $...active.value.air;
        anotherValue    $:active.value.air;
    }
}

"U.*"
{
    solver GAMG;
}

e.air
{
    // This doesn't expand
    $U.air;
}

Note that the "$U.air" expansion does not work in this case due to the
interference between the use of '.' for scoping and phase-name.
This is a fundamental problem which prompted the development of the new more
intuitive and flexible "slash" syntax.

The new syntax also allows a for planned future development to access entries
in directories in other files, e.g.

active
{
    type            fixedValue;
    value.air       $FOAM_CASE/internalFieldValues/value.air;
}

or

active
{
    type            fixedValue;
    value.air       :../internalFieldValues/value.air;
}
2019-07-09 16:45:07 +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
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
687d56fbf1 Field: Moved FieldMapper mapping functions to FieldMapper and made virtual
This allows easier extension and specialisation of field mapping.
2019-05-02 15:43:32 +01:00
6b5020bc3d Test-codeStream: Support parallel testing 2019-04-09 14:36:20 +01:00
1fad5ca11d applications/test/codeStream/codeStreamDict1: Added missing -I 2019-04-08 20:35:48 +01:00
2f3d47ad7e Residuals: New MeshObject class to store solver performance residuals
This is more efficient and modular than the previous approach of storing the
residuals in the mesh data dictionary.
2019-04-04 19:08:08 +01:00
d41166187a writeEntry: Rationalised for consistency, ease of use and maintainability
The writeEntry form is now defined and used consistently throughout OpenFOAM
making it easier to use and extend, particularly to support binary IO of complex
dictionary entries.
2019-03-14 20:54:10 +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
cd8aee2d76 PrimitivePatch: Simplified templating 2019-01-21 09:08:03 +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
d0dc341eb0 Removed unused binary file 2018-12-12 21:16:28 +00:00
91d3f06846 polynomialFunction: Removed unused class 2018-10-17 18:52:28 +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
de456c4f94 applications/test/wordRe: Updated for changes to enum in class wordRe 2018-08-31 16:10:23 +01:00
9581ec1384 applications/test/alloc: Avoid compilation warning 2018-08-31 16:10:05 +01:00
f8ecf8f98e applications/test/ensightFoamReader: Removed due the large number of compilation issues 2018-08-31 16:09:32 +01:00
ad90fe0ac9 applications/test/cubicEqn: Avoided warning from gcc-8.1 2018-08-31 16:08:52 +01:00
ad8a0f967c applications/test/HashingSpeed: Removed due to the large number of compilation warnings 2018-08-31 16:08:23 +01:00
dee5b8e4eb src/OpenFOAM: Rationalised use of enumerations by using the C++11 scoped form
for polynomialEqns
2018-08-30 13:02:18 +01:00
9cf8078fef cubicEqn, quadraticEqn: Correction to repeated roots
Also extended the cubic equation test routine and modified the error
methods so that they more accurately generate the round of error of
evaluation.

This resolves bug report https://bugs.openfoam.org/view.php?id=3015
2018-07-24 16:08:59 +01:00
71a4e548df Updated git hooks to check new header format 2018-07-09 16:59:03 +01: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
d1c4c33ec0 applications/test: Updated to compile 2018-06-20 14:09:53 +01:00
4d09d6c6f5 Test-maxMem: Removed 2018-06-20 14:09:26 +01:00
89f1053f82 Code style: Fixed formatting of banners 2018-06-19 12:01:50 +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
a6e159ae5f Make/options: Rationalized the layout of the EXE_INC statements 2018-06-10 17:11:22 +01:00
c4d209345e Test-rigidBodyDynamics: Renamed source file 2018-06-04 11:18:13 +01:00
59be3e7113 rigidBodyDynamics: Ported tests to general RBD application 2018-05-09 16:04:46 +01:00
ae5a31e8b7 rigidBodyDynamics: Added test application for general bodies 2018-05-09 15:15:23 +01:00
c3be52bcd6 Corrected 'Class' entries in headers
Using script provided by Bruno Santos
See https://bugs.openfoam.org/view.php?id=2919
2018-05-07 14:18:44 +01:00
400cd4a889 wmake options files: Removed -I options referring to non-existent directories
Resolves bug-report https://bugs.openfoam.org/view.php?id=2917
2018-05-04 17:16:46 +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
1073607cb0 Corrected spelling and typo's in comments
Resolves bug report https://bugs.openfoam.org/view.php?id=2845
2018-03-05 20:14:28 +00:00
019c2c08dc Corrected spelling in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2844
2018-02-13 22:17:53 +00:00
0248dd81e3 Corrected comments: inbetween -> in between 2018-02-13 16:38:41 +00:00