Pendulum working
This commit is contained in:
28
test.mo
28
test.mo
@@ -1,28 +0,0 @@
|
||||
model test
|
||||
BondGraphLib.J1 j1(Nin = 1, Nout = 3) annotation(
|
||||
Placement(transformation(extent = {{-10, -10}, {10, 10}})));
|
||||
BondGraphLib.R r annotation(
|
||||
Placement(transformation(origin = {0, 40}, extent = {{-10, -10}, {10, 10}})));
|
||||
BondGraphLib.C c(c = 0.5) annotation(
|
||||
Placement(transformation(origin = {0, -40}, extent = {{-10, -10}, {10, 10}})));
|
||||
Modelica.Blocks.Sources.Step step(height = 1, startTime = 1) annotation(
|
||||
Placement(transformation(origin = {-90, 0}, extent = {{-10, -10}, {10, 10}})));
|
||||
BondGraphLib.mSe mSe annotation(
|
||||
Placement(transformation(origin = {-40, 0}, extent = {{-10, -10}, {10, 10}})));
|
||||
BondGraphLib.I i(I = 0.1) annotation(
|
||||
Placement(transformation(origin = {40, 0}, extent = {{-10, -10}, {10, 10}})));
|
||||
equation
|
||||
connect(j1.Pout[1], c.p) annotation(
|
||||
Line(points = {{0, 8}, {0, -32}}, color = {0, 0, 127}));
|
||||
connect(j1.Pout[2], r.p) annotation(
|
||||
Line(points = {{0, 8}, {0, 48}}, color = {0, 0, 127}));
|
||||
connect(mSe.p, j1.Pin[1]) annotation(
|
||||
Line(points = {{-32, 0}, {0, 0}, {0, 8}}, color = {0, 0, 127}));
|
||||
connect(step.y, mSe.e0) annotation(
|
||||
Line(points = {{-78, 0}, {-40, 0}, {-40, -8}}, color = {0, 0, 127}));
|
||||
connect(i.p, j1.Pout[3]) annotation(
|
||||
Line(points = {{40, 8}, {40, 0}, {0, 0}, {0, 8}}, color = {0, 0, 127}));
|
||||
annotation(
|
||||
uses(Modelica(version = "4.1.0")),
|
||||
experiment(StartTime = 0, StopTime = 12, Tolerance = 1e-06, Interval = 0.024));
|
||||
end test;
|
||||
Reference in New Issue
Block a user