11@connector Flange begin
2- s (t)
3- f (t), [connect = Flow]
2+ s (t), [description = " Absolute position of flange " , unit = u " m " ]
3+ f (t), [connect = Flow, description = " Cut force into the flange " , unit = u " N " ]
44end
55Base. @doc """
66 Flange(;name)
@@ -13,8 +13,8 @@ Base.@doc """
1313""" Flange
1414
1515@connector Support begin
16- s (t)
17- f (t), [connect = Flow]
16+ s (t), [description = " Absolute position of the support/housing " , unit = u " m " ]
17+ f (t), [connect = Flow, description = " Cut force into the flange " , unit = u " N " ]
1818end
1919Base. @doc """
2020 Support(;name)
@@ -36,16 +36,16 @@ Partial model for the compliant connection of two translational 1-dim. flanges.
3636 - `s_rel`: [m] Relative distance (= flange_b.s - flange_a.s). It accepts an initial value, which defaults to 0.0.
3737 - `f`: [N] Force between flanges (= flange_b.f). It accepts an initial value, which defaults to 0.0.
3838"""
39- @mtkmodel PartialCompliant begin # (; name, s_rel_start = 0.0, f_start = 0.0)
39+ @mtkmodel PartialCompliant begin
4040 @components begin
4141 flange_a = Flange ()
4242 flange_b = Flange ()
4343 end
4444 @variables begin
4545 v_a (t) = 0.0
4646 v_b (t) = 0.0
47- s_rel (t) = 0.0
48- f (t) = 0.0
47+ s_rel (t) = 0.0 , [description = " Relative distance " , unit = u " m " ]
48+ f (t) = 0.0 , [description = " Force between flanges " , unit = u " N " ]
4949 end
5050 @equations begin
5151 D (flange_a. s) ~ v_a
6161
6262Partial model for the compliant connection of two translational 1-dim. flanges.
6363
64- # Parameters:
65-
66- - `s_rel_start`: [m] Initial relative distance
67- - `v_rel_start`: [m/s] Initial relative linear velocity (= der(s_rel))
68- - `a_rel_start`: [m/s²] Initial relative linear acceleration (= der(v_rel))
69- - `f_start`: [N] Initial force between flanges
64+ # States:
7065
71- # States:
72-
73- - `s_rel`: [m] Relative distance (= flange_b.phi - flange_a.phi)
74- - `v_rel`: [m/s] Relative linear velocity (= der(s_rel))
75- - `a_rel`: [m/s²] Relative linear acceleration (= der(v_rel))
66+ - `delta_s`: [m]
7667 - `f`: [N] Force between flanges (= flange_b.f)
7768"""
7869@mtkmodel PartialCompliantWithRelativeStates begin
@@ -82,7 +73,7 @@ Partial model for the compliant connection of two translational 1-dim. flanges.
8273 end
8374 @variables begin
8475 delta_s (t) = 0.0
85- f (t) = 0.0
76+ f (t) = 0.0 , [description = " Force between flanges " , unit = u " N " ]
8677 end
8778 @equations begin
8879 delta_s ~ flange_a. s - flange_b. s
@@ -107,7 +98,8 @@ Partial model for a component with one translational 1-dim. shaft flange and a s
10798@component function PartialElementaryOneFlangeAndSupport2 (; name, use_support = false )
10899 @named flange = Flange ()
109100 sys = [flange]
110- @variables s_support (t)
101+ @variables s_support (t),
102+ [description = " Absolute position of support flange" , unit = u " m" ]
111103 if use_support
112104 @named support = Support ()
113105 eqs = [support. s ~ s_support
@@ -136,7 +128,9 @@ Partial model for a component with two translational 1-dim. flanges and a suppor
136128 @named flange_a = Flange ()
137129 @named flange_b = Flange ()
138130 sys = [flange_a, flange_b]
139- @variables s_support (t) = 0.0
131+ @variables function s_support (t)
132+ 0.0 , [description = " Absolute position of support flange" , unit = u " m" ]
133+ end
140134 if use_support
141135 @named support = Support ()
142136 eqs = [support. s ~ s_support
0 commit comments