@@ -1930,11 +1930,12 @@ export function SimulationResultsView({
);
const itemUnitOptions =
resultUnitOptions(item);
- const itemUnit = resolveResultUnitOption(
- item,
- chartWindow.variableUnits[item.key] ??
- item.unit,
- );
+ const itemUnit = isMixed
+ ? resolveResultUnitOption(
+ item,
+ chartWindow.variableUnits[item.key] ?? item.unit,
+ )
+ : selectedUnit;
return (
({ ...point }));
- if (cornerIndex <= 0 || cornerIndex >= nextPoints.length - 1) {
- return nextPoints;
- }
- const previous = nextPoints[cornerIndex - 1];
- const corner = nextPoints[cornerIndex];
- const incomingAxis = edgeSegmentAxis(previous, corner);
- const outgoingAxis = edgeSegmentAxis(
- corner,
- nextPoints[cornerIndex + 1],
- );
-
- corner.x += delta.x;
- corner.y += delta.y;
-
- if (cornerIndex > 1) {
- if (incomingAxis === "horizontal") {
- previous.y = corner.y;
- } else {
- previous.x = corner.x;
- }
- } else if (incomingAxis === "horizontal") {
- const middleX =
- Math.abs(previous.x - corner.x) > ROUTE_EPSILON
- ? (previous.x + corner.x) / 2
- : previous.x + 20;
- nextPoints.splice(
- cornerIndex,
- 0,
- { x: middleX, y: previous.y },
- { x: middleX, y: corner.y },
- );
- cornerIndex += 2;
- } else {
- const middleY =
- Math.abs(previous.y - corner.y) > ROUTE_EPSILON
- ? (previous.y + corner.y) / 2
- : previous.y + 20;
- nextPoints.splice(
- cornerIndex,
- 0,
- { x: previous.x, y: middleY },
- { x: corner.x, y: middleY },
- );
- cornerIndex += 2;
- }
-
- const movedCorner = nextPoints[cornerIndex];
- const following = nextPoints[cornerIndex + 1];
- if (cornerIndex < nextPoints.length - 2) {
- if (outgoingAxis === "horizontal") {
- following.y = movedCorner.y;
- } else {
- following.x = movedCorner.x;
- }
- } else if (outgoingAxis === "horizontal") {
- const middleX =
- Math.abs(movedCorner.x - following.x) > ROUTE_EPSILON
- ? (movedCorner.x + following.x) / 2
- : following.x - 20;
- nextPoints.splice(
- cornerIndex + 1,
- 0,
- { x: middleX, y: movedCorner.y },
- { x: middleX, y: following.y },
- );
- } else {
- const middleY =
- Math.abs(movedCorner.y - following.y) > ROUTE_EPSILON
- ? (movedCorner.y + following.y) / 2
- : following.y - 20;
- nextPoints.splice(
- cornerIndex + 1,
- 0,
- { x: movedCorner.x, y: middleY },
- { x: following.x, y: middleY },
- );
- }
- return simplifyOrthogonalPoints(nextPoints);
-}
-
/** Creates a movable dogleg when a selected route is still a straight line. */
export function createOrthogonalSegmentDetour(
points: EdgeRoutePoint[],
diff --git a/frontend/src/styles.css b/frontend/src/styles.css
index 7502358..b0a2a76 100644
--- a/frontend/src/styles.css
+++ b/frontend/src/styles.css
@@ -3767,23 +3767,6 @@ textarea {
cursor: ew-resize;
}
-.manual-edge-route-handle,
-.manual-edge-corner-handle {
- fill: #ffffff;
- stroke: #1675c1;
- stroke-width: 2;
- cursor: move;
- pointer-events: all;
- touch-action: none;
- vector-effect: non-scaling-stroke;
-}
-
-.manual-edge-corner-handle:hover,
-.manual-edge-route-handle:hover {
- fill: #d9edff;
- stroke: #0f5f9f;
-}
-
.flow-canvas.connection-planning .react-flow__pane {
cursor: crosshair;
}
diff --git a/frontend/tests/e2e/component-symbols.spec.ts b/frontend/tests/e2e/component-symbols.spec.ts
index 401b994..38a56e3 100644
--- a/frontend/tests/e2e/component-symbols.spec.ts
+++ b/frontend/tests/e2e/component-symbols.spec.ts
@@ -1,4 +1,5 @@
import { expect, test, type Locator, type Page } from "@playwright/test";
+import { readFileSync } from "node:fs";
import { expandSimulationConsole } from "./fixtures";
@@ -2439,8 +2440,8 @@ test("PN3NODE2 与 P4NODE2 使用参考图直线汇流结构且粗线对应 port
anchors: [
{ portName: "port_1", x: 32, y: 11.2 },
{ portName: "port_2", x: 19.2, y: 24 },
- { portName: "port_3", x: 44.8, y: 24 },
- { portName: "port_4", x: 32, y: 36.8 },
+ { portName: "port_3", x: 32, y: 36.8 },
+ { portName: "port_4", x: 44.8, y: 24 },
],
center: { x: 32, y: 24 },
finePath: "M32 11.2V36.8M32 24H44.8M19.2 24H22.1",
@@ -2448,8 +2449,8 @@ test("PN3NODE2 与 P4NODE2 使用参考图直线汇流结构且粗线对应 port
positions: {
port_1: "top",
port_2: "left",
- port_3: "right",
- port_4: "bottom",
+ port_3: "bottom",
+ port_4: "right",
},
thickPath: "M22.1 24H32",
},
@@ -2505,6 +2506,57 @@ test("PN3NODE2 与 P4NODE2 使用参考图直线汇流结构且粗线对应 port
}
});
+test("P4NODE2 的真实 Handle 在 180° 时匹配 AME 四口方位,镜像后参考粗线仍指向 port_2", async ({ page }) => {
+ const source = JSON.parse(readFileSync(new URL(
+ "../../../tests/model_audit/p4node2-ame-geometry.json", import.meta.url,
+ ), "utf8")) as {
+ components: Array<{ geometry: number; ports: Record
}>;
+ };
+ // Independent AME COMP_PORT/PORT_POS coordinates, rather than frontend anchors.
+ const amePorts = source.components[0].ports;
+ for (const component of source.components) {
+ expect(component.geometry).toBe(1);
+ expect(component.ports).toEqual(amePorts);
+ }
+ const ameCenter = Object.values(amePorts).reduce(
+ (sum, port) => ({ x: sum.x + port.x / 4, y: sum.y + port.y / 4 }),
+ { x: 0, y: 0 },
+ );
+ await page.goto("/");
+ const node = await dragSymbolToCanvas(page, "amesim_p4node2", { x: 460, y: 320 });
+ const rotate = page.getByRole("button", { name: "顺时针旋转 90° (Ctrl+R)", exact: true });
+ await rotate.click();
+ await rotate.click();
+ const svg = node.locator('[data-component-symbol="amesim_p4node2"] svg');
+ const getDirection = async (portName: string) => {
+ const center = await locatorCenter(svg.locator('[data-junction-part="center"]'));
+ const handle = await locatorCenter(node.locator(`.port-handle[data-port-name="${portName}"]`));
+ const length = Math.hypot(handle.x - center.x, handle.y - center.y);
+ expect(length).toBeGreaterThan(1);
+ return { x: (handle.x - center.x) / length, y: (handle.y - center.y) / length };
+ };
+ for (const [portName, coordinate] of Object.entries(amePorts)) {
+ const length = Math.hypot(coordinate.x - ameCenter.x, coordinate.y - ameCenter.y);
+ await expect.poll(async () => {
+ const actual = await getDirection(portName);
+ return Math.hypot(actual.x - (coordinate.x - ameCenter.x) / length,
+ actual.y - (coordinate.y - ameCenter.y) / length);
+ }).toBeLessThan(0.02);
+ }
+ const expectReferenceStroke = async () => {
+ const center = await locatorCenter(svg.locator('[data-junction-part="center"]'));
+ const stroke = await locatorCenter(svg.locator('[data-junction-part="collector-branch"]'));
+ const reference = await getDirection("port_2");
+ const length = Math.hypot(stroke.x - center.x, stroke.y - center.y);
+ expect((stroke.x - center.x) * reference.x + (stroke.y - center.y) * reference.y).toBeGreaterThan(0);
+ expect(Math.abs((stroke.x - center.x) * reference.y - (stroke.y - center.y) * reference.x) / length).toBeLessThan(0.02);
+ };
+ await expectReferenceStroke();
+ await page.getByRole("button", { name: "水平镜像 (Shift+H)", exact: true }).click();
+ await expect.poll(async () => (await getDirection("port_2")).x).toBeLessThan(-0.99);
+ await expectReferenceStroke();
+});
+
test("PNL00R 与 PNL0001-0003 使用 standard 画布和 60% 工作区占比", async ({
page,
}) => {
diff --git a/frontend/tests/e2e/edge-interactions.spec.ts b/frontend/tests/e2e/edge-interactions.spec.ts
index ed50a0c..d49d8cf 100644
--- a/frontend/tests/e2e/edge-interactions.spec.ts
+++ b/frontend/tests/e2e/edge-interactions.spec.ts
@@ -272,7 +272,7 @@ test("复制块保留内部连接,同时未连接端口仍参与待放置吸
await expect(targetPort).toHaveAttribute("data-connected", "true");
});
-test("正交连接线可拖动内部线段,且无连接交叉点显示跨线桥", async ({
+test("选中正交连接线不显示拐点,仍可拖动线段、撤销并保存跨线桥路由", async ({
page,
}) => {
const project = {
@@ -342,6 +342,7 @@ test("正交连接线可拖动内部线段,且无连接交叉点显示跨线
.locator(".react-flow__edge-interaction")
.dispatchEvent("click");
await expect(horizontalEdge).toHaveClass(/selected|editor-edge-selected/);
+ await expect(horizontalEdge.locator("circle")).toHaveCount(0);
const horizontalSegment = horizontalEdge
.locator(".manual-edge-segment-handle.horizontal")
.first();
@@ -404,125 +405,21 @@ test("正交连接线可拖动内部线段,且无连接交叉点显示跨线
pathBeforeVerticalDrag ?? "",
);
- const cornerHandle = horizontalEdge.locator(
- '.manual-edge-corner-handle[data-corner-index="2"]',
- );
- await expect(cornerHandle).toHaveCount(1);
- const cornerBefore = await cornerHandle.evaluate(
- (circle: SVGCircleElement) => ({
- flowX: circle.cx.baseVal.value,
- flowY: circle.cy.baseVal.value,
- screen: (() => {
- const matrix = circle.getScreenCTM();
- if (!matrix) {
- throw new Error("无法获取连接线拐点坐标");
- }
- const point = new DOMPoint(
- circle.cx.baseVal.value,
- circle.cy.baseVal.value,
- ).matrixTransform(matrix);
- return { x: point.x, y: point.y };
- })(),
- }),
- );
- const pathBeforeCornerDrag = await horizontalPath.getAttribute("d");
- await page.mouse.move(cornerBefore.screen.x, cornerBefore.screen.y);
- await page.mouse.down();
- await page.mouse.move(
- cornerBefore.screen.x + 32,
- cornerBefore.screen.y + 24,
- { steps: 6 },
- );
- await page.mouse.up();
- await expect(horizontalPath).not.toHaveAttribute(
- "d",
- pathBeforeCornerDrag ?? "",
- );
- const cornerAfter = await cornerHandle.evaluate(
- (circle: SVGCircleElement) => ({
- flowX: circle.cx.baseVal.value,
- flowY: circle.cy.baseVal.value,
- }),
- );
- expect(Math.abs(cornerAfter.flowX - cornerBefore.flowX)).toBeGreaterThan(1);
- expect(Math.abs(cornerAfter.flowY - cornerBefore.flowY)).toBeGreaterThan(1);
-
+ const pathAfterSegmentDrags = await horizontalPath.getAttribute("d");
+ await expect(horizontalEdge.locator("circle")).toHaveCount(0);
await page.keyboard.press("Control+z");
await expect(horizontalPath).toHaveAttribute(
"d",
- pathBeforeCornerDrag ?? "",
+ pathBeforeVerticalDrag ?? "",
);
- await horizontalEdge
- .locator(".react-flow__edge-interaction")
- .dispatchEvent("click");
- await expect(horizontalEdge).toHaveClass(/selected|editor-edge-selected/);
-
- const boundaryCorner = horizontalEdge.locator(
- '.manual-edge-corner-handle[data-corner-index="1"]',
- );
- await expect(boundaryCorner).toHaveCount(1);
- const boundaryStart = await boundaryCorner.evaluate(
- (circle: SVGCircleElement) => {
- const matrix = circle.getScreenCTM();
- if (!matrix) {
- throw new Error("无法获取端点相邻拐点坐标");
- }
- const point = new DOMPoint(
- circle.cx.baseVal.value,
- circle.cy.baseVal.value,
- ).matrixTransform(matrix);
- return { x: point.x, y: point.y };
- },
- );
- const boundaryPathLocator = horizontalEdge.locator(".react-flow__edge-path");
- const boundaryPathBefore = await boundaryPathLocator.getAttribute("d");
- const boundaryTarget = {
- x: boundaryStart.x + 38,
- y: boundaryStart.y + 30,
- };
- await page.mouse.move(boundaryStart.x, boundaryStart.y);
- await page.mouse.down();
- await page.mouse.move(
- (boundaryStart.x + boundaryTarget.x) / 2,
- (boundaryStart.y + boundaryTarget.y) / 2,
- { steps: 4 },
- );
- await page.mouse.move(boundaryTarget.x, boundaryTarget.y, { steps: 4 });
- await page.mouse.up();
- await expect(boundaryPathLocator).not.toHaveAttribute(
+ await page.keyboard.press("Control+y");
+ await expect(horizontalPath).toHaveAttribute(
"d",
- boundaryPathBefore ?? "",
+ pathAfterSegmentDrags ?? "",
);
- await expect(boundaryPathLocator).toHaveAttribute("d", / Q /);
- const cornerScreenPoints = await horizontalEdge
- .locator(".manual-edge-corner-handle")
- .evaluateAll((circles: SVGCircleElement[]) =>
- circles.map((circle) => {
- const matrix = circle.getScreenCTM();
- if (!matrix) {
- throw new Error("无法获取调整后的拐点坐标");
- }
- const point = new DOMPoint(
- circle.cx.baseVal.value,
- circle.cy.baseVal.value,
- ).matrixTransform(matrix);
- return { x: point.x, y: point.y };
- }),
- );
- const closestCornerDistance = Math.min(
- ...cornerScreenPoints.map((point) =>
- Math.hypot(point.x - boundaryTarget.x, point.y - boundaryTarget.y),
- ),
- );
- expect(
- closestCornerDistance,
- JSON.stringify({ boundaryStart, boundaryTarget, cornerScreenPoints }),
- ).toBeLessThan(3);
-
- const boundaryPathAfter = await boundaryPathLocator.getAttribute("d");
const linePoints = [
- ...(boundaryPathAfter ?? "").matchAll(
+ ...(pathAfterSegmentDrags ?? "").matchAll(
/[ML]\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)/g,
),
].map((match) => ({ x: Number(match[1]), y: Number(match[2]) }));
@@ -623,110 +520,127 @@ test("缩小画布后连接线端点仍与端口图标边缘对齐", async ({ pa
expect(alignment!.targetGapY).toBeLessThan(0.75);
});
-test("直线首次折弯后即使原手柄卸载,拖动仍连续且保持正交", async ({
- page,
-}) => {
- const project = {
- ...structuredClone(wideProject),
- nodes: [
- projectNode("straight-source", 0, 260),
- projectNode("straight-target", 700, 260),
- ],
- edges: [
- {
- id: "straight-edge",
- source: "straight-source",
- target: "straight-target",
- sourceHandle: "port_b",
- targetHandle: "port_a",
- data: { isContactEdge: false },
- },
- ],
- };
- await page.addInitScript((storedProject) => {
- window.localStorage.setItem(
- "system-simulation-flow:project:demo-system",
- JSON.stringify(storedProject),
+for (const route of [
+ { label: "直线", targetY: 260, targetRotation: 0, pointCount: 2 },
+ { label: "L 型连接线", targetY: 480, targetRotation: 90, pointCount: 3 },
+]) {
+ test(`${route.label}可直接拖动线条,首次折弯后仍连续且保持正交`, async ({
+ page,
+ }) => {
+ const project = {
+ ...structuredClone(wideProject),
+ nodes: [
+ projectNode("straight-source", 0, 260),
+ {
+ ...projectNode("straight-target", 700, route.targetY),
+ data: {
+ ...projectNode("straight-target", 700, route.targetY).data,
+ rotation: route.targetRotation,
+ },
+ },
+ ],
+ edges: [
+ {
+ id: "straight-edge",
+ source: "straight-source",
+ target: "straight-target",
+ sourceHandle: "port_b",
+ targetHandle: "port_a",
+ data: { isContactEdge: false },
+ },
+ ],
+ };
+ await page.addInitScript((storedProject) => {
+ window.localStorage.setItem(
+ "system-simulation-flow:project:demo-system",
+ JSON.stringify(storedProject),
+ );
+ }, project);
+ await page.goto("/");
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+
+ const edge = page.locator(
+ '.flow-canvas .react-flow__edge[data-id="straight-edge"]',
);
- }, project);
- await page.goto("/");
- await page.getByRole("button", { name: "加载工程", exact: true }).click();
-
- const edge = page.locator(
- '.flow-canvas .react-flow__edge[data-id="straight-edge"]',
- );
- const edgePath = edge.locator(".react-flow__edge-path");
- await edge.locator(".react-flow__edge-interaction").dispatchEvent("click");
- const routeHandle = edge.locator(".manual-edge-route-handle");
- await expect(routeHandle).toHaveCount(1);
- const dragStart = await routeHandle.evaluate((circle: SVGCircleElement) => {
- const matrix = circle.getScreenCTM();
- if (!matrix) {
- throw new Error("无法获取直线路由手柄坐标");
- }
- const point = new DOMPoint(
- circle.cx.baseVal.value,
- circle.cy.baseVal.value,
- ).matrixTransform(matrix);
- return { x: point.x, y: point.y };
- });
- const pathBefore = await edgePath.getAttribute("d");
- await page.mouse.move(dragStart.x, dragStart.y);
- await page.mouse.down();
- await page.mouse.move(dragStart.x + 18, dragStart.y + 21, { steps: 4 });
-
- await expect(routeHandle).toHaveCount(0);
- const verticalSegment = edge
- .locator(".manual-edge-segment-handle.vertical")
- .first();
- await expect(verticalSegment).toHaveCount(1);
- const segmentXAtHalfMove = await verticalSegment.evaluate(
- (line: SVGLineElement) => {
+ const edgePath = edge.locator(".react-flow__edge-path");
+ await edge.locator(".react-flow__edge-interaction").dispatchEvent("click");
+ await expect(edge.locator("circle")).toHaveCount(0);
+ const routeHandle = edge.locator(
+ '.manual-edge-segment-handle[data-segment-index="0"]',
+ );
+ await expect(routeHandle).toHaveCount(1);
+ await expect(routeHandle).toHaveCSS("pointer-events", "stroke");
+ const dragStart = await routeHandle.evaluate((line: SVGLineElement) => {
const matrix = line.getScreenCTM();
if (!matrix) {
- throw new Error("无法获取首次折弯后的竖直线段坐标");
+ throw new Error("无法获取待拖动连接线段坐标");
}
- return new DOMPoint(
- line.x1.baseVal.value,
- line.y1.baseVal.value,
- ).matrixTransform(matrix).x;
- },
- );
+ const point = new DOMPoint(
+ line.x1.baseVal.value * 0.75 + line.x2.baseVal.value * 0.25,
+ line.y1.baseVal.value * 0.75 + line.y2.baseVal.value * 0.25,
+ ).matrixTransform(matrix);
+ return { x: point.x, y: point.y };
+ });
+ const pathBefore = await edgePath.getAttribute("d");
+ expect([...(pathBefore ?? "").matchAll(/[ML]\s/g)]).toHaveLength(route.pointCount);
+ await page.mouse.move(dragStart.x, dragStart.y);
+ await page.mouse.down();
+ await page.mouse.move(dragStart.x + 18, dragStart.y + 21, { steps: 4 });
- await page.mouse.move(dragStart.x + 36, dragStart.y + 42, { steps: 4 });
- const segmentXAtFullMove = await verticalSegment.evaluate(
- (line: SVGLineElement) => {
- const matrix = line.getScreenCTM();
- if (!matrix) {
- throw new Error("无法获取连续拖动后的竖直线段坐标");
- }
- return new DOMPoint(
- line.x1.baseVal.value,
- line.y1.baseVal.value,
- ).matrixTransform(matrix).x;
- },
- );
- await page.mouse.up();
- expect(Math.abs(segmentXAtFullMove - segmentXAtHalfMove)).toBeGreaterThan(10);
- await expect(edgePath).not.toHaveAttribute("d", pathBefore ?? "");
- await expect(
- edge.locator(".manual-edge-segment-handle.horizontal").first(),
- ).toHaveCount(1);
+ await expect(routeHandle).toHaveCount(0);
+ const verticalSegment = edge
+ .locator(".manual-edge-segment-handle.vertical")
+ .first();
+ await expect(verticalSegment).toHaveCount(1);
+ const segmentXAtHalfMove = await verticalSegment.evaluate(
+ (line: SVGLineElement) => {
+ const matrix = line.getScreenCTM();
+ if (!matrix) {
+ throw new Error("无法获取首次折弯后的竖直线段坐标");
+ }
+ return new DOMPoint(
+ line.x1.baseVal.value,
+ line.y1.baseVal.value,
+ ).matrixTransform(matrix).x;
+ },
+ );
- const routeAfter = await edgePath.getAttribute("d");
- const routePoints = [
- ...(routeAfter ?? "").matchAll(
- /[ML]\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)/g,
- ),
- ].map((match) => ({ x: Number(match[1]), y: Number(match[2]) }));
- routePoints.slice(1).forEach((point, index) => {
- const previous = routePoints[index];
- expect(
- Math.abs(point.x - previous.x) < 0.01 ||
- Math.abs(point.y - previous.y) < 0.01,
- ).toBe(true);
+ await page.mouse.move(dragStart.x + 36, dragStart.y + 42, { steps: 4 });
+ const segmentXAtFullMove = await verticalSegment.evaluate(
+ (line: SVGLineElement) => {
+ const matrix = line.getScreenCTM();
+ if (!matrix) {
+ throw new Error("无法获取连续拖动后的竖直线段坐标");
+ }
+ return new DOMPoint(
+ line.x1.baseVal.value,
+ line.y1.baseVal.value,
+ ).matrixTransform(matrix).x;
+ },
+ );
+ await page.mouse.up();
+ expect(Math.abs(segmentXAtFullMove - segmentXAtHalfMove)).toBeGreaterThan(10);
+ await expect(edgePath).not.toHaveAttribute("d", pathBefore ?? "");
+ await expect(edge.locator("circle")).toHaveCount(0);
+ await expect(
+ edge.locator(".manual-edge-segment-handle.horizontal").first(),
+ ).toHaveCount(1);
+
+ const routeAfter = await edgePath.getAttribute("d");
+ const routePoints = [
+ ...(routeAfter ?? "").matchAll(
+ /[ML]\s+(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)/g,
+ ),
+ ].map((match) => ({ x: Number(match[1]), y: Number(match[2]) }));
+ routePoints.slice(1).forEach((point, index) => {
+ const previous = routePoints[index];
+ expect(
+ Math.abs(point.x - previous.x) < 0.01 ||
+ Math.abs(point.y - previous.y) < 0.01,
+ ).toBe(true);
+ });
});
-});
+}
test("同一组件不同端口发出的线路在远端交叉时仍显示跨线桥", async ({
page,
diff --git a/frontend/tests/e2e/fit-view.spec.ts b/frontend/tests/e2e/fit-view.spec.ts
index 7fa791c..6b3edb8 100644
--- a/frontend/tests/e2e/fit-view.spec.ts
+++ b/frontend/tests/e2e/fit-view.spec.ts
@@ -1,5 +1,5 @@
import { expect, test, type Page } from "@playwright/test";
-import { existsSync, readFileSync } from "node:fs";
+import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import {
expectAllNodesInsideCanvas,
@@ -22,12 +22,9 @@ type ImportedProject = {
edges: ImportedProjectEdge[];
};
-const MQL_8_PROJECT_PATHS = [
- new URL("../../../tests/data/test-mql-8%20.json", import.meta.url),
- new URL("../../../tests/data/test-mql-8.json", import.meta.url),
-].map(fileURLToPath);
-const MQL_8_PROJECT_PATH =
- MQL_8_PROJECT_PATHS.find(existsSync) ?? MQL_8_PROJECT_PATHS[0];
+const MQL_8_PROJECT_PATH = fileURLToPath(
+ new URL("../../../tests/fixtures/legacy/test-mql-8.json", import.meta.url),
+);
const mql8Project = JSON.parse(
readFileSync(MQL_8_PROJECT_PATH, "utf8"),
) as ImportedProject;
diff --git a/frontend/tests/e2e/parameter-table.spec.ts b/frontend/tests/e2e/parameter-table.spec.ts
index 39f6127..feb939d 100644
--- a/frontend/tests/e2e/parameter-table.spec.ts
+++ b/frontend/tests/e2e/parameter-table.spec.ts
@@ -210,8 +210,8 @@ test("组件参数和仿真设置使用共享的三列表格", async ({ page })
const solver = page.getByLabel("求解器", { exact: true });
await expect(solver).toHaveCSS("text-align", "right");
await expect(solver).toHaveCSS("text-align-last", "right");
- await solver.selectOption("Radau");
- await expect(solver).toHaveValue("Radau");
+ await solver.selectOption("RK45");
+ await expect(solver).toHaveValue("RK45");
});
test("通用离散选项按多条件控制参数行且保留隐藏值和未知旧值", async ({
diff --git a/frontend/tests/e2e/pressure-units.spec.ts b/frontend/tests/e2e/pressure-units.spec.ts
new file mode 100644
index 0000000..6b2151e
--- /dev/null
+++ b/frontend/tests/e2e/pressure-units.spec.ts
@@ -0,0 +1,198 @@
+import { expect, test, type Page } from "@playwright/test";
+import { expandSimulationConsole, prepareApp, wideProject } from "./fixtures";
+
+const componentId = "amesim_pneumatic_test_1";
+const pressureInput = (page: Page) =>
+ page.getByLabel("参考压力", { exact: true });
+const pressureUnit = (page: Page) =>
+ page.getByLabel("参考压力单位", { exact: true });
+const selectPressureComponent = (page: Page) =>
+ page.locator(`.flow-canvas .react-flow__node[data-id="${componentId}"]`).click();
+
+type ExportedProject = {
+ nodes: Array<{
+ data: {
+ parameters: Record;
+ parameterUnits: Record;
+ };
+ }>;
+};
+
+async function exportProject(page: Page) {
+ const downloadPromise = page.waitForEvent("download");
+ await page.getByRole("button", { name: "导出工程 JSON", exact: true }).click();
+ const download = await downloadPromise;
+ const stream = await download.createReadStream();
+ if (!stream) throw new Error("无法读取导出的工程 JSON");
+ const chunks: Buffer[] = [];
+ for await (const chunk of stream) chunks.push(Buffer.from(chunk));
+ const buffer = Buffer.concat(chunks);
+ return {
+ buffer,
+ project: JSON.parse(buffer.toString("utf8")) as ExportedProject,
+ };
+}
+
+async function expectPressureXml(page: Page, expectedValue: number) {
+ await page.getByRole("button", { name: "生成系统 XML", exact: true }).click();
+ await expandSimulationConsole(page);
+ await expect(page.getByLabel("生成的系统 XML").last()).toContainText(
+ ` {
+ await prepareApp(page);
+ await page.goto("/");
+ await expect(
+ page.getByRole("button", { name: "AMESim 气动测试元件", exact: true }),
+ ).toBeVisible();
+});
+
+test("压力默认显示 Pa,bar 与 Pa 换算保持绝压且无大气压偏移", async ({ page }) => {
+ await addPressureComponent(page);
+ await expect(pressureUnit(page)).toHaveValue("Pa");
+ await expect(pressureInput(page)).toHaveValue("100000");
+ await expect(pressureUnit(page).locator('option[value="barA"]')).toHaveCount(0);
+ await pressureUnit(page).selectOption("bar");
+ await expect(pressureInput(page)).toHaveValue("1");
+ await pressureInput(page).fill("2.5");
+ await pressureInput(page).press("Enter");
+ await expectPressureXml(page, 250000);
+
+ for (const { unit, value } of [
+ { unit: "Pa", value: "250000" },
+ { unit: "kPa", value: "250" },
+ { unit: "MPa", value: "0.25" },
+ { unit: "bar", value: "2.5" },
+ ]) {
+ await pressureUnit(page).selectOption(unit);
+ await expect(pressureInput(page)).toHaveValue(value);
+ await expectPressureXml(page, 250000);
+ }
+ const exported = await exportProject(page);
+ expect(exported.project.nodes[0].data.parameters.reference_pressure).toBe(250000);
+ expect(exported.project.nodes[0].data.parameterUnits.reference_pressure).toBe("bar");
+});
+
+test("bar 压力公式在保存、加载和 JSON 导入导出后保留原式与单位", async ({ page }) => {
+ await addPressureComponent(page);
+ await pressureUnit(page).selectOption("bar");
+ const expression = "1+1.5";
+ await pressureInput(page).fill(expression);
+ await pressureInput(page).press("Enter");
+ await expect(pressureUnit(page)).toHaveValue("bar");
+ await expectPressureXml(page, 250000);
+ await page.getByRole("button", { name: "保存工程", exact: true }).click();
+
+ await pressureInput(page).fill("7");
+ await pressureInput(page).press("Enter");
+ await pressureUnit(page).selectOption("kPa");
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ await selectPressureComponent(page);
+ await expect(pressureInput(page)).toHaveValue(expression);
+ await expect(pressureUnit(page)).toHaveValue("bar");
+
+ const exported = await exportProject(page);
+ expect(exported.project.nodes[0].data.parameters.reference_pressure).toBe(expression);
+ expect(exported.project.nodes[0].data.parameterUnits.reference_pressure).toBe("bar");
+ await pressureInput(page).fill("9");
+ await pressureInput(page).press("Enter");
+ await page.locator('input[type="file"]').setInputFiles({
+ name: "pressure-expression.json",
+ mimeType: "application/json",
+ buffer: exported.buffer,
+ });
+ // Wait for the imported project before selecting its component.
+ await expect(page.getByRole("textbox", { name: "工程", exact: true })).toHaveValue(
+ "pressure-expression",
+ );
+ await selectPressureComponent(page);
+ await expect(pressureInput(page)).toHaveValue(expression);
+ await expect(pressureUnit(page)).toHaveValue("bar");
+ await expectPressureXml(page, 250000);
+});
+
+for (const { storedUnit, displayedUnit, displayedValue } of [
+ { storedUnit: "Pa", displayedUnit: "Pa", displayedValue: "250000" },
+ { storedUnit: undefined, displayedUnit: "Pa", displayedValue: "250000" },
+]) {
+ test(`旧 JSON 数值参数单位 ${storedUnit ?? "未记录"} 加载为 ${displayedUnit},SI 数值不变`, async ({ page }) => {
+ await page.locator('input[type="file"]').setInputFiles({
+ name: "legacy-pressure.json",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify(legacyPressureProject(250000, storedUnit))),
+ });
+ await selectPressureComponent(page);
+ await expect(pressureUnit(page)).toHaveValue(displayedUnit);
+ await expect(pressureInput(page)).toHaveValue(displayedValue);
+ await expectPressureXml(page, 250000);
+ const exported = await exportProject(page);
+ expect(exported.project.nodes[0].data.parameters.reference_pressure).toBe(250000);
+ expect(exported.project.nodes[0].data.parameterUnits.reference_pressure).toBe(displayedUnit);
+ });
+}
+
+test("旧 JSON 公式没有记录单位时沿用原 Pa 含义", async ({ page }) => {
+ const expression = "100000+150000";
+ await page.locator('input[type="file"]').setInputFiles({
+ name: "legacy-pressure-expression.json",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify(legacyPressureProject(expression))),
+ });
+ await selectPressureComponent(page);
+ await expect(pressureUnit(page)).toHaveValue("Pa");
+ await expect(pressureInput(page)).toHaveValue(expression);
+ await expectPressureXml(page, 250000);
+ const exported = await exportProject(page);
+ expect(exported.project.nodes[0].data.parameters.reference_pressure).toBe(expression);
+ expect(exported.project.nodes[0].data.parameterUnits.reference_pressure).toBe("Pa");
+});
+
+test("弹性接触的剪切模量 G 保持 Pa 默认单位", async ({ page }) => {
+ await page
+ .getByRole("button", { name: "LSTP00A 弹性接触", exact: true })
+ .dragTo(page.locator(".flow-canvas .react-flow__pane"), {
+ targetPosition: { x: 620, y: 330 },
+ });
+ await page.locator('.flow-canvas .react-flow__node[data-id="amesim_lstp00a_1"]').click();
+ await page.getByLabel("刚度模式", { exact: true }).selectOption("2");
+ await page.getByRole("table", { name: "组件参数" }).getByRole("button", { name: /刚度/ }).click();
+ await expect(page.getByLabel("剪切模量单位", { exact: true })).toHaveValue("Pa");
+ await expect(page.getByLabel("剪切模量", { exact: true })).toHaveValue("85700000000");
+ const exported = await exportProject(page);
+ expect(exported.project.nodes[0].data.parameters.G).toBe(8.57e10);
+ expect(exported.project.nodes[0].data.parameterUnits.G).toBe("Pa");
+});
diff --git a/frontend/tests/e2e/project-persistence.spec.ts b/frontend/tests/e2e/project-persistence.spec.ts
new file mode 100644
index 0000000..7f48e6e
--- /dev/null
+++ b/frontend/tests/e2e/project-persistence.spec.ts
@@ -0,0 +1,139 @@
+import { expect, test, type Page } from "@playwright/test";
+import { prepareApp, wideProject } from "./fixtures";
+
+const projectNameField = (page: Page) =>
+ page.getByRole("textbox", { name: "工程", exact: true });
+
+async function exportProject(page: Page) {
+ const downloadPromise = page.waitForEvent("download");
+ await page.getByRole("button", { name: "导出工程 JSON", exact: true }).click();
+ const download = await downloadPromise;
+ const stream = await download.createReadStream();
+ if (!stream) throw new Error("无法读取导出的工程 JSON");
+ const chunks: Buffer[] = [];
+ for await (const chunk of stream) chunks.push(Buffer.from(chunk));
+ const buffer = Buffer.concat(chunks);
+ return {
+ filename: download.suggestedFilename(),
+ buffer,
+ project: JSON.parse(buffer.toString("utf8")) as typeof wideProject,
+ };
+}
+
+async function deleteFirstNode(page: Page) {
+ await page
+ .locator('.flow-canvas .react-flow__node[data-id="generic_sensor_1"]')
+ .click();
+ await page.getByRole("button", { name: "删除 (Delete)", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length - 1,
+ );
+}
+
+test.beforeEach(async ({ page }) => {
+ await prepareApp(page);
+ await page.goto("/");
+ await expect(page.getByRole("button", { name: /通用测试元件/ })).toBeVisible();
+});
+
+test("外部重命名的工程 JSON 导入后名称一致,保存和刷新后均可加载", async ({
+ page,
+}) => {
+ await page.locator('input[type="file"]').setInputFiles({
+ name: `${wideProject.name}.json`,
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify(wideProject)),
+ });
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length,
+ );
+ const original = await exportProject(page);
+ expect(original.filename).toBe(`${wideProject.name}.json`);
+ expect(original.project.name).toBe(wideProject.name);
+
+ // Only the external filename changes; the exported JSON still has its old name.
+ const renamedProject = "气动 回路.v2";
+ await page.locator('input[type="file"]').setInputFiles({
+ name: `${renamedProject}.JSON`,
+ mimeType: "application/json",
+ buffer: original.buffer,
+ });
+ await expect(projectNameField(page)).toHaveValue(renamedProject);
+ const renamed = await exportProject(page);
+ expect(renamed.filename).toBe(`${renamedProject}.json`);
+ expect(renamed.project.name).toBe(renamedProject);
+ expect(renamed.project.nodes).toEqual(original.project.nodes);
+ expect(renamed.project.simulation).toEqual(original.project.simulation);
+
+ await page.getByRole("button", { name: "保存工程", exact: true }).click();
+ const saved = await page.evaluate((name) => {
+ const raw = localStorage.getItem(
+ `system-simulation-flow:project:${encodeURIComponent(name)}`,
+ );
+ return raw ? JSON.parse(raw) : null;
+ }, renamedProject);
+ expect(saved).toMatchObject({ name: renamedProject });
+ expect(saved.nodes).toHaveLength(wideProject.nodes.length);
+
+ await deleteFirstNode(page);
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length,
+ );
+ await expect(projectNameField(page)).toHaveValue(renamedProject);
+
+ await page.reload();
+ await page.getByRole("button", { name: "忽略", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(0);
+ await projectNameField(page).fill(renamedProject);
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length,
+ );
+ await expect(projectNameField(page)).toHaveValue(renamedProject);
+});
+
+test("浏览器工程内容保留旧名称时,按存储名称连续加载仍能恢复工程", async ({
+ page,
+}) => {
+ const storedName = "已重命名 工程.v3";
+ await page.evaluate(
+ ({ name, project }) => {
+ localStorage.setItem(
+ `system-simulation-flow:project:${encodeURIComponent(name)}`,
+ JSON.stringify(project),
+ );
+ },
+ { name: storedName, project: wideProject },
+ );
+ await projectNameField(page).fill(storedName);
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length,
+ );
+ await expect(projectNameField(page)).toHaveValue(storedName);
+
+ await deleteFirstNode(page);
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ await expect(page.locator(".flow-canvas .react-flow__node")).toHaveCount(
+ wideProject.nodes.length,
+ );
+ await expect(projectNameField(page)).toHaveValue(storedName);
+});
+
+for (const { internalName, expectedName } of [
+ { internalName: " 内部 工程.v1 ", expectedName: "内部 工程.v1" },
+ { internalName: " ", expectedName: "untitled" },
+]) {
+ test(`外部文件名没有基名时,工程名回退为 ${expectedName}`, async ({ page }) => {
+ await page.locator('input[type="file"]').setInputFiles({
+ name: " .JSON",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify({ ...wideProject, name: internalName })),
+ });
+ await expect(projectNameField(page)).toHaveValue(expectedName);
+ const exported = await exportProject(page);
+ expect(exported.filename).toBe(`${expectedName}.json`);
+ expect(exported.project.name).toBe(expectedName);
+ });
+}
diff --git a/frontend/tests/e2e/results-chart-windows.spec.ts b/frontend/tests/e2e/results-chart-windows.spec.ts
index c09cd83..81cc742 100644
--- a/frontend/tests/e2e/results-chart-windows.spec.ts
+++ b/frontend/tests/e2e/results-chart-windows.spec.ts
@@ -211,6 +211,114 @@ test.beforeEach(async ({ page }) => {
}, chartWindowSnapshot);
});
+for (const quantity of ["pressure", "absolute_pressure"]) {
+ for (const kind of ["single", "multi", "mixed"] as const) {
+ test(`${quantity} 的 ${kind} 图默认 Pa,绝压换算及单位持久化不改变原始数据`, async ({ page }) => {
+ await page.addInitScript(({ snapshot, pressureQuantity }) => {
+ const pressure = snapshot.result.variables.find(
+ (variable) => variable.key === "generic_sensor_1.pressure",
+ );
+ if (pressure) pressure.quantity = pressureQuantity;
+ window.sessionStorage.setItem(
+ "system-simulation-flow:latest-result",
+ JSON.stringify(snapshot),
+ );
+ }, { snapshot: chartWindowSnapshot, pressureQuantity: quantity });
+ await page.goto("/");
+ await openResults(page);
+
+ const pressureVariable = page
+ .locator(".results-variable-list button")
+ .filter({ hasText: "压力" })
+ .first();
+ await expect(pressureVariable.locator("small")).toHaveText("Pa");
+ const chartWindow = page.locator(
+ `.result-chart-window[data-chart-kind="${kind}"]`,
+ );
+ if (kind === "single") {
+ await pressureVariable.click();
+ } else {
+ await page.getByRole("button", {
+ name: kind === "multi" ? "新建同单位多曲线对比窗口" : "新建异单位上下对比窗口",
+ exact: true,
+ }).click();
+ if (kind === "mixed") {
+ await page.locator(".results-variable-list button")
+ .filter({ hasText: "数值" }).first().dragTo(chartWindow);
+ }
+ await pressureVariable.dragTo(chartWindow);
+ }
+ const chart = chartWindow.locator('svg[data-result-chart="true"]');
+ const unitSelect = chartWindow.getByRole("combobox", {
+ name: kind === "mixed"
+ ? "generic_sensor_1.pressure纵轴单位"
+ : kind === "multi" ? "多曲线纵轴单位" : "压力纵轴单位",
+ exact: true,
+ });
+ const showUnits = async () => {
+ if (kind === "mixed") {
+ await chartWindow.getByRole("button", {
+ name: "管理多曲线窗口中的曲线", exact: true,
+ }).click();
+ }
+ };
+ const readPressureRange = () => chart.evaluate((element) => {
+ const ranges = element.getAttribute("data-view-y-ranges");
+ return ranges
+ ? JSON.parse(ranges)["generic_sensor_1.pressure"] as number[]
+ : [
+ Number(element.getAttribute("data-view-y-min")),
+ Number(element.getAttribute("data-view-y-max")),
+ ];
+ });
+ await showUnits();
+ await expect(unitSelect).toHaveValue("Pa");
+ await expect(unitSelect.locator('option[value="barA"]')).toHaveCount(0);
+ await expect(chart.locator(".result-chart-unit")).toContainText(["Pa"]);
+ const pascalRange = await readPressureRange();
+ expect(pascalRange[0]).toBeCloseTo(98400, 6);
+ expect(pascalRange[1]).toBeCloseTo(121600, 6);
+
+ await unitSelect.selectOption("bar");
+ await expect(unitSelect).toHaveValue("bar");
+ const barRange = await readPressureRange();
+ expect(barRange[0]).toBeCloseTo(0.984, 6);
+ expect(barRange[1]).toBeCloseTo(1.216, 6);
+ if (kind === "multi") {
+ await expect(chartWindow.locator(".result-chart-window-title")).toContainText("bar");
+ await chartWindow.getByRole("button", {
+ name: "管理多曲线窗口中的曲线", exact: true,
+ }).click();
+ await expect(chartWindow.locator(".result-chart-multi-menu-label small")).toContainText("bar");
+ }
+
+ const storedPressure = await page.evaluate(() => {
+ const snapshot = JSON.parse(sessionStorage.getItem(
+ "system-simulation-flow:latest-result",
+ ) ?? "null");
+ return {
+ values: snapshot.result.series["generic_sensor_1.pressure"],
+ final: snapshot.result.final["generic_sensor_1.pressure"],
+ unit: snapshot.result.variables.find(
+ (variable: { key: string }) => variable.key === "generic_sensor_1.pressure",
+ ).unit,
+ };
+ });
+ expect(storedPressure).toEqual({
+ values: [100000, 110000, 120000], final: 120000, unit: "Pa",
+ });
+
+ await page.reload();
+ await openResults(page);
+ await showUnits();
+ await expect(unitSelect).toHaveValue("bar");
+ expect(await readPressureRange()).toEqual(barRange);
+ await unitSelect.selectOption("Pa");
+ expect(await readPressureRange()).toEqual(pascalRange);
+ });
+ }
+}
+
test("机械状态事件力点不参与连续曲线纵轴,但原始数据与非力状态保持不变", async ({
page,
}) => {
diff --git a/frontend/tests/e2e/simulation-live-mql8.spec.ts b/frontend/tests/e2e/simulation-live-mql8.spec.ts
index 7a491dd..e9af5a9 100644
--- a/frontend/tests/e2e/simulation-live-mql8.spec.ts
+++ b/frontend/tests/e2e/simulation-live-mql8.spec.ts
@@ -43,7 +43,7 @@ type BrowserStreamEvidence = {
};
const PROJECT_PATH = fileURLToPath(
- new URL("../../../tests/data/test-mql-8.json", import.meta.url),
+ new URL("../../../tests/fixtures/legacy/test-mql-8.json", import.meta.url),
);
const EVIDENCE_PATH = fileURLToPath(
new URL(
@@ -514,7 +514,7 @@ test("test-mql-8 在真实浏览器流式链路完成 0.2 s BDF 仿真", async (
servingMode: "isolated-vite-dev-proxy",
},
source: {
- path: "tests/data/test-mql-8.json",
+ path: "tests/fixtures/legacy/test-mql-8.json",
bytes: statSync(PROJECT_PATH).size,
sha256: createHash("sha256").update(projectBytes).digest("hex"),
},
diff --git a/frontend/tests/e2e/vertical-mirror.spec.ts b/frontend/tests/e2e/vertical-mirror.spec.ts
new file mode 100644
index 0000000..ae373c1
--- /dev/null
+++ b/frontend/tests/e2e/vertical-mirror.spec.ts
@@ -0,0 +1,235 @@
+import { expect, test, type Locator, type Page } from "@playwright/test";
+import { componentCatalog, prepareApp, wideProject } from "./fixtures";
+
+const VERTICAL_MIRROR = "竖直镜像 (Shift+V)";
+const horizontalMirror = (page: Page) => page.getByRole("button", { name: "水平镜像 (Shift+H)", exact: true });
+const verticalMirror = (page: Page) => page.getByRole("button", { name: VERTICAL_MIRROR, exact: true });
+const nodeById = (page: Page, id: string) => page.locator(`.flow-canvas .react-flow__node[data-id="${id}"]`);
+const extraPort = { ...wideProject.nodes[0].data.ports[0], name: "port_c" };
+
+function mirrorProject(rotation = 0, mirrored = false) {
+ return {
+ ...structuredClone(wideProject),
+ name: "vertical-mirror",
+ nodes: wideProject.nodes.slice(0, 2).map((node, index) => ({
+ ...structuredClone(node),
+ position: { x: index * 420, y: index * 240 },
+ data: {
+ ...structuredClone(node.data),
+ ports: [...node.data.ports, extraPort],
+ rotation: index === 0 ? rotation : 90,
+ mirrored: index === 0 ? mirrored : true,
+ },
+ })),
+ edges: [{
+ id: "mirror-edge",
+ source: "generic_sensor_1",
+ target: "generic_sensor_2",
+ sourceHandle: "port_a",
+ targetHandle: "port_b",
+ data: { isContactEdge: false },
+ }],
+ };
+}
+
+test.beforeEach(async ({ page }) => {
+ await prepareApp(page);
+ // Two left ports make the component asymmetric about its horizontal centerline.
+ const catalog = {
+ ...componentCatalog,
+ libraries: componentCatalog.libraries.map((library) => ({
+ ...library,
+ components: library.components.map((component) => component.type === "generic_sensor"
+ ? { ...component, ports: [...component.ports, extraPort] }
+ : component),
+ })),
+ };
+ await page.route("**/api/components/catalog", (route) => route.fulfill({
+ status: 200,
+ contentType: "application/json",
+ body: JSON.stringify(catalog),
+ }));
+});
+
+async function importMirrorProject(page: Page, project: ReturnType) {
+ await page.goto("/");
+ await expect(page.getByRole("button", { name: /通用测试元件/ })).toBeVisible();
+ await page.locator('input[type="file"]').setInputFiles({
+ name: "vertical-mirror.json",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify(project)),
+ });
+ await expect(nodeById(page, "generic_sensor_1")).toBeVisible();
+}
+
+async function saveProject(page: Page) {
+ await page.getByRole("button", { name: "保存工程", exact: true }).click();
+ return page.evaluate(() => JSON.parse(window.localStorage.getItem(
+ "system-simulation-flow:project:vertical-mirror",
+ )!)) as Promise>;
+}
+
+async function nodeGeometry(node: Locator) {
+ return node.evaluate((element) => {
+ const body = element.querySelector(".sim-node")!;
+ const frame = element.querySelector(".sim-node-frame")!;
+ const matrix = new DOMMatrixReadOnly(getComputedStyle(frame).transform);
+ const width = Number(body.dataset.nodeLayoutWidth);
+ const height = Number(body.dataset.nodeLayoutHeight);
+ return {
+ width,
+ height,
+ matrix: { a: matrix.a, b: matrix.b, c: matrix.c, d: matrix.d },
+ ports: Array.from(element.querySelectorAll(".port-handle")).map((port) => ({
+ name: port.dataset.handleid,
+ x: parseFloat(port.style.left) - width / 2,
+ y: parseFloat(port.style.top) - height / 2,
+ })),
+ };
+ });
+}
+
+async function expectEdgeAttached(page: Page) {
+ await expect.poll(() => page.evaluate(() => {
+ const path = document.querySelector(
+ '.flow-canvas .react-flow__edge[data-id="mirror-edge"] .react-flow__edge-path',
+ );
+ const handle = document.querySelector(
+ '.flow-canvas .react-flow__node[data-id="generic_sensor_1"] .port-handle[data-handleid="port_a"]',
+ );
+ const matrix = path?.getScreenCTM();
+ if (!path || !handle || !matrix) return Infinity;
+ const point = path.getPointAtLength(0).matrixTransform(matrix);
+ const bounds = handle.getBoundingClientRect();
+ // React Flow attaches the path to the outer edge of a Handle, not its center.
+ const x = handle.classList.contains("react-flow__handle-left")
+ ? bounds.left
+ : handle.classList.contains("react-flow__handle-right")
+ ? bounds.right
+ : bounds.left + bounds.width / 2;
+ const y = handle.classList.contains("react-flow__handle-top")
+ ? bounds.top
+ : handle.classList.contains("react-flow__handle-bottom")
+ ? bounds.bottom
+ : bounds.top + bounds.height / 2;
+ return Math.hypot(point.x - x, point.y - y);
+ })).toBeLessThan(1);
+}
+
+for (const rotation of [0, 90, 180, 270]) {
+ for (const mirrored of [false, true]) {
+ test(`竖直镜像始终上下翻转画布组件与端口:旋转 ${rotation}°,镜像 ${mirrored}`, async ({ page }) => {
+ const project = mirrorProject(rotation, mirrored);
+ await importMirrorProject(page, project);
+ await expect(verticalMirror(page)).toBeDisabled();
+ const first = nodeById(page, "generic_sensor_1");
+ const second = nodeById(page, "generic_sensor_2");
+ await first.click();
+ await expect(verticalMirror(page)).toBeEnabled();
+ const [horizontalBox, verticalBox] = await Promise.all([
+ horizontalMirror(page).boundingBox(), verticalMirror(page).boundingBox(),
+ ]);
+ expect(verticalBox!.x).toBeGreaterThan(horizontalBox!.x);
+ expect(verticalBox!.x - horizontalBox!.x - horizontalBox!.width).toBeLessThan(16);
+ const before = await nodeGeometry(first);
+ const otherBefore = await nodeGeometry(second);
+ const path = page.locator('.react-flow__edge[data-id="mirror-edge"] .react-flow__edge-path');
+ const pathBefore = await path.getAttribute("d");
+ await verticalMirror(page).click();
+ const after = await nodeGeometry(first);
+ expect(after.width).toBe(before.width);
+ expect(after.height).toBe(before.height);
+ expect(after.matrix.a).toBeCloseTo(before.matrix.a, 8);
+ expect(after.matrix.b).toBeCloseTo(-before.matrix.b, 8);
+ expect(after.matrix.c).toBeCloseTo(before.matrix.c, 8);
+ expect(after.matrix.d).toBeCloseTo(-before.matrix.d, 8);
+ after.ports.forEach((port, index) => {
+ expect(port.x).toBeCloseTo(before.ports[index].x, 6);
+ expect(port.y).toBeCloseTo(-before.ports[index].y, 6);
+ });
+ expect(await nodeGeometry(second)).toEqual(otherBefore);
+ await expect(path).not.toHaveAttribute("d", pathBefore!);
+ await expectEdgeAttached(page);
+ const saved = await saveProject(page);
+ expect(saved.nodes[0].data.rotation).toBe((540 - rotation) % 360);
+ expect(saved.nodes[0].data.mirrored).toBe(!mirrored);
+ expect(saved.nodes[0].position).toEqual(project.nodes[0].position);
+ expect(saved.nodes[0].data.parameters).toEqual(project.nodes[0].data.parameters);
+ expect(saved.edges[0]).toMatchObject(project.edges[0]);
+ await verticalMirror(page).click();
+ expect(await nodeGeometry(first)).toEqual(before);
+ await expectEdgeAttached(page);
+ });
+ }
+}
+
+test("竖直镜像支持混合方向多选、快捷键、撤销重做和工程加载", async ({ page }) => {
+ const project = mirrorProject();
+ await importMirrorProject(page, project);
+ await nodeById(page, "generic_sensor_1").click();
+ await page.keyboard.press("Control+a");
+ await expect(page.locator(".flow-canvas .react-flow__node.selected")).toHaveCount(2);
+ await page.keyboard.press("Shift+v");
+ const mirrored = await saveProject(page);
+ expect(mirrored.nodes.map((node) => [node.data.rotation, node.data.mirrored])).toEqual([
+ [180, true], [90, false],
+ ]);
+ await page.getByRole("button", { name: "撤销 (Ctrl+Z)", exact: true }).click();
+ let saved = await saveProject(page);
+ expect(saved.nodes.map((node) => [node.data.rotation, node.data.mirrored])).toEqual([
+ [0, false], [90, true],
+ ]);
+ await page.getByRole("button", { name: "重做 (Ctrl+Y)", exact: true }).click();
+ saved = await saveProject(page);
+ expect(saved.nodes).toEqual(mirrored.nodes);
+ await page.getByRole("button", { name: "加载工程", exact: true }).click();
+ expect((await saveProject(page)).nodes).toEqual(mirrored.nodes);
+ await nodeById(page, "generic_sensor_1").click();
+ await page.keyboard.press("Control+a");
+ await verticalMirror(page).click();
+ saved = await saveProject(page);
+ expect(saved.nodes.map((node) => [node.data.rotation, node.data.mirrored])).toEqual([
+ [0, false], [90, true],
+ ]);
+ expect(saved.nodes.map((node) => node.position)).toEqual(project.nodes.map((node) => node.position));
+ await expectEdgeAttached(page);
+});
+
+test("竖直镜像使接触端口分离时断开连接,撤销恢复端口接触", async ({ page }) => {
+ const project = mirrorProject();
+ project.nodes[0].position = { x: 300, y: 200 };
+ project.nodes[1].data.rotation = 0;
+ project.nodes[1].data.mirrored = false;
+ await importMirrorProject(page, project);
+ const sourceGeometry = await nodeGeometry(nodeById(page, "generic_sensor_1"));
+ const targetGeometry = await nodeGeometry(nodeById(page, "generic_sensor_2"));
+ const sourcePort = sourceGeometry.ports.find((port) => port.name === "port_a")!;
+ const targetPort = targetGeometry.ports.find((port) => port.name === "port_b")!;
+ project.nodes[1].position = {
+ x: project.nodes[0].position.x + sourceGeometry.width / 2 + sourcePort.x
+ - targetGeometry.width / 2 - targetPort.x,
+ y: project.nodes[0].position.y + sourceGeometry.height / 2 + sourcePort.y
+ - targetGeometry.height / 2 - targetPort.y,
+ };
+ project.edges[0].data.isContactEdge = true;
+ await page.locator('input[type="file"]').setInputFiles({
+ name: "vertical-mirror.json",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify(project)),
+ });
+ const source = nodeById(page, "generic_sensor_1");
+ const handle = source.locator('.port-handle[data-handleid="port_a"]');
+ await expect(handle).toHaveAttribute("data-connected", "true");
+ const before = await saveProject(page);
+ expect(before.edges).toHaveLength(1);
+ expect(before.edges[0].data.isContactEdge).toBe(true);
+ await source.click();
+ await verticalMirror(page).click();
+ await expect(handle).toHaveAttribute("data-connected", "false");
+ expect((await saveProject(page)).edges).toHaveLength(0);
+ await page.getByRole("button", { name: "撤销 (Ctrl+Z)", exact: true }).click();
+ await expect(handle).toHaveAttribute("data-connected", "true");
+ const restored = await saveProject(page);
+ expect(restored.nodes).toEqual(before.nodes);
+ expect(restored.edges).toEqual(before.edges);
+});
diff --git a/native/README.md b/native/README.md
index cf9bbab..82c14a0 100644
--- a/native/README.md
+++ b/native/README.md
@@ -1,6 +1,6 @@
# C 数值后端
-后端 Python 校验 XML、检查连接、生成系统专用 C 并编译;独立 EXE 执行完整数值循环。原生运行不调用 Python。当前发布构建支持 Windows x64。
+后端 Python 校验 XML、检查连接、生成系统专用 C 并编译;独立 EXE 执行完整数值循环。原生运行不调用 Python。当前构建支持 Windows x64 和 Linux x86_64;Linux 使用静态链接的 SUNDIALS。
## 启用网页后端
@@ -13,6 +13,15 @@ $env:SUNDIALS_ROOT = 'F:/Anaconda/Library'
.venv-win/Scripts/python.exe -m uvicorn app.main:app --host 127.0.0.1 --port 8000
```
+Linux 使用现有 Python 虚拟环境,并将 C 依赖独立放在 `.venv/native/`:
+
+```bash
+bash bat/setup-native-linux.sh
+.venv/bin/python -m uvicorn app.main:app --host 127.0.0.1 --port 8000
+```
+
+脚本下载并校验固定版本 SUNDIALS 7.4.0,在本地构建静态库;不会安装系统包。构建器先读取 `SUNDIALS_ROOT`,未指定时查找当前 Python 环境的 `native/sundials-7.4.0`、`/usr/local` 和 `/usr`。Linux 安装需包含静态 `.a` 库;生成的 ELF 程序名为 `model`,不依赖 SUNDIALS 共享库或 Python。`.venv/`、`app/data/` 和 `test/` 均在 Git 忽略范围。
+
沿用 `/api/system-xml/simulate` 与 `/api/system-xml/simulate-stream`。`native` 遇到不支持的组件或方法时报告错误,不静默切换。旧 Python 后端已退役,显式选择 `python` 会报错。
`bat/start-backend.bat`、`bat/start-backend.sh` 及其 `start-all` 上层入口默认设置 `native`,保留明确指定的环境变量覆盖。直接通过 uvicorn 启动也使用相同的默认选择。启动日志显示所选内核;C 模式只检查工具链与 XML Schema,不再预热 SciPy 积分/代数求解器。工具链检查失败会记录启动诊断,编辑器仍可使用,提交仿真时会明确报错,不会自动调用 Python 数值后端。
@@ -24,7 +33,7 @@ $env:SUNDIALS_ROOT = 'F:/Anaconda/Library'
## 独立生成与运行
```powershell
-.venv-win/Scripts/python.exe -m app.simulation.native_codegen tests/data/native-skill-test.xml --output-dir test/native-v1/example-run --runs 3 --solve-only
+.venv-win/Scripts/python.exe -m app.simulation.native_codegen tests/fixtures/native-skill-test.xml --output-dir test/native-v1/example-run --runs 3 --solve-only
```
输入支持 XML,或带普通算术表达式的工程 JSON。JSON 普通数字已经是 SI 值;算术表达式按编辑器所选单位换算,例如 `3.14*10**2/4 mm2` 转为 `0.0000785 m2`。较复杂的表达式应先在网页导出 XML。CLI 不执行任意 Python/JavaScript 表达式。
@@ -46,7 +55,7 @@ EXE 不需要 Python、SciPy、XML 或原工程文件。DLL 需要与 EXE 一同
- MECMAS21 支持现有 Python 方程中的摩擦、风阻、柔性限位和 `stoptype=1/2/3/4`,含反弹系数与速度阈值;气腔和管路支持换热。LSTP00A 接受两种刚度模式及接触力符号模式,严格沿用当前组件方程。已有参数中尚未参与 Python 方程的物理效应不会在 C 端凭空补造,详见覆盖记录。
- 扩展编译器上限 1024 状态、16384 输出;无连续状态的信号系统使用隐藏常量状态驱动输出。气动网络必须有压力状态锚点;独立气腔之间不能无阻力直接相连。兼容固定管路容腔是已实现的合并例外。闭合未收敛或方程欠定时明确失败,不静默回退。
- 支持原生 RK45 与 CVODE BDF。CVODE 继续使用默认数值雅可比和稠密线性求解;本次删除不改变 C 求解器的雅可比策略。
-- 默认 `rtol=1e-6`、气体状态 `atol=1e-8`、机械状态 `atol=1e-12`。CLI 可覆盖 rtol;本版不支持自定义 atol 或 first_step。不同积分器相同局部容差不保证全局曲线误差完全相同。
+- 网页和 Python CLI 默认 `rtol=1e-8`;生成的状态绝对误差限为质量 `1e-14 kg`、内能 `1e-8 J`、速度/位移 `1e-12`(各自 SI 单位)。独立 C 程序默认 `rtol=1e-6`,对照时应显式传入。CLI 可覆盖 rtol;本版不支持自定义 atol 或 first_step。不同积分器相同局部容差不保证全局曲线误差完全相同。
- 时间信号显式分段,塑性/反弹端挡用稠密插值定位并重启。试探 RHS 不修改已接受状态。柔性接触沿用现有分段力公式,不改变刚度或阻尼来提速。
- 每任务独立进程,支持进度、取消及超时。进程崩溃不会作为成功返回,受控失败保留最后接受状态。
- 编译缓存位于 `app/data/native-builds/`,校验模型、组件合同、源码、编译选项及依赖哈希。本版参数特化入 C,修改模型数值参数会重新编译;修改时间、步长、rtol、采样选项可复用 EXE。
@@ -71,6 +80,10 @@ EXE 不需要 Python、SciPy、XML 或原工程文件。DLL 需要与 EXE 一同
- `config.py`、`sampling.py`、`results.py`:配置、进度、采样合法性和结果合同。
- `performance.py`:Python 编排阶段计时,求解耗时读取 C 报告。
-`solvers/`、`systems/generic.py`、旧示例、Python 物性/流量/机械公式和物性缓存已删除。数值回归读取 `tests/data/native-python-reference.json` 的 50 个网络、112 组冻结参考状态,不需要 Python 求解器。旧算法及历史对照资料可从 Git 历史找回。
+`solvers/`、`systems/generic.py`、旧示例、Python 物性/流量/机械公式和物性缓存已删除。数值回归读取 `tests/baselines/native/native-python-reference.json` 的 50 个网络、112 组冻结参考状态,不需要 Python 求解器。旧算法及历史对照资料可从 Git 历史找回。
-测试安装:`python -m pip install -r requirements-test.txt`。当前完整数值测试要求 Windows x64、GCC 与 SUNDIALS;Linux 尚不提供 EXE 构建。
+测试安装:`python -m pip install -r requirements-test.txt`。完整数值测试需要 GCC 与 SUNDIALS;Windows x64 使用导入库/DLL,Linux x86_64 使用静态库。
+
+## AME 对齐后的工程输入
+
+当前用户运行请使用 `tests/data/test-mql-4-corrected.json` 或 `tests/data/test-mql-8-corrected.json`。四路执行 XML 位于 `tests/fixtures/amesim/`,与其 JSON 同步;原八路 JSON 已移入 `tests/fixtures/legacy/` 供差异审计。`test-mql-4-amesim-reference.json` 是曲线基准,不是工程输入。模型复核、P4 端口图形修正、默认 `rtol=1e-8` 的验收和速度记录见 [本轮验证报告](../docs/other/牛顿管流求根与四路网页验证-2026-09-11.md)。
diff --git a/native/components/kernels.c b/native/components/kernels.c
index 7488a12..37ae050 100644
--- a/native/components/kernels.c
+++ b/native/components/kernels.c
@@ -346,27 +346,79 @@ static double pipe_friction_derivative(double re,double rr,double rough,double *
double db=8.37293695*b*(1-b)/(re-89.96829989);
*df=dl*(1-b)+b*dt+db*(turb-lam);return lam+b*(turb-lam);
}
+static double pipe_checked_solution(double re,double f,double K,double rr,double rough,
+ double flow_per_re,NativePipeSolve *status) {
+ double target=sqrt(K/f),change=fabs(target-re);
+ /* Separate the absolute and relative tests so a large flow scale cannot
+ make both sides overflow and accidentally satisfy the stopping test. */
+ if(!isfinite(target) || !isfinite(target*flow_per_re) ||
+ !(change<=re*1e-10 || change*flow_per_re<=1e-13))return NAN;
+ double value=target*target*pipe_friction_prepared(target,rr,rough);
+ status->relative_residual=fabs(value/K-1);
+ if(isfinite(value) && status->relative_residual<=1e-9) {
+ status->converged=1;return target;
+ }
+ return NAN;
+}
double native_pipe_resistance(double K,double rr,double flow_per_re,NativePipeSolve *status) {
NativePipeSolve local={0,0,0,INFINITY};if(!status)status=&local;
*status=local;
if(!(K>=0 && rr>=0 && flow_per_re>0) || !isfinite(K) || !isfinite(rr) || !isfinite(flow_per_re))return NAN;
- if(K/64<=89.96829989){status->converged=1;status->relative_residual=0;return K/64;}
- double rough=pipe_rough_limit(rr),lo=0,hi=fmax(sqrt(K/.02),1),df;
- for(int i=0;i<128 && hi*hi*pipe_friction_prepared(hi,rr,rough)iterations=i+1;
- double f=pipe_friction_derivative(re,rr,rough,&df),F=re*re*f-K;
- double target=sqrt(K/f);
- if(fabs(target-re)*flow_per_re<=fmax(1e-13,re*flow_per_re*1e-10)) {
- /* Check the returned point, not just the change of successive guesses. */
- status->relative_residual=fabs(target*target*pipe_friction_prepared(target,rr,rough)/K-1);
- if(isfinite(target) && status->relative_residual<=1e-9){status->converged=1;return target;}
+ if(K==0){status->converged=1;status->relative_residual=0;return 0;}
+ if(K/64<=89.96829989) {
+ double re=K/64;
+ status->relative_residual=fabs(64*re/K-1);
+ if(re>0 && isfinite(re*flow_per_re) && status->relative_residual<=1e-9) {
+ status->converged=1;return re;
}
+ return NAN;
+ }
+ double rough=pipe_rough_limit(rr),lo=0,hi=fmax(sqrt(K/.02),1),df;
+ if(!isfinite(rough) || !isfinite(hi))return NAN;
+ int bracketed=0;
+ for(int i=0;i<128;i++) {
+ double value=hi*hi*pipe_friction_prepared(hi,rr,rough);
+ if(!isfinite(value))return NAN;
+ if(value>=K){bracketed=1;break;}
+ lo=hi;hi*=2;
+ if(!isfinite(hi))return NAN;
+ }
+ /* F(0)=-K; each positive lower endpoint was checked while expanding.
+ Never start iteration with an unchecked or non-finite upper residual. */
+ if(!bracketed)return NAN;
+ double re=fmax(lo,fmin(sqrt(K/.02),hi)),previous_residual=INFINITY;
+ int previous_newton=0;
+ for(int i=0;i<128;i++) {
+ status->iterations=i+1;
+ double f=pipe_friction_derivative(re,rr,rough,&df),value=re*re*f,F=value-K;
+ if(!(f>0) || !isfinite(f) || !isfinite(value))return NAN;
+ status->relative_residual=fabs(value/K-1);
+ double target=pipe_checked_solution(re,f,K,rr,rough,flow_per_re,status);
+ if(status->converged)return target;
if(F>0)hi=re;else lo=re;
- double next=re-F/(2*re*f+re*re*df);
- if(!isfinite(next) || next<=lo || next>=hi){next=.5*(lo+hi);status->bisections++;}
+ double slope=2*re*f+re*re*df;
+ double next=slope>0 && isfinite(slope) ? re-F/slope : NAN;
+ /* An in-bracket Newton step is useful only if it reduces |F|.
+ After a step that fails to halve it, bisect the retained bracket;
+ successive Newton steps therefore cannot stagnate near an endpoint. */
+ int bisect=(previous_newton && fabs(F)>.5*previous_residual) ||
+ !(slope>0) || !isfinite(slope) || !isfinite(next) || next<=lo || next>=hi;
+ if(bisect) {
+ next=lo+.5*(hi-lo);status->bisections++;
+ if(next<=lo || next>=hi) {
+ /* Adjacent floating-point endpoints: inspect both actual
+ candidates, then fail if neither meets the original tests. */
+ double endpoints[]={lo,hi};
+ for(int j=0;j<2;j++) {
+ double endpoint=endpoints[j];
+ target=pipe_checked_solution(endpoint,pipe_friction_prepared(endpoint,rr,rough),
+ K,rr,rough,flow_per_re,status);
+ if(status->converged)return target;
+ }
+ return NAN;
+ }
+ }
+ previous_newton=!bisect;previous_residual=fabs(F);
re=next;
}
return NAN;
diff --git a/tests/data/native-python-reference.json b/tests/baselines/native/native-python-reference.json
similarity index 100%
rename from tests/data/native-python-reference.json
rename to tests/baselines/native/native-python-reference.json
diff --git a/tests/data/test-mql-4-amesim-reference.json b/tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json
similarity index 100%
rename from tests/data/test-mql-4-amesim-reference.json
rename to tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json
diff --git a/tests/baselines/simulation/test_mql_full_branches/manifest.json b/tests/baselines/simulation/test_mql_full_branches/manifest.json
index 3c3df79..d3e4512 100644
--- a/tests/baselines/simulation/test_mql_full_branches/manifest.json
+++ b/tests/baselines/simulation/test_mql_full_branches/manifest.json
@@ -3,7 +3,7 @@
"id": "test_mql_full_branches-historical-v1",
"description": "Historical slow-region and 2.05 s production regression target with three locked-environment repeats and approved state goldens.",
"source": {
- "path": "tests/data/test_mql-full-branches-01-04.xml",
+ "path": "tests/baselines/simulation/test_mql_full_branches/sources/test_mql-full-branches-01-04.xml",
"sha256": "2fb95e65f5de0c85a6a17802aef74ea004087323fd00fd8d01acf0184ff71d48",
"bytes": 58860,
"xmlIsAuthoritative": true,
diff --git a/tests/data/test_mql-full-branches-01-04.xml b/tests/baselines/simulation/test_mql_full_branches/sources/test_mql-full-branches-01-04.xml
similarity index 100%
rename from tests/data/test_mql-full-branches-01-04.xml
rename to tests/baselines/simulation/test_mql_full_branches/sources/test_mql-full-branches-01-04.xml
diff --git a/AmesimModels/help/P4NODE2.pdf b/tests/data/AmesimModels/help/P4NODE2.pdf
similarity index 100%
rename from AmesimModels/help/P4NODE2.pdf
rename to tests/data/AmesimModels/help/P4NODE2.pdf
diff --git a/AmesimModels/help/PN3NODE2.pdf b/tests/data/AmesimModels/help/PN3NODE2.pdf
similarity index 100%
rename from AmesimModels/help/PN3NODE2.pdf
rename to tests/data/AmesimModels/help/PN3NODE2.pdf
diff --git a/AmesimModels/help/PNCH012.pdf b/tests/data/AmesimModels/help/PNCH012.pdf
similarity index 100%
rename from AmesimModels/help/PNCH012.pdf
rename to tests/data/AmesimModels/help/PNCH012.pdf
diff --git a/AmesimModels/help/PNL0001.pdf b/tests/data/AmesimModels/help/PNL0001.pdf
similarity index 100%
rename from AmesimModels/help/PNL0001.pdf
rename to tests/data/AmesimModels/help/PNL0001.pdf
diff --git a/AmesimModels/help/PNL0002.pdf b/tests/data/AmesimModels/help/PNL0002.pdf
similarity index 100%
rename from AmesimModels/help/PNL0002.pdf
rename to tests/data/AmesimModels/help/PNL0002.pdf
diff --git a/AmesimModels/help/PNL0003.pdf b/tests/data/AmesimModels/help/PNL0003.pdf
similarity index 100%
rename from AmesimModels/help/PNL0003.pdf
rename to tests/data/AmesimModels/help/PNL0003.pdf
diff --git a/AmesimModels/help/PNL00R.pdf b/tests/data/AmesimModels/help/PNL00R.pdf
similarity index 100%
rename from AmesimModels/help/PNL00R.pdf
rename to tests/data/AmesimModels/help/PNL00R.pdf
diff --git a/AmesimModels/help/PNOR001.pdf b/tests/data/AmesimModels/help/PNOR001.pdf
similarity index 100%
rename from AmesimModels/help/PNOR001.pdf
rename to tests/data/AmesimModels/help/PNOR001.pdf
diff --git a/AmesimModels/help/PNVO001.pdf b/tests/data/AmesimModels/help/PNVO001.pdf
similarity index 100%
rename from AmesimModels/help/PNVO001.pdf
rename to tests/data/AmesimModels/help/PNVO001.pdf
diff --git a/AmesimModels/help/pneumatic_library_manual/03_gas_properties.pdf b/tests/data/AmesimModels/help/pneumatic_library_manual/03_gas_properties.pdf
similarity index 100%
rename from AmesimModels/help/pneumatic_library_manual/03_gas_properties.pdf
rename to tests/data/AmesimModels/help/pneumatic_library_manual/03_gas_properties.pdf
diff --git a/AmesimModels/help/pneumatic_library_manual/06_important_rules.pdf b/tests/data/AmesimModels/help/pneumatic_library_manual/06_important_rules.pdf
similarity index 100%
rename from AmesimModels/help/pneumatic_library_manual/06_important_rules.pdf
rename to tests/data/AmesimModels/help/pneumatic_library_manual/06_important_rules.pdf
diff --git a/AmesimModels/help/pneumatic_library_manual/07_review_pneumatic.pdf b/tests/data/AmesimModels/help/pneumatic_library_manual/07_review_pneumatic.pdf
similarity index 100%
rename from AmesimModels/help/pneumatic_library_manual/07_review_pneumatic.pdf
rename to tests/data/AmesimModels/help/pneumatic_library_manual/07_review_pneumatic.pdf
diff --git a/AmesimModels/help/pneumatic_library_manual/08_pipes.pdf b/tests/data/AmesimModels/help/pneumatic_library_manual/08_pipes.pdf
similarity index 100%
rename from AmesimModels/help/pneumatic_library_manual/08_pipes.pdf
rename to tests/data/AmesimModels/help/pneumatic_library_manual/08_pipes.pdf
diff --git a/AmesimModels/help/pneumatic_library_manual/lib_pneumatic.pdf b/tests/data/AmesimModels/help/pneumatic_library_manual/lib_pneumatic.pdf
similarity index 100%
rename from AmesimModels/help/pneumatic_library_manual/lib_pneumatic.pdf
rename to tests/data/AmesimModels/help/pneumatic_library_manual/lib_pneumatic.pdf
diff --git a/AmesimModels/help/source/PNCH012.c b/tests/data/AmesimModels/help/source/PNCH012.c
similarity index 100%
rename from AmesimModels/help/source/PNCH012.c
rename to tests/data/AmesimModels/help/source/PNCH012.c
diff --git a/AmesimModels/help/source/PNCH012.spe b/tests/data/AmesimModels/help/source/PNCH012.spe
similarity index 100%
rename from AmesimModels/help/source/PNCH012.spe
rename to tests/data/AmesimModels/help/source/PNCH012.spe
diff --git a/AmesimModels/help/source/PNL0001.c b/tests/data/AmesimModels/help/source/PNL0001.c
similarity index 100%
rename from AmesimModels/help/source/PNL0001.c
rename to tests/data/AmesimModels/help/source/PNL0001.c
diff --git a/AmesimModels/help/source/PNL0001.spe b/tests/data/AmesimModels/help/source/PNL0001.spe
similarity index 100%
rename from AmesimModels/help/source/PNL0001.spe
rename to tests/data/AmesimModels/help/source/PNL0001.spe
diff --git a/AmesimModels/help/source/PNL0002.c b/tests/data/AmesimModels/help/source/PNL0002.c
similarity index 100%
rename from AmesimModels/help/source/PNL0002.c
rename to tests/data/AmesimModels/help/source/PNL0002.c
diff --git a/AmesimModels/help/source/PNL0002.spe b/tests/data/AmesimModels/help/source/PNL0002.spe
similarity index 100%
rename from AmesimModels/help/source/PNL0002.spe
rename to tests/data/AmesimModels/help/source/PNL0002.spe
diff --git a/AmesimModels/help/source/PNL0003.c b/tests/data/AmesimModels/help/source/PNL0003.c
similarity index 100%
rename from AmesimModels/help/source/PNL0003.c
rename to tests/data/AmesimModels/help/source/PNL0003.c
diff --git a/AmesimModels/help/source/PNL0003.spe b/tests/data/AmesimModels/help/source/PNL0003.spe
similarity index 100%
rename from AmesimModels/help/source/PNL0003.spe
rename to tests/data/AmesimModels/help/source/PNL0003.spe
diff --git a/AmesimModels/help/source/PNL00R.c b/tests/data/AmesimModels/help/source/PNL00R.c
similarity index 100%
rename from AmesimModels/help/source/PNL00R.c
rename to tests/data/AmesimModels/help/source/PNL00R.c
diff --git a/AmesimModels/help/source/PNL00R.spe b/tests/data/AmesimModels/help/source/PNL00R.spe
similarity index 100%
rename from AmesimModels/help/source/PNL00R.spe
rename to tests/data/AmesimModels/help/source/PNL00R.spe
diff --git a/AmesimModels/help/source/PNOR001.c b/tests/data/AmesimModels/help/source/PNOR001.c
similarity index 100%
rename from AmesimModels/help/source/PNOR001.c
rename to tests/data/AmesimModels/help/source/PNOR001.c
diff --git a/AmesimModels/help/source/PNOR001.spe b/tests/data/AmesimModels/help/source/PNOR001.spe
similarity index 100%
rename from AmesimModels/help/source/PNOR001.spe
rename to tests/data/AmesimModels/help/source/PNOR001.spe
diff --git a/AmesimModels/help/source/PNVO001.c b/tests/data/AmesimModels/help/source/PNVO001.c
similarity index 100%
rename from AmesimModels/help/source/PNVO001.c
rename to tests/data/AmesimModels/help/source/PNVO001.c
diff --git a/AmesimModels/help/source/PNVO001.spe b/tests/data/AmesimModels/help/source/PNVO001.spe
similarity index 100%
rename from AmesimModels/help/source/PNVO001.spe
rename to tests/data/AmesimModels/help/source/PNVO001.spe
diff --git a/AmesimModels/help/source/pn_public.h b/tests/data/AmesimModels/help/source/pn_public.h
similarity index 100%
rename from AmesimModels/help/source/pn_public.h
rename to tests/data/AmesimModels/help/source/pn_public.h
diff --git a/AmesimModels/help/utilities/pn2pipefr_.pdf b/tests/data/AmesimModels/help/utilities/pn2pipefr_.pdf
similarity index 100%
rename from AmesimModels/help/utilities/pn2pipefr_.pdf
rename to tests/data/AmesimModels/help/utilities/pn2pipefr_.pdf
diff --git a/AmesimModels/help/utilities/pn2rcqfix_.pdf b/tests/data/AmesimModels/help/utilities/pn2rcqfix_.pdf
similarity index 100%
rename from AmesimModels/help/utilities/pn2rcqfix_.pdf
rename to tests/data/AmesimModels/help/utilities/pn2rcqfix_.pdf
diff --git a/AmesimModels/help/utilities/pn2vol.pdf b/tests/data/AmesimModels/help/utilities/pn2vol.pdf
similarity index 100%
rename from AmesimModels/help/utilities/pn2vol.pdf
rename to tests/data/AmesimModels/help/utilities/pn2vol.pdf
diff --git a/AmesimModels/help/utilities/pn2vol1.pdf b/tests/data/AmesimModels/help/utilities/pn2vol1.pdf
similarity index 100%
rename from AmesimModels/help/utilities/pn2vol1.pdf
rename to tests/data/AmesimModels/help/utilities/pn2vol1.pdf
diff --git a/AmesimModels/help/utilities/pn2vol2_.pdf b/tests/data/AmesimModels/help/utilities/pn2vol2_.pdf
similarity index 100%
rename from AmesimModels/help/utilities/pn2vol2_.pdf
rename to tests/data/AmesimModels/help/utilities/pn2vol2_.pdf
diff --git a/AmesimModels/test_mql.ame b/tests/data/AmesimModels/test_mql.ame
similarity index 100%
rename from AmesimModels/test_mql.ame
rename to tests/data/AmesimModels/test_mql.ame
diff --git a/AmesimModels/test_mql/README.md b/tests/data/AmesimModels/test_mql/README.md
similarity index 100%
rename from AmesimModels/test_mql/README.md
rename to tests/data/AmesimModels/test_mql/README.md
diff --git a/tests/data/README.md b/tests/data/README.md
new file mode 100644
index 0000000..3d1b0ea
--- /dev/null
+++ b/tests/data/README.md
@@ -0,0 +1,24 @@
+# 浏览器四路、八路测试工程
+
+本目录中的 JSON/XML 仅保留以下两个可由网页“导入工程 JSON”识别的工程文件。已逐项核对对应 AME 图纸的元件、公开物理参数及端口连接;AME 单位与工程 SI 单位之间的换算已纳入检查。
+
+| 浏览器工程 | Amesim 原文件 | 元件 / 参数 / 连接 |
+|---|---|---|
+| [test-mql-4-corrected.json](test-mql-4-corrected.json) | [test_mql_4.ame](test_mql_4.ame) | 81 / 582 / 90 |
+| [test-mql-8-corrected.json](test-mql-8-corrected.json) | [test_mql.ame](test_mql.ame) | 157 / 1092 / 178 |
+
+网页当前只支持导入工程 JSON;XML 可从网页下载,用作后端输入。网页使用原生 BDF 和当前默认 `rtol=1e-8`,与 AME 内部积分器及历史数值设置不能视为相同。这里的参数对齐指模型物理参数与初值,不声称不同仿真器所有数值输出完全一致。
+
+2026-09-11 整理时,两份工程内容保持不变。其他 JSON/XML 已按用途移出本目录,移动前后字节数及 SHA256 相同:
+
+| 原文件 | 当前路径 | 用途 |
+|---|---|---|
+| native-python-reference.json | [原生数值基准](../baselines/native/native-python-reference.json) | 50 网络冻结参考 |
+| test-mql-4-amesim-reference.json | [四路 Amesim 曲线基准](../baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json) | 72 曲线、57 时刻 |
+| test-mql-4-corrected.xml | [四路执行 XML](../fixtures/amesim/test-mql-4-corrected.xml) | 与四路 JSON 同步的后端输入 |
+| test-mql-8.json / test-mql-8.xml | [旧 JSON](../fixtures/legacy/test-mql-8.json) / [旧 XML](../fixtures/legacy/test-mql-8.xml) | 修正前输入及布局来源 |
+| test_mql-full-branches-01-04.xml | [历史分支基准输入](../baselines/simulation/test_mql_full_branches/sources/test_mql-full-branches-01-04.xml) | 历史回归清单绑定的输入 |
+| native-skill-test.xml | [原生通用测试输入](../fixtures/native-skill-test.xml) | 原生编译、执行与 CI 检查 |
+| fixtures/high_stiffness_explicit_rk45.xml | [高刚度 RK45 输入](../fixtures/high_stiffness_explicit_rk45.xml) | 独立刚度回归用例 |
+
+AME 原文件及本目录中其他类型的资料保持原位。历史运行记录保留当时路径;活动测试、审计脚本、CI 和当前交付说明已更新到新路径。
diff --git a/tests/data/fixtures/high_stiffness_explicit_rk45.xml b/tests/data/fixtures/high_stiffness_explicit_rk45.xml
deleted file mode 100644
index 4682187..0000000
--- a/tests/data/fixtures/high_stiffness_explicit_rk45.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/data/native-skill-test.xml b/tests/data/native-skill-test.xml
deleted file mode 100644
index 6ec9a82..0000000
--- a/tests/data/native-skill-test.xml
+++ /dev/null
@@ -1,325 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/data/test-mql-4-corrected.json b/tests/data/test-mql-4-corrected.json
new file mode 100644
index 0000000..491dad2
--- /dev/null
+++ b/tests/data/test-mql-4-corrected.json
@@ -0,0 +1,15649 @@
+{
+ "projectSchemaVersion": 1,
+ "name": "test-mql-4-AME-aligned",
+ "nodes": [
+ {
+ "id": "pn_gas_data",
+ "type": "simulationComponent",
+ "position": {
+ "x": -450,
+ "y": -180
+ },
+ "data": {
+ "label": "pn_gas_data",
+ "componentType": "amesim_helium_medium",
+ "modelType": "amesim_helium_medium",
+ "modelVersion": "0.1.0",
+ "ports": [],
+ "parameters": {
+ "gi": 1.0,
+ "property_model": 0.0
+ },
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch023_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 140
+ },
+ "data": {
+ "label": "pn_general_chamber",
+ "componentType": "amesim_pnch023",
+ "modelType": "amesim_pnch023",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol": 0.057,
+ "kth": 0.0,
+ "sth": 0.1,
+ "extemp": 293.15,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "cvol": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnor001_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 89.59999999999997
+ },
+ "data": {
+ "label": "pn_orifice_18",
+ "componentType": "amesim_pnor001",
+ "modelType": "amesim_pnor001",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.9,
+ "area": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0
+ },
+ "parameterUnits": {
+ "area": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnor001_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 190.40000000000003
+ },
+ "data": {
+ "label": "pn_orifice_19",
+ "componentType": "amesim_pnor001",
+ "modelType": "amesim_pnor001",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.9,
+ "area": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0
+ },
+ "parameterUnits": {
+ "area": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pn3node2_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -537.1,
+ "y": -15.600000000000051
+ },
+ "data": {
+ "label": "pn_node3_8",
+ "componentType": "amesim_pn3node2",
+ "modelType": "amesim_pn3node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pn3node2_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -537.1,
+ "y": 315.6000000000001
+ },
+ "data": {
+ "label": "pn_node3_9",
+ "componentType": "amesim_pn3node2",
+ "modelType": "amesim_pn3node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pn3node2_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -537.1,
+ "y": 421.2000000000001
+ },
+ "data": {
+ "label": "pn_node3_10",
+ "componentType": "amesim_pn3node2",
+ "modelType": "amesim_pn3node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch023_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 576.8000000000001
+ },
+ "data": {
+ "label": "pn_general_chamber_2",
+ "componentType": "amesim_pnch023",
+ "modelType": "amesim_pnch023",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol": 0.057,
+ "kth": 0.0,
+ "sth": 0.1,
+ "extemp": 293.15,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "cvol": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnor001_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 526.4000000000001
+ },
+ "data": {
+ "label": "pn_orifice_20",
+ "componentType": "amesim_pnor001",
+ "modelType": "amesim_pnor001",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.9,
+ "area": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0
+ },
+ "parameterUnits": {
+ "area": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnor001_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -534,
+ "y": 627.2
+ },
+ "data": {
+ "label": "pn_orifice_21",
+ "componentType": "amesim_pnor001",
+ "modelType": "amesim_pnor001",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.9,
+ "area": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0
+ },
+ "parameterUnits": {
+ "area": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pn3node2_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -537.1,
+ "y": 752.4000000000001
+ },
+ "data": {
+ "label": "pn_node3_11",
+ "componentType": "amesim_pn3node2",
+ "modelType": "amesim_pn3node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -542,
+ "y": 19.199999999999946
+ },
+ "data": {
+ "label": "pneumatic_96",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.014,
+ "le": 1.0,
+ "rr": 0.0032142857142857142,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -542,
+ "y": 244.80000000000007
+ },
+ "data": {
+ "label": "pneumatic_97",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.014,
+ "le": 1.0,
+ "rr": 0.0032142857142857142,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -542,
+ "y": 456.0000000000001
+ },
+ "data": {
+ "label": "pneumatic_98",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.014,
+ "le": 1.0,
+ "rr": 0.0032142857142857142,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_5",
+ "type": "simulationComponent",
+ "position": {
+ "x": -542,
+ "y": 681.6
+ },
+ "data": {
+ "label": "pneumatic_99",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.014,
+ "le": 1.0,
+ "rr": 0.0032142857142857142,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 15299999.999999998,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0003_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -360,
+ "y": 36
+ },
+ "data": {
+ "label": "pneumatic_87",
+ "componentType": "amesim_pnl0003",
+ "modelType": "amesim_pnl0003",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 0.3,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p1_0": 15299999.999999998,
+ "T1_0": 293.15,
+ "p2_0": 15299999.999999998,
+ "T2_0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p1_0": "bar",
+ "T1_0": "K",
+ "p2_0": "bar",
+ "T2_0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0003_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -360,
+ "y": 270
+ },
+ "data": {
+ "label": "pneumatic_88",
+ "componentType": "amesim_pnl0003",
+ "modelType": "amesim_pnl0003",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 0.3,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p1_0": 15299999.999999998,
+ "T1_0": 293.15,
+ "p2_0": 15299999.999999998,
+ "T2_0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p1_0": "bar",
+ "T1_0": "K",
+ "p2_0": "bar",
+ "T2_0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0003_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -360,
+ "y": 684
+ },
+ "data": {
+ "label": "pneumatic_76",
+ "componentType": "amesim_pnl0003",
+ "modelType": "amesim_pnl0003",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 0.3,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p1_0": 15299999.999999998,
+ "T1_0": 293.15,
+ "p2_0": 15299999.999999998,
+ "T2_0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p1_0": "bar",
+ "T1_0": "K",
+ "p2_0": "bar",
+ "T2_0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0003_8",
+ "type": "simulationComponent",
+ "position": {
+ "x": -360,
+ "y": 432
+ },
+ "data": {
+ "label": "pneumatic_75",
+ "componentType": "amesim_pnl0003",
+ "modelType": "amesim_pnl0003",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 0.3,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p1_0": 15299999.999999998,
+ "T1_0": 293.15,
+ "p2_0": 15299999.999999998,
+ "T2_0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p1_0": "bar",
+ "T1_0": "K",
+ "p2_0": "bar",
+ "T2_0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnvo001_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -198,
+ "y": 72
+ },
+ "data": {
+ "label": "pn_morifice_1",
+ "componentType": "amesim_pnvo001",
+ "modelType": "amesim_pnvo001",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 5
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.45,
+ "area0": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0,
+ "opening0": 1.0
+ },
+ "parameterUnits": {
+ "area0": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnvo001_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -198,
+ "y": 252
+ },
+ "data": {
+ "label": "pn_morifice_9",
+ "componentType": "amesim_pnvo001",
+ "modelType": "amesim_pnvo001",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 5
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.45,
+ "area0": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0,
+ "opening0": 1.0
+ },
+ "parameterUnits": {
+ "area0": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnvo001_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -198,
+ "y": 486
+ },
+ "data": {
+ "label": "pn_morifice_10",
+ "componentType": "amesim_pnvo001",
+ "modelType": "amesim_pnvo001",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 5
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.45,
+ "area0": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0,
+ "opening0": 1.0
+ },
+ "parameterUnits": {
+ "area0": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnvo001_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -198,
+ "y": 648
+ },
+ "data": {
+ "label": "pn_morifice_15",
+ "componentType": "amesim_pnvo001",
+ "modelType": "amesim_pnvo001",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 5
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cq": 0.45,
+ "area0": 7.85e-05,
+ "Cv": 0.5,
+ "Kv": 0.4,
+ "flowset": 1.0,
+ "opening0": 1.0
+ },
+ "parameterUnits": {
+ "area0": "mm2"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_step0_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -318,
+ "y": 124
+ },
+ "data": {
+ "label": "step_12",
+ "componentType": "amesim_step0",
+ "modelType": "amesim_step0",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "initial": 0.0,
+ "final": 1.0,
+ "time": 0.04
+ },
+ "parameterUnits": {
+ "time": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_step0_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -318,
+ "y": 340
+ },
+ "data": {
+ "label": "step_13",
+ "componentType": "amesim_step0",
+ "modelType": "amesim_step0",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "initial": 0.0,
+ "final": 1.0,
+ "time": 0.04
+ },
+ "parameterUnits": {
+ "time": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_step0_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -324,
+ "y": 558
+ },
+ "data": {
+ "label": "step_14",
+ "componentType": "amesim_step0",
+ "modelType": "amesim_step0",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "initial": 0.0,
+ "final": 1.0,
+ "time": 0.04
+ },
+ "parameterUnits": {
+ "time": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_step0_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -324,
+ "y": 756
+ },
+ "data": {
+ "label": "step_15",
+ "componentType": "amesim_step0",
+ "modelType": "amesim_step0",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "initial": 0.0,
+ "final": 1.0,
+ "time": 0.04
+ },
+ "parameterUnits": {
+ "time": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_p4node2_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -38,
+ "y": 91.20000000000002
+ },
+ "data": {
+ "label": "pnnode4_16",
+ "componentType": "amesim_p4node2",
+ "modelType": "amesim_p4node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_p4node2_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -38,
+ "y": 196.8
+ },
+ "data": {
+ "label": "pnnode4_17",
+ "componentType": "amesim_p4node2",
+ "modelType": "amesim_p4node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_p4node2_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -36,
+ "y": 432
+ },
+ "data": {
+ "label": "pnnode4_18",
+ "componentType": "amesim_p4node2",
+ "modelType": "amesim_p4node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_p4node2_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -36,
+ "y": 537.6000000000001
+ },
+ "data": {
+ "label": "pnnode4_19",
+ "componentType": "amesim_p4node2",
+ "modelType": "amesim_p4node2",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "fixed",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ],
+ "referencePort": "port_2"
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0002_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -36,
+ "y": 126
+ },
+ "data": {
+ "label": "pneumatic_83",
+ "componentType": "amesim_pnl0002",
+ "modelType": "amesim_pnl0002",
+ "modelVersion": "0.6.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 2.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0002_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": -36,
+ "y": 306
+ },
+ "data": {
+ "label": "pneumatic_86",
+ "componentType": "amesim_pnl0002",
+ "modelType": "amesim_pnl0002",
+ "modelVersion": "0.6.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 2.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0002_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": -34,
+ "y": 466.80000000000007
+ },
+ "data": {
+ "label": "pneumatic_80",
+ "componentType": "amesim_pnl0002",
+ "modelType": "amesim_pnl0002",
+ "modelVersion": "0.6.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 2.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_13",
+ "type": "simulationComponent",
+ "position": {
+ "x": 198,
+ "y": 126
+ },
+ "data": {
+ "label": "pneumatic_69",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 1.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_14",
+ "type": "simulationComponent",
+ "position": {
+ "x": 198,
+ "y": 198
+ },
+ "data": {
+ "label": "pneumatic_68",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 1.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_15",
+ "type": "simulationComponent",
+ "position": {
+ "x": 180,
+ "y": 378
+ },
+ "data": {
+ "label": "pneumatic_66",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 1.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0001_16",
+ "type": "simulationComponent",
+ "position": {
+ "x": 180,
+ "y": 522
+ },
+ "data": {
+ "label": "pneumatic_65",
+ "componentType": "amesim_pnl0001",
+ "modelType": "amesim_pnl0001",
+ "modelVersion": "0.4.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.02,
+ "le": 1.0,
+ "rr": 0.00225,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 100000.00000000001,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch012_12",
+ "type": "simulationComponent",
+ "position": {
+ "x": 320,
+ "y": 528
+ },
+ "data": {
+ "label": "pn_c1_11",
+ "componentType": "amesim_pnch012",
+ "modelType": "amesim_pnch012",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol0": 0.015,
+ "kth": 1500.0,
+ "sth": 0.7,
+ "extemp": 293.15,
+ "p0": 100000.00000000001,
+ "T0": 293.15,
+ "vol1": 0.0,
+ "vol2": 0.0,
+ "vol3": 0.0,
+ "vol4": 0.0,
+ "dvol1": 0.0,
+ "dvol2": 0.0,
+ "dvol3": 0.0,
+ "dvol4": 0.0
+ },
+ "parameterUnits": {
+ "cvol0": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K",
+ "vol1": "m3",
+ "vol2": "m3",
+ "vol3": "m3",
+ "vol4": "m3",
+ "dvol1": "m3/s",
+ "dvol2": "m3/s",
+ "dvol3": "m3/s",
+ "dvol4": "m3/s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_9",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 568
+ },
+ "data": {
+ "label": "pn_plug_22",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_10",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 484
+ },
+ "data": {
+ "label": "pn_plug_23",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch012_13",
+ "type": "simulationComponent",
+ "position": {
+ "x": 320,
+ "y": 384
+ },
+ "data": {
+ "label": "pn_c1_10",
+ "componentType": "amesim_pnch012",
+ "modelType": "amesim_pnch012",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol0": 0.015,
+ "kth": 1500.0,
+ "sth": 0.7,
+ "extemp": 293.15,
+ "p0": 100000.00000000001,
+ "T0": 293.15,
+ "vol1": 0.0,
+ "vol2": 0.0,
+ "vol3": 0.0,
+ "vol4": 0.0,
+ "dvol1": 0.0,
+ "dvol2": 0.0,
+ "dvol3": 0.0,
+ "dvol4": 0.0
+ },
+ "parameterUnits": {
+ "cvol0": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K",
+ "vol1": "m3",
+ "vol2": "m3",
+ "vol3": "m3",
+ "vol4": "m3",
+ "dvol1": "m3/s",
+ "dvol2": "m3/s",
+ "dvol3": "m3/s",
+ "dvol4": "m3/s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_11",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 424
+ },
+ "data": {
+ "label": "pn_plug_20",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_12",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 340
+ },
+ "data": {
+ "label": "pn_plug_21",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch012_14",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 204
+ },
+ "data": {
+ "label": "pn_c1_9",
+ "componentType": "amesim_pnch012",
+ "modelType": "amesim_pnch012",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol0": 0.015,
+ "kth": 1500.0,
+ "sth": 0.7,
+ "extemp": 293.15,
+ "p0": 100000.00000000001,
+ "T0": 293.15,
+ "vol1": 0.0,
+ "vol2": 0.0,
+ "vol3": 0.0,
+ "vol4": 0.0,
+ "dvol1": 0.0,
+ "dvol2": 0.0,
+ "dvol3": 0.0,
+ "dvol4": 0.0
+ },
+ "parameterUnits": {
+ "cvol0": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K",
+ "vol1": "m3",
+ "vol2": "m3",
+ "vol3": "m3",
+ "vol4": "m3",
+ "dvol1": "m3/s",
+ "dvol2": "m3/s",
+ "dvol3": "m3/s",
+ "dvol4": "m3/s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_13",
+ "type": "simulationComponent",
+ "position": {
+ "x": 356,
+ "y": 244
+ },
+ "data": {
+ "label": "pn_plug_18",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_14",
+ "type": "simulationComponent",
+ "position": {
+ "x": 356,
+ "y": 160
+ },
+ "data": {
+ "label": "pn_plug_19",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnch012_15",
+ "type": "simulationComponent",
+ "position": {
+ "x": 338,
+ "y": 78
+ },
+ "data": {
+ "label": "pn_c1_8",
+ "componentType": "amesim_pnch012",
+ "modelType": "amesim_pnch012",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "m_flow",
+ "H_flow"
+ ],
+ "outputs": [
+ "p",
+ "T"
+ ]
+ },
+ "side": "right",
+ "order": 40
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "cvol0": 0.015,
+ "kth": 1500.0,
+ "sth": 0.7,
+ "extemp": 293.15,
+ "p0": 100000.00000000001,
+ "T0": 293.15,
+ "vol1": 0.0,
+ "vol2": 0.0,
+ "vol3": 0.0,
+ "vol4": 0.0,
+ "dvol1": 0.0,
+ "dvol2": 0.0,
+ "dvol3": 0.0,
+ "dvol4": 0.0
+ },
+ "parameterUnits": {
+ "cvol0": "L",
+ "kth": "W/(m2*K)",
+ "sth": "m2",
+ "extemp": "K",
+ "p0": "bar",
+ "T0": "K",
+ "vol1": "m3",
+ "vol2": "m3",
+ "vol3": "m3",
+ "vol4": "m3",
+ "dvol1": "m3/s",
+ "dvol2": "m3/s",
+ "dvol3": "m3/s",
+ "dvol4": "m3/s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_15",
+ "type": "simulationComponent",
+ "position": {
+ "x": 356,
+ "y": 118
+ },
+ "data": {
+ "label": "pn_plug_16",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnpl01_16",
+ "type": "simulationComponent",
+ "position": {
+ "x": 356,
+ "y": 34
+ },
+ "data": {
+ "label": "pn_plug_17",
+ "componentType": "amesim_pnpl01",
+ "modelType": "amesim_pnpl01",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 270,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnrp17_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": 558,
+ "y": -18
+ },
+ "data": {
+ "label": "pn_brp2_8",
+ "componentType": "amesim_pnrp17",
+ "modelType": "amesim_pnrp17",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 20
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "dp": 0.2,
+ "dr": 0.001,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "dp": "mm",
+ "dr": "mm",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnrp17_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": 558,
+ "y": 162
+ },
+ "data": {
+ "label": "pn_brp2_9",
+ "componentType": "amesim_pnrp17",
+ "modelType": "amesim_pnrp17",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 20
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "dp": 0.2,
+ "dr": 0.001,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "dp": "mm",
+ "dr": "mm",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnrp17_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": 558,
+ "y": 324
+ },
+ "data": {
+ "label": "pn_brp2_10",
+ "componentType": "amesim_pnrp17",
+ "modelType": "amesim_pnrp17",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 20
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "dp": 0.2,
+ "dr": 0.001,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "dp": "mm",
+ "dr": "mm",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnrp17_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": 558,
+ "y": 522
+ },
+ "data": {
+ "label": "pn_brp2_11",
+ "componentType": "amesim_pnrp17",
+ "modelType": "amesim_pnrp17",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 20
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "dp": 0.2,
+ "dr": 0.001,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "dp": "mm",
+ "dr": "mm",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_15",
+ "type": "simulationComponent",
+ "position": {
+ "x": 646.5,
+ "y": -43.68675
+ },
+ "data": {
+ "label": "zeroforcesource_26",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_16",
+ "type": "simulationComponent",
+ "position": {
+ "x": 646.5,
+ "y": 136.31324999999998
+ },
+ "data": {
+ "label": "zeroforcesource_27",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_17",
+ "type": "simulationComponent",
+ "position": {
+ "x": 646.5,
+ "y": 298.3132499999999
+ },
+ "data": {
+ "label": "zeroforcesource_28",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_18",
+ "type": "simulationComponent",
+ "position": {
+ "x": 646.5,
+ "y": 496.31325000000015
+ },
+ "data": {
+ "label": "zeroforcesource_29",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": 467.7000000000001,
+ "y": -17.971999999999994
+ },
+ "data": {
+ "label": "mass_friction_endstops_10",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 50.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": -1.0,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.8,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 4.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": 467.70000000000005,
+ "y": 162.02800000000005
+ },
+ "data": {
+ "label": "mass_friction_endstops_11",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 50.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": -1.0,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.8,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 4.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": 467.70000000000016,
+ "y": 324.02799999999996
+ },
+ "data": {
+ "label": "mass_friction_endstops_12",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 50.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": -1.0,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.8,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 4.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": 467.70000000000005,
+ "y": 522.0280000000001
+ },
+ "data": {
+ "label": "mass_friction_endstops_13",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 50.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": -1.0,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.8,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 4.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_23",
+ "type": "simulationComponent",
+ "position": {
+ "x": 425.90000000000003,
+ "y": -1.9719999999999942
+ },
+ "data": {
+ "label": "zeroforcesource_17",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_25",
+ "type": "simulationComponent",
+ "position": {
+ "x": 425.90000000000003,
+ "y": 178.02800000000008
+ },
+ "data": {
+ "label": "zeroforcesource_18",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_26",
+ "type": "simulationComponent",
+ "position": {
+ "x": 425.9000000000001,
+ "y": 340.02799999999996
+ },
+ "data": {
+ "label": "zeroforcesource_19",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_f000_27",
+ "type": "simulationComponent",
+ "position": {
+ "x": 425.9000000000001,
+ "y": 538.028
+ },
+ "data": {
+ "label": "zeroforcesource_20",
+ "componentType": "amesim_f000",
+ "modelType": "amesim_f000",
+ "modelVersion": "0.1.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {},
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lstp00a_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": 738,
+ "y": -18
+ },
+ "data": {
+ "label": "elasticendstop_8",
+ "componentType": "amesim_lstp00a",
+ "modelType": "amesim_lstp00a",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "na": 10.0,
+ "gap0": 0.0,
+ "kcont": 100000000000.0,
+ "G": 85700000000.0,
+ "sdiam": 0.02,
+ "wdiam": 0.002,
+ "rcont": 100000000000.0,
+ "Pdis": 1.0000000000000001e-07,
+ "stiffmode": 1.0,
+ "discContactOption": 1.0
+ },
+ "parameterUnits": {
+ "gap0": "mm",
+ "kcont": "N/m",
+ "G": "Pa",
+ "sdiam": "mm",
+ "wdiam": "mm",
+ "rcont": "N/(m/s)",
+ "Pdis": "mm"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lstp00a_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": 738,
+ "y": 162
+ },
+ "data": {
+ "label": "elasticendstop_9",
+ "componentType": "amesim_lstp00a",
+ "modelType": "amesim_lstp00a",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "na": 10.0,
+ "gap0": 0.0,
+ "kcont": 100000000000.0,
+ "G": 85700000000.0,
+ "sdiam": 0.02,
+ "wdiam": 0.002,
+ "rcont": 100000000000.0,
+ "Pdis": 1.0000000000000001e-07,
+ "stiffmode": 1.0,
+ "discContactOption": 1.0
+ },
+ "parameterUnits": {
+ "gap0": "mm",
+ "kcont": "N/m",
+ "G": "Pa",
+ "sdiam": "mm",
+ "wdiam": "mm",
+ "rcont": "N/(m/s)",
+ "Pdis": "mm"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lstp00a_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": 738,
+ "y": 324
+ },
+ "data": {
+ "label": "elasticendstop_10",
+ "componentType": "amesim_lstp00a",
+ "modelType": "amesim_lstp00a",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "na": 10.0,
+ "gap0": 0.0,
+ "kcont": 100000000000.0,
+ "G": 85700000000.0,
+ "sdiam": 0.02,
+ "wdiam": 0.002,
+ "rcont": 100000000000.0,
+ "Pdis": 1.0000000000000001e-07,
+ "stiffmode": 1.0,
+ "discContactOption": 1.0
+ },
+ "parameterUnits": {
+ "gap0": "mm",
+ "kcont": "N/m",
+ "G": "Pa",
+ "sdiam": "mm",
+ "wdiam": "mm",
+ "rcont": "N/(m/s)",
+ "Pdis": "mm"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lstp00a_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": 738,
+ "y": 522
+ },
+ "data": {
+ "label": "elasticendstop_11",
+ "componentType": "amesim_lstp00a",
+ "modelType": "amesim_lstp00a",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "na": 10.0,
+ "gap0": 0.0,
+ "kcont": 100000000000.0,
+ "G": 85700000000.0,
+ "sdiam": 0.02,
+ "wdiam": 0.002,
+ "rcont": 100000000000.0,
+ "Pdis": 1.0000000000000001e-07,
+ "stiffmode": 1.0,
+ "discContactOption": 1.0
+ },
+ "parameterUnits": {
+ "gap0": "mm",
+ "kcont": "N/m",
+ "G": "Pa",
+ "sdiam": "mm",
+ "wdiam": "mm",
+ "rcont": "N/(m/s)",
+ "Pdis": "mm"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lmechn1_3",
+ "type": "simulationComponent",
+ "position": {
+ "x": 198,
+ "y": -234
+ },
+ "data": {
+ "label": "dynamic_mechanical_node_alternative_3",
+ "componentType": "amesim_lmechn1",
+ "modelType": "amesim_lmechn1",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ },
+ {
+ "name": "port_6",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 60
+ },
+ {
+ "name": "port_7",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 70
+ },
+ {
+ "name": "port_8",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 80
+ },
+ {
+ "name": "port_9",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 90
+ },
+ {
+ "name": "port_10",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 100
+ },
+ {
+ "name": "port_11",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 110
+ },
+ {
+ "name": "port_12",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 120
+ },
+ {
+ "name": "port_13",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 130
+ },
+ {
+ "name": "port_14",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 140
+ },
+ {
+ "name": "port_15",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 150
+ },
+ {
+ "name": "port_16",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 160
+ },
+ {
+ "name": "port_17",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 170
+ },
+ {
+ "name": "port_18",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 180
+ },
+ {
+ "name": "port_19",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 190
+ },
+ {
+ "name": "port_20",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 200
+ },
+ {
+ "name": "port_21",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 210
+ }
+ ],
+ "parameters": {
+ "v1": 4.0,
+ "sum": 1.0
+ },
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_9",
+ "type": "simulationComponent",
+ "position": {
+ "x": 108.20000000000002,
+ "y": -179
+ },
+ "data": {
+ "label": "mass_friction_endstops_19",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 90000.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": -0.72,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.0,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 1.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_forc_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": 36.80000000000001,
+ "y": -179
+ },
+ "data": {
+ "label": "forcecon_1",
+ "componentType": "amesim_forc",
+ "modelType": "amesim_forc",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "direction": 1.0
+ },
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_ud00_1",
+ "type": "simulationComponent",
+ "position": {
+ "x": -30.39999999999999,
+ "y": -179
+ },
+ "data": {
+ "label": "piecewiselinear",
+ "componentType": "amesim_ud00",
+ "modelType": "amesim_ud00",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "tstart": 0.0,
+ "start1": 1e+17,
+ "end1": 1e+17,
+ "t1": 0.8,
+ "start2": 49000.0,
+ "end2": 49000.0,
+ "t2": 10.0,
+ "start3": 0.0,
+ "end3": 0.0,
+ "t3": 3.0,
+ "start4": 0.0,
+ "end4": 0.0,
+ "t4": 3.0,
+ "start5": 0.0,
+ "end5": 0.0,
+ "t5": 3.0,
+ "start6": 0.0,
+ "end6": 0.0,
+ "t6": 3.0,
+ "start7": 0.0,
+ "end7": 0.0,
+ "t7": 3.0,
+ "start8": 0.0,
+ "end8": 0.0,
+ "t8": 3.0,
+ "nstages": 2.0,
+ "iscyclic": 1.0
+ },
+ "parameterUnits": {
+ "tstart": "s",
+ "t1": "s",
+ "t2": "s",
+ "t3": "s",
+ "t4": "s",
+ "t5": "s",
+ "t6": "s",
+ "t7": "s",
+ "t8": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_lmechn1_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": 1078,
+ "y": 555
+ },
+ "data": {
+ "label": "dynamic_mechanical_node_alternative_2",
+ "componentType": "amesim_lmechn1",
+ "modelType": "amesim_lmechn1",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ },
+ {
+ "name": "port_3",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 30
+ },
+ {
+ "name": "port_4",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 40
+ },
+ {
+ "name": "port_5",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 50
+ },
+ {
+ "name": "port_6",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 60
+ },
+ {
+ "name": "port_7",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 70
+ },
+ {
+ "name": "port_8",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 80
+ },
+ {
+ "name": "port_9",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 90
+ },
+ {
+ "name": "port_10",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 100
+ },
+ {
+ "name": "port_11",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 110
+ },
+ {
+ "name": "port_12",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 120
+ },
+ {
+ "name": "port_13",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 130
+ },
+ {
+ "name": "port_14",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 140
+ },
+ {
+ "name": "port_15",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 150
+ },
+ {
+ "name": "port_16",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 160
+ },
+ {
+ "name": "port_17",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 170
+ },
+ {
+ "name": "port_18",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 180
+ },
+ {
+ "name": "port_19",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 190
+ },
+ {
+ "name": "port_20",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 200
+ },
+ {
+ "name": "port_21",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 210
+ }
+ ],
+ "parameters": {
+ "v1": 4.0,
+ "sum": 1.0
+ },
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 180,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_mecmas21_10",
+ "type": "simulationComponent",
+ "position": {
+ "x": 1183.8,
+ "y": 610
+ },
+ "data": {
+ "label": "mass_friction_endstops_18",
+ "componentType": "amesim_mecmas21",
+ "modelType": "amesim_mecmas21",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "mass": 170000.0,
+ "fstick": 0.0,
+ "fcoul": 0.0,
+ "rvisc": 0.0,
+ "wind": 0.0,
+ "dvel": 1e-06,
+ "restdvel": 1e-06,
+ "restcoeff": 0.65,
+ "astrib": 0.001,
+ "xmin": 0.0,
+ "Kbmin": 1000000000.0,
+ "Dbmin": 10000.0,
+ "Pdmin": 0.0001,
+ "xmax": 0.37,
+ "Kbmax": 1000000000.0,
+ "Dbmax": 10000.0,
+ "Pdmax": 0.0001,
+ "theta": 0.0,
+ "useFriction": 1.0,
+ "stoptype": 1.0,
+ "discContactOption": 1.0,
+ "strib": 1.0,
+ "frictionType": 1.0,
+ "v0": 0.0,
+ "x0": 0.0
+ },
+ "parameterUnits": {
+ "mass": "kg",
+ "fstick": "N",
+ "fcoul": "N",
+ "rvisc": "N/(m/s)",
+ "wind": "N/(m/s)^2",
+ "dvel": "m/s",
+ "restdvel": "m/s",
+ "astrib": "m/s",
+ "xmin": "m",
+ "Kbmin": "N/m",
+ "Dbmin": "N/(m/s)",
+ "Pdmin": "m",
+ "xmax": "m",
+ "Kbmax": "N/m",
+ "Dbmax": "N/(m/s)",
+ "Pdmax": "m",
+ "v0": "m/s",
+ "x0": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_forc_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": 1255.1999999999998,
+ "y": 610
+ },
+ "data": {
+ "label": "forcecon_2",
+ "componentType": "amesim_forc",
+ "modelType": "amesim_forc",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "res",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "input",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "mechanical",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "x",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "位移",
+ "quantity": "length",
+ "unit": "m",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "v",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "速度",
+ "quantity": "velocity",
+ "unit": "m/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "f",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "力",
+ "quantity": "force",
+ "unit": "N",
+ "resultVisible": true,
+ "order": 30
+ }
+ ],
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "direction": -1.0
+ },
+ "parameterUnits": {},
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_ud00_2",
+ "type": "simulationComponent",
+ "position": {
+ "x": 1322.3999999999996,
+ "y": 610
+ },
+ "data": {
+ "label": "piecewiselinear_1",
+ "componentType": "amesim_ud00",
+ "modelType": "amesim_ud00",
+ "modelVersion": "0.2.0",
+ "ports": [
+ {
+ "name": "out",
+ "kind": "signal",
+ "domain": "signal",
+ "nominalRole": "output",
+ "variables": [
+ {
+ "name": "signal",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "信号值",
+ "quantity": "dimensionless",
+ "unit": "",
+ "resultVisible": true,
+ "order": 10
+ }
+ ],
+ "side": "right",
+ "order": 10
+ }
+ ],
+ "parameters": {
+ "tstart": 0.0,
+ "start1": 1000000000000.0,
+ "end1": 1000000000000.0,
+ "t1": 0.8,
+ "start2": 0.0,
+ "end2": 0.0,
+ "t2": 10.0,
+ "start3": 0.0,
+ "end3": 0.0,
+ "t3": 3.0,
+ "start4": 0.0,
+ "end4": 0.0,
+ "t4": 3.0,
+ "start5": 0.0,
+ "end5": 0.0,
+ "t5": 3.0,
+ "start6": 0.0,
+ "end6": 0.0,
+ "t6": 3.0,
+ "start7": 0.0,
+ "end7": 0.0,
+ "t7": 3.0,
+ "start8": 0.0,
+ "end8": 0.0,
+ "t8": 3.0,
+ "nstages": 2.0,
+ "iscyclic": 1.0
+ },
+ "parameterUnits": {
+ "tstart": "s",
+ "t1": "s",
+ "t2": "s",
+ "t3": "s",
+ "t4": "s",
+ "t5": "s",
+ "t6": "s",
+ "t7": "s",
+ "t8": "s"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": true
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl00r_4",
+ "type": "simulationComponent",
+ "position": {
+ "x": -722,
+ "y": 780
+ },
+ "data": {
+ "label": "pneumatic",
+ "componentType": "amesim_pnl00r",
+ "modelType": "amesim_pnl00r",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.01,
+ "le": 1.0,
+ "rr": 1e-05
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl00r_5",
+ "type": "simulationComponent",
+ "position": {
+ "x": -542,
+ "y": 350.4000000000001
+ },
+ "data": {
+ "label": "pneumatic_100",
+ "componentType": "amesim_pnl00r",
+ "modelType": "amesim_pnl00r",
+ "modelVersion": "0.3.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.014,
+ "le": 1.0,
+ "rr": 0.0032142857142857142
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 90,
+ "mirrored": false
+ },
+ "selected": false
+ },
+ {
+ "id": "amesim_pnl0002_10",
+ "type": "simulationComponent",
+ "position": {
+ "x": 80.0,
+ "y": 900.0
+ },
+ "data": {
+ "label": "pneumatic_1",
+ "componentType": "amesim_pnl0002",
+ "modelType": "amesim_pnl0002",
+ "modelVersion": "0.6.0",
+ "ports": [
+ {
+ "name": "port_1",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "left",
+ "order": 10
+ },
+ {
+ "name": "port_2",
+ "kind": "physical",
+ "domain": "pneumatic",
+ "nominalRole": "bidirectional",
+ "positiveFlowDirection": "intoComponent",
+ "variables": [
+ {
+ "name": "p",
+ "role": "effort",
+ "connectionRule": "equal",
+ "label": "压力",
+ "quantity": "pressure",
+ "unit": "Pa",
+ "resultVisible": true,
+ "order": 10
+ },
+ {
+ "name": "m_flow",
+ "role": "flow",
+ "connectionRule": "sumToZero",
+ "label": "质量流量",
+ "quantity": "mass_flow",
+ "unit": "kg/s",
+ "resultVisible": true,
+ "order": 20
+ },
+ {
+ "name": "h_outflow",
+ "role": "stream",
+ "connectionRule": "streamMix",
+ "label": "流出比焓",
+ "quantity": "specific_enthalpy",
+ "unit": "J/kg",
+ "resultVisible": true,
+ "order": 30
+ },
+ {
+ "name": "volume",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积",
+ "quantity": "volume",
+ "unit": "m3",
+ "resultVisible": false,
+ "order": 40
+ },
+ {
+ "name": "volume_flow",
+ "role": "signal",
+ "connectionRule": "directed",
+ "label": "外部容积变化率",
+ "quantity": "volume_flow",
+ "unit": "m3/s",
+ "resultVisible": false,
+ "order": 50
+ }
+ ],
+ "computation": {
+ "mode": "equation",
+ "inputs": [
+ "p",
+ "T"
+ ],
+ "outputs": [
+ "m_flow",
+ "H_flow"
+ ]
+ },
+ "side": "right",
+ "order": 20
+ }
+ ],
+ "parameters": {
+ "gi": 1.0,
+ "diam": 0.01,
+ "le": 1.0,
+ "rr": 1e-05,
+ "k": 1.35,
+ "kth": 0.0,
+ "extemp": 293.15,
+ "mode": 2.0,
+ "p0": 101301.013,
+ "T0": 293.15
+ },
+ "parameterUnits": {
+ "diam": "mm",
+ "le": "m",
+ "kth": "W/(m2*K)",
+ "extemp": "K",
+ "p0": "Pa",
+ "T0": "K"
+ },
+ "parameterScientificNotation": {},
+ "rotation": 0,
+ "mirrored": false
+ },
+ "selected": false
+ }
+ ],
+ "edges": [
+ {
+ "id": "edge-amesim_pnch012_15-port_2-amesim_pnrp17_1-port_1-1786949561970",
+ "source": "amesim_pnch012_15",
+ "target": "amesim_pnrp17_1",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_1-port_1-amesim_pnrp17_1-port_2-1786949817764-1",
+ "source": "amesim_mecmas21_1",
+ "target": "amesim_pnrp17_1",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_lmechn1_3-port_1-amesim_pnrp17_1-port_3-1786949849269",
+ "source": "amesim_lmechn1_3",
+ "target": "amesim_pnrp17_1",
+ "sourceHandle": "port_4",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_15-port_1-amesim_pnrp17_1-port_4-1786949604845-0",
+ "source": "amesim_f000_15",
+ "target": "amesim_pnrp17_1",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnrp17_1-port_5-amesim_lstp00a_1-port_1-1786949716336",
+ "source": "amesim_pnrp17_1",
+ "target": "amesim_lstp00a_1",
+ "sourceHandle": "port_5",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnch012_14-port_2-amesim_pnrp17_2-port_1-1786949570722",
+ "source": "amesim_pnch012_14",
+ "target": "amesim_pnrp17_2",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_2-port_1-amesim_pnrp17_2-port_2-1786949641925-0",
+ "source": "amesim_mecmas21_2",
+ "target": "amesim_pnrp17_2",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_lmechn1_3-port_2-amesim_pnrp17_2-port_3-1786949850839",
+ "source": "amesim_lmechn1_3",
+ "target": "amesim_pnrp17_2",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_16-port_1-amesim_pnrp17_2-port_4-1786949607587-0",
+ "source": "amesim_f000_16",
+ "target": "amesim_pnrp17_2",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnrp17_2-port_5-amesim_lstp00a_2-port_1-1786949718088",
+ "source": "amesim_pnrp17_2",
+ "target": "amesim_lstp00a_2",
+ "sourceHandle": "port_5",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_27-port_1-amesim_mecmas21_4-port_2-1786949674147-0",
+ "source": "amesim_f000_27",
+ "target": "amesim_mecmas21_4",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_4-port_1-amesim_pnrp17_4-port_2-1786949645226-0",
+ "source": "amesim_mecmas21_4",
+ "target": "amesim_pnrp17_4",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_lstp00a_1-port_2-amesim_lmechn1_4-port_8-1786949940789",
+ "source": "amesim_lstp00a_1",
+ "target": "amesim_lmechn1_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_lstp00a_2-port_2-amesim_lmechn1_4-port_7-1786949942329",
+ "source": "amesim_lstp00a_2",
+ "target": "amesim_lmechn1_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_lstp00a_3-port_2-amesim_lmechn1_4-port_6-1786949943732",
+ "source": "amesim_lstp00a_3",
+ "target": "amesim_lmechn1_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_lstp00a_4-port_2-amesim_lmechn1_4-port_5-1786949945286",
+ "source": "amesim_lstp00a_4",
+ "target": "amesim_lmechn1_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_10-port_2-amesim_lmechn1_4-port_9-1786949926181-0",
+ "source": "amesim_mecmas21_10",
+ "target": "amesim_lmechn1_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_5",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_forc_2-port_2-amesim_mecmas21_10-port_1-1786949929831-0",
+ "source": "amesim_forc_2",
+ "target": "amesim_mecmas21_10",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnrp17_3-port_5-amesim_lstp00a_3-port_1-1786949719667",
+ "source": "amesim_pnrp17_3",
+ "target": "amesim_lstp00a_3",
+ "sourceHandle": "port_5",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnrp17_4-port_5-amesim_lstp00a_4-port_1-1786949721116",
+ "source": "amesim_pnrp17_4",
+ "target": "amesim_lstp00a_4",
+ "sourceHandle": "port_5",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_lmechn1_3-port_4-amesim_pnrp17_4-port_3-1786949854874",
+ "source": "amesim_lmechn1_3",
+ "target": "amesim_pnrp17_4",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_lmechn1_3-port_3-amesim_pnrp17_3-port_3-1786949852383",
+ "source": "amesim_lmechn1_3",
+ "target": "amesim_pnrp17_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_9-port_1-amesim_lmechn1_3-port_9-1786949831063-0",
+ "source": "amesim_mecmas21_9",
+ "target": "amesim_lmechn1_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_5",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_forc_1-port_2-amesim_mecmas21_9-port_2-1786949832141-0",
+ "source": "amesim_forc_1",
+ "target": "amesim_mecmas21_9",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnch012_13-port_2-amesim_pnrp17_3-port_1-1786949575918",
+ "source": "amesim_pnch012_13",
+ "target": "amesim_pnrp17_3",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_3-port_1-amesim_pnrp17_3-port_2-1786949643700-0",
+ "source": "amesim_mecmas21_3",
+ "target": "amesim_pnrp17_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_17-port_1-amesim_pnrp17_3-port_4-1786949609264-0",
+ "source": "amesim_f000_17",
+ "target": "amesim_pnrp17_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0001_13-port_1-amesim_pnch012_15-port_1-1786949522082",
+ "source": "amesim_pnl0001_13",
+ "target": "amesim_pnch012_15",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949519920-1",
+ "source": "amesim_pnpl01_16",
+ "target": "amesim_pnch012_15",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949519920-0",
+ "source": "amesim_pnpl01_15",
+ "target": "amesim_pnch012_15",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0001_14-port_1-amesim_pnch012_14-port_1-1786949517114",
+ "source": "amesim_pnl0001_14",
+ "target": "amesim_pnch012_14",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949515328-1",
+ "source": "amesim_pnpl01_14",
+ "target": "amesim_pnch012_14",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949515328-0",
+ "source": "amesim_pnpl01_13",
+ "target": "amesim_pnch012_14",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0001_15-port_1-amesim_pnch012_13-port_1-1786949510820",
+ "source": "amesim_pnl0001_15",
+ "target": "amesim_pnch012_13",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949508480-1",
+ "source": "amesim_pnpl01_12",
+ "target": "amesim_pnch012_13",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949508480-0",
+ "source": "amesim_pnpl01_11",
+ "target": "amesim_pnch012_13",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0001_16-port_1-amesim_pnch012_12-port_1-1786949506502",
+ "source": "amesim_pnl0001_16",
+ "target": "amesim_pnch012_12",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949504776-1",
+ "source": "amesim_pnpl01_10",
+ "target": "amesim_pnch012_12",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnch012_12-port_2-amesim_pnrp17_4-port_1-1786949579000",
+ "source": "amesim_pnch012_12",
+ "target": "amesim_pnrp17_4",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-copy-1786949504776-0",
+ "source": "amesim_pnpl01_9",
+ "target": "amesim_pnch012_12",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_18-port_1-amesim_pnrp17_4-port_4-1786949612717-0",
+ "source": "amesim_f000_18",
+ "target": "amesim_pnrp17_4",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_ud00_1-out-amesim_forc_1-res-1786949833688-0",
+ "source": "amesim_ud00_1",
+ "target": "amesim_forc_1",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnor001_2-port_2-amesim_pnch023_1-port_1-1786948253132-1",
+ "source": "amesim_pnor001_2",
+ "target": "amesim_pnch023_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnor001_1-port_1-amesim_pnch023_1-port_2-1786948460485-0",
+ "source": "amesim_pnor001_1",
+ "target": "amesim_pnch023_1",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0001_1-port_2-amesim_pnor001_1-port_2-1786948481782-0",
+ "source": "amesim_pnl0001_1",
+ "target": "amesim_pnor001_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0001_2-port_2-amesim_pnor001_2-port_1-1786948499851-0",
+ "source": "amesim_pnl0001_2",
+ "target": "amesim_pnor001_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_mecmas21_1-port_2-amesim_f000_23-port_1-1786949817764-0",
+ "source": "amesim_mecmas21_1",
+ "target": "amesim_f000_23",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pn3node2_1-port_1-amesim_pnl0001_1-port_1-1786948483280-0",
+ "source": "amesim_pn3node2_1",
+ "target": "amesim_pnl0001_1",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pn3node2_1-port_2-amesim_pnl0003_1-port_1-1786948902586",
+ "source": "amesim_pn3node2_1",
+ "target": "amesim_pnl0003_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnl00r_4-port_1-amesim_pn3node2_1-port_3-1786972805226",
+ "source": "amesim_pnl00r_4",
+ "target": "amesim_pn3node2_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl00r_5-port_1-amesim_pn3node2_2-port_1-1786953128004-0",
+ "source": "amesim_pnl00r_5",
+ "target": "amesim_pn3node2_2",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pn3node2_2-port_2-amesim_pnl0003_2-port_1-1786948943285",
+ "source": "amesim_pn3node2_2",
+ "target": "amesim_pnl0003_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pn3node2_2-port_3-amesim_pnl0001_2-port_1-1786948516979-0",
+ "source": "amesim_pn3node2_2",
+ "target": "amesim_pnl0001_2",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnor001_4-port_2-amesim_pnch023_2-port_1-1786948572079-0",
+ "source": "amesim_pnor001_4",
+ "target": "amesim_pnch023_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnch023_2-port_2-amesim_pnor001_3-port_1-1786948548687-0",
+ "source": "amesim_pnch023_2",
+ "target": "amesim_pnor001_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnor001_3-port_2-amesim_pnl0001_4-port_2-1786948546851-0",
+ "source": "amesim_pnor001_3",
+ "target": "amesim_pnl0001_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0001_5-port_2-amesim_pnor001_4-port_1-1786948580590-0",
+ "source": "amesim_pnl0001_5",
+ "target": "amesim_pnor001_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0001_4-port_1-amesim_pn3node2_3-port_1-1786948539164-0",
+ "source": "amesim_pnl0001_4",
+ "target": "amesim_pn3node2_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pn3node2_3-port_2-amesim_pnl0003_8-port_1-1786948947499",
+ "source": "amesim_pn3node2_3",
+ "target": "amesim_pnl0003_8",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl00r_5-port_2-amesim_pn3node2_3-port_3-1786953128004-1",
+ "source": "amesim_pnl00r_5",
+ "target": "amesim_pn3node2_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "ame-amesim_pn3node2_4-port_1-amesim_pnl00r_4-port_1",
+ "source": "amesim_pn3node2_4",
+ "target": "amesim_pnl00r_4",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pn3node2_4-port_2-amesim_pnl0003_3-port_1-1786948950174",
+ "source": "amesim_pn3node2_4",
+ "target": "amesim_pnl0003_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pn3node2_4-port_3-amesim_pnl0001_5-port_1-1786948588931-0",
+ "source": "amesim_pn3node2_4",
+ "target": "amesim_pnl0001_5",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0002_1-port_1-amesim_p4node2_1-port_1-1786972813085-1",
+ "source": "amesim_pnl0002_1",
+ "target": "amesim_p4node2_1",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_p4node2_1-port_2-amesim_pnl0001_13-port_2-1786972847258",
+ "source": "amesim_p4node2_1",
+ "target": "amesim_pnl0001_13",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "ame-amesim_p4node2_1-port_3-amesim_pnl0002_10-port_1",
+ "source": "amesim_p4node2_1",
+ "target": "amesim_pnl0002_10",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnvo001_1-port_2-amesim_p4node2_1-port_3-1786949112480",
+ "source": "amesim_pnvo001_1",
+ "target": "amesim_p4node2_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_p4node2_2-port_4-amesim_pnl0002_2-port_1-1786949195556",
+ "source": "amesim_p4node2_2",
+ "target": "amesim_pnl0002_2",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_p4node2_2-port_3-amesim_pnl0001_14-port_2-1786949362056",
+ "source": "amesim_p4node2_2",
+ "target": "amesim_pnl0001_14",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0002_1-port_2-amesim_p4node2_2-port_1-1786972813085-0",
+ "source": "amesim_pnl0002_1",
+ "target": "amesim_p4node2_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnvo001_2-port_2-amesim_p4node2_2-port_2-1786949129074",
+ "source": "amesim_pnvo001_2",
+ "target": "amesim_p4node2_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_pnl0002_3-port_1-amesim_p4node2_3-port_4-1786949203907-0",
+ "source": "amesim_pnl0002_3",
+ "target": "amesim_p4node2_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_1",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_p4node2_3-port_3-amesim_pnl0001_15-port_2-1786949364233",
+ "source": "amesim_p4node2_3",
+ "target": "amesim_pnl0001_15",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0002_2-port_2-amesim_p4node2_3-port_1-1786949196897",
+ "source": "amesim_pnl0002_2",
+ "target": "amesim_p4node2_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnvo001_3-port_2-amesim_p4node2_3-port_2-1786949131664",
+ "source": "amesim_pnvo001_3",
+ "target": "amesim_p4node2_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "ame-amesim_p4node2_4-port_1-amesim_pnl0002_10-port_2",
+ "source": "amesim_p4node2_4",
+ "target": "amesim_pnl0002_10",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_p4node2_4-port_3-amesim_pnl0001_16-port_2-1786949365198",
+ "source": "amesim_p4node2_4",
+ "target": "amesim_pnl0001_16",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_p4node2_4-port_1-amesim_pnl0002_3-port_2-1786949205596-0",
+ "source": "amesim_p4node2_4",
+ "target": "amesim_pnl0002_3",
+ "sourceHandle": "port_3",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnvo001_4-port_2-amesim_p4node2_4-port_2-1786949134056",
+ "source": "amesim_pnvo001_4",
+ "target": "amesim_p4node2_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_4",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_ud00_2-out-amesim_forc_2-res-1786949931612-0",
+ "source": "amesim_ud00_2",
+ "target": "amesim_forc_2",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0003_1-port_2-amesim_pnvo001_1-port_3-1786948980355",
+ "source": "amesim_pnl0003_1",
+ "target": "amesim_pnvo001_1",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_step0_1-out-amesim_pnvo001_1-res-1786949061988",
+ "source": "amesim_step0_1",
+ "target": "amesim_pnvo001_1",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0003_2-port_2-amesim_pnvo001_2-port_3-1786948998177",
+ "source": "amesim_pnl0003_2",
+ "target": "amesim_pnvo001_2",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_step0_2-out-amesim_pnvo001_2-res-1786949060983",
+ "source": "amesim_step0_2",
+ "target": "amesim_pnvo001_2",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0003_8-port_2-amesim_pnvo001_3-port_3-1786948999135",
+ "source": "amesim_pnl0003_8",
+ "target": "amesim_pnvo001_3",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_step0_3-out-amesim_pnvo001_3-res-1786949059791",
+ "source": "amesim_step0_3",
+ "target": "amesim_pnvo001_3",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_25-port_1-amesim_mecmas21_2-port_2-1786949669623-0",
+ "source": "amesim_f000_25",
+ "target": "amesim_mecmas21_2",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ },
+ {
+ "id": "edge-amesim_pnl0003_3-port_2-amesim_pnvo001_4-port_3-1786949000506",
+ "source": "amesim_pnl0003_3",
+ "target": "amesim_pnvo001_4",
+ "sourceHandle": "port_2",
+ "targetHandle": "port_3",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-amesim_step0_4-out-amesim_pnvo001_4-res-1786949058632",
+ "source": "amesim_step0_4",
+ "target": "amesim_pnvo001_4",
+ "sourceHandle": "out",
+ "targetHandle": "res",
+ "data": {
+ "isContactEdge": false
+ }
+ },
+ {
+ "id": "edge-contact-amesim_f000_26-port_1-amesim_mecmas21_3-port_2-1786949671407-0",
+ "source": "amesim_f000_26",
+ "target": "amesim_mecmas21_3",
+ "sourceHandle": "port_1",
+ "targetHandle": "port_2",
+ "data": {
+ "isContactEdge": true
+ }
+ }
+ ],
+ "simulation": {
+ "t_start": 0.0,
+ "t_stop": 10.0,
+ "step": 0.01,
+ "max_step": 1e+30,
+ "method": "BDF"
+ }
+}
diff --git a/tests/data/test-mql-4-corrected.xml b/tests/data/test-mql-4-corrected.xml
deleted file mode 100644
index 7675121..0000000
--- a/tests/data/test-mql-4-corrected.xml
+++ /dev/null
@@ -1,1088 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/data/test-mql-8.json b/tests/data/test-mql-8-corrected.json
similarity index 99%
rename from tests/data/test-mql-8.json
rename to tests/data/test-mql-8-corrected.json
index 50c4719..b22a7cc 100644
--- a/tests/data/test-mql-8.json
+++ b/tests/data/test-mql-8-corrected.json
@@ -1,6 +1,6 @@
{
"projectSchemaVersion": 1,
- "name": "test-mql-8",
+ "name": "test-mql-8-corrected",
"nodes": [
{
"id": "pn_gas_data",
@@ -2679,7 +2679,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2732,7 +2732,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2785,7 +2785,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2838,7 +2838,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2891,7 +2891,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2944,7 +2944,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -2997,7 +2997,7 @@
"parameters": {},
"parameterUnits": {},
"parameterScientificNotation": {},
- "rotation": 0,
+ "rotation": 180,
"mirrored": false
}
},
@@ -7368,7 +7368,7 @@
}
],
"parameters": {
- "mass": 90000,
+ "mass": 100.0,
"fstick": 0,
"fcoul": 0,
"rvisc": 0,
@@ -7377,17 +7377,17 @@
"restdvel": 1e-06,
"restcoeff": 0.65,
"astrib": 0.001,
- "xmin": -0.72,
+ "xmin": -1.0,
"Kbmin": 1000000000,
"Dbmin": 10000,
"Pdmin": 0.0001,
- "xmax": 0,
+ "xmax": 1.0,
"Kbmax": 1000000000,
"Dbmax": 10000,
"Pdmax": 0.0001,
"theta": 0,
"useFriction": 1,
- "stoptype": 1,
+ "stoptype": 4.0,
"discContactOption": 1,
"strib": 1,
"frictionType": 1,
@@ -8768,7 +8768,7 @@
"source": "amesim_pnvo001_1",
"target": "amesim_p4node2_1",
"sourceHandle": "port_2",
- "targetHandle": "port_3",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -8778,7 +8778,7 @@
"source": "amesim_pnvo001_2",
"target": "amesim_p4node2_2",
"sourceHandle": "port_2",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -8788,7 +8788,7 @@
"source": "amesim_pnvo001_3",
"target": "amesim_p4node2_3",
"sourceHandle": "port_2",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -8798,7 +8798,7 @@
"source": "amesim_pnvo001_4",
"target": "amesim_p4node2_4",
"sourceHandle": "port_2",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -8807,7 +8807,7 @@
"id": "edge-amesim_p4node2_2-port_4-amesim_pnl0002_2-port_1-1786949195556",
"source": "amesim_p4node2_2",
"target": "amesim_pnl0002_2",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_1",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -8818,7 +8818,7 @@
"source": "amesim_pnl0002_2",
"target": "amesim_p4node2_3",
"sourceHandle": "port_2",
- "targetHandle": "port_1",
+ "targetHandle": "port_3",
"data": {
"isContactEdge": false
}
@@ -8828,26 +8828,26 @@
"source": "amesim_pnl0002_3",
"target": "amesim_p4node2_3",
"sourceHandle": "port_1",
- "targetHandle": "port_4",
+ "targetHandle": "port_1",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
"id": "edge-contact-amesim_p4node2_4-port_1-amesim_pnl0002_3-port_2-1786949205596-0",
"source": "amesim_p4node2_4",
"target": "amesim_pnl0002_3",
- "sourceHandle": "port_1",
+ "sourceHandle": "port_3",
"targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
"id": "edge-amesim_p4node2_4-port_4-amesim_pnl0002_4-port_1-1786949231675",
"source": "amesim_p4node2_4",
"target": "amesim_pnl0002_4",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_1",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -8858,7 +8858,7 @@
"source": "amesim_pnl0002_4",
"target": "amesim_p4node2_5",
"sourceHandle": "port_2",
- "targetHandle": "port_1",
+ "targetHandle": "port_3",
"data": {
"isContactEdge": false
}
@@ -8867,20 +8867,20 @@
"id": "edge-contact-amesim_p4node2_5-port_4-amesim_pnl0002_5-port_1-1786949246412-0",
"source": "amesim_p4node2_5",
"target": "amesim_pnl0002_5",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_1",
"targetHandle": "port_1",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
"id": "edge-contact-amesim_p4node2_6-port_1-amesim_pnl0002_5-port_2-1786949247647-0",
"source": "amesim_p4node2_6",
"target": "amesim_pnl0002_5",
- "sourceHandle": "port_1",
+ "sourceHandle": "port_3",
"targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -8888,7 +8888,7 @@
"source": "amesim_pnl0002_6",
"target": "amesim_p4node2_6",
"sourceHandle": "port_1",
- "targetHandle": "port_4",
+ "targetHandle": "port_1",
"data": {
"isContactEdge": false
}
@@ -8898,7 +8898,7 @@
"source": "amesim_pnl0002_6",
"target": "amesim_p4node2_7",
"sourceHandle": "port_2",
- "targetHandle": "port_1",
+ "targetHandle": "port_3",
"data": {
"isContactEdge": false
}
@@ -8908,26 +8908,26 @@
"source": "amesim_pnl0002_7",
"target": "amesim_p4node2_7",
"sourceHandle": "port_1",
- "targetHandle": "port_4",
+ "targetHandle": "port_1",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
"id": "edge-contact-amesim_p4node2_8-port_1-amesim_pnl0002_7-port_2-1786949266454-0",
"source": "amesim_p4node2_8",
"target": "amesim_pnl0002_7",
- "sourceHandle": "port_1",
+ "sourceHandle": "port_3",
"targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
"id": "edge-amesim_p4node2_2-port_3-amesim_pnl0001_14-port_2-1786949362056",
"source": "amesim_p4node2_2",
"target": "amesim_pnl0001_14",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8937,7 +8937,7 @@
"id": "edge-amesim_p4node2_3-port_3-amesim_pnl0001_15-port_2-1786949364233",
"source": "amesim_p4node2_3",
"target": "amesim_pnl0001_15",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8947,7 +8947,7 @@
"id": "edge-amesim_p4node2_4-port_3-amesim_pnl0001_16-port_2-1786949365198",
"source": "amesim_p4node2_4",
"target": "amesim_pnl0001_16",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8957,7 +8957,7 @@
"id": "edge-amesim_p4node2_5-port_3-amesim_pnl0001_17-port_2-1786949374542",
"source": "amesim_p4node2_5",
"target": "amesim_pnl0001_17",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8967,7 +8967,7 @@
"id": "edge-amesim_p4node2_6-port_3-amesim_pnl0001_18-port_2-1786949377180",
"source": "amesim_p4node2_6",
"target": "amesim_pnl0001_18",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8977,7 +8977,7 @@
"id": "edge-amesim_p4node2_7-port_3-amesim_pnl0001_19-port_2-1786949380063",
"source": "amesim_p4node2_7",
"target": "amesim_pnl0001_19",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -8987,7 +8987,7 @@
"id": "edge-amesim_p4node2_8-port_3-amesim_pnl0001_20-port_2-1786949381164",
"source": "amesim_p4node2_8",
"target": "amesim_pnl0001_20",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
"isContactEdge": false
@@ -9018,9 +9018,9 @@
"source": "amesim_pnpl01_2",
"target": "amesim_pnch012_8",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9038,9 +9038,9 @@
"source": "amesim_pnpl01_4",
"target": "amesim_pnch012_9",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9068,9 +9068,9 @@
"source": "amesim_pnpl01_6",
"target": "amesim_pnch012_10",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9098,9 +9098,9 @@
"source": "amesim_pnpl01_8",
"target": "amesim_pnch012_11",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9128,9 +9128,9 @@
"source": "amesim_pnpl01_10",
"target": "amesim_pnch012_12",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9158,9 +9158,9 @@
"source": "amesim_pnpl01_12",
"target": "amesim_pnch012_13",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9188,9 +9188,9 @@
"source": "amesim_pnpl01_14",
"target": "amesim_pnch012_14",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9218,9 +9218,9 @@
"source": "amesim_pnpl01_16",
"target": "amesim_pnch012_15",
"sourceHandle": "port_1",
- "targetHandle": "port_3",
+ "targetHandle": "port_2",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9237,7 +9237,7 @@
"id": "edge-amesim_pnch012_15-port_2-amesim_pnrp17_1-port_1-1786949561970",
"source": "amesim_pnch012_15",
"target": "amesim_pnrp17_1",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9247,7 +9247,7 @@
"id": "edge-amesim_pnch012_14-port_2-amesim_pnrp17_2-port_1-1786949570722",
"source": "amesim_pnch012_14",
"target": "amesim_pnrp17_2",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9257,7 +9257,7 @@
"id": "edge-amesim_pnch012_13-port_2-amesim_pnrp17_3-port_1-1786949575918",
"source": "amesim_pnch012_13",
"target": "amesim_pnrp17_3",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9267,7 +9267,7 @@
"id": "edge-amesim_pnch012_12-port_2-amesim_pnrp17_4-port_1-1786949579000",
"source": "amesim_pnch012_12",
"target": "amesim_pnrp17_4",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9277,7 +9277,7 @@
"id": "edge-amesim_pnch012_11-port_2-amesim_pnrp17_5-port_1-1786949583304",
"source": "amesim_pnch012_11",
"target": "amesim_pnrp17_5",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9287,7 +9287,7 @@
"id": "edge-amesim_pnch012_10-port_2-amesim_pnrp17_6-port_1-1786949586596",
"source": "amesim_pnch012_10",
"target": "amesim_pnrp17_6",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9297,7 +9297,7 @@
"id": "edge-amesim_pnch012_9-port_2-amesim_pnrp17_7-port_1-1786949589317",
"source": "amesim_pnch012_9",
"target": "amesim_pnrp17_7",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9307,7 +9307,7 @@
"id": "edge-amesim_pnch012_8-port_2-amesim_pnrp17_8-port_1-1786949590677",
"source": "amesim_pnch012_8",
"target": "amesim_pnrp17_8",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_3",
"targetHandle": "port_1",
"data": {
"isContactEdge": false
@@ -9667,7 +9667,7 @@
"id": "edge-amesim_lmechn1_3-port_1-amesim_pnrp17_1-port_3-1786949849269",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_1",
- "sourceHandle": "port_1",
+ "sourceHandle": "port_8",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9677,7 +9677,7 @@
"id": "edge-amesim_lmechn1_3-port_2-amesim_pnrp17_2-port_3-1786949850839",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_2",
- "sourceHandle": "port_2",
+ "sourceHandle": "port_7",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9687,7 +9687,7 @@
"id": "edge-amesim_lmechn1_3-port_3-amesim_pnrp17_3-port_3-1786949852383",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_3",
- "sourceHandle": "port_3",
+ "sourceHandle": "port_6",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9697,7 +9697,7 @@
"id": "edge-amesim_lmechn1_3-port_4-amesim_pnrp17_4-port_3-1786949854874",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_4",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_5",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9707,7 +9707,7 @@
"id": "edge-amesim_lmechn1_3-port_5-amesim_pnrp17_5-port_3-1786949858405",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_5",
- "sourceHandle": "port_5",
+ "sourceHandle": "port_4",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9717,7 +9717,7 @@
"id": "edge-amesim_lmechn1_3-port_6-amesim_pnrp17_6-port_3-1786949862365",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_6",
- "sourceHandle": "port_6",
+ "sourceHandle": "port_3",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9727,7 +9727,7 @@
"id": "edge-amesim_lmechn1_3-port_7-amesim_pnrp17_7-port_3-1786949896879",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_7",
- "sourceHandle": "port_7",
+ "sourceHandle": "port_2",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9737,7 +9737,7 @@
"id": "edge-amesim_lmechn1_3-port_8-amesim_pnrp17_8-port_3-1786949898922",
"source": "amesim_lmechn1_3",
"target": "amesim_pnrp17_8",
- "sourceHandle": "port_8",
+ "sourceHandle": "port_1",
"targetHandle": "port_3",
"data": {
"isContactEdge": false
@@ -9778,7 +9778,7 @@
"source": "amesim_lstp00a_1",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_8",
+ "targetHandle": "port_1",
"data": {
"isContactEdge": false
}
@@ -9788,7 +9788,7 @@
"source": "amesim_lstp00a_2",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_7",
+ "targetHandle": "port_2",
"data": {
"isContactEdge": false
}
@@ -9798,7 +9798,7 @@
"source": "amesim_lstp00a_3",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_6",
+ "targetHandle": "port_3",
"data": {
"isContactEdge": false
}
@@ -9808,7 +9808,7 @@
"source": "amesim_lstp00a_4",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_5",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -9818,7 +9818,7 @@
"source": "amesim_lstp00a_5",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_4",
+ "targetHandle": "port_5",
"data": {
"isContactEdge": false
}
@@ -9828,7 +9828,7 @@
"source": "amesim_lstp00a_6",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_3",
+ "targetHandle": "port_6",
"data": {
"isContactEdge": false
}
@@ -9838,7 +9838,7 @@
"source": "amesim_lstp00a_7",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_2",
+ "targetHandle": "port_7",
"data": {
"isContactEdge": false
}
@@ -9848,7 +9848,7 @@
"source": "amesim_lstp00a_8",
"target": "amesim_lmechn1_4",
"sourceHandle": "port_2",
- "targetHandle": "port_1",
+ "targetHandle": "port_8",
"data": {
"isContactEdge": false
}
@@ -9978,9 +9978,9 @@
"source": "amesim_pnl0002_1",
"target": "amesim_p4node2_2",
"sourceHandle": "port_2",
- "targetHandle": "port_1",
+ "targetHandle": "port_3",
"data": {
- "isContactEdge": true
+ "isContactEdge": false
}
},
{
@@ -9997,20 +9997,10 @@
"id": "edge-amesim_p4node2_1-port_4-amesim_pnl0002_8-port_2-1786972824427",
"source": "amesim_p4node2_1",
"target": "amesim_pnl0002_8",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_3",
"targetHandle": "port_2",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": 19.87945415380198,
- "y": 52.17994257325029
- },
- {
- "x": 199.87521088533356,
- "y": 52.17994257325029
- }
- ]
+ "isContactEdge": false
}
},
{
@@ -10020,37 +10010,17 @@
"sourceHandle": "port_2",
"targetHandle": "port_2",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": 80.32926682952949,
- "y": 139.08364630171945
- },
- {
- "x": 80.32926682952949,
- "y": 181.8752425865067
- }
- ]
+ "isContactEdge": false
}
},
{
"id": "edge-amesim_p4node2_8-port_4-amesim_pnl0002_8-port_1-1786972860850",
"source": "amesim_p4node2_8",
"target": "amesim_pnl0002_8",
- "sourceHandle": "port_4",
+ "sourceHandle": "port_1",
"targetHandle": "port_1",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": 21.87942245262885,
- "y": 1602.5991575147043
- },
- {
- "x": 199.87521088533356,
- "y": 1602.5991575147043
- }
- ]
+ "isContactEdge": false
}
},
{
@@ -10058,7 +10028,7 @@
"source": "amesim_pnl0001_21",
"target": "amesim_p4node2_5",
"sourceHandle": "port_1",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
"isContactEdge": false
}
@@ -10098,19 +10068,9 @@
"source": "amesim_pnl0001_27",
"target": "amesim_p4node2_8",
"sourceHandle": "port_1",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": -8.800000000000004,
- "y": 1512
- },
- {
- "x": -8.800000000000004,
- "y": 1449.5999999999997
- }
- ]
+ "isContactEdge": false
}
},
{
@@ -10138,19 +10098,9 @@
"source": "amesim_pnl0001_26",
"target": "amesim_p4node2_7",
"sourceHandle": "port_1",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": -8.800000000000004,
- "y": 1350
- },
- {
- "x": -8.800000000000004,
- "y": 1344
- }
- ]
+ "isContactEdge": false
}
},
{
@@ -10178,27 +10128,17 @@
"source": "amesim_pnl0001_25",
"target": "amesim_p4node2_6",
"sourceHandle": "port_1",
- "targetHandle": "port_2",
+ "targetHandle": "port_4",
"data": {
- "isContactEdge": false,
- "routePoints": [
- {
- "x": -9.800000000000004,
- "y": 1116
- },
- {
- "x": -9.800000000000004,
- "y": 1054.8
- }
- ]
+ "isContactEdge": false
}
}
],
"simulation": {
- "t_start": 0,
- "t_stop": 10,
+ "t_start": 0.0,
+ "t_stop": 10.0,
"step": 0.01,
- "max_step": 0.02,
+ "max_step": 1e+30,
"method": "BDF"
}
}
diff --git a/tests/data/test-mql-8.xml b/tests/data/test-mql-8.xml
deleted file mode 100644
index 008e0fe..0000000
--- a/tests/data/test-mql-8.xml
+++ /dev/null
@@ -1,2078 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/manual/benchmark_native_pipe_solver.py b/tests/manual/benchmark_native_pipe_solver.py
new file mode 100644
index 0000000..e21ee27
--- /dev/null
+++ b/tests/manual/benchmark_native_pipe_solver.py
@@ -0,0 +1,91 @@
+"""Compare identical native models with the old fixed-point, previous and current pipe solvers.
+
+Run with Python 3.12 from the repository; generated programs/results stay in --output-dir.
+The baseline ref is an explicit Git revision, never a frozen numerical result substituted for execution.
+"""
+from __future__ import annotations
+import argparse
+from hashlib import sha256
+import json
+from pathlib import Path
+import statistics
+import subprocess
+import sys
+
+ROOT = Path(__file__).resolve().parents[2]
+sys.path.insert(0, str(ROOT))
+from app.main import compile_system_xml_network
+from app.simulation.backends import simulation_config
+from app.simulation.native_codegen import build as builder
+from app.simulation.native_codegen.compiler import compile_native_program
+from app.simulation.native_codegen.input import load_input
+from app.simulation.native_codegen.runner import execute_native
+
+OLD_ITERATION = '''double rough_limit=pipe_rough_limit(rr);
+ double base=area*p*cm/sqrt(T),q=sqrt(d/(length*.02))*base;
+ for(int i=0;i<(kind==0?64:16);i++) {
+ double next=sqrt(d/(length*pipe_friction_prepared(4*fabs(q)/den,rr,rough_limit)))*base;
+ if(fabs(next-q)<=fmax(1e-12,fabs(q)*1e-9)) return sign*next;
+ q=.5*(q+next);
+ }
+ return sign*q;'''
+NEW_CALL = '''double base=area*p*cm/sqrt(T),K=pow(4*base/den,2)*d/length;
+ return sign*native_pipe_resistance(K,rr,den/4,NULL)*den/4;'''
+
+
+def main():
+ parser=argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('input',type=Path)
+ parser.add_argument('--output-dir',type=Path,required=True)
+ parser.add_argument('--baseline-ref',default='5d5a2e1')
+ parser.add_argument('--runs',type=int,default=3)
+ args=parser.parse_args()
+ if args.runs<1:parser.error('--runs must be positive')
+ out=args.output_dir.resolve();out.mkdir(parents=True,exist_ok=True)
+ if (out/'summary.json').exists():parser.error('Choose a fresh output directory')
+ revision=subprocess.check_output(['git','rev-parse',args.baseline_ref],cwd=ROOT,text=True).strip()
+ xml,doc=load_input(args.input)
+ program=compile_native_program(compile_system_xml_network(doc))
+ config=simulation_config(doc.simulation)
+ (out/'input.xml').write_bytes(xml)
+ (out/('input'+args.input.suffix)).write_bytes(args.input.read_bytes())
+ paths=subprocess.check_output(['git','ls-tree','-r','--name-only',revision,'native'],cwd=ROOT,text=True).splitlines()
+ variants={}
+ original_native=builder.NATIVE
+ try:
+ for variant in ('fixed-point','previous-newton','guarded-newton'):
+ directory=out/variant
+ for name in paths:
+ if variant=='guarded-newton':data=(ROOT/name).read_bytes()
+ else:data=subprocess.check_output(['git','show',f'{revision}:{name}'],cwd=ROOT)
+ target=directory/name;target.parent.mkdir(parents=True,exist_ok=True);target.write_bytes(data)
+ if variant=='fixed-point':
+ target=directory/'native/components/kernels.c';source=target.read_text()
+ if source.count(NEW_CALL)!=1:raise ValueError('Baseline pipe flow layout does not match the audited fixed-point substitution')
+ target.write_text(source.replace(NEW_CALL,OLD_ITERATION))
+ builder.NATIVE=directory/'native'
+ variants[variant]=builder.build_native(program,cache_dir=out/'cache')
+ finally:builder.NATIVE=original_native
+ rows=[]
+ for index in range(args.runs+1):
+ order=list(variants)
+ if index%2:order.reverse()
+ for variant in order:
+ data=execute_native(variants[variant],config,doc.simulation.sample_step,
+ run_dir=out/variant/('warmup' if index==0 else f'run-{index}'),timeout=120)
+ row={key:value for key,value in data.items() if key not in ('series','final','finalState')}
+ row.update(variant=variant,run=index)
+ rows.append(row);print(json.dumps(row,ensure_ascii=False),flush=True)
+ if not data['success']:raise RuntimeError(f'{variant} did not complete: {data["message"]}')
+ summary={'baselineRef':revision,'input':str(args.input.resolve()),
+ 'inputSha256':sha256(args.input.read_bytes()).hexdigest(),'xmlSha256':sha256(xml).hexdigest(),
+ 'settings':vars(config),'sampleStep':doc.simulation.sample_step,'rows':rows,
+ 'variants':{name:{'sourceSha256':sha256((out/name/'native/components/kernels.c').read_bytes()).hexdigest(),
+ 'buildKey':build.manifest['buildKey'],
+ 'medianSolveSeconds':statistics.median(row['solveSeconds'] for row in rows if row['variant']==name and row['run']>0),
+ 'medianProcessSeconds':statistics.median(row['processWallSeconds'] for row in rows if row['variant']==name and row['run']>0)}
+ for name,build in variants.items()}}
+ (out/'summary.json').write_text(json.dumps(summary,ensure_ascii=False,indent=2)+'\n')
+ print(json.dumps(summary['variants'],ensure_ascii=False,indent=2))
+
+if __name__=='__main__':main()
diff --git a/tests/manual/browser_native_simulation.mjs b/tests/manual/browser_native_simulation.mjs
new file mode 100644
index 0000000..a196b1d
--- /dev/null
+++ b/tests/manual/browser_native_simulation.mjs
@@ -0,0 +1,89 @@
+// Real browser/HTTP/native execution. No API routes or result data are mocked.
+import { chromium } from '../../frontend/node_modules/playwright/index.mjs';
+import fs from 'node:fs/promises';
+import path from 'node:path';
+import { performance } from 'node:perf_hooks';
+import assert from 'node:assert/strict';
+import { createHash } from 'node:crypto';
+const [input, output, baseURL = 'http://127.0.0.1:8011', runCount = '3'] = process.argv.slice(2);
+if (!input || !output) throw new Error('Usage: node browser_native_simulation.mjs MODEL.json OUTPUT_DIR [URL] [RUNS]');
+await fs.mkdir(output, { recursive: true });
+const inputText = await fs.readFile(input, 'utf8');
+const project = JSON.parse(inputText);
+const curveNodeId = project.nodes.find(node => node.id === 'amesim_pnl0002_10')?.id
+ ?? project.nodes.find(node => node.data.modelType === 'amesim_pnl0002')?.id;
+if (!curveNodeId) throw new Error('Curve verification requires a PNL0002 component.');
+await fs.writeFile(path.join(output, 'input.json'), inputText);
+const browser = await chromium.launch({ headless: true });
+const context = await browser.newContext({ viewport: { width: 1600, height: 1000 }, acceptDownloads: true });
+const page = await context.newPage();
+page.setDefaultTimeout(30000);
+const errors = [];
+page.on('pageerror', error => errors.push(String(error)));
+const rows = [];
+try {
+ await page.goto(baseURL);
+ await page.locator('input[type="file"][accept*=".json"]').setInputFiles(path.resolve(input));
+ await page.getByRole('textbox', { name: '工程', exact: true }).waitFor();
+ await page.waitForFunction(name => document.querySelector('input[aria-label="工程"]')?.value === name || [...document.querySelectorAll('input')].some(input => input.value === name), path.basename(input, path.extname(input)));
+ await page.screenshot({ path: path.join(output, 'model.png'), fullPage: true });
+ for (let i = 0; i <= Number(runCount); i++) {
+ const oldMarker = await page.evaluate(() => sessionStorage.getItem('system-simulation-flow:latest-result'));
+ const responsePromise = page.waitForResponse(response => response.url().endsWith('/api/system-xml/simulate-stream'), { timeout: 180000 });
+ const started = performance.now();
+ await page.getByRole('button', { name: '运行仿真', exact: true }).click();
+ const response = await responsePromise;
+ await response.finished();
+ if (!response.ok()) throw new Error(`Simulation HTTP ${response.status()}`);
+ const receivedMs = performance.now() - started;
+ await page.waitForFunction(old => {
+ const marker = sessionStorage.getItem('system-simulation-flow:latest-result');
+ return marker && marker !== old && JSON.parse(marker).storage === 'indexeddb';
+ }, oldMarker, { timeout: 180000 });
+ await page.getByRole('button', { name: '运行仿真', exact: true }).waitFor({ state: 'visible' });
+ await page.waitForFunction(() => !document.querySelector('button[aria-label="运行仿真"]')?.disabled);
+ await page.getByRole('tab', { name: /^结果/ }).click();
+ await page.getByRole('button', { name: '下载结果文件', exact: true }).waitFor();
+ const readyMs = performance.now() - started;
+ await page.waitForFunction(old => {
+ const marker = sessionStorage.getItem('system-simulation-flow:latest-result');
+ return marker && marker !== old && JSON.parse(marker).storage === 'indexeddb';
+ }, oldMarker);
+ const downloadPromise = page.waitForEvent('download');
+ await page.getByRole('button', { name: '下载结果文件', exact: true }).click();
+ await (await downloadPromise).saveAs(path.join(output, `run-${i}.simresult`));
+ const exported = JSON.parse(await fs.readFile(path.join(output, `run-${i}.simresult`), 'utf8'));
+ const result = exported.snapshot.result;
+ if (!result.success) throw new Error(result.message);
+ assert.equal(result.diagnostics.integration.rtol, 1e-8);
+ assert.equal(result.simulatedUntil, project.simulation.t_stop);
+ const row = { run: i, receivedMs, readyMs, sampleCount: result.series.time.length,
+ ...result.diagnostics.native };
+ rows.push(row);
+ console.log(JSON.stringify(row));
+ if (i < Number(runCount)) await page.getByRole('tab', { name: '建模', exact: true }).click();
+ }
+ await page.getByRole('button', { name: '适应系统图窗口', exact: true }).click();
+ await page.locator(`.results-system-panel .react-flow__node[data-id=${JSON.stringify(curveNodeId)}]`).click();
+ await page.locator('.results-variable-list button').filter({ has: page.locator('small', { hasText: /^K$/ }) }).first().click();
+ await page.locator('.results-chart-panel .result-chart-window svg').first().waitFor();
+ const csvDownload = page.waitForEvent('download');
+ await page.getByRole('button', { name: '下载结果 CSV', exact: true }).click();
+ await (await csvDownload).saveAs(path.join(output, 'result.csv'));
+ await page.screenshot({ path: path.join(output, 'result.png'), fullPage: true });
+ await page.reload();
+ await page.getByRole('tab', { name: /^结果/ }).click();
+ await page.getByRole('button', { name: '下载结果文件', exact: true }).waitFor();
+ const restored = page.waitForEvent('download');
+ await page.getByRole('button', { name: '下载结果文件', exact: true }).click();
+ await (await restored).saveAs(path.join(output, 'restored.simresult'));
+ const restoredData = JSON.parse(await fs.readFile(path.join(output, 'restored.simresult'), 'utf8'));
+ const lastData = JSON.parse(await fs.readFile(path.join(output, `run-${runCount}.simresult`), 'utf8'));
+ assert.deepEqual(restoredData.snapshot.result, lastData.snapshot.result);
+ await fs.writeFile(path.join(output, 'summary.json'), JSON.stringify({ input: path.resolve(input), inputSha256: createHash('sha256').update(inputText).digest('hex'), baseURL, browser: browser.version(), rows, errors, restored: true, restoredResultIdentical: true, csvExported: true }, null, 2));
+ if (errors.length) throw new Error(`Browser errors: ${errors.join('\n')}`);
+} catch (error) {
+ await page.screenshot({ path: path.join(output, 'failure.png'), fullPage: true });
+ await fs.writeFile(path.join(output, 'failure.txt'), `${error.stack}\nPage errors: ${JSON.stringify(errors)}\n${await page.locator('body').innerText()}`);
+ throw error;
+} finally { await context.close(); await browser.close(); }
diff --git a/tests/manual/compare_native_amesim.py b/tests/manual/compare_native_amesim.py
new file mode 100644
index 0000000..f08ab04
--- /dev/null
+++ b/tests/manual/compare_native_amesim.py
@@ -0,0 +1,92 @@
+"""Compare real native/browser results to the frozen 72-curve Amesim reference.
+
+Run with Python + NumPy. --plot additionally requires Matplotlib, available in
+this workstation's system Python. Outputs stay in the requested artifact folder.
+"""
+from __future__ import annotations
+import argparse
+import csv
+import hashlib
+import json
+from pathlib import Path
+import numpy as np
+
+ROOT = Path(__file__).resolve().parents[2]
+LIMITS = {'pressure': 250., 'temperature': .015, 'displacement': 2e-6,
+ 'velocity': 1e-5, 'mass_flow': 3e-5}
+UNITS = {'pressure': 'Pa', 'temperature': 'K', 'displacement': 'm',
+ 'velocity': 'm/s', 'mass_flow': 'kg/s'}
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('result', type=Path)
+ parser.add_argument('--reference', type=Path, default=ROOT/'tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json')
+ parser.add_argument('--output-dir', type=Path, required=True)
+ parser.add_argument('--plot', action='store_true')
+ args = parser.parse_args()
+ ref = json.loads(args.reference.read_text())
+ data = json.loads(args.result.read_text())
+ if 'snapshot' in data:
+ data = data['snapshot']['result']
+ series = data['series']; times = np.array(series['time']); ref_times = np.array(ref['times'])
+ if not data['success'] or times[-1] < ref_times[-1] or times[0] > ref_times[0]:
+ raise ValueError('A completed result covering all reference times is required.')
+ if np.any(np.diff(times) < 0):
+ raise ValueError('Native sample times are not ordered.')
+ finite = all(np.all(np.isfinite(values)) for values in series.values())
+ rows = []; grouped = {}
+ for key, curve in ref['series'].items():
+ actual = np.interp(ref_times, times, series[key]); error = actual - curve['values']
+ worst = int(np.argmax(abs(error))); quantity = curve['quantity']
+ row = {'key': key, 'quantity': quantity, 'unit': UNITS[quantity],
+ 'maxAbsoluteError': float(abs(error[worst])), 'rmsError': float(np.sqrt(np.mean(error**2))),
+ 'worstTime': float(ref_times[worst]), 'limit': LIMITS[quantity],
+ 'passed': bool(np.max(abs(error)) <= LIMITS[quantity])}
+ rows.append(row)
+ if quantity not in grouped or row['maxAbsoluteError'] > grouped[quantity]['maxAbsoluteError']:
+ grouped[quantity] = row
+ masses = np.array([v for k, v in series.items() if k.rsplit('.', 1)[-1] in ('m', 'm1', 'm2')])
+ total = np.sum(masses, axis=0)
+ mass_drift = float(np.max(abs(total-total[0])))
+ force_peaks = sorted(({'key': k, 'peakAbsolute': max(map(abs, v))} for k, v in series.items()
+ if k.startswith('amesim_lstp00a_') and k.endswith('.f')),
+ key=lambda row: row['peakAbsolute'], reverse=True)
+ summary = {'resultPath': str(args.result.resolve()),
+ 'resultSha256': hashlib.sha256(args.result.read_bytes()).hexdigest(),
+ 'referencePath': str(args.reference.resolve()),
+ 'referenceSha256': hashlib.sha256(args.reference.read_bytes()).hexdigest(),
+ 'referenceSource': ref['source'], 'freshAmesimRun': False,
+ 'referenceCurveCount': len(rows), 'referenceTimeCount': len(ref_times),
+ 'nativeSampleCount': len(times), 'allSamplesFinite': bool(finite),
+ 'massStateCount': len(masses), 'maxTotalMassDriftKg': mass_drift,
+ 'groupedWorstErrors': grouped, 'curves': rows, 'contactForcePeaksOutsideReferenceScope': force_peaks,
+ 'passed': bool(finite and mass_drift <= 1e-10 and all(row['passed'] for row in rows))}
+ args.output_dir.mkdir(parents=True, exist_ok=True)
+ (args.output_dir/'comparison.json').write_text(json.dumps(summary, ensure_ascii=False, indent=2)+'\n')
+ with (args.output_dir/'curve-errors.csv').open('w', newline='') as output:
+ writer = csv.DictWriter(output, fieldnames=list(rows[0])); writer.writeheader(); writer.writerows(rows)
+ if args.plot:
+ import matplotlib
+ matplotlib.use('Agg')
+ import matplotlib.pyplot as plt
+ fig, axes = plt.subplots(5, 2, figsize=(13, 15), constrained_layout=True)
+ for (quantity, row), (left, right) in zip(grouped.items(), axes):
+ key = row['key']; values = ref['series'][key]['values']
+ actual = np.interp(ref_times, times, series[key])
+ left.plot(times, series[key], linewidth=1, label='Native, rtol=1e-8')
+ left.plot(ref_times, values, '.', markersize=3, label='Saved Amesim reference')
+ left.set_title(key, fontsize=9); left.set_ylabel(UNITS[quantity]); left.legend(fontsize=7)
+ right.plot(ref_times, actual-values, '.-', linewidth=.8, markersize=3)
+ right.axhline(row['limit'], color='gray', linestyle='--', linewidth=.6)
+ right.axhline(-row['limit'], color='gray', linestyle='--', linewidth=.6)
+ right.set_title(f'{quantity}: sampled difference and acceptance limits', fontsize=9)
+ right.set_ylabel(UNITS[quantity])
+ for ax in (left, right): ax.grid(alpha=.2); ax.set_xlabel('Time [s]')
+ fig.suptitle('Four-branch model: 72 curves checked at 57 stored Amesim times\nWorst curve per quantity; contact force is outside this reference', fontsize=12)
+ fig.savefig(args.output_dir/'comparison.svg'); fig.savefig(args.output_dir/'comparison.png', dpi=140)
+ print(json.dumps({k: summary[k] for k in ('passed', 'nativeSampleCount', 'maxTotalMassDriftKg', 'groupedWorstErrors')}, indent=2))
+ if not summary['passed']: raise SystemExit(1)
+
+
+if __name__ == '__main__': main()
diff --git a/tests/model_audit/audit_mql4_model.py b/tests/model_audit/audit_mql4_model.py
new file mode 100644
index 0000000..7b1f902
--- /dev/null
+++ b/tests/model_audit/audit_mql4_model.py
@@ -0,0 +1,403 @@
+"""Audit the AME diagram against the corrected XML; emit an aligned browser project.
+
+Run from the repository root with .venv/bin/python. Does not run Amesim or use
+the stale eight-branch compiled/result cache inside the four-branch archive.
+"""
+from __future__ import annotations
+
+import argparse
+from collections import Counter, defaultdict
+from copy import deepcopy
+import hashlib
+import json
+from pathlib import Path
+import re
+import sys
+if '--check' in sys.argv:
+ sys.dont_write_bytecode = True
+import struct
+import tarfile
+import xml.etree.ElementTree as ET
+
+ROOT = Path(__file__).resolve().parents[2]
+sys.path.insert(0, str(ROOT))
+from app.simulation.registry import get_component_model_spec
+from tests.test_test_mql_ame_contract import (
+ _blocks, _required_element_text, _element_text, _resolve_globals,
+ _public_model_type, _expected_parameters, _value_fields,
+)
+
+OUT = ROOT / 'test/solver-newton-20260911/mql4'
+AME = ROOT / 'tests/data/test_mql_4.ame'
+XML = ROOT / 'tests/fixtures/amesim/test-mql-4-corrected.xml'
+REFERENCE = ROOT / 'tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json'
+PROJECT = ROOT / 'tests/data/test-mql-4-corrected.json'
+
+
+def sha(path):
+ return hashlib.sha256(path.read_bytes()).hexdigest()
+
+
+def public_port(model, index):
+ if index == 0 and model in {'amesim_pnvo001', 'amesim_forc'}:
+ return 'res'
+ if index == 0 and model in {'amesim_step0', 'amesim_ud00'}:
+ return 'out'
+ return f'port_{index + 1}'
+
+
+def parameter_key(values):
+ return tuple(sorted((key, format(float(value), '.12g')) for key, value in values.items()))
+
+
+def audit_source():
+ with tarfile.open(AME) as archive:
+ def read(suffix):
+ names = [name for name in archive.getnames() if name.endswith(suffix)]
+ if len(names) != 1:
+ raise ValueError((suffix, names))
+ return archive.extractfile(names[0]).read().decode('latin1')
+ cir = read('.cir')
+ sim = read('.sim')
+ modelinfo = read('.modelinfo')
+ variables = read('.var')
+ perf = read('.ameperf')
+ result_name = next(name for name in archive.getnames() if name.endswith('.results'))
+ result_data = archive.extractfile(result_name).read()
+ result_points, result_columns = struct.unpack('<2i', result_data[:8])
+ member_hashes = {}
+ for suffix in ['.cir', '.sim', '.modelinfo', '.var', '.results']:
+ name = next(name for name in archive.getnames() if name.endswith(suffix))
+ data = archive.extractfile(name).read()
+ member_hashes[name] = {'bytes': len(data), 'sha256': hashlib.sha256(data).hexdigest()}
+ globals_ = _resolve_globals(cir)
+ components = _blocks(cir, 'COMP')
+ lines = _blocks(cir, 'LINE')
+ nodes = {}
+ for kind, entities in [('component', components), ('line', lines)]:
+ for index, body in enumerate(entities):
+ submodel = _required_element_text(body, 'SUB_NAME')
+ if submodel == 'DIRECT':
+ continue
+ model = _public_model_type(submodel)
+ nodes[f'{kind}:{index}'] = {
+ 'modelType': model,
+ 'alias': _required_element_text(body, 'ALIAS'),
+ 'parameters': _expected_parameters(body, model, globals_),
+ 'sourceValues': {name: {'expression': value.expression, 'unit': value.unit}
+ for name, value in _value_fields(body).items()},
+ 'position': _element_text(body, 'COMP_POS') or _element_text(body, 'LINE_POINTS'),
+ 'geometry': _element_text(body, 'COMP_GEOMETRY'),
+ 'outputType': _element_text(body, 'OUTPUT_TYPE'),
+ }
+ edges = set()
+ contacts = set()
+ for index, body in enumerate(components):
+ for port_index, port_body in enumerate(_blocks(body, 'COMP_PORT')):
+ if _required_element_text(port_body, 'PORT_CONNECT') != '1':
+ continue
+ for connection in _blocks(port_body, 'CONNECT'):
+ other = int(_required_element_text(connection, 'CONNECT_ENTITY_NUM'))
+ other_port = int(_required_element_text(connection, 'CONNECT_ENTITY_PORT'))
+ contacts.add(((index, port_index), (other, other_port)))
+ assert all((b, a) in contacts for a, b in contacts)
+ def endpoint(index, port):
+ key = f'component:{index}'
+ return key, public_port(nodes[key]['modelType'], port)
+ for a, b in contacts:
+ edges.add(tuple(sorted((endpoint(*a), endpoint(*b)))))
+ for index, body in enumerate(lines):
+ assert _required_element_text(body, 'LINE_START_TYPE') == '0'
+ assert _required_element_text(body, 'LINE_END_TYPE') == '0'
+ start = endpoint(int(_required_element_text(body, 'LINE_START_ENTITY')),
+ int(_required_element_text(body, 'LINE_START_PORT')))
+ end = endpoint(int(_required_element_text(body, 'LINE_END_ENTITY')),
+ int(_required_element_text(body, 'LINE_END_PORT')))
+ if _required_element_text(body, 'SUB_NAME') == 'DIRECT':
+ edges.add(tuple(sorted((start, end))))
+ else:
+ key = f'line:{index}'
+ output_type = _required_element_text(body, 'OUTPUT_TYPE')
+ assert output_type in {'1', '2'}
+ first, second = ('port_1', 'port_2') if output_type == '1' else ('port_2', 'port_1')
+ edges.add(tuple(sorted((start, (key, first)))))
+ edges.add(tuple(sorted((end, (key, second)))))
+ count = Counter(node['modelType'] for node in nodes.values())
+ states = sum(count[model] * size for model, size in {
+ 'amesim_pnch012': 2, 'amesim_pnch023': 2, 'amesim_pnl0001': 2,
+ 'amesim_pnl0002': 2, 'amesim_pnl0003': 4, 'amesim_mecmas21': 2,
+ }.items())
+ return nodes, sorted(edges), {
+ 'archiveSha256': sha(AME), 'archiveBytes': AME.stat().st_size,
+ 'members': member_hashes, 'globals': globals_,
+ 'componentCount': len(components), 'modeledLineCount': len(nodes) - len(components),
+ 'directLineCount': len(lines) - (len(nodes) - len(components)),
+ 'contactCount': len(contacts) // 2, 'publicNodeCount': len(nodes),
+ 'publicParameterCount': sum(len(node['parameters']) for node in nodes.values()),
+ 'connectionCount': len(edges), 'typeCounts': dict(count),
+ 'diagramDynamicStateCount': states,
+ 'simulationFileRaw': sim, 'savedSimulationNumericRows': [[float(x) for x in row.split()] for row in sim.splitlines()],
+ 'cachedModelInfo': modelinfo,
+ 'cachedResultsSuitableForFourBranchComparison': False,
+ 'cacheRejectionReason': 'Diagram has 64 states / four pistons; cached modelinfo has 132 states, .ameperf contains eight LSTP00A instances, and .results declares 1116 saved variables while the current .var has only 640 rows.',
+ 'cachedResultHeader': {'pointCount': result_points, 'savedVariableCount': abs(result_columns)},
+ 'variableRowCount': len(variables.splitlines()),
+ 'cachedPerformanceContactInstances': sorted(set(re.findall(r'LSTP00A-([0-9]+)', perf))),
+ 'cachedPistonAliases': sorted(set(re.findall(r'Data_Path=\S+@(pn_brp2[^\s]*)', variables))),
+ }
+
+
+def xml_model(root=None):
+ if root is None:
+ root = ET.parse(XML).getroot()
+ nodes = {item.attrib['id']: {
+ 'modelType': item.attrib['type'],
+ 'modelVersion': item.attrib['modelVersion'],
+ 'parameters': {p.attrib['name']: float(p.attrib['value']) for p in item.findall('Parameter')},
+ } for item in root.findall('./Components/Component')}
+ edges = [tuple(sorted((ep.attrib['component'], ep.attrib['port']) for ep in item.findall('Endpoint')))
+ for item in root.findall('./Connections/Connection')]
+ return nodes, edges, root
+
+
+def find_mapping(first, first_edges, second, second_edges, *, ports=False, parameters=True):
+ """Find an actual graph bijection, preserving node types and all parameters."""
+ def edge_label(node, port):
+ if not ports:
+ return ''
+ return port
+ def graph(nodes, edges):
+ adjacency = {key: defaultdict(Counter) for key in nodes}
+ for (a, ap), (b, bp) in edges:
+ adjacency[a][b][(edge_label(a, ap), edge_label(b, bp))] += 1
+ adjacency[b][a][(edge_label(b, bp), edge_label(a, ap))] += 1
+ return adjacency
+ a, b = graph(first, first_edges), graph(second, second_edges)
+ def signature(nodes, adj, key):
+ return (nodes[key]['modelType'], parameter_key(nodes[key]['parameters']) if parameters else (),
+ sum(sum(labels.values()) for labels in adj[key].values()))
+ candidates = {key: [other for other in second if signature(first, a, key) == signature(second, b, other)]
+ for key in first}
+ if any(not options for options in candidates.values()):
+ return None
+ mapping = {}
+ used = set()
+ def search():
+ if len(mapping) == len(first):
+ return dict(mapping)
+ key = min((key for key in first if key not in mapping),
+ key=lambda key: (-sum(neighbor in mapping for neighbor in a[key]),
+ len([other for other in candidates[key] if other not in used]), -len(a[key])))
+ for other in candidates[key]:
+ if other in used:
+ continue
+ if any(a[key].get(existing, Counter()) != b[other].get(target, Counter())
+ for existing, target in mapping.items()):
+ continue
+ mapping[key] = other
+ used.add(other)
+ result = search()
+ if result is not None:
+ return result
+ used.remove(other)
+ del mapping[key]
+ return None
+ return search()
+
+
+def check_project_contract(project, xml_root):
+ """Check generated port metadata and exact JSON/XML execution data, without writes.
+
+ This covers the observed nullable optional-field failure and shared physical
+ data, not a replacement for the complete frontend project parser.
+ """
+ xml_nodes, xml_edges, _ = xml_model(xml_root)
+ json_nodes = {node['id']: node['data'] for node in project['nodes']}
+ if len(json_nodes) != len(project['nodes']) or json_nodes.keys() != xml_nodes.keys():
+ raise ValueError('JSON/XML component IDs differ or JSON contains duplicate IDs.')
+ for node_id, data in json_nodes.items():
+ expected = xml_nodes[node_id]
+ if (data['componentType'] != expected['modelType'] or
+ data['modelType'] != expected['modelType'] or
+ data['modelVersion'] != expected['modelVersion']):
+ raise ValueError(f'{node_id}: JSON/XML model type or version differs.')
+ if data['parameters'] != expected['parameters']:
+ raise ValueError(f'{node_id}: JSON/XML parameters differ.')
+ for port in data['ports']:
+ # frontend/src/App.tsx:isProjectPortDefinitionValue accepts omission,
+ # or the literal intoComponent. An explicit null rejects the import.
+ if ('positiveFlowDirection' in port and
+ port['positiveFlowDirection'] != 'intoComponent'):
+ raise ValueError(f"{node_id}.{port['name']}: omit undefined positiveFlowDirection instead of null.")
+ json_edges = []
+ for edge in project['edges']:
+ endpoints = []
+ for side in ['source', 'target']:
+ component, port = edge[side], edge[side + 'Handle']
+ if component not in json_nodes:
+ raise ValueError(f'Unknown connection component {component}.')
+ data = json_nodes[component]
+ active_ports = get_component_model_spec(data['modelType']).active_ports(data['parameters'])
+ if port not in {item.name for item in active_ports}:
+ raise ValueError(f'{component}.{port}: connection port is inactive or unknown.')
+ endpoints.append((component, port))
+ json_edges.append(tuple(sorted(endpoints)))
+ if Counter(json_edges) != Counter(xml_edges):
+ raise ValueError('JSON/XML connection endpoints differ.')
+ simulation = xml_root.find('Simulation').attrib
+ for key, xml_key in [('t_start', 'tStart'), ('t_stop', 'tStop'),
+ ('step', 'sampleStep'), ('max_step', 'maxStep')]:
+ if project['simulation'][key] != float(simulation[xml_key]):
+ raise ValueError(f'JSON/XML simulation {key} differs.')
+ if project['simulation']['method'] != simulation['method']:
+ raise ValueError('JSON/XML integration methods differ.')
+ return {'valid': True, 'componentCount': len(json_nodes), 'connectionCount': len(json_edges),
+ 'parameterCount': sum(len(data['parameters']) for data in json_nodes.values()),
+ 'optionalPortFieldsValid': True, 'jsonXmlExecutionDataEqual': True}
+
+
+def generate_project(source, source_edges, target, target_edges, xml_root, mapping):
+ layout_source = ROOT / 'tests/fixtures/legacy/test-mql-8.json'
+ layout = json.loads(layout_source.read_text())
+ layout_nodes = {node['id']: node for node in layout['nodes']}
+ reverse_mapping = {value: key for key, value in mapping.items()}
+ nodes = []
+ for node_id, model in target.items():
+ source_node = source[reverse_mapping[node_id]]
+ template = layout_nodes.get(node_id)
+ if template is None:
+ template = next(node for node in layout['nodes'] if node['data']['modelType'] == model['modelType'])
+ node = deepcopy(template)
+ node['id'] = node_id
+ node['selected'] = False
+ node['data']['label'] = source_node['alias']
+ node['data']['parameters'] = source_node['parameters']
+ node['data']['modelVersion'] = model['modelVersion']
+ node['data']['ports'] = get_component_model_spec(model['modelType']).as_catalog_dict()['ports']
+ for port in node['data']['ports']:
+ if port.get('positiveFlowDirection') is None:
+ port.pop('positiveFlowDirection', None)
+ if model['modelType'] == 'amesim_p4node2':
+ node['data']['rotation'] = 180
+ node['data']['mirrored'] = False
+ if node_id not in layout_nodes:
+ # The extra closing pipe sits below the four retained branches.
+ node['position'] = {'x': 80.0, 'y': 900.0}
+ node['data']['rotation'] = 0
+ nodes.append(node)
+ original_by_pair = {}
+ for edge in layout['edges']:
+ pair = tuple(sorted((edge['source'], edge['target'])))
+ original_by_pair[pair] = edge
+ xml_by_pair = {}
+ for connection in xml_root.findall('./Connections/Connection'):
+ pair = tuple(sorted(ep.attrib['component'] for ep in connection.findall('Endpoint')))
+ xml_by_pair[pair] = connection
+ edges = []
+ changed_connections = []
+ for ((a, ap), (b, bp)) in source_edges:
+ a, b = mapping[a], mapping[b]
+ pair = tuple(sorted((a, b)))
+ existing = original_by_pair.get(pair)
+ edge = deepcopy(existing) if existing else {'id': 'ame-' + a + '-' + ap + '-' + b + '-' + bp}
+ if existing and existing['source'] == b:
+ a, ap, b, bp = b, bp, a, ap
+ old_connection = xml_by_pair[pair]
+ old_endpoints = {ep.attrib['component']: ep.attrib['port'] for ep in old_connection.findall('Endpoint')}
+ changed = old_endpoints != {a: ap, b: bp}
+ if changed:
+ changed_connections.append({'components': pair, 'before': old_endpoints, 'after': {a: ap, b: bp}})
+ edge.update({'source': a, 'target': b, 'sourceHandle': ap, 'targetHandle': bp})
+ edge.pop('selected', None)
+ if any(target[node_id]['modelType'] == 'amesim_p4node2' for node_id in [a, b]):
+ edge.setdefault('data', {}).pop('routePoints', None)
+ if changed or existing is None:
+ edge['data'] = {'isContactEdge': False}
+ edges.append(edge)
+ for endpoint in old_connection.findall('Endpoint'):
+ endpoint.attrib['port'] = {a: ap, b: bp}[endpoint.attrib['component']]
+ parameter_changes = []
+ for component in xml_root.findall('./Components/Component'):
+ node_id = component.attrib['id']
+ parameters = source[reverse_mapping[node_id]]['parameters']
+ for parameter in component.findall('Parameter'):
+ key = parameter.attrib['name']
+ before = float(parameter.attrib['value'])
+ after = parameters[key]
+ if abs(before - after) > max(1e-18, abs(after) * 1e-12):
+ parameter_changes.append({'component': node_id, 'parameter': key, 'before': before, 'after': after})
+ parameter.attrib['value'] = repr(after)
+ simulation = {'t_start': 0.0, 't_stop': 10.0, 'step': 0.01, 'max_step': 1e30, 'method': 'BDF'}
+ project = {'projectSchemaVersion': 1, 'name': 'test-mql-4-AME-aligned', 'nodes': nodes,
+ 'edges': edges, 'simulation': simulation}
+ check_project_contract(project, xml_root)
+ PROJECT.write_text(json.dumps(project, indent=2, ensure_ascii=False) + '\n')
+ generated_xml = OUT / 'aligned-input.xml'
+ xml_root.attrib['name'] = project['name']
+ ET.indent(xml_root)
+ ET.ElementTree(xml_root).write(generated_xml, encoding='utf-8', xml_declaration=True)
+ XML.write_bytes(generated_xml.read_bytes())
+ # Check the delivered JSON itself, including every exact endpoint and number.
+ json_nodes = {node['id']: node['data'] for node in json.loads(PROJECT.read_text())['nodes']}
+ for source_id, project_id in mapping.items():
+ assert json_nodes[project_id]['parameters'] == source[source_id]['parameters']
+ expected_edges = {tuple(sorted(((mapping[a], ap), (mapping[b], bp)))) for ((a, ap), (b, bp)) in source_edges}
+ actual_edges = {tuple(sorted(((edge['source'], edge['sourceHandle']), (edge['target'], edge['targetHandle'])))) for edge in edges}
+ assert expected_edges == actual_edges
+ for edge in edges:
+ for side in ['source', 'target']:
+ data = json_nodes[edge[side]]
+ active_ports = get_component_model_spec(data['modelType']).active_ports(data['parameters'])
+ assert edge[side + 'Handle'] in {port.name for port in active_ports}
+ return {'path': str(PROJECT.relative_to(ROOT)), 'sha256': sha(PROJECT),
+ 'xmlPath': str(generated_xml.relative_to(ROOT)), 'xmlSha256': sha(generated_xml),
+ 'nodeCount': len(nodes), 'edgeCount': len(edges), 'parameterCount': sum(len(n['data']['parameters']) for n in nodes),
+ 'allMappedParametersExactlyMatchAme': True, 'allMappedConnectionPortsExactlyMatchAme': True,
+ 'parameterChangesFromLegacyXml': parameter_changes, 'connectionPortChangesFromLegacyXml': changed_connections,
+ 'layoutMetadataSource': {'path': str(layout_source.relative_to(ROOT)), 'sha256': sha(layout_source)},
+ 'simulation': simulation,
+ 'simulationSettingsNote': 'AME archive stores historical fixed-step settings. This JSON uses native BDF; rtol is supplied by the backend and is not stored in the project. Initial validation used 1e-7; the backend default was subsequently changed to 1e-8. The earlier official Standard variable-step reference remains tolerance 1e-7. Inspect actual run diagnostics; solver algorithms are not identical.'}
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('--check', action='store_true', help='Validate delivered JSON/XML only; do not generate or write files.')
+ arguments = parser.parse_args()
+ if arguments.check:
+ print(json.dumps(check_project_contract(json.loads(PROJECT.read_text()), ET.parse(XML).getroot()), indent=2))
+ return
+ OUT.mkdir(parents=True, exist_ok=True)
+ source, source_edges, audit = audit_source()
+ legacy_xml = OUT / 'legacy-corrected-input.xml'
+ if not legacy_xml.exists():
+ legacy_xml.write_bytes(XML.read_bytes())
+ target, target_edges, xml_root = xml_model()
+ mapping = find_mapping(source, source_edges, target, target_edges)
+ audit['correctedXml'] = {'path': str(XML.relative_to(ROOT)), 'sha256': sha(XML),
+ 'parameterAndComponentTopologyIsomorphic': mapping is not None}
+ ref = json.loads(REFERENCE.read_text())
+ audit['reference'] = {'path': str(REFERENCE.relative_to(ROOT)), 'sha256': sha(REFERENCE),
+ 'source': ref['source'], 'timeCount': len(ref['times']), 'seriesCount': len(ref['series']),
+ 'ameHashMatches': ref['originalAmeSha256'] == sha(AME),
+ 'xmlHashMatches': ref['xmlSha256'] == sha(XML),
+ 'newAmesimRunPerformed': False}
+ (OUT / 'source-model.json').write_text(json.dumps({'nodes': source, 'edges': source_edges}, indent=2, ensure_ascii=False) + '\n')
+ if not mapping:
+ mapping = find_mapping(source, source_edges, target, target_edges, parameters=False)
+ if mapping:
+ audit['componentMapping'] = {key: {'alias': source[key]['alias'], 'projectId': value} for key, value in mapping.items()}
+ transformed = {tuple(sorted(((mapping[a], ap), (mapping[b], bp)))) for ((a, ap), (b, bp)) in source_edges}
+ target_set = set(target_edges)
+ audit['correctedXml']['exactPortDifferencesForTopologyMapping'] = {
+ 'ameOnly': sorted(transformed - target_set), 'xmlOnly': sorted(target_set - transformed)}
+ if mapping:
+ audit['generatedProject'] = generate_project(source, source_edges, target, target_edges, xml_root, mapping)
+ audit['correctedXml']['scope'] = 'Input XML snapshot before this generation; generatedProject describes the delivered corrected files.'
+ audit_text = json.dumps(audit, indent=2, ensure_ascii=False) + '\n'
+ (OUT / 'model-audit.json').write_text(audit_text)
+ (ROOT / 'tests/model_audit/test-mql-4-audit.json').write_text(audit_text)
+ print(json.dumps({key: value for key, value in audit.items() if key not in {'componentMapping', 'members', 'globals'}}, indent=2))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/tests/model_audit/independent_mql4_parameter_check.py b/tests/model_audit/independent_mql4_parameter_check.py
new file mode 100644
index 0000000..5cab600
--- /dev/null
+++ b/tests/model_audit/independent_mql4_parameter_check.py
@@ -0,0 +1,101 @@
+"""Independent read of AME XML fields; no shared expected-parameter helper."""
+from pathlib import Path
+import ast, collections, hashlib, json, math, operator, re, sys, tarfile
+import xml.etree.ElementTree as ET
+ROOT=Path(__file__).resolve().parents[2]
+sys.path.insert(0,str(ROOT))
+from app.simulation.registry import get_component_model_spec
+OUT=ROOT/'test/solver-newton-20260911/mql4/visual-recheck'
+OUT.mkdir(parents=True,exist_ok=True)
+with tarfile.open(ROOT/'tests/data/test_mql_4.ame') as archive:
+ cir=archive.extractfile('test_mql_4_.cir').read().decode('latin1')
+# AME stores unescaped C-style && in visibility metadata, outside parameter values.
+xml_text=re.sub(r'.*?', '', cir, flags=re.S)
+xml_text=re.sub(r'&(?!amp;|lt;|gt;|quot;|apos;|#)', '&', xml_text)
+root=ET.fromstring(xml_text)
+BINARY={ast.Add:operator.add,ast.Sub:operator.sub,ast.Mult:operator.mul,ast.Div:operator.truediv,ast.Pow:operator.pow}
+UNARY={ast.UAdd:operator.pos,ast.USub:operator.neg}
+def evaluate(text,names):
+ def visit(node):
+ if isinstance(node,ast.Constant) and isinstance(node.value,(int,float)):return float(node.value)
+ if isinstance(node,ast.Name):return names[node.id]
+ if isinstance(node,ast.BinOp) and type(node.op) in BINARY:return BINARY[type(node.op)](visit(node.left),visit(node.right))
+ if isinstance(node,ast.UnaryOp) and type(node.op) in UNARY:return UNARY[type(node.op)](visit(node.operand))
+ raise ValueError(ast.dump(node))
+ return visit(ast.parse(text.strip().replace('^','**'),mode='eval').body)
+variables={};pending={g.findtext('GLOB_PARAM_NAME').strip():g.findtext('VALUE').strip() for g in root.findall('.//GLOBALPARAM')}
+while pending:
+ count=len(pending)
+ for key,value in list(pending.items()):
+ try:variables[key]=evaluate(value,variables)
+ except KeyError:continue
+ del pending[key]
+ assert len(pending)MODEL_INFO\n",
+ "cachedResultsSuitableForFourBranchComparison": false,
+ "cacheRejectionReason": "Diagram has 64 states / four pistons; cached modelinfo has 132 states, .ameperf contains eight LSTP00A instances, and .results declares 1116 saved variables while the current .var has only 640 rows.",
+ "cachedResultHeader": {
+ "pointCount": 1001,
+ "savedVariableCount": 1116
+ },
+ "variableRowCount": 640,
+ "cachedPerformanceContactInstances": [
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8"
+ ],
+ "cachedPistonAliases": [
+ "pn_brp2_10",
+ "pn_brp2_11",
+ "pn_brp2_8",
+ "pn_brp2_9"
+ ],
+ "correctedXml": {
+ "path": "tests/fixtures/amesim/test-mql-4-corrected.xml",
+ "sha256": "7b67e61f791f33bf2a4a0045d151d7fd6a418e63a5ea7f3472d474fd4eff9c86",
+ "parameterAndComponentTopologyIsomorphic": false,
+ "exactPortDifferencesForTopologyMapping": {
+ "ameOnly": [
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_1"
+ ],
+ [
+ "amesim_lstp00a_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_2"
+ ],
+ [
+ "amesim_lstp00a_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_3"
+ ],
+ [
+ "amesim_lstp00a_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_4"
+ ],
+ [
+ "amesim_lstp00a_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_1",
+ "port_3"
+ ],
+ [
+ "amesim_pnl0002_10",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_1",
+ "port_4"
+ ],
+ [
+ "amesim_pnvo001_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_2",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_3"
+ ],
+ [
+ "amesim_pnl0002_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_4"
+ ],
+ [
+ "amesim_pnvo001_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_3",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_3"
+ ],
+ [
+ "amesim_pnl0002_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_4"
+ ],
+ [
+ "amesim_pnvo001_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_10",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_3"
+ ],
+ [
+ "amesim_pnl0002_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_4"
+ ],
+ [
+ "amesim_pnvo001_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_pn3node2_1",
+ "port_3"
+ ],
+ [
+ "amesim_pnl00r_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_pn3node2_4",
+ "port_1"
+ ],
+ [
+ "amesim_pnl00r_4",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_12",
+ "port_2"
+ ],
+ [
+ "amesim_pnpl01_10",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_12",
+ "port_3"
+ ],
+ [
+ "amesim_pnrp17_4",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_13",
+ "port_2"
+ ],
+ [
+ "amesim_pnpl01_12",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_13",
+ "port_3"
+ ],
+ [
+ "amesim_pnrp17_3",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_14",
+ "port_2"
+ ],
+ [
+ "amesim_pnpl01_14",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_14",
+ "port_3"
+ ],
+ [
+ "amesim_pnrp17_2",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_15",
+ "port_2"
+ ],
+ [
+ "amesim_pnpl01_16",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_15",
+ "port_3"
+ ],
+ [
+ "amesim_pnrp17_1",
+ "port_1"
+ ]
+ ]
+ ],
+ "xmlOnly": [
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_1"
+ ],
+ [
+ "amesim_lstp00a_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_2"
+ ],
+ [
+ "amesim_lstp00a_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_3"
+ ],
+ [
+ "amesim_lstp00a_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_lmechn1_4",
+ "port_4"
+ ],
+ [
+ "amesim_lstp00a_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_1",
+ "port_3"
+ ],
+ [
+ "amesim_pnvo001_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_1",
+ "port_4"
+ ],
+ [
+ "amesim_pnl0002_10",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_1",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_3"
+ ],
+ [
+ "amesim_pnvo001_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_2",
+ "port_4"
+ ],
+ [
+ "amesim_pnl0002_2",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_2",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_3"
+ ],
+ [
+ "amesim_pnvo001_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_3",
+ "port_4"
+ ],
+ [
+ "amesim_pnl0002_3",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_1"
+ ],
+ [
+ "amesim_pnl0002_3",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_3"
+ ],
+ [
+ "amesim_pnvo001_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_p4node2_4",
+ "port_4"
+ ],
+ [
+ "amesim_pnl0002_10",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_pn3node2_1",
+ "port_3"
+ ],
+ [
+ "amesim_pnl00r_4",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pn3node2_4",
+ "port_1"
+ ],
+ [
+ "amesim_pnl00r_4",
+ "port_2"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_12",
+ "port_2"
+ ],
+ [
+ "amesim_pnrp17_4",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_12",
+ "port_3"
+ ],
+ [
+ "amesim_pnpl01_10",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_13",
+ "port_2"
+ ],
+ [
+ "amesim_pnrp17_3",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_13",
+ "port_3"
+ ],
+ [
+ "amesim_pnpl01_12",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_14",
+ "port_2"
+ ],
+ [
+ "amesim_pnrp17_2",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_14",
+ "port_3"
+ ],
+ [
+ "amesim_pnpl01_14",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_15",
+ "port_2"
+ ],
+ [
+ "amesim_pnrp17_1",
+ "port_1"
+ ]
+ ],
+ [
+ [
+ "amesim_pnch012_15",
+ "port_3"
+ ],
+ [
+ "amesim_pnpl01_16",
+ "port_1"
+ ]
+ ]
+ ]
+ },
+ "scope": "Input XML snapshot before this generation; generatedProject describes the delivered corrected files."
+ },
+ "reference": {
+ "path": "tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json",
+ "sha256": "7db51a3f2f4d9d25b27b591d52ab1259ff48c4ed44ab1e47cd6a6718224ef65a",
+ "source": "Official Amesim recompile of tests/data/test_mql_4.ame (four branches, 64 states), Standard variable step, tolerance 1e-7, max step 1e30. Recorded on 2026-09-11.",
+ "timeCount": 57,
+ "seriesCount": 72,
+ "ameHashMatches": true,
+ "xmlHashMatches": true,
+ "newAmesimRunPerformed": false
+ },
+ "componentMapping": {
+ "component:62": {
+ "alias": "pn_gas_data",
+ "projectId": "pn_gas_data"
+ },
+ "component:12": {
+ "alias": "dynamic_mechanical_node_alternative_2",
+ "projectId": "amesim_lmechn1_4"
+ },
+ "component:14": {
+ "alias": "elasticendstop_8",
+ "projectId": "amesim_lstp00a_1"
+ },
+ "component:15": {
+ "alias": "elasticendstop_9",
+ "projectId": "amesim_lstp00a_2"
+ },
+ "component:16": {
+ "alias": "elasticendstop_10",
+ "projectId": "amesim_lstp00a_3"
+ },
+ "component:17": {
+ "alias": "elasticendstop_11",
+ "projectId": "amesim_lstp00a_4"
+ },
+ "component:0": {
+ "alias": "pn_brp2_8",
+ "projectId": "amesim_pnrp17_1"
+ },
+ "component:18": {
+ "alias": "dynamic_mechanical_node_alternative_3",
+ "projectId": "amesim_lmechn1_3"
+ },
+ "component:1": {
+ "alias": "pn_brp2_9",
+ "projectId": "amesim_pnrp17_2"
+ },
+ "component:2": {
+ "alias": "pn_brp2_10",
+ "projectId": "amesim_pnrp17_3"
+ },
+ "component:3": {
+ "alias": "pn_brp2_11",
+ "projectId": "amesim_pnrp17_4"
+ },
+ "component:20": {
+ "alias": "pn_c1_8",
+ "projectId": "amesim_pnch012_15"
+ },
+ "component:23": {
+ "alias": "pn_c1_9",
+ "projectId": "amesim_pnch012_14"
+ },
+ "component:26": {
+ "alias": "pn_c1_10",
+ "projectId": "amesim_pnch012_13"
+ },
+ "component:29": {
+ "alias": "pn_c1_11",
+ "projectId": "amesim_pnch012_12"
+ },
+ "component:5": {
+ "alias": "mass_friction_endstops_10",
+ "projectId": "amesim_mecmas21_1"
+ },
+ "component:7": {
+ "alias": "mass_friction_endstops_11",
+ "projectId": "amesim_mecmas21_2"
+ },
+ "component:9": {
+ "alias": "mass_friction_endstops_12",
+ "projectId": "amesim_mecmas21_3"
+ },
+ "component:11": {
+ "alias": "mass_friction_endstops_13",
+ "projectId": "amesim_mecmas21_4"
+ },
+ "component:13": {
+ "alias": "mass_friction_endstops_18",
+ "projectId": "amesim_mecmas21_10"
+ },
+ "component:19": {
+ "alias": "mass_friction_endstops_19",
+ "projectId": "amesim_mecmas21_9"
+ },
+ "component:36": {
+ "alias": "forcecon_1",
+ "projectId": "amesim_forc_1"
+ },
+ "component:51": {
+ "alias": "forcecon_2",
+ "projectId": "amesim_forc_2"
+ },
+ "component:52": {
+ "alias": "piecewiselinear",
+ "projectId": "amesim_ud00_1"
+ },
+ "component:53": {
+ "alias": "piecewiselinear_1",
+ "projectId": "amesim_ud00_2"
+ },
+ "line:13": {
+ "alias": "pneumatic_65",
+ "projectId": "amesim_pnl0001_16"
+ },
+ "component:50": {
+ "alias": "pnnode4_19",
+ "projectId": "amesim_p4node2_4"
+ },
+ "component:60": {
+ "alias": "pn_morifice_15",
+ "projectId": "amesim_pnvo001_4"
+ },
+ "line:19": {
+ "alias": "pneumatic_76",
+ "projectId": "amesim_pnl0003_3"
+ },
+ "component:46": {
+ "alias": "pn_node3_11",
+ "projectId": "amesim_pn3node2_4"
+ },
+ "line:38": {
+ "alias": "pneumatic",
+ "projectId": "amesim_pnl00r_4"
+ },
+ "component:40": {
+ "alias": "pn_node3_8",
+ "projectId": "amesim_pn3node2_1"
+ },
+ "line:23": {
+ "alias": "pneumatic_87",
+ "projectId": "amesim_pnl0003_1"
+ },
+ "component:54": {
+ "alias": "pn_morifice_1",
+ "projectId": "amesim_pnvo001_1"
+ },
+ "component:47": {
+ "alias": "pnnode4_16",
+ "projectId": "amesim_p4node2_1"
+ },
+ "line:39": {
+ "alias": "pneumatic_1",
+ "projectId": "amesim_pnl0002_10"
+ },
+ "line:17": {
+ "alias": "pneumatic_69",
+ "projectId": "amesim_pnl0001_13"
+ },
+ "line:20": {
+ "alias": "pneumatic_80",
+ "projectId": "amesim_pnl0002_3"
+ },
+ "component:49": {
+ "alias": "pnnode4_18",
+ "projectId": "amesim_p4node2_3"
+ },
+ "line:14": {
+ "alias": "pneumatic_66",
+ "projectId": "amesim_pnl0001_15"
+ },
+ "component:58": {
+ "alias": "pn_morifice_10",
+ "projectId": "amesim_pnvo001_3"
+ },
+ "line:18": {
+ "alias": "pneumatic_75",
+ "projectId": "amesim_pnl0003_8"
+ },
+ "component:45": {
+ "alias": "pn_node3_10",
+ "projectId": "amesim_pn3node2_3"
+ },
+ "line:31": {
+ "alias": "pneumatic_100",
+ "projectId": "amesim_pnl00r_5"
+ },
+ "component:41": {
+ "alias": "pn_node3_9",
+ "projectId": "amesim_pn3node2_2"
+ },
+ "line:24": {
+ "alias": "pneumatic_88",
+ "projectId": "amesim_pnl0003_2"
+ },
+ "component:56": {
+ "alias": "pn_morifice_9",
+ "projectId": "amesim_pnvo001_2"
+ },
+ "component:48": {
+ "alias": "pnnode4_17",
+ "projectId": "amesim_p4node2_2"
+ },
+ "line:21": {
+ "alias": "pneumatic_83",
+ "projectId": "amesim_pnl0002_1"
+ },
+ "line:22": {
+ "alias": "pneumatic_86",
+ "projectId": "amesim_pnl0002_2"
+ },
+ "line:16": {
+ "alias": "pneumatic_68",
+ "projectId": "amesim_pnl0001_14"
+ },
+ "line:27": {
+ "alias": "pneumatic_96",
+ "projectId": "amesim_pnl0001_1"
+ },
+ "line:28": {
+ "alias": "pneumatic_97",
+ "projectId": "amesim_pnl0001_2"
+ },
+ "line:29": {
+ "alias": "pneumatic_98",
+ "projectId": "amesim_pnl0001_4"
+ },
+ "line:30": {
+ "alias": "pneumatic_99",
+ "projectId": "amesim_pnl0001_5"
+ },
+ "component:38": {
+ "alias": "pn_orifice_18",
+ "projectId": "amesim_pnor001_1"
+ },
+ "component:37": {
+ "alias": "pn_general_chamber",
+ "projectId": "amesim_pnch023_1"
+ },
+ "component:39": {
+ "alias": "pn_orifice_19",
+ "projectId": "amesim_pnor001_2"
+ },
+ "component:43": {
+ "alias": "pn_orifice_20",
+ "projectId": "amesim_pnor001_3"
+ },
+ "component:42": {
+ "alias": "pn_general_chamber_2",
+ "projectId": "amesim_pnch023_2"
+ },
+ "component:44": {
+ "alias": "pn_orifice_21",
+ "projectId": "amesim_pnor001_4"
+ },
+ "component:55": {
+ "alias": "step_12",
+ "projectId": "amesim_step0_1"
+ },
+ "component:57": {
+ "alias": "step_13",
+ "projectId": "amesim_step0_2"
+ },
+ "component:59": {
+ "alias": "step_14",
+ "projectId": "amesim_step0_3"
+ },
+ "component:61": {
+ "alias": "step_15",
+ "projectId": "amesim_step0_4"
+ },
+ "component:4": {
+ "alias": "zeroforcesource_17",
+ "projectId": "amesim_f000_23"
+ },
+ "component:6": {
+ "alias": "zeroforcesource_18",
+ "projectId": "amesim_f000_25"
+ },
+ "component:8": {
+ "alias": "zeroforcesource_19",
+ "projectId": "amesim_f000_26"
+ },
+ "component:10": {
+ "alias": "zeroforcesource_20",
+ "projectId": "amesim_f000_27"
+ },
+ "component:32": {
+ "alias": "zeroforcesource_26",
+ "projectId": "amesim_f000_15"
+ },
+ "component:33": {
+ "alias": "zeroforcesource_27",
+ "projectId": "amesim_f000_16"
+ },
+ "component:34": {
+ "alias": "zeroforcesource_28",
+ "projectId": "amesim_f000_17"
+ },
+ "component:35": {
+ "alias": "zeroforcesource_29",
+ "projectId": "amesim_f000_18"
+ },
+ "component:21": {
+ "alias": "pn_plug_16",
+ "projectId": "amesim_pnpl01_15"
+ },
+ "component:22": {
+ "alias": "pn_plug_17",
+ "projectId": "amesim_pnpl01_16"
+ },
+ "component:24": {
+ "alias": "pn_plug_18",
+ "projectId": "amesim_pnpl01_13"
+ },
+ "component:25": {
+ "alias": "pn_plug_19",
+ "projectId": "amesim_pnpl01_14"
+ },
+ "component:27": {
+ "alias": "pn_plug_20",
+ "projectId": "amesim_pnpl01_11"
+ },
+ "component:28": {
+ "alias": "pn_plug_21",
+ "projectId": "amesim_pnpl01_12"
+ },
+ "component:30": {
+ "alias": "pn_plug_22",
+ "projectId": "amesim_pnpl01_9"
+ },
+ "component:31": {
+ "alias": "pn_plug_23",
+ "projectId": "amesim_pnpl01_10"
+ }
+ },
+ "generatedProject": {
+ "path": "tests/data/test-mql-4-corrected.json",
+ "sha256": "542494eed8e235cb36eae5f80a0776b812e547d9215fa370949b0882834ebc8b",
+ "xmlPath": "test/solver-newton-20260911/mql4/aligned-input.xml",
+ "xmlSha256": "99e5e15ce0247eb31ecc6c41711aff46d162b173e1958d176af6d7377e55a20a",
+ "nodeCount": 81,
+ "edgeCount": 90,
+ "parameterCount": 582,
+ "allMappedParametersExactlyMatchAme": true,
+ "allMappedConnectionPortsExactlyMatchAme": true,
+ "parameterChangesFromLegacyXml": [
+ {
+ "component": "amesim_pnl00r_4",
+ "parameter": "rr",
+ "before": 0.0032142857142857142,
+ "after": 1e-05
+ }
+ ],
+ "connectionPortChangesFromLegacyXml": [
+ {
+ "components": [
+ "amesim_pnch012_15",
+ "amesim_pnrp17_1"
+ ],
+ "before": {
+ "amesim_pnch012_15": "port_2",
+ "amesim_pnrp17_1": "port_1"
+ },
+ "after": {
+ "amesim_pnch012_15": "port_3",
+ "amesim_pnrp17_1": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_14",
+ "amesim_pnrp17_2"
+ ],
+ "before": {
+ "amesim_pnch012_14": "port_2",
+ "amesim_pnrp17_2": "port_1"
+ },
+ "after": {
+ "amesim_pnch012_14": "port_3",
+ "amesim_pnrp17_2": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_lmechn1_4",
+ "amesim_lstp00a_1"
+ ],
+ "before": {
+ "amesim_lstp00a_1": "port_2",
+ "amesim_lmechn1_4": "port_4"
+ },
+ "after": {
+ "amesim_lstp00a_1": "port_2",
+ "amesim_lmechn1_4": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_lmechn1_4",
+ "amesim_lstp00a_2"
+ ],
+ "before": {
+ "amesim_lstp00a_2": "port_2",
+ "amesim_lmechn1_4": "port_3"
+ },
+ "after": {
+ "amesim_lstp00a_2": "port_2",
+ "amesim_lmechn1_4": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_lmechn1_4",
+ "amesim_lstp00a_3"
+ ],
+ "before": {
+ "amesim_lstp00a_3": "port_2",
+ "amesim_lmechn1_4": "port_2"
+ },
+ "after": {
+ "amesim_lstp00a_3": "port_2",
+ "amesim_lmechn1_4": "port_3"
+ }
+ },
+ {
+ "components": [
+ "amesim_lmechn1_4",
+ "amesim_lstp00a_4"
+ ],
+ "before": {
+ "amesim_lstp00a_4": "port_2",
+ "amesim_lmechn1_4": "port_1"
+ },
+ "after": {
+ "amesim_lstp00a_4": "port_2",
+ "amesim_lmechn1_4": "port_4"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_13",
+ "amesim_pnrp17_3"
+ ],
+ "before": {
+ "amesim_pnch012_13": "port_2",
+ "amesim_pnrp17_3": "port_1"
+ },
+ "after": {
+ "amesim_pnch012_13": "port_3",
+ "amesim_pnrp17_3": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_15",
+ "amesim_pnpl01_16"
+ ],
+ "before": {
+ "amesim_pnpl01_16": "port_1",
+ "amesim_pnch012_15": "port_3"
+ },
+ "after": {
+ "amesim_pnpl01_16": "port_1",
+ "amesim_pnch012_15": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_14",
+ "amesim_pnpl01_14"
+ ],
+ "before": {
+ "amesim_pnpl01_14": "port_1",
+ "amesim_pnch012_14": "port_3"
+ },
+ "after": {
+ "amesim_pnpl01_14": "port_1",
+ "amesim_pnch012_14": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_13",
+ "amesim_pnpl01_12"
+ ],
+ "before": {
+ "amesim_pnpl01_12": "port_1",
+ "amesim_pnch012_13": "port_3"
+ },
+ "after": {
+ "amesim_pnpl01_12": "port_1",
+ "amesim_pnch012_13": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_12",
+ "amesim_pnpl01_10"
+ ],
+ "before": {
+ "amesim_pnpl01_10": "port_1",
+ "amesim_pnch012_12": "port_3"
+ },
+ "after": {
+ "amesim_pnpl01_10": "port_1",
+ "amesim_pnch012_12": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_pnch012_12",
+ "amesim_pnrp17_4"
+ ],
+ "before": {
+ "amesim_pnch012_12": "port_2",
+ "amesim_pnrp17_4": "port_1"
+ },
+ "after": {
+ "amesim_pnch012_12": "port_3",
+ "amesim_pnrp17_4": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_pn3node2_1",
+ "amesim_pnl00r_4"
+ ],
+ "before": {
+ "amesim_pnl00r_4": "port_1",
+ "amesim_pn3node2_1": "port_3"
+ },
+ "after": {
+ "amesim_pnl00r_4": "port_2",
+ "amesim_pn3node2_1": "port_3"
+ }
+ },
+ {
+ "components": [
+ "amesim_pn3node2_4",
+ "amesim_pnl00r_4"
+ ],
+ "before": {
+ "amesim_pnl00r_4": "port_2",
+ "amesim_pn3node2_4": "port_1"
+ },
+ "after": {
+ "amesim_pn3node2_4": "port_1",
+ "amesim_pnl00r_4": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_1",
+ "amesim_pnl0002_10"
+ ],
+ "before": {
+ "amesim_p4node2_1": "port_4",
+ "amesim_pnl0002_10": "port_1"
+ },
+ "after": {
+ "amesim_p4node2_1": "port_3",
+ "amesim_pnl0002_10": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_1",
+ "amesim_pnvo001_1"
+ ],
+ "before": {
+ "amesim_pnvo001_1": "port_2",
+ "amesim_p4node2_1": "port_3"
+ },
+ "after": {
+ "amesim_pnvo001_1": "port_2",
+ "amesim_p4node2_1": "port_4"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_2",
+ "amesim_pnl0002_2"
+ ],
+ "before": {
+ "amesim_p4node2_2": "port_4",
+ "amesim_pnl0002_2": "port_1"
+ },
+ "after": {
+ "amesim_p4node2_2": "port_1",
+ "amesim_pnl0002_2": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_2",
+ "amesim_pnl0002_1"
+ ],
+ "before": {
+ "amesim_pnl0002_1": "port_2",
+ "amesim_p4node2_2": "port_1"
+ },
+ "after": {
+ "amesim_pnl0002_1": "port_2",
+ "amesim_p4node2_2": "port_3"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_2",
+ "amesim_pnvo001_2"
+ ],
+ "before": {
+ "amesim_pnvo001_2": "port_2",
+ "amesim_p4node2_2": "port_3"
+ },
+ "after": {
+ "amesim_pnvo001_2": "port_2",
+ "amesim_p4node2_2": "port_4"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_3",
+ "amesim_pnl0002_3"
+ ],
+ "before": {
+ "amesim_pnl0002_3": "port_1",
+ "amesim_p4node2_3": "port_4"
+ },
+ "after": {
+ "amesim_pnl0002_3": "port_1",
+ "amesim_p4node2_3": "port_1"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_3",
+ "amesim_pnl0002_2"
+ ],
+ "before": {
+ "amesim_pnl0002_2": "port_2",
+ "amesim_p4node2_3": "port_1"
+ },
+ "after": {
+ "amesim_pnl0002_2": "port_2",
+ "amesim_p4node2_3": "port_3"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_3",
+ "amesim_pnvo001_3"
+ ],
+ "before": {
+ "amesim_pnvo001_3": "port_2",
+ "amesim_p4node2_3": "port_3"
+ },
+ "after": {
+ "amesim_pnvo001_3": "port_2",
+ "amesim_p4node2_3": "port_4"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_4",
+ "amesim_pnl0002_10"
+ ],
+ "before": {
+ "amesim_pnl0002_10": "port_2",
+ "amesim_p4node2_4": "port_4"
+ },
+ "after": {
+ "amesim_p4node2_4": "port_1",
+ "amesim_pnl0002_10": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_4",
+ "amesim_pnl0002_3"
+ ],
+ "before": {
+ "amesim_p4node2_4": "port_1",
+ "amesim_pnl0002_3": "port_2"
+ },
+ "after": {
+ "amesim_p4node2_4": "port_3",
+ "amesim_pnl0002_3": "port_2"
+ }
+ },
+ {
+ "components": [
+ "amesim_p4node2_4",
+ "amesim_pnvo001_4"
+ ],
+ "before": {
+ "amesim_pnvo001_4": "port_2",
+ "amesim_p4node2_4": "port_3"
+ },
+ "after": {
+ "amesim_pnvo001_4": "port_2",
+ "amesim_p4node2_4": "port_4"
+ }
+ }
+ ],
+ "layoutMetadataSource": {
+ "path": "tests/fixtures/legacy/test-mql-8.json",
+ "sha256": "4f1bf698519ba21429a11a83653adc7e52191f2d2b51fca943ee0b84f62feebd"
+ },
+ "simulation": {
+ "t_start": 0.0,
+ "t_stop": 10.0,
+ "step": 0.01,
+ "max_step": 1e+30,
+ "method": "BDF"
+ },
+ "simulationSettingsNote": "AME archive stores historical fixed-step settings. This JSON uses native BDF; rtol is supplied by the backend and is not stored in the project. Initial validation used 1e-7; the backend default was subsequently changed to 1e-8. The earlier official Standard variable-step reference remains tolerance 1e-7. Inspect actual run diagnostics; solver algorithms are not identical."
+ },
+ "displayGeometryCorrection": {
+ "priorProjectSha256": "6513906dbee184b40f2f2056d438fad730b16186aafd64737cbf792e7ea06507",
+ "nodeDisplayChanges": [
+ {
+ "id": "amesim_p4node2_1",
+ "beforeRotation": 180,
+ "afterRotation": 180,
+ "mirrored": false
+ },
+ {
+ "id": "amesim_p4node2_2",
+ "beforeRotation": 0,
+ "afterRotation": 180,
+ "mirrored": false
+ },
+ {
+ "id": "amesim_p4node2_3",
+ "beforeRotation": 0,
+ "afterRotation": 180,
+ "mirrored": false
+ },
+ {
+ "id": "amesim_p4node2_4",
+ "beforeRotation": 0,
+ "afterRotation": 180,
+ "mirrored": false
+ }
+ ],
+ "clearedRoutePointEdges": [
+ "edge-amesim_p4node2_1-port_2-amesim_pnl0001_13-port_2-1786972847258"
+ ],
+ "physicalDataUnchanged": true,
+ "symbolPortAnchorCorrection": "Swap P4NODE2 port 3 and port 4 anchors. With rotation=180, all four directions match AME geometry 1.",
+ "browserGeometryTests": {
+ "file": "frontend/tests/e2e/component-symbols.spec.ts",
+ "selectedTests": 2,
+ "passed": 2,
+ "elapsedSeconds": 9.4,
+ "simulationExecuted": false,
+ "sourceGeometryFixture": "tests/model_audit/p4node2-ame-geometry.json"
+ }
+ },
+ "independentParameterRecheck": {
+ "script": "tests/model_audit/independent_mql4_parameter_check.py",
+ "directAmeFields": 543,
+ "publicVolumeInputDefaults": 32,
+ "adapterFields": 7,
+ "totalChecked": 582,
+ "differences": 0,
+ "callsSharedExpectedParameters": false
+ }
+}
diff --git a/tests/native_reference.py b/tests/native_reference.py
index f26fc04..71815df 100644
--- a/tests/native_reference.py
+++ b/tests/native_reference.py
@@ -9,7 +9,7 @@ from app.simulation.systems.network import SimulationNetwork
def reference_data():
- return json.loads((Path(__file__).parent / 'data/native-python-reference.json').read_text(encoding='utf-8'))
+ return json.loads((Path(__file__).parent / 'baselines/native/native-python-reference.json').read_text(encoding='utf-8'))
def reference_network(case):
diff --git a/tests/test_high_stiffness_explicit_rk45.py b/tests/test_high_stiffness_explicit_rk45.py
index f5429c7..fb8011c 100644
--- a/tests/test_high_stiffness_explicit_rk45.py
+++ b/tests/test_high_stiffness_explicit_rk45.py
@@ -10,7 +10,6 @@ from app.main import run_system_xml_simulation
FIXTURE_PATH = (
Path(__file__).resolve().parent
- / "data"
/ "fixtures"
/ "high_stiffness_explicit_rk45.xml"
)
diff --git a/tests/test_native_codegen.py b/tests/test_native_codegen.py
index 98e8f96..d179d2f 100644
--- a/tests/test_native_codegen.py
+++ b/tests/test_native_codegen.py
@@ -22,7 +22,7 @@ from app.simulation.config import SolverActivityTracker
from app.system_xml import validate_system_xml_document
ROOT = Path(__file__).resolve().parents[1]
-FIXTURE = ROOT / "tests/data/native-skill-test.xml"
+FIXTURE = ROOT / "tests/fixtures/native-skill-test.xml"
def network(xml=None):
@@ -76,7 +76,8 @@ class NativeExecutionTests(unittest.TestCase):
def test_cache_and_standalone_executable_without_python_path(self):
cached = build_native(self.program)
self.assertTrue(cached.cache_hit)
- env = {**os.environ, "PATH": str(Path(os.environ["SystemRoot"]) / "System32")}
+ isolated_path = str(Path(os.environ["SystemRoot"]) / "System32") if os.name == "nt" else str(self.root / "no-path")
+ env = {**os.environ, "PATH": isolated_path}
r = subprocess.run([str(cached.executable), "--init"], env=env, cwd=self.root,
capture_output=True, text=True, check=True)
self.assertEqual(len(json.loads(r.stdout)), 12)
diff --git a/tests/test_native_only_backend.py b/tests/test_native_only_backend.py
index e783d32..ea0591e 100644
--- a/tests/test_native_only_backend.py
+++ b/tests/test_native_only_backend.py
@@ -29,7 +29,7 @@ sys.meta_path.insert(0, NoNumericalPython())
from app.main import compile_system_xml_network
from app.simulation.native_codegen.compiler import compile_native_program
from app.system_xml import validate_system_xml_document
-doc = validate_system_xml_document(Path('tests/data/native-skill-test.xml').read_bytes()).document
+doc = validate_system_xml_document(Path('tests/fixtures/native-skill-test.xml').read_bytes()).document
program = compile_native_program(compile_system_xml_network(doc))
assert len(program.state_keys) == 12
assert len(program.variables) == 175
diff --git a/tests/test_native_pipe_physics.py b/tests/test_native_pipe_physics.py
index 61f7988..2a4c791 100644
--- a/tests/test_native_pipe_physics.py
+++ b/tests/test_native_pipe_physics.py
@@ -152,8 +152,8 @@ int main(void) {
self.assertLess(abs(sum(rates)),1e-10+sum(map(abs,rates))*1e-12)
def test_web_stream_completes_mql4_and_matches_amesim_reference(self):
- reference=json.loads((ROOT/'tests/data/test-mql-4-amesim-reference.json').read_text())
- xml=(ROOT/'tests/data/test-mql-4-corrected.xml').read_bytes()
+ reference=json.loads((ROOT/'tests/baselines/simulation/test_mql_4/test-mql-4-amesim-reference.json').read_text())
+ xml=(ROOT/'tests/fixtures/amesim/test-mql-4-corrected.xml').read_bytes()
events=[json.loads(line) for line in simulation_event_stream(xml)]
self.assertFalse([e for e in events if e['event']=='error'])
self.assertTrue(any(e['event']=='progress' for e in events))
@@ -161,7 +161,7 @@ int main(void) {
self.assertTrue(result['success'],result['message'])
self.assertEqual(result['simulatedUntil'],10)
self.assertEqual(result['diagnostics']['backend'],'native-c')
- self.assertEqual(result['diagnostics']['integration']['rtol'],1e-7)
+ self.assertEqual(result['diagnostics']['integration']['rtol'],1e-8)
self.assertEqual(result['diagnostics']['integration']['method'],'BDF')
self.assertEqual(result['diagnostics']['stateCount'],64)
# Bound the formerly stalled tiny-step failure by work, not machine time.
diff --git a/tests/test_native_pipe_solver.py b/tests/test_native_pipe_solver.py
new file mode 100644
index 0000000..61e7354
--- /dev/null
+++ b/tests/test_native_pipe_solver.py
@@ -0,0 +1,237 @@
+"""Standalone pipe-root checks; only a C compiler and Python stdlib are needed."""
+import ctypes
+import math
+import os
+from pathlib import Path
+import shlex
+import shutil
+import subprocess
+import tempfile
+import unittest
+
+
+ROOT = Path(__file__).resolve().parents[1]
+LAMINAR_END = 89.96829989
+
+
+def reference_friction(reynolds, roughness):
+ """Independent evaluation of the retained Darcy blend, without its slope."""
+ laminar = 64 / reynolds
+ if reynolds <= LAMINAR_END:
+ return laminar
+ smooth = (-1.8 * math.log10(6.9 / reynolds)) ** -2
+ turbulent = smooth
+ if roughness:
+ fully_rough = (-2 * math.log10(roughness / 3.7)) ** -2
+ weight = 1 / (1 + (180 / (reynolds * roughness)) ** 2)
+ turbulent = (1 - weight) * smooth + weight * fully_rough
+ transition = ((reynolds - LAMINAR_END) / 2741.96700831) ** 8.37293695
+ return (laminar + transition * turbulent) / (1 + transition)
+
+
+def reference_root(constant, roughness):
+ if constant == 0:
+ return 0.0
+ low, high = 0.0, 1.0
+ while high * high * reference_friction(high, roughness) < constant:
+ high *= 2
+ for _ in range(120):
+ middle = low + (high - low) / 2
+ if middle == low or middle == high:
+ break
+ if middle * middle * reference_friction(middle, roughness) < constant:
+ low = middle
+ else:
+ high = middle
+ return low + (high - low) / 2
+
+
+class PipeStatus(ctypes.Structure):
+ _fields_ = [
+ ('converged', ctypes.c_int),
+ ('iterations', ctypes.c_int),
+ ('bisections', ctypes.c_int),
+ ('relative_residual', ctypes.c_double),
+ ]
+
+
+class NativePipeSolverTests(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ command = shlex.split(os.environ.get('CC', ''))
+ if not command:
+ compiler = shutil.which('gcc') or shutil.which('clang')
+ if not compiler:
+ raise unittest.SkipTest('A native C compiler is required')
+ command = [compiler]
+ cls.directory = tempfile.TemporaryDirectory(prefix='native-pipe-solver-')
+ cls.addClassCleanup(cls.directory.cleanup)
+ cls.compiler = command
+ source = (ROOT / 'native/components/kernels.c').read_text()
+ cls.library = cls.build_library(source, 'ordinary')
+
+ # Fault injection only in the temporary test translation unit. The
+ # resistance equation and public production ABI have no test switches.
+ prepared = 'static double pipe_friction_prepared('
+ derivative = 'static double pipe_friction_derivative('
+ assert source.count(prepared) == source.count(derivative) == 1
+ injected = 'int test_pipe_fault_mode=0;\n' + source.replace(
+ prepared, 'static double pipe_friction_prepared_original(', 1)
+ injected = injected.replace('static double pipe_friction(double', r'''
+static double pipe_friction_prepared(double re,double rr,double rough) {
+ if(test_pipe_fault_mode==5)return 0; /* No upper sign change. */
+ if(test_pipe_fault_mode==6)return re<2000 ? .01 : 100;
+ return pipe_friction_prepared_original(re,rr,rough);
+}
+static double pipe_friction(double''', 1)
+ injected = injected.replace(
+ derivative, 'static double pipe_friction_derivative_original(', 1)
+ injected = injected.replace('static double pipe_checked_solution(', r'''
+static double pipe_friction_derivative(double re,double rr,double rough,double *df) {
+ double f=pipe_friction_derivative_original(re,rr,rough,df);
+ double slope=2*re*f+re*re*(*df);
+ if(test_pipe_fault_mode==1)*df=(1e6*slope-2*re*f)/(re*re);
+ if(test_pipe_fault_mode==2)*df=NAN;
+ if(test_pipe_fault_mode==3)*df=(-slope-2*re*f)/(re*re);
+ if(test_pipe_fault_mode==4)return NAN;
+ if(test_pipe_fault_mode==6){*df=0;return re<2000 ? .01 : 100;}
+ return f;
+}
+static double pipe_checked_solution(''', 1)
+ cls.fault_library = cls.build_library(injected, 'faults')
+ cls.fault_mode = ctypes.c_int.in_dll(cls.fault_library, 'test_pipe_fault_mode')
+
+ @classmethod
+ def build_library(cls, source, name):
+ directory = Path(cls.directory.name)
+ source_path = directory / (name + '.c')
+ library_path = directory / (name + ('.dll' if os.name == 'nt' else '.so'))
+ source_path.write_text(source)
+ command = cls.compiler + [
+ '-std=c11', '-O3', '-Wall', '-Wextra', '-Werror',
+ '-ffp-contract=off', '-fno-fast-math', '-shared',
+ ]
+ if os.name != 'nt':
+ command.append('-fPIC')
+ command += ['-I', str(ROOT / 'native/include'), str(source_path),
+ '-lm', '-o', str(library_path)]
+ run = subprocess.run(command, capture_output=True, text=True, timeout=60)
+ if run.returncode:
+ raise AssertionError(run.stderr)
+ library = ctypes.CDLL(str(library_path))
+ if os.name == 'nt':
+ import _ctypes
+ cls.addClassCleanup(_ctypes.FreeLibrary, library._handle)
+ library.native_pipe_resistance.argtypes = [
+ ctypes.c_double, ctypes.c_double, ctypes.c_double,
+ ctypes.POINTER(PipeStatus),
+ ]
+ library.native_pipe_resistance.restype = ctypes.c_double
+ return library
+
+ def solve(self, constant, roughness=0, flow_scale=1, library=None):
+ # Nonzero sentinel fields ensure every call resets a reused status.
+ status = PipeStatus(1, 999, 999, -1)
+ result = (library or self.library).native_pipe_resistance(
+ constant, roughness, flow_scale, ctypes.byref(status))
+ return result, status
+
+ def assert_root(self, constant, roughness, result, status):
+ self.assertTrue(status.converged)
+ self.assertTrue(math.isfinite(result))
+ self.assertLessEqual(status.relative_residual, 1e-9)
+ expected = reference_root(constant, roughness)
+ self.assertLessEqual(abs(result - expected), 1e-12 + expected * 1e-9)
+ residual = abs(result * result * reference_friction(result, roughness) / constant - 1)
+ self.assertLessEqual(residual, 1e-9)
+
+ def test_independent_bisection_across_reynolds_roughness_and_flow_scales(self):
+ fallbacks = 0
+ maximum_iterations = 0
+ for exponent in range(151):
+ reynolds = 10 ** (-6 + exponent * .1)
+ for roughness in (0, 1e-5, 1e-4, 1e-3, 1e-2, .1):
+ constant = reynolds ** 2 * reference_friction(reynolds, roughness)
+ for scale in (1e-12, 1e-6, 1):
+ with self.subTest(reynolds=reynolds, roughness=roughness, scale=scale):
+ result, status = self.solve(constant, roughness, scale)
+ self.assert_root(constant, roughness, result, status)
+ self.assertLess(status.iterations, 20)
+ fallbacks += status.bisections
+ maximum_iterations = max(maximum_iterations, status.iterations)
+ self.assertGreater(fallbacks, 0)
+ self.assertGreater(maximum_iterations, 0)
+
+ def test_laminar_transition_neighbors_and_extreme_flow_scales(self):
+ for center in (LAMINAR_END, 1000, 2300, LAMINAR_END + 2741.96700831, 4000):
+ for reynolds in (math.nextafter(center, 0), center, math.nextafter(center, math.inf)):
+ for roughness in (0, 1e-5, .1):
+ constant = reynolds ** 2 * reference_friction(reynolds, roughness)
+ for scale in (1e-300, 1e-12, 1, 1e300):
+ with self.subTest(reynolds=reynolds, roughness=roughness, scale=scale):
+ result, status = self.solve(constant, roughness, scale)
+ self.assert_root(constant, roughness, result, status)
+
+ def test_zero_invalid_inputs_and_unrepresentable_values_fail_explicitly(self):
+ result, status = self.solve(0)
+ self.assertEqual(result, 0)
+ self.assertTrue(status.converged)
+ self.assertEqual(status.relative_residual, 0)
+ result, status = self.solve(64, 0, 1.7e308)
+ self.assertEqual(result, 1)
+ self.assertTrue(status.converged)
+ for constant, roughness, scale in (
+ (-1, 0, 1), (math.nan, 0, 1), (math.inf, 0, 1),
+ (1, -1, 1), (1, math.nan, 1), (1, math.inf, 1),
+ (1, 0, 0), (1, 0, -1), (1, 0, math.nan), (1, 0, math.inf),
+ (math.ulp(0.0), 0, 1), # A positive root rounds to zero.
+ (1e8, 3.7, 1), # Non-finite roughness limit.
+ (1e100, 0, 1), # Non-finite friction in bracket expansion.
+ (1e308, 0, 1), # Non-finite starting bound.
+ (128, 0, 1.7e308), (1e8, 0, 1.7e308),
+ ):
+ with self.subTest(constant=constant, roughness=roughness, scale=scale):
+ result, status = self.solve(constant, roughness, scale)
+ self.assertTrue(math.isnan(result))
+ self.assertFalse(status.converged)
+ self.assertLessEqual(status.iterations, 128)
+ self.assertNotEqual(status.relative_residual, -1)
+
+ def test_inaccurate_or_unusable_newton_slopes_trigger_convergent_bisection(self):
+ try:
+ for mode in (1, 2, 3):
+ self.fault_mode.value = mode
+ for reynolds in (1000, 2800, 1e5, 1e9):
+ for roughness in (0, .1):
+ constant = reynolds ** 2 * reference_friction(reynolds, roughness)
+ with self.subTest(mode=mode, reynolds=reynolds, roughness=roughness):
+ result, status = self.solve(constant, roughness, library=self.fault_library)
+ self.assert_root(constant, roughness, result, status)
+ self.assertGreater(status.bisections, 0)
+ self.assertLess(status.iterations, 128)
+ finally:
+ self.fault_mode.value = 0
+
+ def test_nonfinite_equation_missing_bracket_and_float_stagnation_fail(self):
+ try:
+ for mode in (4, 5, 6):
+ self.fault_mode.value = mode
+ with self.subTest(mode=mode):
+ result, status = self.solve(1e6, library=self.fault_library)
+ self.assertTrue(math.isnan(result))
+ self.assertFalse(status.converged)
+ if mode == 4:
+ self.assertEqual(status.iterations, 1)
+ elif mode == 5:
+ self.assertEqual(status.iterations, 0)
+ else:
+ # A discontinuous equation has no valid root even when
+ # the bracket narrows to adjacent representable values.
+ self.assertGreater(status.bisections, 0)
+ self.assertLess(status.iterations, 128)
+ finally:
+ self.fault_mode.value = 0
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_pressure_units.py b/tests/test_pressure_units.py
new file mode 100644
index 0000000..89c8598
--- /dev/null
+++ b/tests/test_pressure_units.py
@@ -0,0 +1,84 @@
+from __future__ import annotations
+
+from copy import deepcopy
+import subprocess
+import unittest
+from xml.etree import ElementTree as ET
+
+from app.main import run_system_xml_simulation
+from app.simulation.native_codegen.build import toolchain
+from app.simulation.native_codegen.input import project_xml
+from app.system_xml import validate_system_xml_document
+from tests.test_amesim_pnch012_xml import amesim_pnch012_project
+
+
+def pressure_project(value: float | str, unit: str = "bar") -> dict:
+ project = amesim_pnch012_project().model_dump(mode="json")
+ chamber = project["nodes"][0]["data"]
+ chamber["parameters"]["p0"] = value
+ chamber["parameterUnits"]["p0"] = unit
+ return project
+
+
+class PressureUnitInputTests(unittest.TestCase):
+ def test_absolute_bar_expression_exports_si_without_atmospheric_offset(self) -> None:
+ project = pressure_project("= 0.25 + 0.75")
+ original = deepcopy(project)
+ xml = project_xml(project)
+ root = ET.fromstring(xml)
+ self.assertEqual(root.attrib["unitSystem"], "SI")
+ parameter = root.find(
+ "./Components/Component[@id='chamber_1']/Parameter[@name='p0']"
+ )
+ self.assertIsNotNone(parameter)
+ self.assertEqual(float(parameter.attrib["value"]), 100000.0)
+ self.assertNotIn("unit", parameter.attrib)
+ report = validate_system_xml_document(xml)
+ self.assertTrue(report.valid, report.as_dict())
+ self.assertEqual(project, original)
+
+ def test_saved_numeric_values_are_already_si_with_absolute_bar_display(self) -> None:
+ for value in (250000.0, "250000"):
+ with self.subTest(value=value):
+ self.assertEqual(
+ project_xml(pressure_project(value)),
+ project_xml(pressure_project(250000.0, "Pa")),
+ )
+
+ def test_absolute_bar_and_existing_pressure_expression_units_are_equivalent(self) -> None:
+ expected = project_xml(pressure_project(250000.0, "Pa"))
+ for unit, expression in (
+ ("bar", "2 + 0.5"),
+ ("kPa", "200 + 50"),
+ ("MPa", "0.2 + 0.05"),
+ ("Pa", "200000 + 50000"),
+ ):
+ with self.subTest(unit=unit):
+ self.assertEqual(project_xml(pressure_project(expression, unit)), expected)
+
+ def test_absolute_bar_and_pa_simulations_return_identical_si_pressure(self) -> None:
+ try:
+ toolchain()
+ except (OSError, RuntimeError, subprocess.SubprocessError) as exc:
+ self.skipTest(f"Native toolchain unavailable: {exc}")
+ absolute_bar = run_system_xml_simulation(
+ project_xml(pressure_project("2 + 0.5", "bar"))
+ )
+ pascals = run_system_xml_simulation(
+ project_xml(pressure_project(250000.0, "Pa"))
+ )
+ self.assertTrue(absolute_bar["success"], absolute_bar["message"])
+ self.assertTrue(pascals["success"], pascals["message"])
+ self.assertEqual(absolute_bar["series"], pascals["series"])
+ self.assertEqual(absolute_bar["series"]["time"], [0.0, 0.001, 0.002])
+ for pressure in absolute_bar["series"]["chamber_1.p"]:
+ self.assertAlmostEqual(pressure, 250000.0, places=6)
+ pressure_metadata = next(
+ variable for variable in absolute_bar["variables"]
+ if variable["key"] == "chamber_1.p"
+ )
+ self.assertEqual(pressure_metadata["unit"], "Pa")
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/test_regression_fixture_line_endings.py b/tests/test_regression_fixture_line_endings.py
index c1c845c..ea18e14 100644
--- a/tests/test_regression_fixture_line_endings.py
+++ b/tests/test_regression_fixture_line_endings.py
@@ -11,9 +11,9 @@ BASELINE_ROOT = REPOSITORY_ROOT / "tests" / "baselines" / "simulation"
GIT_ATTRIBUTES_PATH = REPOSITORY_ROOT / ".gitattributes"
EXPECTED_ATTRIBUTE_RULES = {
- ("tests/data/test-mql-8.xml", "text", "eol=lf"),
- ("tests/data/test-mql-8.json", "text", "eol=lf"),
- ("tests/data/test_mql-full-branches-01-04.xml", "text", "eol=lf"),
+ ("tests/fixtures/legacy/test-mql-8.xml", "text", "eol=lf"),
+ ("tests/fixtures/legacy/test-mql-8.json", "text", "eol=lf"),
+ ("tests/baselines/simulation/test_mql_full_branches/sources/test_mql-full-branches-01-04.xml", "text", "eol=lf"),
("tests/baselines/simulation/**/*.json", "text", "eol=lf"),
}
diff --git a/tools/audit_test_mql8_model.py b/tools/audit_test_mql8_model.py
new file mode 100644
index 0000000..c5c4844
--- /dev/null
+++ b/tools/audit_test_mql8_model.py
@@ -0,0 +1,325 @@
+"""Reproduce the eight-branch AME drawing -> editor model audit.
+
+Run from the repository root with .venv/bin/python. The original inputs are
+read only. Mapping uses typed graph isomorphism and endpoint edit cost, never
+component display names; names are emitted only as evidence for review.
+"""
+from __future__ import annotations
+
+from collections import Counter, defaultdict
+from copy import deepcopy
+import hashlib
+import json
+import math
+import re
+from pathlib import Path
+import sys
+import tarfile
+
+ROOT = Path(__file__).resolve().parents[1]
+sys.path.insert(0, str(ROOT))
+from tests.test_test_mql_ame_contract import (
+ _blocks, _element_text as element, _expected_parameters,
+ _public_model_type, _resolve_globals, _value_fields,
+ _SOURCE_FIELD_BY_PARAMETER, _numeric_project_value,
+)
+from app.simulation.registry import get_component_model_spec
+
+HERE = ROOT / 'test/solver-newton-20260911/mql8'
+AME = ROOT / 'tests/data/test_mql.ame'
+INPUT = ROOT / 'tests/fixtures/legacy/test-mql-8.json'
+OUTPUT = ROOT / 'tests/data/test-mql-8-corrected.json'
+
+
+def read_drawing():
+ with tarfile.open(AME) as archive:
+ cir = archive.extractfile('test_mql_.cir').read().decode('latin1')
+ sim = archive.extractfile('test_mql_.sim').read().decode('ascii')
+ model_info = archive.extractfile('test_mql_.modelinfo').read().decode('ascii')
+ globals_ = _resolve_globals(cir)
+ components, lines = _blocks(cir, 'COMP'), _blocks(cir, 'LINE')
+ entities, edges = {}, []
+
+ def add(key, body):
+ kind = _public_model_type(element(body, 'SUB_NAME'))
+ entities[key] = {
+ 'modelType': kind, 'alias': element(body, 'ALIAS'),
+ 'parameters': _expected_parameters(body, kind, globals_),
+ 'fields': {k: vars(v) for k, v in _value_fields(body).items()},
+ 'geometry': element(body, 'COMP_GEOMETRY'),
+ 'outputType': element(body, 'OUTPUT_TYPE'),
+ 'scopeId': element(body, 'CIRCUIT_SCOPE_ID'),
+ 'drawingPorts': [{'position': element(p, 'PORT_POS'), 'face': element(p, 'PORT_FACE')}
+ for p in _blocks(body, 'COMP_PORT')],
+ }
+
+ def port(component, index):
+ kind = entities[component]['modelType']
+ if index == 0 and kind in ('amesim_forc', 'amesim_pnvo001'):
+ return 'res'
+ if index == 0 and kind in ('amesim_step0', 'amesim_ud00'):
+ return 'out'
+ return f'port_{index + 1}'
+
+ for index, body in enumerate(components):
+ add(f'component:{index}', body)
+ contacts = set()
+ for index, body in enumerate(components):
+ for pindex, pbody in enumerate(_blocks(body, 'COMP_PORT')):
+ if element(pbody, 'PORT_CONNECT') != '1':
+ continue
+ for conn in _blocks(pbody, 'CONNECT'):
+ other = int(element(conn, 'CONNECT_ENTITY_NUM'))
+ op = int(element(conn, 'CONNECT_ENTITY_PORT'))
+ contacts.add(((index, pindex), (other, op)))
+ for left, right in sorted(contacts):
+ assert (right, left) in contacts, 'Non-reciprocal component contact'
+ if left > right:
+ continue
+ a, b = f'component:{left[0]}', f'component:{right[0]}'
+ edges.append(((a, port(a, left[1])), (b, port(b, right[1])), 'contact'))
+ for index, body in enumerate(lines):
+ assert element(body, 'LINE_START_TYPE') == element(body, 'LINE_END_TYPE') == '0'
+ a, b = ('component:' + element(body, 'LINE_START_ENTITY'),
+ 'component:' + element(body, 'LINE_END_ENTITY'))
+ left = a, port(a, int(element(body, 'LINE_START_PORT')))
+ right = b, port(b, int(element(body, 'LINE_END_PORT')))
+ if element(body, 'SUB_NAME') == 'DIRECT':
+ edges.append((left, right, f'direct-line:{index}'))
+ continue
+ key = f'line:{index}'
+ add(key, body)
+ output_type = element(body, 'OUTPUT_TYPE')
+ assert output_type in ('1', '2'), (key, output_type)
+ # A reversed two-port line's first physical endpoint is submodel port 2.
+ lp, rp = ('port_1', 'port_2') if output_type == '1' else ('port_2', 'port_1')
+ edges.extend(((left, (key, lp), key), ((key, rp), right, key)))
+ return entities, edges, globals_, sim, model_info
+
+
+def match_graph(entities, ame_edges, project):
+ nodes = {n['id']: n for n in project['nodes']}
+ types = {**{k: v['modelType'] for k, v in entities.items()},
+ **{k: v['data']['modelType'] for k, v in nodes.items()}}
+ adjacency = {k: {} for k in types}
+ for (a, ap), (b, bp), _ in ame_edges:
+ assert b not in adjacency[a], 'Parallel entity edges need a multigraph matcher'
+ adjacency[a][b], adjacency[b][a] = (ap, bp), (bp, ap)
+ for edge in project['edges']:
+ a, b = edge['source'], edge['target']
+ assert b not in adjacency[a], 'Parallel editor edges need a multigraph matcher'
+ ap, bp = edge['sourceHandle'], edge['targetHandle']
+ adjacency[a][b], adjacency[b][a] = (ap, bp), (bp, ap)
+ colors = types.copy()
+ for _ in range(len(entities)):
+ signatures = {k: (types[k], colors[k], tuple(sorted(colors[n] for n in adjacency[k]))) for k in types}
+ vocabulary = {v: i for i, v in enumerate(sorted(set(signatures.values())))}
+ updated = {k: vocabulary[v] for k, v in signatures.items()}
+ if len(set(updated.values())) == len(set(colors.values())):
+ colors = updated
+ break
+ colors = updated
+ groups = defaultdict(lambda: [[], []])
+ for key in entities:
+ groups[colors[key]][0].append(key)
+ for key in nodes:
+ groups[colors[key]][1].append(key)
+ for ames, editors in groups.values():
+ assert len(ames) == len(editors), 'Typed topology differs'
+ # All remaining structural symmetries in this exact input preserve
+ # parameters, so selection within them does not hide parameter errors.
+ assert len({json.dumps(entities[k]['parameters'], sort_keys=True) for k in ames}) == 1
+ candidates = {a: tuple(editors) for ames, editors in groups.values() for a in ames}
+ best, best_cost, examined = None, math.inf, 0
+ mapping, used = {}, set()
+
+ def choices(a):
+ result = []
+ for b in candidates[a]:
+ if b in used:
+ continue
+ cost = 0
+ for previous, assigned in mapping.items():
+ ae, be = adjacency[a].get(previous), adjacency[b].get(assigned)
+ if bool(ae) != bool(be):
+ break
+ if ae:
+ cost += sum(x != y for x, y in zip(ae, be))
+ else:
+ result.append((cost, b))
+ return sorted(result)
+
+ def visit(cost):
+ nonlocal best, best_cost, examined
+ if cost >= best_cost:
+ return
+ if len(mapping) == len(entities):
+ examined += 1
+ best, best_cost = mapping.copy(), cost
+ return
+ remaining = [(a, choices(a)) for a in entities if a not in mapping]
+ if any(not options for _, options in remaining):
+ return
+ # Each current candidate cost is charged only for edges to assigned
+ # nodes, so this lower bound does not double count any edge.
+ if cost + sum(options[0][0] for _, options in remaining) >= best_cost:
+ return
+ a, options = min(remaining, key=lambda item: (len(item[1]),
+ -sum(n in mapping for n in adjacency[item[0]]), -len(adjacency[item[0]]), item[0]))
+ for extra, b in options:
+ mapping[a] = b
+ used.add(b)
+ visit(cost + extra)
+ used.remove(b)
+ del mapping[a]
+ visit(0)
+ assert best is not None, 'No typed topology isomorphism'
+ return best, {'minimumEndpointEdits': best_cost, 'improvingSolutions': examined,
+ 'typedRefinementGroups': len(groups), 'parameterPreservingSymmetries': True}
+
+
+def main():
+ HERE.mkdir(parents=True, exist_ok=True)
+ original = json.loads(INPUT.read_text())
+ entities, edges, globals_, sim, model_info = read_drawing()
+ mapping, matching = match_graph(entities, edges, original)
+ corrected = deepcopy(original)
+ corrected['name'] = 'test-mql-8-corrected'
+ nodes = {n['id']: n for n in corrected['nodes']}
+ parameter_audit, parameter_changes = [], []
+ for source, target in mapping.items():
+ entity, node = entities[source], nodes[target]
+ spec = get_component_model_spec(entity['modelType'])
+ assert node['data']['modelVersion'] == spec.model_version
+ source_fields = _SOURCE_FIELD_BY_PARAMETER.get(entity['modelType'], {})
+ assert set(node['data']['parameters']) == set(entity['parameters'])
+ for parameter in spec.parameters:
+ name = parameter.name
+ expected = entity['parameters'][name]
+ actual = _numeric_project_value(node['data']['parameters'][name])
+ row = {'component': target, 'ameEntity': source, 'ameAlias': entity['alias'],
+ 'parameter': name, 'unit': parameter.unit, 'old': actual, 'expected': expected,
+ 'source': entity['fields'].get(source_fields.get(name, name)),
+ 'matches': math.isclose(actual, expected, rel_tol=2e-14, abs_tol=1e-15)}
+ parameter_audit.append(row)
+ if not row['matches']:
+ parameter_changes.append(row)
+ node['data']['parameters'][name] = expected
+ desired = {}
+ for (a, ap), (b, bp), source in edges:
+ ja, jb = mapping[a], mapping[b]
+ key = frozenset((ja, jb))
+ assert key not in desired
+ desired[key] = ({ja: ap, jb: bp}, source)
+ connection_audit, connection_changes = [], []
+ cleared_contact_flags = []
+ for edge in corrected['edges']:
+ ends, source = desired.pop(frozenset((edge['source'], edge['target'])))
+ before = [(edge['source'], edge['sourceHandle']), (edge['target'], edge['targetHandle'])]
+ after = [(edge['source'], ends[edge['source']]), (edge['target'], ends[edge['target']])]
+ row = {'edgeId': edge['id'], 'ameSource': source, 'before': before, 'after': after, 'matches': before == after}
+ connection_audit.append(row)
+ if not row['matches']:
+ connection_changes.append(row)
+ edge['sourceHandle'], edge['targetHandle'] = after[0][1], after[1][1]
+ # A moved endpoint no longer certifies the old geometric contact.
+ # Keep its explicit connection visible; physical adjacency is intact.
+ if edge.get('data', {}).get('isContactEdge'):
+ edge['data']['isContactEdge'] = False
+ cleared_contact_flags.append(edge['id'])
+ assert not desired
+ # The corrected shared P4 symbol uses p1 up, p2 left, p3 down, p4 right.
+ # Read every drawing port to ensure the saved geometry needs exactly 180°.
+ display_audit, p4_nodes = [], set()
+ for source, target in mapping.items():
+ entity = entities[source]
+ if entity['modelType'] != 'amesim_p4node2':
+ continue
+ expected = [('10 19', '1'), ('19 10', '3'), ('10 1', '0'), ('1 10', '2')]
+ assert entity['geometry'] == '1'
+ assert [(p['position'], p['face']) for p in entity['drawingPorts']] == expected
+ data = nodes[target]['data']
+ display_audit.append({'component': target, 'ameEntity': source, 'ameAlias': entity['alias'],
+ 'ameGeometry': entity['geometry'], 'drawingPorts': entity['drawingPorts'],
+ 'previousRotation': data.get('rotation'), 'previousMirrored': data.get('mirrored'),
+ 'rotation': 180, 'mirrored': False,
+ 'portSides': {'port_1': 'bottom', 'port_2': 'right', 'port_3': 'top', 'port_4': 'left'}})
+ data['rotation'], data['mirrored'] = 180, False
+ p4_nodes.add(target)
+ cleared_route_points = []
+ for edge in corrected['edges']:
+ if edge['source'] in p4_nodes or edge['target'] in p4_nodes:
+ if 'routePoints' in edge.get('data', {}):
+ del edge['data']['routePoints']
+ cleared_route_points.append(edge['id'])
+ # The first five .sim values are recorded directly; no interpretation of
+ # undocumented solver-enumeration slots is needed for this correction.
+ sim_values = [float(x) for x in sim.splitlines()[0].split()]
+ corrected['simulation'].update(t_start=sim_values[0], t_stop=sim_values[1], step=sim_values[2], max_step=sim_values[3])
+ from app.main import ReactFlowProjectPayload, build_reactflow_system_xml, compile_reactflow_network
+ from app.simulation.native_codegen.compiler import compile_native_program
+ # Browser export resolves arithmetic editor expressions on a separate copy.
+ executable = deepcopy(corrected)
+ for node in executable['nodes']:
+ node['data']['parameters'] = {k: _numeric_project_value(v)
+ for k, v in node['data']['parameters'].items()}
+ payload = ReactFlowProjectPayload.model_validate(executable)
+ network = compile_reactflow_network(payload)
+ program = compile_native_program(network)
+ OUTPUT.write_text(json.dumps(corrected, ensure_ascii=False, indent=2) + '\n')
+ xml = build_reactflow_system_xml(payload)
+ (HERE / 'corrected.xml').write_bytes(xml if isinstance(xml, bytes) else xml.encode())
+ # The archive's parameter table and run input have matching row order.
+ with tarfile.open(AME) as archive:
+ param_lines = archive.extractfile('test_mql_.param').read().decode('latin1').splitlines()
+ data_lines = archive.extractfile('test_mql_.data').read().decode('latin1').splitlines()
+ assert len(param_lines) == len(data_lines)
+ run_parameters = {re.search(r'Data_Path=(\S+)', text).group(1): (i+1, data_lines[i])
+ for i,text in enumerate(param_lines) if 'Data_Path=' in text}
+ cache_checks, structural_fields = [], []
+ reverse_mapping = {v:k for k,v in mapping.items()}
+ from tests.test_test_mql_ame_contract import _evaluate_expression
+ for row in parameter_audit:
+ if row['source'] is None:
+ continue
+ entity = entities[reverse_mapping[row['component']]]
+ field = _SOURCE_FIELD_BY_PARAMETER.get(entity['modelType'], {}).get(row['parameter'], row['parameter'])
+ path = field + '@' + row['ameAlias']
+ if path not in run_parameters:
+ assert entity['modelType'] == 'amesim_lmechn1' and field == 'v1'
+ structural_fields.append(path)
+ continue
+ line, expression = run_parameters[path]
+ drawing_value = _evaluate_expression(row['source']['expression'], globals_)
+ run_value = _evaluate_expression(expression, globals_)
+ assert math.isclose(drawing_value, run_value, rel_tol=2e-14, abs_tol=1e-15), path
+ cache_checks.append({'dataPath': path, 'parameterDataLine': line,
+ 'drawingValue': drawing_value, 'runValue': run_value})
+ audit = {
+ 'sources': {str(p.relative_to(ROOT)): {'sha256': hashlib.sha256(p.read_bytes()).hexdigest(), 'bytes': p.stat().st_size} for p in (AME, INPUT)},
+ 'output': str(OUTPUT.relative_to(ROOT)), 'globals': globals_, 'matching': matching,
+ 'counts': {'components': len(entities), 'connections': len(edges), 'parameters': len(parameter_audit),
+ 'changedParameters': len(parameter_changes), 'changedConnections': len(connection_changes),
+ 'states': len(program.state_keys), 'outputs': len(program.variables)},
+ 'simulation': {'old': original['simulation'], 'corrected': corrected['simulation'], 'ameRaw': sim,
+ 'ameModelInfo': model_info, 'ameRtol': sim_values[4],
+ 'note': 'BDF retained; AME solver enumeration is not equated with CVODE BDF. API rtol comes from the current backend default; this editor JSON does not carry rtol.'},
+ 'mapping': [{'ameEntity': a, 'ameAlias': entities[a]['alias'], 'component': b,
+ 'type': entities[a]['modelType'], 'lineOutputType': entities[a]['outputType']} for a,b in sorted(mapping.items())],
+ 'parameterChanges': parameter_changes, 'connectionChanges': connection_changes,
+ 'clearedGeometricContactFlags': cleared_contact_flags,
+ 'p4DisplayAlignment': display_audit,
+ 'clearedP4RoutePoints': cleared_route_points,
+ 'archiveParameterCrossCheck': {'tableRows': len(param_lines), 'checked': len(cache_checks),
+ 'drawingOnlyStructuralFields': structural_fields, 'checks': cache_checks},
+ 'parameters': parameter_audit, 'connections': connection_audit,
+ 'evaluationSchedule': program.evaluation_schedule,
+ }
+ (HERE / 'audit.json').write_text(json.dumps(audit, ensure_ascii=False, indent=2) + '\n')
+ print(json.dumps({'counts': audit['counts'], 'matching': matching,
+ 'parameters': parameter_changes, 'connections': connection_changes,
+ 'simulation': audit['simulation']}, ensure_ascii=False, indent=2))
+
+
+if __name__ == '__main__':
+ main()