Will Bainbridge 0d9786651b Function1: Made Table and Constant readable in multiple formats
A typical Function1 entry can be read in one of three ways; with the
parameters in the current dictionary, in a separate sub-dict, or with
the entry itself as the dictionary; e.g.,

    // Current-dictionary form
    <entryName>     sine;
    amplitude       0.1;
    frequency       10;
    level           0.2;

    // Coeff-dictionary form
    <entryName>     sine;
    <entryName>Coeffs
    {
        amplitude       0.1;
        frequency       10;
        level           0.2;
    }

    // Entry-as-dictionary form
    <entryName>
    {
        type            sine;
        amplitude       0.1;
        frequency       10;
        level           0.2;
    }

The latter two sub-dictionary forms are needed when there are multiple
Function1 entries of the same type in a dictionary. Enclosing the
parameters in a separate sub-dictionary prevents the keywords (in this
case "amplitude", "frequency" and "level") from being duplicated.

Table and constant Function1 entries are different in that they have
special formats which allow the data to be appended directly to the
entry name; e.g;

    <entryName>         table ((0 (1 0 0)) (1 (2 0 0)));

    <entryName>         constant (1 0 0);

    // (constant can even have the "constant" keyword omitted)
    <entryName>         (1 0 0);

Table also has two optional additional controls; "outOfBounds" and
"interpolationScheme". In order for these to be written out in such a
way that the entries are not duplicated, table needs to be written out
(and therefore also read in) as one of the sub-dictionary forms. To that
effect, Table has been extended to additionally permit reading in the
three forms described previously, and to write in the coeff-dictionary
form.

    // Current-dictionary form
    <entryName>     table;
    values          ((0 (1 0 0)) (1 (2 0 0)));
    outOfBounds     repeat;
    interpolationScheme linear;

    // Coeff-dictionary form
    <entryName>     sine;
    <entryName>Coeffs
    {
        values          ((0 (1 0 0)) (1 (2 0 0)));
        outOfBounds     repeat;
        interpolationScheme linear;
    }

    // Entry-as-dictionary form
    <entryName>
    {
        type            table;
        values          ((0 (1 0 0)) (1 (2 0 0)));
        outOfBounds     repeat;
        interpolationScheme linear;
    }

For completeness and consistency, constant has also been modified so
that it can read in these forms. However, constant has no additional
control entries, which means writing a coeff-dictionary is unecessary,
so the output has not been changed.
2019-11-15 12:26:23 +00:00
2019-07-05 14:21:52 +01:00
2018-04-14 23:13:00 +01:00
2018-01-03 17:18:12 +00:00

README for OpenFOAM-dev

#

About OpenFOAM

OpenFOAM is a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foundation. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.

Copyright

OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or http://www.gnu.org/licenses/, for a description of the GNU General Public License terms under which you can copy the files.

Description
Description: OpenFOAM Foundation repository for OpenFOAM version 12
Readme 304 MiB
Languages
C++ 97.4%
Shell 1.8%
Lex 0.4%
Liquid 0.2%
C 0.1%