Ticket #5839: Test.mo

File Test.mo, 1.6 KB (added by massimo ceraolo, 3 years ago)
Line 
1model Test
2 Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage(V = 1, freqHz = 50) annotation(
3 Placement(visible = true, transformation(origin = {-80, -6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
4 Modelica.Electrical.Analog.Basic.Resistor resistor(R = 2) annotation(
5 Placement(visible = true, transformation(origin = {-18, -8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
6 Modelica.Electrical.Analog.Basic.Ground ground annotation(
7 Placement(visible = true, transformation(origin = {-50, -36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
8 Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 20) annotation(
9 Placement(visible = true, transformation(origin = {-50, -8}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
10equation
11 connect(resistor.n, ground.p) annotation(
12 Line(points = {{-18, -18}, {-18, -26}, {-50, -26}}, color = {0, 0, 255}));
13 connect(resistor1.n, ground.p) annotation(
14 Line(points = {{-50, -18}, {-50, -26}}, color = {0, 0, 255}));
15 connect(sineVoltage.n, ground.p) annotation(
16 Line(points = {{-80, -16}, {-80, -26}, {-50, -26}}, color = {0, 0, 255}));
17 connect(sineVoltage.p, resistor.p) annotation(
18 Line(points = {{-80, 4}, {-80, 12}, {-18, 12}, {-18, 2}}, color = {0, 0, 255}));
19 connect(resistor1.p, sineVoltage.p) annotation(
20 Line(points = {{-50, 2}, {-50, 12}, {-80, 12}, {-80, 4}}, color = {0, 0, 255}));
21
22annotation(
23 uses(Modelica(version = "3.2.3")),
24 Diagram(coordinateSystem(extent = {{-100, 20}, {0, -60}})),
25 version = "",
26 experiment(StartTime = 0, StopTime = 0.05, Tolerance = 1e-6, Interval = 0.0001));
27end Test;