mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated function object documentation
This commit is contained in:
@ -28,10 +28,33 @@ Group
|
|||||||
grpIOFunctionObjects
|
grpIOFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Allows some fields/registered objects to be written more often than others.
|
This function object allows user-selected fields/registered objects to be
|
||||||
|
written at a custom write interval. It operates by deleting all entries
|
||||||
|
except those selected after writing.
|
||||||
|
|
||||||
Works in the opposite way: deletes at intermediate times all
|
Example of function object specification:
|
||||||
but selected fields.
|
\verbatim
|
||||||
|
partialWrite1
|
||||||
|
{
|
||||||
|
type partialWrite;
|
||||||
|
functionObjectLibs ("libIOFunctionObjects.so");
|
||||||
|
...
|
||||||
|
objectNames (p U T);
|
||||||
|
writeInterval 100;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
\heading Function object usage
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | type name: partialWrite | yes |
|
||||||
|
objectNames | objects to write | yes |
|
||||||
|
writeInterval | write interval | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::OutputFilterFunctionObject
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
partialWrite.C
|
partialWrite.C
|
||||||
@ -58,7 +81,7 @@ class dictionary;
|
|||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class partialWrite Declaration
|
Class partialWrite Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class partialWrite
|
class partialWrite
|
||||||
|
|||||||
@ -28,7 +28,29 @@ Group
|
|||||||
grpIOFunctionObjects
|
grpIOFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Removes registered IO objects if present in the database
|
This function object removes registered objects if present in the database
|
||||||
|
|
||||||
|
Example of function object specification:
|
||||||
|
\verbatim
|
||||||
|
removeRegisteredObject1
|
||||||
|
{
|
||||||
|
type removeRegisteredObject;
|
||||||
|
functionObjectLibs ("libIOFunctionObjects.so");
|
||||||
|
...
|
||||||
|
objectNames (obj1 obj2);
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
\heading Function object usage
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | type name: removeRegisteredObject | yes |
|
||||||
|
objectNames | objects to remove | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::OutputFilterFunctionObject
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
removeRegisteredObject.C
|
removeRegisteredObject.C
|
||||||
|
|||||||
@ -28,7 +28,30 @@ Group
|
|||||||
grpIOFunctionObjects
|
grpIOFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Takes over the writing of registered IO objects
|
This function object takes-over the writing of objects registered to the
|
||||||
|
database.
|
||||||
|
|
||||||
|
Example of function object specification:
|
||||||
|
\verbatim
|
||||||
|
writeRegisteredObject1
|
||||||
|
{
|
||||||
|
type writeRegisteredObject;
|
||||||
|
functionObjectLibs ("libIOFunctionObjects.so");
|
||||||
|
...
|
||||||
|
objectNames (obj1 obj2);
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
\heading Function object usage
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | type name: writeRegisteredObject | yes |
|
||||||
|
objectNames | objects to write | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::OutputFilterFunctionObject
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
writeRegisteredObject.C
|
writeRegisteredObject.C
|
||||||
|
|||||||
@ -34,7 +34,7 @@ extract predicted field and derived quantities at run-time. Alternatively,
|
|||||||
the actions can be executed afterwards using the \c execFlowFunctionObjects
|
the actions can be executed afterwards using the \c execFlowFunctionObjects
|
||||||
utility.
|
utility.
|
||||||
|
|
||||||
<br>
|
\linebreak
|
||||||
The current range of features comprises of:
|
The current range of features comprises of:
|
||||||
- \ref grpCloudFunctionObjects
|
- \ref grpCloudFunctionObjects
|
||||||
- \ref grpFieldFunctionObjects
|
- \ref grpFieldFunctionObjects
|
||||||
@ -43,12 +43,13 @@ The current range of features comprises of:
|
|||||||
- \ref grpJobControlFunctionObjects
|
- \ref grpJobControlFunctionObjects
|
||||||
- \ref grpUtilitiesFunctionObjects
|
- \ref grpUtilitiesFunctionObjects
|
||||||
|
|
||||||
<br>
|
\linebreak
|
||||||
\subsection secFieldFunctionObjectUsage Using function objects
|
\subsection secFieldFunctionObjectUsage Using function objects
|
||||||
|
|
||||||
Function objects are defined by additional entries in the
|
Function objects are defined by additional entries in the
|
||||||
$FOAM_CASE/system/controlDict input dictionary. Each object is listed in a
|
$FOAM_CASE/system/controlDict input dictionary. Each object is listed in a
|
||||||
\c functions sub-dictionary entry, e.g. for `output' type objects:
|
\c functions sub-dictionary entry, e.g. the following shows the input options
|
||||||
|
applicable to `output' -type objects:
|
||||||
|
|
||||||
\verbatim
|
\verbatim
|
||||||
functions
|
functions
|
||||||
|
|||||||
@ -43,7 +43,6 @@ Description
|
|||||||
...
|
...
|
||||||
log yes;
|
log yes;
|
||||||
patches (walls);
|
patches (walls);
|
||||||
|
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,55 @@ Group
|
|||||||
grpFunctionObjects
|
grpFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Executes system calls, entered in the form of a string list
|
This function object executes system calls, entered in the form of a
|
||||||
|
string lists. Calls can be made at the following points in the
|
||||||
|
calculation:
|
||||||
|
- every time step
|
||||||
|
- every output time
|
||||||
|
- end of the calculation
|
||||||
|
|
||||||
|
Example of function object specification:
|
||||||
|
\verbatim
|
||||||
|
systemCall1
|
||||||
|
{
|
||||||
|
type systemCall;
|
||||||
|
functionObjectLibs ("libsystemCall.so");
|
||||||
|
...
|
||||||
|
executeCalls
|
||||||
|
(
|
||||||
|
"echo execute"
|
||||||
|
);
|
||||||
|
writeCalls
|
||||||
|
(
|
||||||
|
"echo \*\*\* writing data \*\*\*"
|
||||||
|
);
|
||||||
|
endCalls
|
||||||
|
(
|
||||||
|
"echo \*\*\* writing .bashrc \*\*\*"
|
||||||
|
"cat ~/.bashrc"
|
||||||
|
"echo \*\*\* done \*\*\*"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
\heading Function object usage
|
||||||
|
\table
|
||||||
|
Property | Description | Required | Default value
|
||||||
|
type | type name: systemCall | yes |
|
||||||
|
executeCalls | list of calls on execute | yes |
|
||||||
|
writeCalls | list of calls on write | yes |
|
||||||
|
endCalls | list of calls on end | yes |
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
Note
|
||||||
|
Since this function object executes system calls, there is a potential
|
||||||
|
security risk. In order to use the \c systemCall function object, the
|
||||||
|
\c allowSystemOperations must be set to '1'; otherwise, system calls will
|
||||||
|
not be allowed.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::OutputFilterFunctionObject
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
systemCall.C
|
systemCall.C
|
||||||
@ -53,7 +101,7 @@ class dictionary;
|
|||||||
class mapPolyMesh;
|
class mapPolyMesh;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class systemCall Declaration
|
Class systemCall Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class systemCall
|
class systemCall
|
||||||
|
|||||||
@ -28,7 +28,13 @@ Group
|
|||||||
grpUtilitiesFunctionObjects
|
grpUtilitiesFunctionObjects
|
||||||
|
|
||||||
Description
|
Description
|
||||||
functionObject using dynamic code compilation.
|
This function object provides a general interface to enable dynamic code
|
||||||
|
compilation.
|
||||||
|
|
||||||
|
SeeAlso
|
||||||
|
Foam::functionObject
|
||||||
|
Foam::OutputFilterFunctionObject
|
||||||
|
Foam::codedBase
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
codedFunctionObject.C
|
codedFunctionObject.C
|
||||||
@ -47,7 +53,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class codedFunctionObject Declaration
|
Class codedFunctionObject Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class codedFunctionObject
|
class codedFunctionObject
|
||||||
|
|||||||
Reference in New Issue
Block a user