Skip to content

Commit ab660ce

Browse files
committed
Revert "unit removed from VariableResistor - all tests pass now"
This reverts commit fb90653.
1 parent 7e01d58 commit ab660ce

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/Electrical/Analog/ideal_components.jl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,11 @@ R = R_const + pos * R_ref * (1 + alpha * (port.T - T_ref))
391391
end
392392

393393
@parameters begin
394-
R_ref = 1.0, [description = "Resistance at temperature T_ref when fully closed (pos=1.0) (Ω)"]
395-
T_ref = 300.15, [description = "Reference temperature (K)"]
396-
R_const = 1e-3, [description = "Constant resistance between p and n (Ω)"]
394+
R_ref = 1.0,
395+
[description = "Resistance at temperature T_ref when fully closed (pos=1.0)",
396+
unit = "Ω"]
397+
T_ref = 300.15, [description = "Reference temperature", unit = "K"]
398+
R_const = 1e-3, [description = "Constant resistance between p and n", unit = "Ω"]
397399
end
398400

399401
@components begin
@@ -402,13 +404,13 @@ R = R_const + pos * R_ref * (1 + alpha * (port.T - T_ref))
402404

403405
@variables begin
404406
pos(t), [description = "Position of the wiper (normally 0-1)"]
405-
R(t), [description = "Resistance (Ω)"]
407+
R(t), [description = "Resistance", unit = "Ω"]
406408
end
407409

408410
if T_dep
409411
@parameters begin
410412
alpha = 1e-3,
411-
[description = "Temperature coefficient of resistance (K^-1)"]
413+
[description = "Temperature coefficient of resistance", unit = "K^-1"]
412414
end
413415
@components begin
414416
port = HeatPort()

0 commit comments

Comments
 (0)