Examples projects
Todo:

Primitives

Todo:

This example is based on a flux model involving 3 simulation functions, applied to a spatial domain composed of 13 units distributed into 2 unit classes. It aims at showing how values of variables are produced and used in a spatially distributed way.

Model

ex-primitives-model.png

The flux model is composed of 3 simulations functions :

The examples.primitives.unitsA.prod function produces values for variable var1 and var2 on units of class A, and requires values for var3 on units of class A on a previous time step.

The examples.primitives.unitsA.up function produces values for variable var3 on units of class A, updates values for variable var2 on units of class A, and requires values for var1 on units of class A.

The examples.primitives.unitsB.prod function produces values for variable var5 on units of class B, and requires values for var2 and var3 on units of class A. The flux model is defined in the model.fluidx file.

Spatial domain

Todo:

The spatial domain is composed of 13 units, distributed into 2 unit classes (class A and class B). The connections between units are defined for each unit independently, as "to" units. The process order depends on these connections. This spatial domain is represented as a graph, where nodes are units and edges are connections between units. The spatial domain is defined in *.ddef.xml file(s).

ex-primitives-domain.png

Simulation

Todo:

The simulation will run from January 1st, 2001, at 00:00:00 to January 15th, 2001, at 08:01:02. The fixed time step is 3600 seconds (1 hour).

The run configuration is defined in the run.fluidx file.

All variables of all unit classes (A and B) are saved in files. The output configuration is defined in the output.xml file.

Run this example

Todo:

In order to run a simulation using these example functions, the command to run is:
openfluid-engine -i /path/to/inputdata -o /path/to/outputdir

In case of the example simulation functions are not installed in a standard path searched by openfluid-engine, the -p command line option should be used to add specific search paths.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines