In [1]:
using Modia
using Modia.Electric
using ModiaMath.plot
In [2]:
@model LPfilter begin
R=Resistor(R=100.0)
C=Capacitor(C=2.5E-3)
V=ConstantVoltage(V=10.0)
@equations begin
connect(V.p, R.p)
connect(R.n, C.p)
connect(C.n, V.n)
end
end;
In [3]:
result = simulate(LPfilter, 2);
In [9]:
plot(result, ("C.v", "V.v"))
In [ ]: