agentleFS
psu-efdpsu-efd/pyHMT2D/.cursor/rules/hydraulic-models.mdc

pyHMT2D / rules

Cursor rule132 starsChanged 8 months agoMITView on GitHub

This rule covers the supported hydraulic models and how to work with them in pyHMT2D. Example usage: Example usage: The package provides tools for converting between different model formats: Common operations for all models: - Project opening/closing - Model initialization - Simulation running - Result reading - Model cleanup All models support: - Reading results into NumPy arrays - Converting to VTK format - Sampling and probing - Statistical analysis - Visualization

The file

We split this hydraulic-models.mdc into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read SRH-2D results into NumPy arrays

    line 15
  2. Distinctive:

    Read RAS2D results (HDF files)

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
hydraulic-models.mdc
---
description: 
globs: 
alwaysApply: false
---
# 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/](mdc: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:
```python
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/](mdc:pyHMT2D/RAS_2D)
- Key Features:
  - Read RAS2D results (HDF files)
  - Convert to VTK format
  - Convert mesh and boundary conditions
  - Control simulations

Example usage:
```python
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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.