How arishneel-narayan/centrifugal_pump_sizing_app works
Project Type & Purpose
• This is a lightweight, single‐page Streamlit web application written in Python.
• Purpose: Provide process engineers with an interactive UI to calculate TDH, power requirements, and NPSHa for centrifugal pump sizing.
Main Architectural Components
a. Streamlit Web Server
– Hosts the interactive UI.
– Handles HTTP(s) requests from the browser.
b. Calculation Engine
– Encapsulated by pump_sizer.py.
– Contains the domain logic and formulas for pump sizing.
c. External Libraries
– Listed in requirements.txt (e.g., streamlit, numpy, pandas).
– Provide UI widgets, numeric computation, and data handling.
d. Client (Web Browser)
– Renders the Streamlit‐generated UI.
– User interacts (inputs flows, pressures, fluid properties).
Relationships & Data Flow
• Browser → Streamlit Server: user inputs via HTTP/WebSocket.
• Streamlit Server → Calculation Engine: passes input parameters to pump_sizer functions.
• Calculation Engine → Streamlit Server: returns results (TDH, power, NPSHa).
• Streamlit Server → Browser: renders results as charts, tables, text.
Architectural Patterns & Principles
• Clear separation of concerns:
• UI layer (Streamlit)
• Domain logic (pump_sizer.py)
• Dependency management (requirements.txt)
• Single process, event‐driven model (Streamlit’s run loop).
• Stateless between runs – all state lives in session memory.