I am proud that I can release a new tutorial for physical modelling with Julia using ModelingToolkit.jl: GitHub - ufechner7/Tethers.jl: Tether models
This is not really a package, but a project with a lot of examples and a good documentation. I use modelling of a tether as example, because it is numerically challenging, and with ModelingToolkit you can achieve:
- 2000 times the performance of Python
- the code is quite compact and readable
- you get beautiful gif animations as result
Just try it out or suggest it to your students!
Thanks a lot to Johann Hell for testing and finding bugs.
20 Likes
Cool, nice share!
I have also been working a bit on tether models in ModelingToolkit, but as part of a multibody component library, check it out, maybe it could be useful to you if you want to add additional components to your tethers. I’m using Makie to generate 3D animations, which rather easily gives you interactive 3D renders, which I can recommend!
5 Likes
Nice! I guess you did not implement ropes that are reeled out from a winch yet? I am using a particle system approach. I know that multibody is also an option, but it is more complex and not really needed for my applications.
That’s correct, I have not
Congratulations, great work!
As far as I understand, this module is a part of your kite-simulation system, which was first implemented in Python and is now running in Julia.
For verification I ran your “Thether models” in MODELICA environment and in Julia-Modia3D and get the same results.
2 Likes
Well, not quite yet. When I started implementing my kite power system model in Julia, ModelingToolkit was not very developed yet, so I used an approach based on implicit DAEs. But I would like to switch to MTK because it is easier to understand and faster. We will do that if I either find the time to do it myself, or I find a student who can do it. A student from Norway already implemented the first working MTK based kite model, but it is somewhat different from my main reference model, it models a kite connected to three winches on the ground, but the system we use in Delft has a flying kite control unit that is steering the kite.
In the latest version of Tethers.jl the performance increased to 5000 times the speed of Python by using the FBDF()
solver.
I also did some more refactoring to make the code shorter and better readable.
5 Likes