Skip to content
Science templates

Pipe network — continuity and pressure losses

Build a steady-flow network model with conservation at junctions and pressure losses along branches. Minor losses, elevation and pump head must use a consistent reference and unit system.

Template previewScience
Rendering…

What this template contains

Source
25 lines

Make it your own.

{
  "nodes": [
    { "id": "source", "type": "rounded", "label": "Source pressure / reservoir", "x": 40, "y": 200, "width": 150, "height": 104, "fill": "#ede9fe", "stroke": "#6d28d9" },
    { "id": "pump", "type": "rounded", "label": "Pump head contribution", "x": 215, "y": 200, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "split", "type": "rounded", "label": "Flow junction", "x": 390, "y": 200, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "a", "type": "rounded", "label": "Branch A resistance", "x": 565, "y": 40, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "b", "type": "rounded", "label": "Branch B resistance", "x": 565, "y": 360, "width": 150, "height": 104, "fill": "#fef3c7", "stroke": "#b45309" },
    { "id": "join", "type": "rounded", "label": "Outlet boundary", "x": 740, "y": 200, "width": 150, "height": 104, "fill": "#fce7f3", "stroke": "#be185d" },
    { "id": "cont", "type": "octagon", "label": "Junction mass continuity", "x": 390, "y": 520, "width": 150, "height": 104, "fill": "#e0f2fe", "stroke": "#0369a1" },
    { "id": "elev", "type": "card", "label": "Elevation / minor-loss terms", "x": 740, "y": 520, "width": 150, "height": 104, "fill": "#ccfbf1", "stroke": "#0f766e" },
    { "id": "solve", "type": "card", "label": "Flow and pressure solution", "x": 915, "y": 200, "width": 150, "height": 104, "fill": "#ccfbf1", "stroke": "#0f766e" }
  ],
  "edges": [
    { "id": "e0", "source": "source", "target": "pump", "label": "inlet" },
    { "id": "e1", "source": "pump", "target": "split", "label": "supply" },
    { "id": "e2", "source": "split", "target": "a", "label": "branch flow" },
    { "id": "e3", "source": "split", "target": "b", "label": "branch flow" },
    { "id": "e4", "source": "a", "target": "join", "label": "pressure drop" },
    { "id": "e5", "source": "b", "target": "join", "label": "pressure drop" },
    { "id": "e6", "source": "cont", "target": "split", "label": "conservation", "style": "dashed" },
    { "id": "e7", "source": "elev", "target": "solve", "label": "consistent head terms" },
    { "id": "e8", "source": "join", "target": "solve", "label": "boundary constraints" },
    { "id": "e9", "source": "pump", "target": "solve", "label": "pump curve" }
  ]
}