Documentation for OpenFLUID
2.2.0
|
The format of the source file is a CSV format which defines the values of the desired variables according to a simulation date. The first column defines the simulation dates using the ISO format YYYYMMDDThhmmss
. The first row of the column is labelled #datetime. All others columns define a variable for a desired spatial unit. The first row of these columns are labelled using the format UnitClass#UnitID:VarName
.
UnitClass
defines the unit class,UnitId
defines the unit ID,VarName
defines the variable name.If you want to define the same variable for all the units in a given class, you can use the format UnitClass#*:VarName
as a column label, where *
replace all unit classes.
;
. This example shows that we inject values for the dates in the first column. The second column indicates that we are injecting values for the var1 variable for spatial unit 1 of the UnitClass1 class. The third column indicates that we inject values for the var2 variable for all the spatial units in the UnitClass2 class. The last column override the third one for the spatial unit 5 because it is more specific.
In OpenFLUID-Builder, the multi-column CSV can be set with the same dialog than for other generators. It will use a chosen multi-column csv file. You can either use all the variables defined in the file or specify just a selection of them. The generator will produce all selected variables from the csv file.
In this example (taken from Firespread example), we are importing the file multi_inject.csv which defines 2 variables for all spatial units in the unit class AU : AU#*gas.atm.V.windspeed
and AU#*:gas.atm.degree.mainwinddir
. The Signature parameter defines all the selected columns from the file.
In this image, we can see that the generators produces the selected variables gas.atm.V.windspeed and gas.atm.degree.mainwinddir.
Here is an example of model.fluidx file containing a multi-column generator:
The generator method
is inject-multicol
and there is also has a mandatory attribute variables
where the selected columns headers are specified. The multi-column generator block contains a single parameter called datafile
indicating the path of csv file used for injection.