{
  "schemaVersion": 1,
  "id": "example_process",
  "title": "Process treatment and flow-control loop",
  "diagram": {
    "adapter": "flowchart",
    "direction": "LR",
    "nodes": [
      {
        "id": "feed",
        "kind": "process_vessel",
        "label": "Feed vessel",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.25
            },
            "id": "feed:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "feed:outlet"
          },
          {
            "name": "vent",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "feed:vent"
          },
          {
            "name": "drain",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "feed:drain"
          }
        ],
        "fields": {
          "tag": "V-101",
          "capacity": "10 m³",
          "material": "316L SS",
          "description": ""
        }
      },
      {
        "id": "pump",
        "kind": "process_pump",
        "label": "Transfer pump",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "pump:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "pump:out"
          }
        ],
        "fields": {
          "tag": "P-101",
          "flow": "12 m³/h",
          "head": "20 m",
          "description": ""
        }
      },
      {
        "id": "filter",
        "kind": "process_filter",
        "label": "Feed filtration",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "filter:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "filter:out"
          }
        ],
        "fields": {
          "tag": "F-101",
          "rating": "10 µm",
          "description": ""
        }
      },
      {
        "id": "hx",
        "kind": "heat_exchanger",
        "label": "Feed conditioning",
        "ports": [
          {
            "name": "shell-in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.22
            },
            "id": "hx:shell-in"
          },
          {
            "name": "shell-out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.22
            },
            "id": "hx:shell-out"
          },
          {
            "name": "tube-in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.5
            },
            "id": "hx:tube-in"
          },
          {
            "name": "tube-out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "hx:tube-out"
          }
        ],
        "fields": {
          "tag": "E-101",
          "duty": "50 kW",
          "description": ""
        }
      },
      {
        "id": "valve",
        "kind": "control_valve",
        "label": "Flow control",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "valve:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "valve:out"
          },
          {
            "name": "signal",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "valve:signal"
          }
        ],
        "fields": {
          "tag": "FV-101",
          "signal": "4–20 mA",
          "description": ""
        }
      },
      {
        "id": "flow",
        "kind": "flow_transmitter",
        "label": "Flow measurement",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "flow:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "flow:out"
          },
          {
            "name": "signal",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "flow:signal"
          }
        ],
        "fields": {
          "tag": "FT-101",
          "range": "0–20 m³/h",
          "description": ""
        }
      },
      {
        "id": "reactor",
        "kind": "reactor",
        "label": "Treatment reactor",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "reactor:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "reactor:out"
          },
          {
            "name": "top",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "reactor:top"
          },
          {
            "name": "bottom",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "reactor:bottom"
          }
        ],
        "fields": {
          "tag": "R-101",
          "volume": "2 m³",
          "temperature": "80 °C",
          "description": ""
        }
      },
      {
        "id": "product",
        "kind": "process_vessel",
        "label": "Product vessel",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.25
            },
            "id": "product:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "product:outlet"
          },
          {
            "name": "vent",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "product:vent"
          },
          {
            "name": "drain",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "product:drain"
          }
        ],
        "fields": {
          "tag": "V-102",
          "capacity": "10 m³",
          "material": "316L SS",
          "description": ""
        }
      },
      {
        "id": "controller",
        "kind": "pid_controller",
        "label": "Flow controller",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "controller:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "controller:out"
          }
        ],
        "fields": {
          "tag": "FIC-101",
          "loop": "Flow control",
          "setpoint": "10 m³/h",
          "description": ""
        }
      },
      {
        "id": "pressure",
        "kind": "pressure_transmitter",
        "label": "Discharge pressure",
        "ports": [
          {
            "name": "process",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "pressure:process"
          },
          {
            "name": "signal",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "pressure:signal"
          }
        ],
        "fields": {
          "tag": "PT-101",
          "range": "0–10 bar",
          "description": ""
        }
      },
      {
        "id": "utility_in",
        "kind": "process_vessel",
        "label": "Cooling-water supply",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.25
            },
            "id": "utility_in:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "utility_in:outlet"
          },
          {
            "name": "vent",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "utility_in:vent"
          },
          {
            "name": "drain",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "utility_in:drain"
          }
        ],
        "fields": {
          "tag": "CW-S",
          "capacity": "10 m³",
          "material": "316L SS",
          "description": ""
        }
      },
      {
        "id": "utility_out",
        "kind": "process_vessel",
        "label": "Cooling-water return",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.25
            },
            "id": "utility_out:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "utility_out:outlet"
          },
          {
            "name": "vent",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "utility_out:vent"
          },
          {
            "name": "drain",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "utility_out:drain"
          }
        ],
        "fields": {
          "tag": "CW-R",
          "capacity": "10 m³",
          "material": "316L SS",
          "description": ""
        }
      }
    ],
    "connectors": [
      {
        "id": "example_process_edge_0",
        "from": {
          "nodeId": "feed",
          "portId": "feed:outlet"
        },
        "to": {
          "nodeId": "pump",
          "portId": "pump:in"
        },
        "label": "Feed"
      },
      {
        "id": "example_process_edge_1",
        "from": {
          "nodeId": "pump",
          "portId": "pump:out"
        },
        "to": {
          "nodeId": "filter",
          "portId": "filter:in"
        },
        "label": ""
      },
      {
        "id": "example_process_edge_2",
        "from": {
          "nodeId": "filter",
          "portId": "filter:out"
        },
        "to": {
          "nodeId": "hx",
          "portId": "hx:shell-in"
        },
        "label": ""
      },
      {
        "id": "example_process_edge_3",
        "from": {
          "nodeId": "hx",
          "portId": "hx:shell-out"
        },
        "to": {
          "nodeId": "valve",
          "portId": "valve:in"
        },
        "label": "Conditioned feed"
      },
      {
        "id": "example_process_edge_4",
        "from": {
          "nodeId": "valve",
          "portId": "valve:out"
        },
        "to": {
          "nodeId": "flow",
          "portId": "flow:in"
        },
        "label": ""
      },
      {
        "id": "example_process_edge_5",
        "from": {
          "nodeId": "flow",
          "portId": "flow:out"
        },
        "to": {
          "nodeId": "reactor",
          "portId": "reactor:in"
        },
        "label": ""
      },
      {
        "id": "example_process_edge_6",
        "from": {
          "nodeId": "reactor",
          "portId": "reactor:out"
        },
        "to": {
          "nodeId": "product",
          "portId": "product:inlet"
        },
        "label": "Product"
      },
      {
        "id": "example_process_edge_7",
        "from": {
          "nodeId": "flow",
          "portId": "flow:signal"
        },
        "to": {
          "nodeId": "controller",
          "portId": "controller:in"
        },
        "label": "Flow signal"
      },
      {
        "id": "example_process_edge_8",
        "from": {
          "nodeId": "controller",
          "portId": "controller:out"
        },
        "to": {
          "nodeId": "valve",
          "portId": "valve:signal"
        },
        "label": "Control signal"
      },
      {
        "id": "example_process_edge_9",
        "from": {
          "nodeId": "pump",
          "portId": "pump:out"
        },
        "to": {
          "nodeId": "pressure",
          "portId": "pressure:process"
        },
        "label": "Pressure tap"
      },
      {
        "id": "example_process_edge_10",
        "from": {
          "nodeId": "utility_in",
          "portId": "utility_in:outlet"
        },
        "to": {
          "nodeId": "hx",
          "portId": "hx:tube-in"
        },
        "label": "Cooling water"
      },
      {
        "id": "example_process_edge_11",
        "from": {
          "nodeId": "hx",
          "portId": "hx:tube-out"
        },
        "to": {
          "nodeId": "utility_out",
          "portId": "utility_out:inlet"
        },
        "label": "Utility return"
      }
    ],
    "groups": []
  },
  "layout": {
    "feed": {
      "x": 40,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "pump": {
      "x": 300,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "filter": {
      "x": 560,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "hx": {
      "x": 820,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "valve": {
      "x": 1080,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "flow": {
      "x": 1340,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "reactor": {
      "x": 1600,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "product": {
      "x": 1860,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "controller": {
      "x": 1200,
      "y": -120,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "pressure": {
      "x": 310,
      "y": -120,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "utility_in": {
      "x": 620,
      "y": -120,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    },
    "utility_out": {
      "x": 870,
      "y": 470,
      "width": 220,
      "height": 150,
      "color": "#e3f1f5"
    }
  },
  "presentation": {
    "steps": [
      {
        "id": "example_process_focus",
        "type": "focus",
        "targetId": "feed",
        "duration": 3,
        "caption": "Start with feed storage and the transfer pump."
      },
      {
        "id": "example_process_trace_0",
        "type": "connection",
        "targetId": "example_process_edge_0",
        "duration": 2,
        "caption": "Trace the main process stream."
      },
      {
        "id": "example_process_trace_1",
        "type": "connection",
        "targetId": "example_process_edge_1",
        "duration": 2,
        "caption": "Follow the connection → Feed filtration"
      },
      {
        "id": "example_process_trace_2",
        "type": "connection",
        "targetId": "example_process_edge_2",
        "duration": 2,
        "caption": "Follow the connection → Feed conditioning"
      },
      {
        "id": "example_process_trace_3",
        "type": "connection",
        "targetId": "example_process_edge_3",
        "duration": 2,
        "caption": "Conditioned feed → Flow control"
      },
      {
        "id": "example_process_trace_4",
        "type": "connection",
        "targetId": "example_process_edge_4",
        "duration": 2,
        "caption": "Follow the connection → Flow measurement"
      },
      {
        "id": "example_process_trace_5",
        "type": "connection",
        "targetId": "example_process_edge_5",
        "duration": 2,
        "caption": "Follow the connection → Treatment reactor"
      },
      {
        "id": "example_process_trace_6",
        "type": "connection",
        "targetId": "example_process_edge_6",
        "duration": 2,
        "caption": "Product → Product vessel"
      },
      {
        "id": "example_process_trace_7",
        "type": "connection",
        "targetId": "example_process_edge_7",
        "duration": 2,
        "caption": "Flow signal → Flow controller"
      },
      {
        "id": "example_process_trace_8",
        "type": "connection",
        "targetId": "example_process_edge_8",
        "duration": 2,
        "caption": "Control signal → Flow control"
      },
      {
        "id": "example_process_trace_9",
        "type": "connection",
        "targetId": "example_process_edge_9",
        "duration": 2,
        "caption": "Pressure tap → Discharge pressure"
      },
      {
        "id": "example_process_trace_10",
        "type": "connection",
        "targetId": "example_process_edge_10",
        "duration": 2,
        "caption": "Cooling water → Feed conditioning"
      },
      {
        "id": "example_process_trace_11",
        "type": "connection",
        "targetId": "example_process_edge_11",
        "duration": 2,
        "caption": "Utility return → Cooling-water return"
      },
      {
        "id": "example_process_note",
        "type": "note",
        "text": "The flow transmitter and controller close the valve-control loop. Dashed connectors represent instrument signals in this example.",
        "duration": 4
      }
    ]
  },
  "connectorStyles": {
    "example_process_edge_0": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_1": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_2": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_3": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_4": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_5": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_6": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_7": {
      "routing": "elbow",
      "pattern": "dashed",
      "width": 1.8,
      "color": "#8b6bb2",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_8": {
      "routing": "elbow",
      "pattern": "dashed",
      "width": 1.8,
      "color": "#8b6bb2",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_9": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_10": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_process_edge_11": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    }
  }
}
