Declaration of the simulation function signature

The signature can be automatically generated through the OpenFLUID plugin for Eclipse, included in the SDK. However it is possible to write the signature "from scratch".

The signature has to be defined between the BEGIN_SIGNATURE_HOOK and END_SIGNATURE_HOOK macros.


The identification part of the signature must contain at least the ID of the simulation function. This ID will be used by the framework to load functions. It is declared in the signature using the DECLARE_SIGNATURE_ID macro.
The others information that can be included for identification are:

Applications range

The informations about applications range is just indicative. it has no effects on coherence or computation. These information are :

Handled data and units graph

The data handled by the simulation functions are function data or spatially distributed data, can be read by the function, appended by the function, and/or modified by the function.
The function data are parameters passed to the simulation function, they usually are computation parameters. The distributed input data are attached to spatial units, and can be simulation variables or units properties.
The spatial units graph representing the landscape can also be modified by simulation functions dynamically during simulations.

Read data must have rules associated when they are declared. These rules are :

Function data

Function data are attached to functions. The declaration macros take 3 arguments : the name of the data, the description of the data (not required), and the unit of the data (not required).

Input data

Input data are invariant information attached to units. Simulation functions declares handling input data on each unit class. The declaration macros take 4 arguments : the name of the data, the concerned unit class, the description of the data (not required), and the unit of the data (not required).

Simulation variables

Simulation variables are produced, read and modified by functions, and attached to distributed units. The declaration macros take 4 arguments : the name of the data, the concerned unit class, the description of the data (not required), and the unit of the data (not required).

To declare read variables :

To declare produced or modified variables :

These variables can be scalar (no dimension) or vector (1 dimension). When they are declared in the signature, the variables names suffixed by the [] symbol are vectors, the ones not suffixed are scalars ( myvariable is scalar and myothervariable[] is vector).

Distributed discrete events

If the simulation function uses distributed discrete events, they must be declared in the signature. The declaration macros take 1 arguments : the concerned unit class

To declare the use of discrete events:

Extra files

The simulation function can declare files that it loads. This can help users to furnish the files needed by the function, and also indicates to the OpenFLUID framework to check the presence of the file if required.

To declare extra files:

Spatial units graph

The spatial units graph representing the landscape can be modified by simulations functions. These modifications must be declared in the signature function using the following macros:



  DECLARE_SIGNATURE_NAME("Morel-Seytoux production on surface units");
  DECLARE_SIGNATURE_DESCRIPTION("Production function computing infiltration and runoff at the surface of a unit 
                                 using the Morel-Seytoux method, based on the Green and Ampt method.");



  DECLARE_REQUIRED_VAR("water.atm-surf.H.rain","SU","rainfall height on SU","m");

  DECLARE_PRODUCED_VAR("","SU","runoff on the surface of the unit","m");
  DECLARE_PRODUCED_VAR("","SU","infiltration through the surface of the unit","m");

  DECLARE_USED_PREVVAR("","SU","output volume at the outlet of the upstream SUs","m3/s");

  DECLARE_REQUIRED_INPUTDATA("ks","SU","hydraulic conductivity when saturated","m/s");


  DECLARE_FUNCTION_PARAM("resstep","numerical resolution step for ponding time","");


Generated using Doxygen 1.6.3
Creative Commons License Creative Commons By-NC-ND license