In [12]:
using Modia
using Modia.Electric
using ModiaMath.plot
In [13]:
@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 [16]:
result = simulate(LPfilter, 2);
In [17]:
plot(result, ("C.v", "V.v"))
In [ ]: