Subsections

2. Usage information

The OpenFLUID-Engine application is available on Linux, Windows and MacOSX platforms. We encourage you to use OpenFLUID-Engine program on Linux platform as it is the development and usually used platform. The following instructions mainly applies to Linux platforms.

2.1 Installation

On linux platforms, the OpenFLUID-Engine software is available as distribution packages (deb, rpm) or archive files (tar.gz, tar.bz2). The recommanded way to install is to use packages for your Linux distribution. If you want to use archive files, you have to unarchive the software according to the directory tree.
Once installed, the openfluid-engine command should be available. You can check it by running the command openfluid-engine --help or openfluid-engine --version in your favorite terminal. You are now ready to run your first simulation.

2.2 Input dataset

Before running the simulation, the input dataset must be built. An OpenFLUID-Engine input dataset includes different informations, shared into many files:

All these files must be placed into any directory that can be reached by the engine. The default searched directory is a directory named .openfluid/engine/OPENFLUID.IN and located into the user home directory (the user home directory may vary, depending on the used operating system). This directory is not automatically created, it should be created by hand. If you prefer to place your dataset in another directory, you can specify it using command line options passed to the engine (-i or --input-dir).

In order to build these files, we encouraged you to use a good text editor, or better, an XML editor. You can also use custom scripts or macros in specialized sotware, such as spreadsheets or Geographic Information Systems (GIS), to generate automatically the input dataset.


2.3 Engine sequence

The following sequence diagram describes the stage-by-stage execution of an OpenFLUID-Engine-engine simulation. The kernel is the main application, and the simulation function represents each simulation function used in the model definition.

Image ofeseq
Stages description:
  1. the kernel loads the model definition (from the model.xml file)
  2. the kernel loads and instanciates the simulation functions, according to the model definition
  3. the kernel requests the signature of each simulation function
  4. the kernel runs the initParams() method of each simulation function
  5. the kernel loads the domain definition (from the *.ddef.xml files)
  6. the kernel check the domain definition consistency and rebuild the domain topology
  7. the kernel loads the domain input data (from the *.ddata.xml files)
  8. the kernel runs the prepareData() method of each simulation function
  9. the kernel runs the checkConsistency() method of each simulation function
  10. the kernel checks the global consistency (model + domain definition + domain input data)
  11. the kernel runs the initializeRun() method of each simulation function
  12. at every time step, the kernel runs the runStep() method of each simulation function
  13. at every time step, if the progressive output of results is enabled and if the current time step is a "progressive output time step", the kernel saves a packet of data and frees memory
  14. the kernel runs the finalizeRun() method of each simulation function
  15. the kernel completes the save of results (all results if progressive output is disabled, the remaining results if progressive output is enabled)


2.4 Run the simulation

To run the simulation, if the dataset is located in the default searched directory, simply run the command openfluid-engine in your favorite terminal. To specify a different input dataset directory, use the -i or --input-dir command line option.


Image oferun

2.5 Explore the results

The results are stored in files, gathered by spatial unit. In each files, the values for variables are stored as columns, each row corresponfing to a data exchange time step (represented as a date and time). The format of the files depends on the configuration of outputs, set through the run.xml file. The default output directory is a directory named .openfluid/engine/OPENFLUID.OUT and located into the user home directory (the user home directory may vary, depending on the used operating system). If you prefer to save your outputs in another directory, you can specify it using command line options passed to the engine (-o or --output-dir).

In order to process the results of your simulations, we encourage you to use software environments such as R, Scilab or Octave, spreadsheets such as OpenOffice Calc, GIS such as GRASS or QGIS.

Jean-Christophe Fabre 2009-08-17