MBD Modeling and Co-Simulation with MotionSolve

Learn about MBD modeling through data exchange and co-simulation with MotionSolve.

The Twin Activate co-simulation interface lets you simulate a complex system that includes a multi-body system (MBS) and one or more control subsystems. In order to effectively simulate the entire system, the MBS is simulated with MotionSolve while the control subsystem is simulated with Twin Activate.

The installation of HyperWorks MotionSolve software is required for co-simulation. MotionSolve offers powerful modeling, analysis, visualization and optimization capabilities for multi-disciplinary simulations that include kinematics & dynamics, statics & quasi-statics, linear & vibration studies, stress & durability, loads extraction, co-simulation, effort estimation and packaging synthesis.

Co-simulation between MotionSolve or MotionView and Twin Activate can be performed on local or remote computer systems.

For more details, see the chapter on co-simulation in the Extended Definitions for Advanced Users.

Note: Co-simulation between Twin Activate and MotionSolve/MotionView on Linux platforms is supported with HyperWorks version 2020 or higher.

Modeling for Co-Simulation

Special statements and blocks are available for defining the inputs and outputs between an MBS and control-system model.

Statements to reference inputs and outputs
You can add special statements, Control_PlantInput and Control_PlantOutput, to a MotionSolve model to reference variables that are either used as inputs, such as forces or torques, or measured outputs, such as displacements or velocities.
MSPlant (MotionSolve Plant) and MSSignal (MotionSolve Signal) blocks
A MotionSolve model connects to a Twin Activate model by way of the MSPlant or MSSignal blocks. These blocks specify the MotionSolve model and have inputs and outputs based on the ControlPlant elements defined in the model. Models can include multiple MSPlant or MSSignal blocks due to the IPC for co-simulation between Twin Activate and MotionSolve. For more information, refer to the block help or the Extended Definitions for Advanced Users.
MotionView models as input
The MSPlant and MSSignals blocks support either MotionSolve or MotionView models as input. If a MotionView model is used, you can open and modify the model provided that the path to MotionView is defined in the Preferences dialog. The actual co-simulation is performed with MotionSolve, therefore, if needed, the simulation process starts by converting the .mdl MotionView model file to a .xml MotionSolve model file.

Local Co-Simulation Setup

Set up a co-simulation between Twin Activate and MotionSolve on the same computer system.

Table 1. Specifications for a Local Setup
Setup Method Setup Directions
Local
  1. Install MotionSolve and Twin Activate on the same machine. You do not need any additional setup.
  2. In the MSPlant block, keep the default values for the MotionSolve server IP address and MotionSolve server port number. When starting the co-simulation from Twin Activate, the connection between the two solvers is made automatically, based on the paths specified in the Preferences.

Remote Co-Simulation Setup

Set up a co-simulation between MotionSolve and Twin Activate on different machines that are accessible over a network.

Overview

For a remote simulation setup, it is assumed that Twin Activate is installed on machine A and MotionSolve is installed on machine B where machine A and B are not the same. The remote setup scenario is useful when a MotionSolve model is located on machine B and transferring that model to machine A to perform a local co-simulation is not feasible.

Guidelines for Setting Up a Remote Co-Simulation

Note these guidelines when setting up your remote co-simulation:
  • The IP address must be entered in the xyz.xyz.xyz.xyz format.
  • When an IP address is specified, the default port number is 22903.
  • When performing a remote co-simulation, a full installation of MotionSolve in not needed on machine A. However the MotionSolve binaries such as nuclient.dll, msciscos.dll, and the .dll files that are loaded by these binaries, are required.
  • When performing a remote co-simulation, a Twin Activate installation is not required on machine B.
  • If you specify the IP address as localhost, then there is no need to invoke a msdaemon or any other utility from the MotionSolve installation.
  • If a firewall exists between machine A and machine B, you must disable it to enable co-simulation.
Table 2. Setup Specifications for Machine A and B for Co-Simulation
Computer System Setup Directions
Machine A
  1. Specify the software path settings on machine A. These include pointing to the MotionSolve installation directory or the directory that includes the required MotionSolve.dll files on machine A.
  2. In the MSPlant block, specify the exact name (without path) of the MotionSolve model that is located on machine B.
  3. In the MSPlant block, enter the MotionSolve server IP address and port number for machine B.
  4. Select OK.
Machine B
  1. From a command prompt, navigate to the directory where the MotionSolve model resides and set the following three environment variables:
    • Set NUSOL_DLL_DIR to point to the location of the MotionSolve binaries (typically <altair>/hwsolvers/motionsolve/bin/win64).
    • Set PATH by inserting what is defined by NUSOL_DLL_DIR at the beginning of the path. For example on Windows, enter PATH=%NUSOL_DLL_DIR%;%PATH%
    • Set RADFLEX_PATH to point to the location of the MotionSolve license libraries (typically <altair>/hwsolvers/common/bin/win64).
  2. In a command prompt, enter msdaemon 22903. Invoking the MotionSolve msdaemon launches the MotionSolver server in listening mode.

Defining the Software Path Settings

Defining the paths to MotionSolve and other software that is required for local and remote co-simulation methods.

  1. From the File menu, select the Preferences button.
    The Preferences dialog appears.
  2. On the left column of the dialog, select the category, Twin Activate Paths.
  3. For each preference, enter an installation path, and click Apply.
    Preference Path
    MotionView <HyperWorks_install_path>/hwdesktop/hw/bin/platform
    MotionSolve <HyperWorks_install_path>/hwsolvers/motionsolve/bin/platform
    MotionSolve License (Radflex) <HyperWorks_install_path>/hwsolvers/common/bin/platform
    Python

    (For HyperWorks 2021): <HyperWorks_install_path>/common/python/python3.5/platform

    (For HyperWorks 2020): <HyperWorks install_dir>/hwdesktop/common/python/python3.5/platform