Documentation for OpenFLUID
2.2.0
|
This appendix provides insight about use cases and set up of generators to provide variable data easily. It deals only with single-column csv, for multi-column data files, see Multi-column generators : setup and use
The available data types depend from the kind of wanted generation:
Generator type | Double (scalar) | Double (vector) | Double (matrix) | Integer | Boolean | String |
---|---|---|---|---|---|---|
Fixed values | Yes | Yes* | Yes* | Yes | Yes | Yes |
Random values | Yes | Yes | Yes | Yes | Yes | No |
Values from file interpolation | Yes | No | No | No | No | No |
Values from file injection | Yes | No | No | No | No | No |
*The non-scalar double generator can be used either with a single value for all, or a value for each cell of the container. Eg, for every time step and every unit of the given unit class, for a generator of vector of size 4 containing doubles:
An option is available for the random generator, to be able to have identical or different values inside the container. Eg with a vector of 4 double:
Currently the random generator for boolean gives a balanced probability between true and false (50% each)
The sources file format is an XML based format which defines a list of sources files associated to an unique ID.
The sources must be defined in a section delimited by the <datasources>
tag, inside an <openfluid>
tag and must be structured following these rules:
<datasources>
tag, there must be a set of <filesource>
tags<filesource>
tag must bring an ID
attribute giving the identifier of source, and a file
attribute giving the name of the file containing the source of data. The files must be placed in the input directory of the simulation..fluidx
extension. Using the .fluidx
extension may lead to an unexpected behaviour (such as deletion of the sources file). .xml
(e.g. sources.xml)An associated source data file is a two columns text file, containing a serie of values in time. The first column is the date using the ISO format YYYY-MM-DD'T'HH:MM:SS
. The second column is the value itself.
A distribution file is a two column file associating a unit ID (first column) to a source ID (second column).