Skip to content

Commit 7e286e7

Browse files
committed
Fix test
1 parent a4e119f commit 7e286e7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/components.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,22 @@ end
213213
@test structural_simplify(foo) isa ModelingToolkit.AbstractSystem
214214

215215
# BLT tests
216+
using LinearAlgebra
217+
function parallel_rc_model(i; name, source, ground, R, C)
218+
resistor = HeatingResistor(name=Symbol(:resistor, i), R=R)
219+
capacitor = Capacitor(name=Symbol(:capacitor, i), C=C)
220+
heat_capacitor = HeatCapacitor(name=Symbol(:heat_capacitor, i))
221+
222+
rc_eqs = [
223+
connect(source.p, resistor.p)
224+
connect(resistor.n, capacitor.p)
225+
connect(capacitor.n, source.n, ground.g)
226+
connect(resistor.h, heat_capacitor.h)
227+
]
228+
229+
compose(ODESystem(rc_eqs, t, name=Symbol(name, i)),
230+
[resistor, capacitor, source, ground, heat_capacitor])
231+
end
216232
V = 2.0
217233
@named source = ConstantVoltage(V=V)
218234
@named ground = Ground()

0 commit comments

Comments
 (0)