Skip to content

Commit 8fdad94

Browse files
ven-kAayushSabharwal
authored andcommitted
metadata(components): adds units and descriptions to Rotational components
1 parent 9381c29 commit 8fdad94

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/Mechanical/Rotational/components.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Linear 1D rotational spring
9494
@symcheck c > 0 || throw(ArgumentError("Expected `c` to be positive"))
9595
end
9696
@parameters begin
97-
c, [description = "Spring constant", unit = u"N*m"]
97+
c, [description = "Spring constant", unit = u"N*m*rad^-1"]
9898
phi_rel0 = 0.0, [description = "Unstretched spring angle", unit = u"rad"]
9999
end
100100
@equations begin

src/Mechanical/Rotational/sources.jl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,21 @@ Constant torque source
6565
tau_constant,
6666
[
6767
description = "Constant torque (if negative, torque is acting as load in positive direction of rotation)",
68-
unit = u"N*m"
68+
unit = u"N*m",
6969
]
7070
end
7171
@extend flange, phi = partial_element = PartialTorque(; use_support = false)
7272
@variables begin
73-
tau(t), [description = "Accelerating torque acting at flange (= -flange.tau)",
74-
unit = u"N*m"]
75-
w(t), [description = "Angular velocity of flange with respect to support",
76-
unit = u"rad*s^-1"]
73+
tau(t),
74+
[
75+
description = "Accelerating torque acting at flange (= -flange.tau)",
76+
unit = u"N*m",
77+
]
78+
w(t),
79+
[
80+
description = "Angular velocity of flange with respect to support",
81+
unit = u"rad*s^-1",
82+
]
7783
end
7884
@equations begin
7985
w ~ D(phi)

0 commit comments

Comments
 (0)