# Pipe Network Flow Balancer AI Agent Connect

> Pipe Network Flow Balancer is a computational engine for simulating fluid distribution networks. It reconciles physical constraints with node demands to calculate steady-state flows and pressure heads. Your AI client uses this MCP to run iterative solvers, verify network connectivity, and determine pipe resistance or pump performance.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_iCuPdqYfgcKmqFMwhxq1NCncy0Nfnrq5SuEvbbQp/ai-agent-connect
- **Tags:** fluid-dynamics, hydraulics, network-analysis, physics, engineering-tools

## Description

You can use this MCP to handle the heavy lifting of hydraulic modeling. Instead of manually calculating head losses or checking network connectivity, you give your agent the network parameters and let it run the math. It works by reconciling physical constraints against specific node demands to find steady-state flows. 

When you're designing or auditing a system, you can use it to verify that your network topology is actually connected before running full simulations. It handles the iterative math, like Newton-Raphson, to find the balance between flow and pressure. You can also pull specific resistance properties for individual pipes or check how much head a specific pump will add at a given flow rate. It's built for engineers who need to move from a conceptual network layout to a calculated hydraulic model without leaving their AI-integrated development environment.

## Tools

### analyze_network_topology
This tool checks the structural integrity and connectivity of your network. It ensures all nodes and pipes are properly linked before you run simulations.

### evaluate_pump_performance
This tool calculates the specific head added by a pump. It determines output based on the flow rate you provide.

### calculate_flow_balance
This tool runs iterative solvers to find steady-state flows and pressures. It uses methods like Newton-Raphson to reach convergence.

### get_pipe_characteristics
This tool retrieves the physical resistance properties of a pipe. It provides data on roughness and hydraulic diameter.

## Prompt Examples

**Prompt:** 
```
Check if this network is connected: nodes=[{'id': 'N1', 'type': 'source', 'demand': 0, 'head': 10}], pipes=[{'id': 'P1', 'startNode': 'N1', 'endNode': 'N1', 'length': 10, 'diameter': 0.5, 'roughness': 0.01}]
```

**Response:** 
```
The network is connected with 1 node and 1 pipe.
```

**Prompt:** 
```
Calculate the flow balance for a simple network using Newton-Raphson.
```

**Response:** 
```
The steady-state flow has been calculated with a convergence error of 0.0001.
```

**Prompt:** 
```
What are the resistance properties for pipe P1?
```

**Response:** 
```
Pipe P1 has a roughness coefficient of 0.01, a hydraulic diameter of 0.5, and a resistance factor of 12.4.
```

## Capabilities

### Steady-State Simulation
Your agent uses iterative solvers to find the balance between flow and pressure.

### Topology Validation
Your agent checks if your network nodes and pipes are correctly connected.

### Pump Head Calculation
Your agent determines how much head a pump adds at specific flow rates.

### Pipe Property Analysis
Your agent calculates resistance, roughness, and hydraulic diameters for individual pipes.

## Use Cases

### Water Network Design
Verify that a proposed water distribution layout has the correct connectivity and pressure heads.

### Pump Selection
Determine if a specific pump can provide enough head for a required flow rate in a system.

### System Auditing
Check the resistance properties of existing pipes to identify potential flow bottlenecks.

### Steady-State Modeling
Run convergence-based simulations to find the equilibrium of a fluid network.

## Benefits

- Automates iterative Newton-Raphson solvers for flow and pressure.
- Validates network connectivity to prevent simulation errors.
- Calculates specific pipe resistance and pump head output.
- Reconciles physical constraints with node demands automatically.

## How It Works

You connect the MCP to your AI client and start providing network data.

1. Connect your AI client to Vinkius to access the MCP.
2. Provide network data including nodes, pipes, and demands.
3. Ask your agent to run a topology check or a flow balance calculation.
4. Review the calculated steady-state flows, pressures, or pump performance.

## Frequently Asked Questions

**What kind of math does this MCP use for flow calculations?**
It uses iterative solvers, such as the Newton-Raphson method, to find steady-state flows and pressures.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**Does it check if my network is actually connected?**
Yes, the analyze_network_topology tool validates the structural integrity and connectivity of your network.

**What information do I need to provide for pipe analysis?**
You'll need to provide pipe data like length, diameter, and roughness to get resistance properties.

**Can it help with pump sizing?**
Yes, the evaluate_pump_performance tool determines the head added by a pump at a specific flow rate.

**How do I check if my network is fully connected?**
You can use the `analyze_network_topology` tool to validate structural integrity and identify any disconnected components in your network.

**Which solver methods are supported?**
The engine supports iterative methods such as Newton-Raphson and Hardy-Cross via the `calculate_flow_balance` tool.

**Can I model pump performance?**
Yes, you can use `evaluate_pump_performance` to determine the head added by a pump at a specific flow rate based on its characteristic curve.
