Set Up Activate for Co-Simulation and Modelica Library Modeling
Learn how to include Modelica library components in your Activate diagram and run co-simulations with:
- MotionSolve multibody models
- Flux electromagnetics models
- Functional Mockup Units (FMUs)
Refer to the attached PowerPoint for a more detailed overview.
Install C++ Compiler
The C++ Compiler allows for FMI co-sim and Modelica library compiling.
Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:
- Go to the download page: https://visualstudio.microsoft.com/downloads/
- Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
- Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.
Note: Depending on VS version downloaded, above return may vary slightly.
oml > vssGetCompilerName() ans = vc16_community_x64 >
Install C++ Compiler | Troubleshooting
If your vssGetCompilerName() command returns “tcc”, please re-install Visual Studio and double check that the C++ package is being included in installation.
Co-Simulation Paths
These paths allow access to the solver *.dll’s necessary for co-simulation. The directories will match those above with the exception of the version year, depending on which versions you are running.
Note: Paths are valid for MotionSolve/MotionView/Flux 2020
- From the menu bar, select File > Open Recent > Preferences.
- In the Preferences dialog, select the Path category and set the following directories listed below.
Cosimulation with MotionSolve
- MotionView: C:/Program Files/Altair/2020/hw/bin/win64/
- MotionSolve: C:/Program Files/Altair/2020/hwsolvers/motionsolve/bin/win64
- MotionSolve License: C:/Program Files/Altair/2020/hwsolvers /common/bin/win64
- Python: C:/Program Files/Altair/2020/hwsolvers/common/python/python3.5/win64
Cosimulation with Flux
- Flux: C:/Program Files/Altair/2020/flux/Flux
Now You're Ready To...
- Include Modelica library components in your diagram
- Run co-simulations with:
- MotionSolve multibody models
- Flux electromagnetics models
- Functional Mockup Units (FMUs)