Build Your First Model
In this tutorial, you will learn the core workflow of Simit by building a simple Mass-Spring-Damper system. We will focus on how to use the editor rather than the physics theory.
Goal: Create a model that simulates a mass oscillating on a spring.
1. Create a Project
- Click File > New Model in the top menu.
- Name it “FirstSim”.
- Set the solver settings in the right panel:
- Step Size:
0.001(1ms) - Duration:
10.0seconds
- Step Size:
2. Add Blocks
You can add blocks by searching the palette.
- Press
/(forward slash) to open the Quick Search. - Type Integrator and press Enter to place it.
- Repeat this to add:
- Another Integrator
- Three Gain blocks
- A Sum block
- A Step source
- A Scope sink
3. Connect and Wire
- Drag from the output port of the Step block to the input of the Sum block.
- Connect the blocks in a feedback loop (Integrator -> Integrator -> Scope).
- Tip: You can select a block and press
Rto rotate orFlipto mirror it for cleaner wiring.
- Tip: You can select a block and press
4. Configure Parameters
Double-click a block to edit its parameters.
- Step Block: Set
Final Valueto1.0. - Gain Blocks: Set values to represent Mass (), Spring (), and Damper ().
- Gain 1:
1.0(1/m) - Gain 2:
50.0(Spring Stiffness) - Gain 3:
0.5(Damping Coefficient)
- Gain 1:
- Sum Block: Change signs to
+ - -to subtract the spring and damping forces.
5. Run and Visualize
- Press the Run button (▶) in the top toolbar.
- Double-click the Scope block to see the results.
- You should see an oscillating line that eventually settles.
Challenge: Try changing the Damping Coefficient to
2.0and run it again. How does the curve change?
What’s Next? Now that you can build a simple flat model, learn how to organize complex logic using Subsystems.