# System modeling workflow example

**URL:** https://discourse.julialang.org/t/system-modeling-workflow-example/67612
**Category:** Modelling & Simulations
**Tags:** examples, workflow, modelingtoolkit
**Created:** [September 3, 2021, 1:05am UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612 "2021-09-03T01:05:38Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![holmesthinking](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@holmesthinking](https://discourse.julialang.org/u/holmesthinking)
#### Post date: [September 3, 2021, 1:05am UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/1 "2021-09-03T01:05:38Z")

</div>

Hi,  
I have some experience in Simulink but I want to do stuff in Julia (ModelingToolkit).  
I’m searching for examples of simple system models for example two water tanks and pump or something similar in complexity. I would like to see and learn how structure of that system looks like and how to connect componets of modeling system in organised manner. I can’t find any example of workflow that contains few components conected together in one consistent model.  
Thanks for help.

---

<div class="post-metadata">

### Author: ![Wen-Wei\_Tseng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wen-wei_tseng/32/28839_2.png) [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)
#### Post date: [September 3, 2021, 7:18am UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/2 "2021-09-03T07:18:14Z")

</div>

Hello, there is a JuliaCon video about [component-based RC circuit modeling](https://youtu.be/HEVOgSLBzWA?t=7715). The copy-pastable code is [here](https://mtk.sciml.ai/dev/tutorials/acausal_components/) in the `ModelingToolkit.jl` docs. Hope this helps.

---

<div class="post-metadata">

### Author: ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)
#### Post date: [September 3, 2021, 9:15am UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/3 "2021-09-03T09:15:05Z")

</div>

Let me state, that coming from Simulink, you should be aware of a complete change of the modeling approach. The modeling approach followed by Simulink is called _causal_ (also _assignment-based_). Simulink actually models _signal flows_ (every block in the Simulink _block diagram_ produces an output signal in response to an input signal). On the other hand, ModelingToolkit follows (similarly as (Open)Modelica and Modelica-inspired Julia package [Modia](https://youtu.be/N94si3rOl1g)) the so-called _acausal_ (also _equation-based_) approach, where you do not have to classify the signals/variables as inputs or outputs. This turns out very useful for modeling complex interconnected systems. Well, for a couple of years even Simulink users can enjoy the latter modeling approach through the the extension library called [Simscape](https://www.mathworks.com/products/simscape.html). Besides possible ModelingToolkit examples and tutorials, some intro to (Open)Modelica or Modia can make your transition easier, because it is really a transion from one mental framework to another rather than just a switch from one software to another.

---

<div class="post-metadata">

### Author: ![holmesthinking](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@holmesthinking](https://discourse.julialang.org/u/holmesthinking)
#### Post date: [September 4, 2021, 11:30pm UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/4 "2021-09-04T23:30:31Z")

</div>

Thank you for the valuable informations. I will check out all and do further study. I will appreciate it, if someone has and could share more code examples like the one above.

---

<div class="post-metadata">

### Author: ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)
#### Post date: [October 5, 2021, 7:25pm UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/5 "2021-10-05T19:25:58Z")

</div>

There is also [Causal.jl](https://github.com/zekeriyasari/Causal.jl), which is pretty much Simulink.

---

<div class="post-metadata">

### Author: ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)
#### Post date: [October 5, 2021, 7:51pm UTC](https://discourse.julialang.org/t/system-modeling-workflow-example/67612/6 "2021-10-05T19:51:26Z")

</div>

And [BlockSystem.jl](https://wuerfel.io/BlockSystems.jl/dev/)
