Creating MTK components

I created a nice tether model using MTK. Now the question arises, can I create an MTK component out of it.

It would need two or three ports:

  • at point one a force vector and and a speed vector
  • at point two the same
  • in addition a scalar input for the reel-out speed of the winch, or a port with a scalar speed and force, because they are related

Perhaps in addition position vectors are needed?

How could I define these ports or the interface of this component?

See also: Theory

GitHub - SciML/ModelingToolkitStandardLibrary.jl: A standard library of components to model the world and beyond is a good starting point.

I think Chris Rackauckas and Mike Tiller gave a workshop during JuliaCon this summer that included port design. But I don’t know whether the video of it has been published.

Do I understand correctly: Functions that create a component should start with a capital letter?

That’s just a convention, not a requirement

1 Like