You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/lectures/lecture1.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -384,12 +384,18 @@ Now the `Mass` and `Damper` components can be assembled in a system and connecte
384
384
end
385
385
386
386
@mtkbuild sys = System(;v=100, m=5, d=3)
387
+
nothing # hide
388
+
```
389
+
390
+

391
+
392
+
Here we arrive at the following equations
393
+
```@example l1
387
394
full_equations(sys)
388
395
```
389
396
390
397
As can be seen we arrive at the same equation as derived previously. Now it would be easy to define a system that adds a spring, or has a series of connected masses, springs, dampers, etc.
391
398
392
-
393
399
The `Damper` component created previously was a little incomplete because it only had one port. In reality a damper or spring will be connected between 2 objects, for example the car frame and the wheel. Therefore a proper component will define 2 ports so that the component can be as analogous with real life as possible. In the example below the component is defined properly with 2 ports. Note the velocity of the component `v` is defined as a relative velocity between the 2 ports. It's easy to understand how this works if it's assumed that `port_b` is connected to a stationary reference frame.
394
400
395
401
```@example l1
@@ -550,6 +556,13 @@ Now let's assemble a *mass-spring-damper* system with the full collection of com
550
556
end
551
557
552
558
@mtkbuild sys = System()
559
+
```
560
+
561
+

562
+
563
+
Solving the system gives a plot of the 2 solved uknowns.
As an example, the `MassSpringDamper` component can be connected in series to make a complex system. One can imagine then how this enables easy construction of complex models that can be quickly modified, extremely useful for the application of model based design.
624
639
625
640
```@example l1
@@ -644,6 +659,14 @@ As an example, the `MassSpringDamper` component can be connected in series to ma
0 commit comments