aboutsummaryrefslogtreecommitdiffstats
path: root/modelica-parser-lalrpop/examples/modelica_models/simple_circuit.mo
blob: 7c22a35577ff656d6025c3b5d338b402ca277fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
model circuit
 Resistor R1(R=10);
 Capacitor C(C=0.01);
 Resistor R2(R=100);
 Inductor L(L=0.1);
 VsourceAC AC;
 Ground G;

equation
 connect (AC.p, R1.p); // Capacitor circuit
 connect (R1.n, C.p);
 connect (C.n, AC.n);
 connect (R1.p, R2.p); // Inductor circuit
 connect (R2.n, L.p);
 connect (L.n, C.n);
 connect (AC.n, G.p); // Ground
end circuit;