hydraulic-models

hydraulic-models is a cursor rule for Cursor from psu-efd/pyHMT2D. It costs 0 tokens per session (623 once invoked), scanned A, original, MIT.

A reference for the hydraulic models supported by pyHMT2D, a Python tool for two-dimensional water-flow simulation and result analysis.

In plain words
What is it for?
Use it when working with SRH-2D or HEC-RAS 2D projects, including running simulations, reading results, converting files, and probing data.
Why use it?
It clarifies which model systems are supported and what operations are available for each one.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/psu-efd/pyhmt2d/hydraulic-models
Clone the repo
git clone --depth 1 https://github.com/psu-efd/pyHMT2D

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hydraulic-models

README.md
[![agentmods](https://agentmods.dev/badge/rules/psu-efd/pyhmt2d/hydraulic-models.svg)](https://agentmods.dev/rules/psu-efd/pyhmt2d/hydraulic-models)
Your own site
<a href="https://agentmods.dev/rules/psu-efd/pyhmt2d/hydraulic-models"><img src="https://agentmods.dev/badge/rules/psu-efd/pyhmt2d/hydraulic-models.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00623
Opus 5 $0.00000 $0.00311
Sonnet 5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00062

Measured 3d ago against content hash 548b568125dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hydraulic-models scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/hydraulic-models.mdc · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hydraulic Models Integration

This rule covers the supported hydraulic models and how to work with them in pyHMT2D.

Supported Models

SRH-2D

  • Location: pyHMT2D/SRH_2D/
  • Key Features:
    • Read SRH-2D results into NumPy arrays
    • Convert results to VTK format
    • Control and modify simulations
    • Sample and probe results

Example usage:

import pyHMT2D

# Create SRH-2D model instance
my_srh_2d_model = pyHMT2D.SRH_2D.SRH_2D_Model(
    version="3.3",
    srh_pre_path="path/to/SRH_Pre_Console.exe",
    srh_path="path/to/SRH-2D_V330_Console.exe",
    extra_dll_path="path/to/dlls"
)

# Initialize and run
my_srh_2d_model.init_model()
my_srh_2d_model.open_project("project.srhhydro")
my_srh_2d_model.run_pre_model()
my_srh_2d_model.run_model()

HEC-RAS 2D

  • Location: pyHMT2D/RAS_2D/
  • Key Features:
    • Read RAS2D results (HDF files)
    • Convert to VTK format
    • Convert mesh and boundary conditions
    • Control simulations

Example usage:

import pyHMT2D

# Create HEC-RAS model instance
my_hec_ras_model = pyHMT2D.RAS_2D.HEC_RAS_Model(
    version="5.0.7",
    faceless=False
)

# Initialize and run
my_hec_ras_model.init_model()
my_hec_ras_model.open_project("project.prj", "terrain.tif")
my_hec_ras_model.run_model()

Backwater-1D

  • A simple demonstration model
  • Used for testing and educational purposes

Model Interoperability

The package provides tools for converting between different model formats:

  1. RAS2D to SRH-2D conversion:

    • Mesh conversion
    • Boundary condition conversion
    • Manning's n data conversion
  2. Result Comparison:

    • Compare results between different models
    • Support for different mesh types
    • Statistical analysis tools

Model Control

Common operations for all models:

  • Project opening/closing
  • Model initialization
  • Simulation running
  • Result reading
  • Model cleanup

Data Processing

All models support:

  • Reading results into NumPy arrays
  • Converting to VTK format
  • Sampling and probing
  • Statistical analysis
  • Visualization

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 99 lines · 0 tokens per session scan A 548b568125dc

Subscribe to this mod's changes

hydraulic-models is a cursor rule published in the GitHub repository psu-efd/pyHMT2D (128 stars, last pushed 24d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 623 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.