Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7402 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
1 changed file
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
model dcmotor | ||
Modelica.Electrical.Analog.Basic.Resistor r1(R=10); | ||
Modelica.Electrical.Analog.Basic.Inductor i1; | ||
Modelica.Electrical.Analog.Basic.EMF emf1; | ||
Modelica.Mechanics.Rotational.Inertia load; | ||
Modelica.Electrical.Analog.Basic.Ground g; | ||
Modelica.Electrical.Analog.Sources.ConstantVoltage v; | ||
Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 10); | ||
//Observe the difference between MSL 2.2 and 3.1 regarding the default values, in 3.1 there are no default values set, only start values | ||
Modelica.Electrical.Analog.Basic.Inductor inductor1(L = 0.2); | ||
Modelica.Electrical.Analog.Basic.Ground ground1; | ||
Modelica.Mechanics.Rotational.Components.Inertia load(J = 1); // Modelica version 3.1 | ||
// Modelica.Mechanics.Rotational.Inertia load(J = 1); // Modelica version 2.2 | ||
Modelica.Electrical.Analog.Basic.EMF emf1; | ||
Modelica.Blocks.Sources.Step step1; | ||
Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage1; | ||
equation | ||
connect(v.p, r1.p); | ||
connect(v.n, g.p); | ||
connect(r1.n, i1.p); | ||
connect(i1.n, emf1.p); | ||
connect(emf1.n, g.p); | ||
connect(emf1.flange_b, load.flange_a); | ||
//connect(step1.outport, signalVoltage1.inPort); | ||
connect(step1.y, signalVoltage1.v); | ||
connect(signalVoltage1.p, resistor1.p); | ||
connect(resistor1.n, inductor1.p); | ||
connect(inductor1.n, emf1.p); | ||
// connect(emf1.flange_b, load.flange_a); //Modelica version 2.2 | ||
connect(emf1.flange, load.flange_a); // Modelica version 3.1 | ||
connect(signalVoltage1.n, ground1.p); | ||
connect(ground1.p, emf1.n); | ||
end dcmotor; |