new 2d lib and test

This commit is contained in:
2026-03-09 20:46:06 +01:00
parent 1312baa41d
commit befe3209bf
11 changed files with 223 additions and 773 deletions

View File

@@ -2,16 +2,23 @@ model test1d
BondGraph.J1 j1(N = 3, s = {-1, -1, 1}) annotation(
Placement(transformation(extent = {{-10, -10}, {10, 10}})));
BondGraph.R r1(R = 1) annotation(
Placement(transformation(origin = {0, 40}, extent = {{-10, -10}, {10, 10}})));
BondGraph.R r2(R = 1) annotation(
Placement(transformation(origin = {0, -40}, extent = {{-10, -10}, {10, 10}})));
BondGraph.Se se(e0 = 1) annotation(
Placement(transformation(origin = {0, 42}, extent = {{-10, -10}, {10, 10}})));
BondGraph.mSe mSe annotation(
Placement(transformation(origin = {-40, 0}, extent = {{-10, -10}, {10, 10}})));
BondGraph.C c(c = 0.1) annotation(
Placement(transformation(origin = {0, -40}, extent = {{-10, -10}, {10, 10}})));
Modelica.Blocks.Sources.Step step(startTime = 0.5) annotation(
Placement(transformation(origin = {-70, 0}, extent = {{-10, -10}, {10, 10}})));
equation
connect(j1.P[1], r1.p) annotation(
Line(points = {{0, 0}, {0, 40}}, color = {0, 0, 127}));
connect(j1.P[2], r2.p) annotation(
Line(points = {{0, 0}, {0, -40}}, color = {0, 0, 127}));
connect(se.p, j1.P[3]) annotation(
Line(points = {{0, 0}, {0, 42}}, color = {0, 0, 127}));
connect(mSe.p, j1.P[3]) annotation(
Line(points = {{-32, 0}, {0, 0}}, color = {0, 0, 127}));
connect(j1.P[2], c.p) annotation(
Line(points = {{0, 0}, {0, -40}}, color = {0, 0, 127}));
connect(step.y, mSe.e0) annotation(
Line(points = {{-58, 0}, {-40, 0}, {-40, -8}}, color = {0, 0, 127}));
annotation(
uses(Modelica(version = "4.1.0")));
end test1d;