feelpp_fmi_fmu(1)
2. SYNOPSIS
{manmanual} --config-file <file>.cfg  (1)
            --fmu.<option>=<value>    (2)
| 1 | gather command line options in a .cfg file | 
| 2 | set fmu options, see below | 
3. DESCRIPTION
feelpp_fmi_fmu is an application which can
- 
load an Functional Mockup Unit(FMU) using the Functional Mockup Interface(FMI)
 - 
print same information about the model and the variables
 - 
simulate the FMU over a span of time
 
3.1. Options
feelpp_fmi_fmu requires some options.
| Prefix | Name | Description | Type | Default value | 
|---|---|---|---|---|
  | 
  | 
name of the FMU file with absolute path  | 
  | 
  | 
  | 
  | 
Display the list of variables and description after loading FMU  | 
boolean  | 
  | 
  | 
  | 
Run with verbosity  | 
boolean  | 
  | 
  | 
  | 
Time step for FMU Solver  | 
double  | 
  | 
  | 
  | 
Relative tolerance for FMU Solver  | 
double  | 
  | 
  | 
  | 
inital time for the simulation. Default is taken from the model  | 
double  | 
  | 
  | 
  | 
Final time for the simulation. Default is taken from the model  | 
double  | 
  | 
  | 
  | 
List of variables which have to be exported  | 
  | 
empty  | 
  | 
  | 
Location of the exported data. Default is the app directory  | 
  | 
  | 
4. EXAMPLES
We are now using the feelpp/feelpp:latest docker images as described in book.feelpp.org/user-manual/#getting_started to demonstrate feelpp_fmi_fmu usage.
We use the meshes in src/feelpp/data/gmsh/primitives in the docker image.
feelpp/feelpp:latestdocker run --rm -ti -v $HOME/feel:/feel feelpp/feelpp
4.1. Running a FMU
./feelpp_fmi_fmu --config-file="github:{repo:feelpp,path:feelpp/tools/fmi/fmus/bouncingball.cfg}"
The cfg file is downloaded, it contains the option fmu.filename which points to a file stored publicly on our girder server.
The output should look like
Reading /home/<user>/feel/downloads/feelpp_fmi_fmu/cfgs/bouncingball.cfg...
[ Starting Feel++ ] application feelpp_fmi_fmu version 0.1 date 2019-Dec-02
 . feelpp_fmi_fmu files are stored in /home/<user>/feel/feelpp_fmi_fmu/np_1
 .. logfiles :/home/<user>/feel/feelpp_fmi_fmu/np_1/logs
/home/<user>/feel/downloads/feelpp_fmi_fmu/fmus/fmi2cs.fmu
FMU Model loaded : name=BouncingBall, guid={f57105f2-ee2b-45c4-a1ef-b23bedcd600e}, kind=CS, id=fmi2cs
Version returned from FMU = 2.0
=================================================================
FMU Model BouncingBall : list of variables
=================================================================
Name                          Alias Type      Description
_D_whenCondition1             0     bool      h < 0.0
der(h)                        0     double    der(Height)
der(v)                        0     double    der(Velocity)
e                             0     double    Coefficient of restitution
h                             0     double    Height
h0                            0     double    Initial height
v                             0     double    Velocity
=================================================================
[env] Time : 0.16095s
[ Stopping Feel++ ] application feelpp_fmi_fmu execution time 0.16095s
The cfg file uses fmu.exported-variables to define a list of variables to export.
The variables are h and v by default.
The results are stored in /home/<user>/feel/feelpp_fmi_fmu/np_1/fmu_values.csv
and it should contain the following:
feelpp_fmi_fmut,h,v 0.000000,1,0 0.100000,1,-0.981 0.200000,0.9019,-1.962 0.300000,0.7057,-2.943 0.400000,0.4114,-3.924 0.500000,0.019,-4.905 0.600000,-0.4715,4.7088 0.700000,-0.00062,3.7278 0.800000,0.37216,2.7468 0.900000,0.64684,1.7658 1.000000,0.82342,0.7848 1.100000,0.9019,-0.1962
5. SEE ALSO
Feel++ Docs: docs.feelpp.org/user/latest/using/