$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "pipes": [
< "water at 20 C, 200 gpm through 300 ft of 3 in sch 40 steel with 6 elbows, 2 gate valves and 1 check valve, rise 20 ft",
< "compressed air at 7 barg and 25 C, 300 scfm through 150 m of DN50 galvanized pipe, 4 elbows",
< {
< "fluid": "ethylene glycol 30%",
< "temperature": "5 C",
< "flow": "30 m3/h",
< "material": "PVC",
< "length": "80 m",
< "fittings": [
< "8 elbows",
< "2 ball valves"
< ],
< "sizePipe": true
< }
< ],
< "pumpSystems": [
< {
< "title": "Booster pump to a roof tank",
< "fluid": "water",
< "temperature": "60 F",
< "pump": {
< "curve": [
< [
< "0 gpm",
< "160 ft"
< ],
< [
< "100 gpm",
< "155 ft"
< ],
< [
< "200 gpm",
< "140 ft"
< ],
< [
< "300 gpm",
< "115 ft"
< ],
< [
< "400 gpm",
< "80 ft"
< ]
< ],
< "efficiency": [
< [
< "50 gpm",
< "35%"
< ],
< [
< "150 gpm",
< "62%"
< ],
< [
< "250 gpm",
< "74%"
< ],
< [
< "300 gpm",
< "75%"
< ],
< [
< "350 gpm",
< "72%"
< ],
< [
< "400 gpm",
< "65%"
< ]
< ],
< "npshr": [
< [
< "100 gpm",
< "6 ft"
< ],
< [
< "300 gpm",
< "10 ft"
< ],
< [
< "400 gpm",
< "15 ft"
< ]
< ]
< },
< "staticHead": "85 ft",
< "suction": {
< "pipe": "5 in sch 40 steel",
< "length": "20 ft",
< "fittings": "entrance, 1 gate valve, 1 elbow",
< "liquidLevel": "4 ft"
< },
< "discharge": "600 ft of 4 in sch 40 steel, 10 elbows, 1 check valve, 2 gate valves, exit"
< }
< ],
< "networks": [
< {
< "title": "Two-loop town main",
< "fluid": "water",
< "temperature": "15 C",
< "headloss": "hazen-williams",
< "nodes": [
< {
< "id": "Tank",
< "type": "tank",
< "head": "95 m",
< "x": 0,
< "y": 0
< },
< {
< "id": "A",
< "elevation": "40 m",
< "demand": "25 l/s",
< "x": 1000,
< "y": 0
< },
< {
< "id": "B",
< "elevation": "38 m",
< "demand": "30 l/s",
< "x": 2000,
< "y": 0
< },
< {
< "id": "C",
< "elevation": "45 m",
< "demand": "20 l/s",
< "x": 2000,
< "y": -900
< },
< {
< "id": "D",
< "elevation": "42 m",
< "demand": "35 l/s",
< "x": 1000,
< "y": -900
< },
< {
< "id": "E",
< "elevation": "50 m",
< "demand": "15 l/s",
< "x": 0,
< "y": -900
< }
< ],
< "pipes": [
< {
< "id": "P1",
< "from": "Tank",
< "to": "A",
< "length": "1000 m",
< "diameter": "400 mm",
< "C": 130
< },
< {
< "id": "P2",
< "from": "A",
< "to": "B",
< "length": "1000 m",
< "diameter": "250 mm",
< "C": 130
< },
< {
< "id": "P3",
< "from": "B",
< "to": "C",
< "length": "900 m",
< "diameter": "200 mm",
< "C": 130
< },
< {
< "id": "P4",
< "from": "D",
< "to": "C",
< "length": "1000 m",
< "diameter": "200 mm",
< "C": 130
< },
< {
< "id": "P5",
< "from": "A",
< "to": "D",
< "length": "900 m",
< "diameter": "300 mm",
< "C": 130
< },
< {
< "id": "P6",
< "from": "E",
< "to": "D",
< "length": "1000 m",
< "diameter": "150 mm",
< "C": 130
< },
< {
< "id": "P7",
< "from": "Tank",
< "to": "E",
< "length": "900 m",
< "diameter": "200 mm",
< "C": 130
< }
< ]
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/jumblemog~pipe-flow-calculator/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'