Function1, Function2: Improved and standardised usage documentation

This commit is contained in:
Henry Weller
2022-05-13 22:23:59 +01:00
parent 16c0c68e92
commit 590d2ce5d0
16 changed files with 100 additions and 32 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,8 @@ Class
Description
Templated function that returns a constant value.
Usage - for entry \<name\> returning the value <value>:
Usage
For entry \<name\> returning the value <value>:
\verbatim
<name> constant <value>
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Templated function that returns the corresponding 1 (one).
Usage:
Usage
\verbatim
<name> one;
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,7 @@ Description
increasing monotonically to 1 from \c start over the \c duration and
remaining at 1 thereafter.
Usage:
Usage
\verbatim
<name> <rampFunction>;
<name>Coeffs
@ -47,6 +47,24 @@ Description
duration 20;
}
\endverbatim
or including a constant scaling factor:
\verbatim
<name>
{
type scale;
scale
{
type <rampFunction>;
start 0;
duration 10;
}
value 100;
}
\endverbatim
for more details of scaling the ramp see Foam::Function1s::Scale.
Where:
\table
@ -57,6 +75,7 @@ Description
See also
Foam::Function1
Foam::Function1s::Scale
SourceFiles
Ramp.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,8 @@ Description
This is particularly useful to ramp a time-varying value by one of the
monotonic ramp functions.
Usage for a vector:
Usage
For a vector:
\verbatim
<name>
{
@ -78,7 +79,7 @@ Description
}
\endverbatim
Usage including the optional 'xScale' function:
Including the optional 'xScale' function:
\verbatim
<name>
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ Description
Items are stored in a list of Tuple2's. First column is always stored as
scalar entries. Data is read in Tuple2 form:
Usage:
Usage
\verbatim
<name> table
(
@ -74,7 +74,6 @@ Description
The data may be read from a separate file in either native or CSV format:
Usage:
\verbatim
<name>
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ Description
components of the second (y) column are given by the componentColumns
entry.
Usage:
Usage
\verbatim
nHeaderLine 4; // number of header lines
refColumn 0; // reference column index

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ Description
This is a list of Tuple2's where the first (x) column is scalar, and the
second (y) column is the type to be interpolated.
Usage:
Usage
\verbatim
values
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,7 @@ Description
of Tuple2's where the first (x) column is scalar, and the second (y) column
is the type to be interpolated.
Usage:
Usage
\verbatim
(
(0.0 (1 2 3))

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,8 @@ Description
Provides backward-compatibility for cases where a field is spatially
"uniform" and may be treated as a constant value.
Usage - for entry \<name\> returning the value <value>:
Usage
For entry \<name\> returning the value <value>:
\verbatim
<name> uniform <value>
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Templated function that returns the corresponding 0 (zero).
Usage:
Usage
\verbatim
<name> zero;
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,53 @@ Description
Linear ramp function starting from 0 and increasing linearRamply to 1 from
\c start over the \c duration and remaining at 1 thereafter.
Usage
\verbatim
<name> linearRamp;
<name>Coeffs
{
start 10;
duration 20;
}
\endverbatim
or
\verbatim
<name>
{
type linearRamp;
start 10;
duration 20;
}
\endverbatim
or including a constant scaling factor:
\verbatim
<name>
{
type scale;
scale
{
type linearRamp;
start 0;
duration 10;
}
value 100;
}
\endverbatim
for more details of scaling the ramp see Foam::Function1s::Scale.
Where:
\table
Property | Description | Required | Default value
start | Start time | no | 0
duration | Duration | yes |
\endtable
See also
Foam::Function1s::Ramp
Foam::Function1s::Scale
SourceFiles
linearRamp.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,8 @@ Description
from 1 decreasing to 0 from \c start over the \c duration and remaining at 0
thereafter.
Usage for scaling a vector:
Usage
For scaling a vector:
\verbatim
<name>
{

View File

@ -29,7 +29,7 @@ Description
instantaneously to 1, remains at 1 for \c duration, then drops
instantaneously back to 0.
Usage:
Usage
\verbatim
<name> squarePulse;
<name>Coeffs

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,8 @@ Class
Description
Templated function of two variables that returns a constant value.
Usage - for entry \<name\> returning the value <value>:
Usage
For entry \<name\> returning the value <value>:
\verbatim
<name> constant <value>;
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Templated function of two variables that returns the corresponding 1 (one).
Usage:
Usage
\verbatim
<name> one;
\endverbatim

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ Class
Description
Templated function of two variables that returns the corresponding 0 (zero).
Usage:
Usage
\verbatim
<name> zero;
\endverbatim