A simplified rain flow simulation template using Rhino 3D and Grasshopper to assist in early-stage architectural or landscape design.
In an era of increasing climate uncertainty and rising urbanization, understanding water flow patterns has become crucial for resilient design. Urban flooding, landscape erosion, and inadequate drainage systems pose significant risks to both infrastructure and communities. Moreover, proper roof drainage design is essential for building longevity and occupant safety. Early-stage water flow analysis can help identify potential problems before they manifest, leading to more informed design decisions and more resilient built environments.
This Grasshopper script provides architects, urban planners, and designers an accessible tool for analyzing potential water flow patterns on terrain surfaces and roof geometries. By visualizing and understanding approximate water flow behaviour in landscape, urban, and architectural contexts, designers can make more informed decisions about site planning, drainage strategies, and risk mitigation.
This tool uses a simplified physics model to simulate water flow on mesh surfaces, providing indicative visualization of:
- Potential water flow paths
- Areas of water accumulation through flow line clustering
- Possible drainage patterns
- Potential flood risk zones in urban areas
- Roof drainage patterns and critical points
- Indicative locations for gutters and overflow zones
The script simulates water particles flowing over a mesh surface using a combination of gravitational force and momentum. Each particle:
- Follows the terrain/roof geometry
- Maintains directional momentum
- Responds to gravitational pull
- Creates a continuous flow path
- The tool includes functionality to:
- Group flow lines that are within a specified distance threshold
- Identify areas where multiple flow paths converge
- Highlight potential high-risk zones for water accumulation
- Visualize primary drainage patterns
- Indicate optimal locations for gutters and overflow points on roofs
- Help determine appropriate gutter sizes based on flow concentration
step
: Controls the granularity of the analysisiterations
: Determines how far the water flowsmomentum
: Balances between terrain-following and gravitational behavior (0-1)0
: Pure gravitational flow1
: Strong terrain-following behavior- Recommended range for water simulation:
0.6-0.8
cluster_threshold
: Distance threshold for grouping nearby flow lines
The tool consists of two main parts:
- Water flow simulation implemented in GHPython, leveraging:
- RhinoCommon for geometry operations
- GHPython for Grasshopper integration
- Native Python functionality for calculations
- Flow line clustering and analysis implemented through standard Grasshopper components for:
- Proximity analysis
- Group formation
- Pattern identification
- Risk zone visualization
This dual implementation approach makes the tool both powerful and easily customizable within the familiar Grasshopper environment.
This tool is intended for preliminary analysis and visualization purposes only. It should not be used as the sole basis for critical design decisions or engineering calculations. The simulation does NOT account for:
- Water volume and mass
- Ground material permeability or absorption
- Existing drainage infrastructure capacity
- Surface friction or material properties
- Water accumulation or pooling
- Flow splitting or merging
- Variable velocity based on slope
- Real fluid dynamics (turbulence, pressure, etc.)
- Rainfall intensity or duration
- Subsurface water movement
- Existing flood prevention measures
- Local drainage regulations and requirements
- Specific roof material characteristics
- Building code requirements for drainage systems
This tool is best used for:
- Early-stage site analysis
- Preliminary drainage strategy development
- Urban risk assessment visualization
- Roof drainage design exploration
- Educational purposes
- Communication with stakeholders
- Identifying areas requiring detailed hydrological study
- Initial gutter placement and sizing studies
- Rhinoceros 3D (version 8)
- Grasshopper
- GHPython
This project is licensed under the MIT License - see the LICENSE file for details. This means you can freely use, modify, and distribute this tool, but please provide attribution to the original authors.
We welcome contributions to improve the script! If you encounter any issues or have suggestions for enhancements, please feel free to contact us at [email protected].