| 1 | within ;
|
|---|
| 2 | model RL
|
|---|
| 3 | Modelica.Electrical.Analog.Basic.Resistor resistor(R=2) annotation (
|
|---|
| 4 | Placement(visible=true, transformation(extent={{14,24},{34,44}},
|
|---|
| 5 | rotation=0)));
|
|---|
| 6 | Modelica.Electrical.Analog.Basic.Inductor inductor(L=0.001, i(start=1.0))
|
|---|
| 7 | annotation (Placement(visible=true, transformation(
|
|---|
| 8 | origin={58,14},
|
|---|
| 9 | extent={{-10,-10},{10,10}},
|
|---|
| 10 | rotation=270)));
|
|---|
| 11 | Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(
|
|---|
| 12 | visible=true, transformation(extent={{16,-38},{36,-18}}, rotation=0)));
|
|---|
| 13 | Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage annotation (
|
|---|
| 14 | Placement(transformation(
|
|---|
| 15 | extent={{-10,10},{10,-10}},
|
|---|
| 16 | rotation=-90,
|
|---|
| 17 | origin={-12,8})));
|
|---|
| 18 | Modelica.Blocks.Sources.Step step(
|
|---|
| 19 | offset=0,
|
|---|
| 20 | height=1,
|
|---|
| 21 | startTime=0.003)
|
|---|
| 22 | annotation (Placement(transformation(extent={{-50,-2},{-30,18}})));
|
|---|
| 23 | equation
|
|---|
| 24 | connect(inductor.p, resistor.n)
|
|---|
| 25 | annotation (Line(points={{58,24},{58,34},{34,34}}, color={0,0,255}));
|
|---|
| 26 | connect(signalVoltage.p, resistor.p)
|
|---|
| 27 | annotation (Line(points={{-12,18},{-12,34},{14,34}}, color={0,0,255}));
|
|---|
| 28 | connect(inductor.n, signalVoltage.n) annotation (Line(points={{58,4},{58,-12},
|
|---|
| 29 | {-12,-12},{-12,-2}}, color={0,0,255}));
|
|---|
| 30 | connect(ground.p, signalVoltage.n) annotation (Line(points={{26,-18},{26,-12},
|
|---|
| 31 | {-12,-12},{-12,-2}}, color={0,0,255}));
|
|---|
| 32 | connect(step.y, signalVoltage.v)
|
|---|
| 33 | annotation (Line(points={{-29,8},{-29,8},{-19,8}}, color={0,0,127}));
|
|---|
| 34 | annotation (
|
|---|
| 35 | experiment(StopTime=0.01),
|
|---|
| 36 | experimentSetupOutput,
|
|---|
| 37 | Diagram(coordinateSystem(
|
|---|
| 38 | extent={{-60,-40},{80,60}},
|
|---|
| 39 | preserveAspectRatio=true,
|
|---|
| 40 | initialScale=0.1,
|
|---|
| 41 | grid={2,2})),
|
|---|
| 42 | Icon(coordinateSystem(
|
|---|
| 43 | extent={{-60,-40},{80,60}},
|
|---|
| 44 | preserveAspectRatio=true,
|
|---|
| 45 | initialScale=0.1,
|
|---|
| 46 | grid={2,2})),
|
|---|
| 47 | uses(Modelica(version="3.2.2")));
|
|---|
| 48 | end RL;
|
|---|