Are you ready to talk?

Exporting models for co-simulation in other tools

Table of contents

To configure the FMI export for co-simulation with Dymola 2012 you need to complete the following steps:

  • Download the SUNDIALS suite of solvers from https://computation.llnl.gov/casc/sundials/download/download.html make sure this is version 2.4.0
  • Extract the archive and move the sundials-2.4.0 directory in to the Program FilesDymola 2012SourceFMI directory
  • Then create a file called sundials_config.h within the sundials-2.4.0includesundials  directory with the following contents:
    /* 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
    #define SUNDIALS_EXPORT
  • Now when you run the translateModelFMU command the FMU generated will support both the FMI for Model Exchange specification and the FMI for co-simulation slave interface.

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.

Need to talk to an expert?

Our engineering teams are on hand to provide tailored guidance and support with a deep knowledge of the full Dassault Systèmes portfolio.

Want to receive more content like this?

Sign up to receive a weekly roundup of Expert insights as they are published...

  • Related news & articles straight to your inbox
  • Hints, tips & how-tos
  • Thought leadership articles