@@ -13,15 +13,15 @@ Flange fixed in housing at a given position.
1313"""
1414@mtkmodel Fixed begin
1515 @parameters begin
16- s0
16+ s0
1717 end
1818
1919 @components begin
20- flange = Flange (; s = 0.0 )
20+ flange = Flange (; s = 0.0 )
2121 end
2222
2323 @equations begin
24- flange. s ~ s0
24+ flange. s ~ s0
2525 end
2626end
2727
@@ -45,12 +45,12 @@ Sliding mass with inertia
4545"""
4646@mtkmodel Mass begin
4747 @parameters begin
48- m = 0.0 , [description = " Mass of sliding mass [kg]" ]
48+ m = 0.0 , [description = " Mass of sliding mass [kg]" ]
4949 end
5050 @variables begin
51- s
52- v (t) = 0.0 , [description = " Absolute linear velocity of sliding mass [m/s]" ]
53- a (t) = 0.0 , [description = " Absolute linear acceleration of sliding mass [m/s^2]" ]
51+ s
52+ v (t) = 0.0 , [description = " Absolute linear velocity of sliding mass [m/s]" ]
53+ a (t) = 0.0 , [description = " Absolute linear acceleration of sliding mass [m/s^2]" ]
5454 end
5555 @extend flange_a, flange_b, s = pr = PartialRigid (; L = 0.0 , s = s)
5656 @equations begin
@@ -78,12 +78,12 @@ Linear 1D translational spring
7878@mtkmodel Spring begin
7979 @extend flange_a, flange_b, s_rel, f = pc = PartialCompliant ()
8080 @parameters begin
81- c = 0.0 , [description = " Spring constant [N/m]" ]
82- s_rel0 = 0.0 , [description = " Unstretched spring length [m]" ]
81+ c = 0.0 , [description = " Spring constant [N/m]" ]
82+ s_rel0 = 0.0 , [description = " Unstretched spring length [m]" ]
8383 end
8484
8585 @equations begin
86- f ~ c * (s_rel - s_rel0)
86+ f ~ c * (s_rel - s_rel0)
8787 end
8888end
8989
@@ -104,13 +104,13 @@ Linear 1D translational damper
104104@mtkmodel Damper begin
105105 @extend flange_a, flange_b, v_rel, f = pc = PartialCompliantWithRelativeStates ()
106106 @parameters begin
107- d = 0.0 , [description = " Damping constant [Ns/m]" ]
107+ d = 0.0 , [description = " Damping constant [Ns/m]" ]
108108 end
109109 @variables begin
110- lossPower (t) = 0.0 , [description = " Power dissipated by the damper [W]" ]
110+ lossPower (t) = 0.0 , [description = " Power dissipated by the damper [W]" ]
111111 end
112112 @equations begin
113- f ~ d * v_rel
114- lossPower ~ f * v_rel
113+ f ~ d * v_rel
114+ lossPower ~ f * v_rel
115115 end
116116end
0 commit comments