| 1 | package Resimulate
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | model RL1
|
|---|
| 6 | Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 1) annotation(
|
|---|
| 7 | Placement(visible = true, transformation(origin = {-18, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 8 | Modelica.Electrical.Analog.Basic.Inductor inductor1(L = 0.1) annotation(
|
|---|
| 9 | Placement(visible = true, transformation(origin = {38, 6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 10 | Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 1) annotation(
|
|---|
| 11 | Placement(visible = true, transformation(origin = {-66, 18}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 12 | Modelica.Electrical.Analog.Basic.Ground ground1 annotation(
|
|---|
| 13 | Placement(visible = true, transformation(origin = {-66, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 14 | equation
|
|---|
| 15 | connect(resistor1.p, constantVoltage1.p) annotation(
|
|---|
| 16 | Line(points = {{-28, 36}, {-66, 36}, {-66, 28}}, color = {0, 0, 255}));
|
|---|
| 17 | connect(resistor1.n, inductor1.p) annotation(
|
|---|
| 18 | Line(points = {{-8, 36}, {38, 36}, {38, 16}}, color = {0, 0, 255}));
|
|---|
| 19 | connect(ground1.p, constantVoltage1.n) annotation(
|
|---|
| 20 | Line(points = {{-66, -22}, {-66, -22}, {-66, 8}, {-66, 8}}, color = {0, 0, 255}));
|
|---|
| 21 | connect(constantVoltage1.n, inductor1.n) annotation(
|
|---|
| 22 | Line(points = {{-66, 8}, {-66, 8}, {-66, -14}, {38, -14}, {38, -4}, {38, -4}}, color = {0, 0, 255}));
|
|---|
| 23 | annotation(
|
|---|
| 24 | Diagram(coordinateSystem(extent = {{-100, -80}, {100, 80}})),
|
|---|
| 25 | experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-07, Interval = 0.002));end RL1;
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | model RL2
|
|---|
| 29 | Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 1) annotation(
|
|---|
| 30 | Placement(visible = true, transformation(origin = {-18, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 31 | Modelica.Electrical.Analog.Basic.Inductor inductor1(L = 0.1) annotation(
|
|---|
| 32 | Placement(visible = true, transformation(origin = {38, 6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 33 | Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage1(V = 1) annotation(
|
|---|
| 34 | Placement(visible = true, transformation(origin = {-66, 18}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 35 | Modelica.Electrical.Analog.Basic.Ground ground1 annotation(
|
|---|
| 36 | Placement(visible = true, transformation(origin = {-66, -32}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 37 | equation
|
|---|
| 38 | connect(resistor1.p, constantVoltage1.p) annotation(
|
|---|
| 39 | Line(points = {{-28, 36}, {-66, 36}, {-66, 28}}, color = {0, 0, 255}));
|
|---|
| 40 | connect(resistor1.n, inductor1.p) annotation(
|
|---|
| 41 | Line(points = {{-8, 36}, {38, 36}, {38, 16}}, color = {0, 0, 255}));
|
|---|
| 42 | connect(ground1.p, constantVoltage1.n) annotation(
|
|---|
| 43 | Line(points = {{-66, -22}, {-66, -22}, {-66, 8}, {-66, 8}}, color = {0, 0, 255}));
|
|---|
| 44 | connect(constantVoltage1.n, inductor1.n) annotation(
|
|---|
| 45 | Line(points = {{-66, 8}, {-66, 8}, {-66, -14}, {38, -14}, {38, -4}, {38, -4}}, color = {0, 0, 255}));
|
|---|
| 46 | annotation(
|
|---|
| 47 | Diagram(coordinateSystem(extent = {{-100, -80}, {100, 80}})),
|
|---|
| 48 | experiment(StartTime = 0, StopTime = 2, Tolerance = 1e-07, Interval = 0.004));
|
|---|
| 49 | end RL2;
|
|---|
| 50 | annotation(
|
|---|
| 51 | Diagram(coordinateSystem(extent = {{-100, -80}, {100, 80}})),
|
|---|
| 52 | uses(Modelica(version = "3.2.2")));
|
|---|
| 53 | end Resimulate;
|
|---|