Tutorial: Co-Simulating a Plunger Model with Flux 3D
Create an Activate model to regulate by hysteresis a current that feeds into the coil of a 3D Flux model of a plunger, and co-simulate the models.
The co-simulation process with Flux includes four basic steps:
- Create a Flux model (for this tutorial, the Flux model is provided for you).
- Generate the Flux coupling component required for Activate to read in the Flux model data.
- Create an Activate model and include the Flux block for reading in the Flux coupling component.
- Co-simulate the models in Activate.
Files for This Tutorial
TRANSLATING_MOTION_COUPLING.F2STA, TRANSLATING_MOTION_COUPLINGF2STA.FLU, Translating_motion_coupling.scm
Overview of the Flux Translation Motion Model
The Flux model is a plunger with one transient computation completed for the position of the plunger in a function of time. The coil of the plunger is supplied with constant voltage.
- Upper grip
- Lower grip
- Coil
The inputs for the plunger are defined as multi-physical parameters and include:
- Command: the control of the switch
- I: the current in the coil conductor
The outputs for the plunger are scalar I/O settings that retrieve values through the sensors, formulas (forces and couples) and parameters (position, speed, acceleration).
The circuit of the plunger is configured with a voltage source, coil conductor, resistor and switch.
Generating the Coupling Component in Flux
Load the Flux model and generate the coupling component with the required inputs, outputs and parameters.
Creating the Activate Model
Create an Activate model to regulate by hysteresis the current in the coil that feeds the Flux model of the plunger.
Co-Simulating the Activate and Flux Models
During co-simulation, the Activate model supplies a current into the coil of the plunger.