# Creating MTK components

**URL:** https://discourse.julialang.org/t/creating-mtk-components/118426
**Category:** Modelling & Simulations
**Tags:** question, package, modelingtoolkit
**Created:** [August 20, 2024, 7:22pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426 "2024-08-20T19:22:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [August 20, 2024, 7:22pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426/1 "2024-08-20T19:22:51Z")

</div>

I created a nice [tether model](https://github.com/ufechner7/Tethers.jl) 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](https://ufechner7.github.io/Tethers.jl/dev/theory/)

---

<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: [August 22, 2024, 4:57pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426/2 "2024-08-22T16:57:56Z")

</div>

[GitHub - SciML/ModelingToolkitStandardLibrary.jl: A standard library of components to model the world and beyond](https://github.com/SciML/ModelingToolkitStandardLibrary.jl) is a good starting point.

---

<div class="post-metadata">

### Author: ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)
#### Post date: [August 22, 2024, 5:03pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426/3 "2024-08-22T17:03:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [August 22, 2024, 5:33pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426/4 "2024-08-22T17:33:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [August 22, 2024, 5:43pm UTC](https://discourse.julialang.org/t/creating-mtk-components/118426/5 "2024-08-22T17:43:49Z")

</div>

That’s just a convention, not a requirement
