Bond graph ports and drawing added
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
},
|
||||
"roots": [
|
||||
{
|
||||
"id": "4014ba90-5538-4050-a9be-552318197ce1",
|
||||
"id": "4aefc7e3-ac23-4b31-9087-bbad16156be0",
|
||||
"name": "New Graph Block 1",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
@@ -61,19 +61,47 @@
|
||||
"graph": {
|
||||
"blocks": [
|
||||
{
|
||||
"id": "86ba2bf6-0da5-40a4-98e9-fb0d9c12c576",
|
||||
"name": "Constant0",
|
||||
"id": "c6169e52-e993-4293-8fc8-5b97e8ad59be",
|
||||
"name": "C",
|
||||
"position": {
|
||||
"x": -224.0,
|
||||
"y": -160.0
|
||||
"x": -96.0,
|
||||
"y": -288.0
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"interface": {
|
||||
"inputs": [],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "port-2e1d884f",
|
||||
"name": "p",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"properties": {
|
||||
"iconPosition": {
|
||||
"x": 64.0,
|
||||
"y": 64.0
|
||||
}
|
||||
},
|
||||
"type": "power",
|
||||
"multipleConnections": false,
|
||||
"valueType": "real",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": "",
|
||||
"orientation": "input",
|
||||
"domain": "power",
|
||||
"causality": "preferred effort out"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "port-ddc97277",
|
||||
"name": "y",
|
||||
"id": "port-ca7716d5",
|
||||
"name": "state",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
@@ -87,22 +115,25 @@
|
||||
"type": "signal",
|
||||
"multipleConnections": false,
|
||||
"valueType": "real",
|
||||
"quantity": "Length",
|
||||
"unit": "m",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": ""
|
||||
"description": "",
|
||||
"orientation": "output",
|
||||
"domain": "power",
|
||||
"causality": "indifferent"
|
||||
}
|
||||
]
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"id": "parameter-022177fc",
|
||||
"name": "v",
|
||||
"id": "parameter-d056bc27",
|
||||
"name": "c",
|
||||
"type": "real",
|
||||
"value": "2",
|
||||
"value": "1",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
@@ -123,54 +154,23 @@
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"cornerRadius": 5.0,
|
||||
"fill": "#f4f4f4",
|
||||
"height": 64.0,
|
||||
"type": "text",
|
||||
"x": 40.0,
|
||||
"y": 40.0,
|
||||
"width": 48.0,
|
||||
"height": 48.0,
|
||||
"text": "C",
|
||||
"color": "#303030",
|
||||
"fontSize": 32.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#303030",
|
||||
"type": "rectangle",
|
||||
"width": 64.0,
|
||||
"x": 32.0,
|
||||
"y": 32.0
|
||||
},
|
||||
{
|
||||
"fill": "none",
|
||||
"height": 48.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#00007f",
|
||||
"type": "line",
|
||||
"width": 0.0,
|
||||
"x": 40.0,
|
||||
"y": 40.0
|
||||
},
|
||||
{
|
||||
"fill": "none",
|
||||
"height": 0.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#00007f",
|
||||
"type": "line",
|
||||
"width": 48.0,
|
||||
"x": 40.0,
|
||||
"y": 88.0
|
||||
},
|
||||
{
|
||||
"fill": "none",
|
||||
"height": 0.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.0,
|
||||
"stroke": "#ffaa00",
|
||||
"type": "line",
|
||||
"width": 48.0,
|
||||
"x": 40.0,
|
||||
"y": 64.0
|
||||
"fill": "#ffffff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"showName": true
|
||||
"showName": false
|
||||
},
|
||||
"library": {
|
||||
"showSubtree": true
|
||||
@@ -178,15 +178,15 @@
|
||||
"implementation": {
|
||||
"kind": "text",
|
||||
"source": {
|
||||
"equations": "y = v;",
|
||||
"equations": "der(state) = p.f;\np.e = state/c;",
|
||||
"declarations": "",
|
||||
"initialEquations": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "7805cb2f-c938-44b2-a1f8-e1b4af13f7bf",
|
||||
"name": "Gain0",
|
||||
"id": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6",
|
||||
"name": "1",
|
||||
"position": {
|
||||
"x": -96.0,
|
||||
"y": -160.0
|
||||
@@ -195,8 +195,8 @@
|
||||
"interface": {
|
||||
"inputs": [
|
||||
{
|
||||
"id": "port-df34ce84",
|
||||
"name": "u",
|
||||
"id": "port-3e53bf80",
|
||||
"name": "p",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
@@ -207,8 +207,8 @@
|
||||
"y": 64.0
|
||||
}
|
||||
},
|
||||
"type": "signal",
|
||||
"multipleConnections": false,
|
||||
"type": "power",
|
||||
"multipleConnections": true,
|
||||
"valueType": "real",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
@@ -216,24 +216,80 @@
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": ""
|
||||
"description": "",
|
||||
"orientation": "indifferent",
|
||||
"domain": "power",
|
||||
"causality": "indifferent"
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
"outputs": []
|
||||
},
|
||||
"parameters": [],
|
||||
"icon": {
|
||||
"shape": "rectangle",
|
||||
"fill": "#f4f4f4",
|
||||
"border": "#303030",
|
||||
"text": "Text",
|
||||
"size": {
|
||||
"width": 128.0,
|
||||
"height": 128.0
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"id": "port-fe9e6486",
|
||||
"name": "y",
|
||||
"type": "text",
|
||||
"x": 40.0,
|
||||
"y": 40.0,
|
||||
"width": 48.0,
|
||||
"height": 48.0,
|
||||
"text": "1",
|
||||
"color": "#303030",
|
||||
"fontSize": 32.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#303030",
|
||||
"fill": "#ffffff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"showName": false
|
||||
},
|
||||
"library": {
|
||||
"showSubtree": true
|
||||
},
|
||||
"implementation": {
|
||||
"kind": "text",
|
||||
"source": {
|
||||
"equations": "flow = p[1].f;\nsum(p[i].e for i in 1:$p_N$) = 0;\nfor i in 2:$p_N$ loop\n p[i].f = p[i-1].f;\nend for;",
|
||||
"declarations": "Real flow;",
|
||||
"initialEquations": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ea95e8ee-7f2d-4e14-a65d-d56bec5b4eb2",
|
||||
"name": "R",
|
||||
"position": {
|
||||
"x": 32.0,
|
||||
"y": -160.0
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"interface": {
|
||||
"inputs": [
|
||||
{
|
||||
"id": "port-2e1d884f",
|
||||
"name": "p",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"properties": {
|
||||
"iconPosition": {
|
||||
"x": 88.0,
|
||||
"y": 40.0
|
||||
"x": 64.0,
|
||||
"y": 64.0
|
||||
}
|
||||
},
|
||||
"type": "signal",
|
||||
"type": "power",
|
||||
"multipleConnections": false,
|
||||
"valueType": "real",
|
||||
"quantity": "",
|
||||
@@ -242,18 +298,22 @@
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": ""
|
||||
"description": "",
|
||||
"orientation": "input",
|
||||
"domain": "power",
|
||||
"causality": "indifferent"
|
||||
}
|
||||
]
|
||||
],
|
||||
"outputs": []
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"id": "parameter-61a43a86",
|
||||
"name": "k",
|
||||
"id": "parameter-d056bc27",
|
||||
"name": "r",
|
||||
"type": "real",
|
||||
"value": "2.5",
|
||||
"quantity": "Current",
|
||||
"unit": "A",
|
||||
"value": "1",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
@@ -272,35 +332,23 @@
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"cornerRadius": 5.0,
|
||||
"fill": "#f4f4f4",
|
||||
"height": 64.0,
|
||||
"type": "text",
|
||||
"x": 40.0,
|
||||
"y": 40.0,
|
||||
"width": 48.0,
|
||||
"height": 48.0,
|
||||
"text": "R",
|
||||
"color": "#303030",
|
||||
"fontSize": 32.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#303030",
|
||||
"type": "rectangle",
|
||||
"width": 64.0,
|
||||
"x": 32.0,
|
||||
"y": 32.0
|
||||
},
|
||||
{
|
||||
"color": "#00007f",
|
||||
"fill": "#ffffff",
|
||||
"fontSize": 24.0,
|
||||
"height": 48.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#00007f",
|
||||
"text": "K",
|
||||
"type": "text",
|
||||
"width": 48.0,
|
||||
"x": 40.0,
|
||||
"y": 40.0
|
||||
"fill": "#ffffff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"showName": true
|
||||
"showName": false
|
||||
},
|
||||
"library": {
|
||||
"showSubtree": true
|
||||
@@ -308,23 +356,149 @@
|
||||
"implementation": {
|
||||
"kind": "text",
|
||||
"source": {
|
||||
"equations": "y = k*u;",
|
||||
"equations": "p.e = r*p.f;",
|
||||
"declarations": "",
|
||||
"initialEquations": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "063a6341-cb18-4bfe-a1e4-00957a88a874",
|
||||
"name": "Se",
|
||||
"position": {
|
||||
"x": -224.0,
|
||||
"y": -160.0
|
||||
},
|
||||
"rotation": 0.0,
|
||||
"interface": {
|
||||
"inputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"id": "port-2e1d884f",
|
||||
"name": "p",
|
||||
"position": {
|
||||
"x": 0.0,
|
||||
"y": 0.0
|
||||
},
|
||||
"properties": {
|
||||
"iconPosition": {
|
||||
"x": 64.0,
|
||||
"y": 64.0
|
||||
}
|
||||
},
|
||||
"type": "power",
|
||||
"multipleConnections": false,
|
||||
"valueType": "real",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": "",
|
||||
"orientation": "output",
|
||||
"domain": "power",
|
||||
"causality": "fixed effort out"
|
||||
}
|
||||
]
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"id": "parameter-d056bc27",
|
||||
"name": "effort",
|
||||
"type": "real",
|
||||
"value": "1",
|
||||
"quantity": "",
|
||||
"unit": "",
|
||||
"dimensions": {
|
||||
"rows": 1,
|
||||
"columns": 1
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"shape": "rectangle",
|
||||
"fill": "#f4f4f4",
|
||||
"border": "#303030",
|
||||
"text": "Text",
|
||||
"size": {
|
||||
"width": 128.0,
|
||||
"height": 128.0
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"type": "text",
|
||||
"x": 32.0,
|
||||
"y": 32.0,
|
||||
"width": 64.0,
|
||||
"height": 64.0,
|
||||
"text": "Se",
|
||||
"color": "#303030",
|
||||
"fontSize": 32.0,
|
||||
"lineStyle": "solid",
|
||||
"lineWidth": 1.5,
|
||||
"stroke": "#303030",
|
||||
"fill": "#ffffff"
|
||||
}
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"showName": false
|
||||
},
|
||||
"library": {
|
||||
"showSubtree": true
|
||||
},
|
||||
"implementation": {
|
||||
"kind": "text",
|
||||
"source": {
|
||||
"equations": "p.e = effort;\nflow = p.f;",
|
||||
"declarations": "Real flow;",
|
||||
"initialEquations": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "5582d4ad-7c7a-40fe-87d2-9b78410336b3",
|
||||
"id": "4b09ba21-baa0-4db7-9431-4c919478bce4",
|
||||
"source": {
|
||||
"block": "86ba2bf6-0da5-40a4-98e9-fb0d9c12c576",
|
||||
"port": "port-ddc97277"
|
||||
"block": "063a6341-cb18-4bfe-a1e4-00957a88a874",
|
||||
"port": "port-2e1d884f"
|
||||
},
|
||||
"target": {
|
||||
"block": "7805cb2f-c938-44b2-a1f8-e1b4af13f7bf",
|
||||
"port": "port-df34ce84"
|
||||
"block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6",
|
||||
"port": "port-3e53bf80"
|
||||
},
|
||||
"name": "",
|
||||
"properties": {
|
||||
"waypoints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a73a99a1-54e2-461d-a9a7-2d6d11d500f4",
|
||||
"source": {
|
||||
"block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6",
|
||||
"port": "port-3e53bf80"
|
||||
},
|
||||
"target": {
|
||||
"block": "ea95e8ee-7f2d-4e14-a65d-d56bec5b4eb2",
|
||||
"port": "port-2e1d884f"
|
||||
},
|
||||
"name": "",
|
||||
"properties": {
|
||||
"waypoints": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dd5fb1e2-b125-4b5f-a792-dac89dd89ad3",
|
||||
"source": {
|
||||
"block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6",
|
||||
"port": "port-3e53bf80"
|
||||
},
|
||||
"target": {
|
||||
"block": "c6169e52-e993-4293-8fc8-5b97e8ad59be",
|
||||
"port": "port-2e1d884f"
|
||||
},
|
||||
"name": "",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user