June 14th, 2011 by Mike Dempsey
With the release of Dymola 2012 it is now possible to compile models to the FMI standard for co-simulation.Â This means that a model built in Dymola can be compiled with an open standard interface and coupled to other simulation and integration tools.Â Dymola uses the SUNDIALS suite of numerical solvers for co-simulation and these have to be installed separately.
To configure the FMI export for co-simulation with Dymola 2012 you need to complete the following steps:
/* SUNDIALS configuration header file */
#define SUNDIALS_PACKAGE_VERSION "2.4.0"
#define F77_FUNC(name ,NAME) name ## _
#define F77_FUNC_(name ,NAME) name ## _
#define SUNDIALS_DOUBLE_PRECISION 1
#define SUNDIALS_USE_GENERIC_MATH 1
#define SUNDIALS_MPI_COMM_F2C 1
Please note that you do not have to build the SUNDIALS numerical solvers separately. The source code for these solvers will be detected once the sundials_config.h file is placed in the correct directory and Dymola will then use the source code directly to generate the FMU.