# Hardy Cross Pipe Network Calculator MCP. AI Agent Connect

> Hardy Cross Pipe Network Calculator MCP handles the heavy lifting for fluid dynamics calculations in closed pipe systems. It gives your AI client the ability to run the iterative Hardy Cross method, allowing it to determine flow corrections, check for network convergence, and ensure mass conservation across all nodes in a hydraulic network.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_SHX24ltHFsz1P1X0dbeyZaazFbPAI2ggBRCDW66Q/ai-agent-connect
- **Tags:** hardy-cross, fluid-dynamics, pipe-network, engineering, hydraulics

## Description

If you are working with closed pipe networks, you know the manual math for the Hardy Cross method is tedious and prone to error. This MCP gives your AI client the specific engineering tools needed to solve for flow distribution. Instead of you manually calculating loop adjustments, your agent can run the iterative process to find the necessary corrections for each loop. Once the system reaches a steady state, the MCP provides the final branch flows and head losses. You can also use it to verify that your results actually meet accuracy requirements or to double check that mass is conserved at every junction. It turns your AI client into a specialized hydraulic calculator that handles the iterative math while you focus on the system design.

## Tools

### compute_final_network_state
This tool calculates the steady-state flows, head losses, and node residuals for the entire network.

### validate_network_convergence
Use this to check if the iterative Hardy Cross process has met your specific accuracy requirements.

### verify_node_balance
This tool checks the conservation of mass at every node to ensure the network is balanced.

### calculate_hardy_cross_corrections
This tool finds the required flow adjustments for each individual loop in the network.

## Prompt Examples

**Prompt:** 
```
Calculate the flow corrections for a loop with these pipes and initial flows.
```

**Response:** 
```
The required correction for the loop is 0.045 m³/s.
```

**Prompt:** 
```
What is the final state of the network after convergence?
```

**Response:** 
```
The final branch flows are 1.2 m³/s for pipe 1 and 0.8 m³/s for pipe 2, with a convergence status of true.
```

**Prompt:** 
```
Is the node balance maintained for the current flows?
```

**Response:** 
```
Yes, the node residuals are zero and the network is balanced.
```

## Capabilities

### Iterative Flow Correction
Your agent uses this to calculate loop adjustments during the Hardy Cross process.

### Steady-State Calculation
The AI client uses this to find final branch flows and head losses.

### Convergence Verification
Your agent checks this to see if the iterative math has reached the required tolerance.

### Mass Balance Validation
The AI client uses this to ensure mass conservation at every junction in the network.

## Use Cases

### Water Distribution Modeling
Solve for flows in municipal water networks using the Hardy Cross method.

### Network Convergence Checks
Verify that an iterative hydraulic solution has met the necessary accuracy thresholds.

### Mass Balance Audits
Confirm that every junction in a pipe network maintains conservation of mass.

### Steady-State Analysis
Determine final branch flows and head losses after the iterative process completes.

## Benefits

- Automates the iterative Hardy Cross math for closed loops.
- Provides instant verification of mass conservation at nodes.
- Reduces manual calculation errors in hydraulic modeling.
- Delivers final steady-state flow and head loss data quickly.

## How It Works

Connect the MCP to your AI client and start feeding it network data.

1. Connect your AI client to the Vinkius-hosted MCP.
2. Provide the pipe network parameters and initial flow estimates to your agent.
3. The agent uses the correction tool to iterate through the loops.
4. The agent validates convergence and node balance to ensure accuracy.
5. Retrieve the final steady-state flows and head losses.

## Frequently Asked Questions

**What is the Hardy Cross method?**
It is an iterative method used to solve for flow distributions in closed pipe networks.

**How do I use this with Claude or Cursor?**
You connect the MCP through Vinkius, and your AI client will automatically see the engineering tools available for use.

**Can this MCP check if my network is balanced?**
Yes, it includes a tool specifically to verify node balance and mass conservation.

**Does this handle steady-state calculations?**
Yes, it can compute the final steady-state flows and head losses for the network.

**How does the agent know when the calculation is accurate?**
The agent uses the validation tool to check if the iterative process has met the required convergence tolerance.

**How do I check if my network has converged?**
You can use the `validate_network_convergence` tool by providing the magnitude of the last correction and your desired tolerance.

**Can I verify mass conservation at the nodes?**
Yes, the `verify_node_balance` tool checks if the sum of flows entering and leaving each node, including external demands, equals zero.
