The mass spring damper digital twin (DT) comprises two mass spring dampers and demonstrates how a co-simulation based DT can be used within DTaaS.
There are two simulators included in the study, each representing a
mass spring damper system. The first simulator calculates the mass
displacement and speed of
This example uses two models and one tool. The specific assets used are:
Asset Type | Names of Assets | Visibility | Reuse in Other Examples |
---|---|---|---|
Models | MassSpringDamper1.fmu | Private | Yes |
MassSpringDamper2.fmu | Private | Yes | |
Tool | maestro-2.3.0-jar-with-dependencies.jar | Common | Yes |
The co-sim.json
and time.json
are two DT configuration files used for executing the digital twin.
You can change these two files to customize the DT to your needs.
Lifecycle Phase | Completed Tasks |
---|---|
Create | Installs Java Development Kit for Maestro tool |
Execute | Produces and stores output in data/mass-spring-damper/output directory |
Clean | Clears run logs and outputs |
To run the example, change your present directory.
cd /workspace/examples/digital_twins/mass-spring-damper
If required, change the execute permission of lifecycle scripts you need to execute, for example:
chmod +x lifecycle/create
Now, run the following scripts:
Installs Open Java Development Kit 17 in the workspace.
lifecycle/create
Run the the Digital Twin. Since this is a co-simulation based digital twin, the Maestro co-simulation tool executes co-simulation using the two FMU models.
lifecycle/execute
The results can be found in the /workspace/examples/data/mass-spring-damper/output directory.
You can also view run logs in the /workspace/examples/digital_twins/mass-spring-damper.
Terminate to clean up the debug files and co-simulation output files.
lifecycle/terminate
More information about co-simulation techniques and mass spring damper case study are available in:
Gomes, Cláudio, et al. "Co-simulation: State of the art."
arXiv preprint arXiv:1702.00686 (2017).
The source code for the models used in this DT are available in mass spring damper github repository.