Microservice for calculating pump horsepower needs based on pipe diameter, distance, suction loss, static head, flow rate, temperature, and material.
Find a file
2025-01-22 22:07:58 +00:00
templates Update templates/index.html 2025-01-22 22:07:58 +00:00
pumpcalc.py Update pumpcalc.py 2025-01-18 02:46:06 +00:00
README.md Update README.md 2025-01-18 01:05:21 +00:00
requirements.txt Add requirements.txt 2025-01-18 00:58:48 +00:00

PumpCalc Documentation

Overview

PumpCalc is a Python-based web application built using FastAPI for calculating pump power requirements and hydraulic parameters.


Installation

  1. Clone the Repository:

    git clone https://sij.ai/sij/pumpcalc
    cd pumpcalc
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Run the Application:

    python3 pumpcalc.py
    

    The app will be available at http://127.0.0.1:8901.


Endpoints

  1. GET /
    The web interface for data entry and calculations.

  2. GET /calculate
    Performs pump calculations based on query parameters such as pipe_diameter, distance, suction_loss, static_head, flow_rate, etc.


Example Caddyfile

To serve PumpCalc using Caddy:

pumpcalc.yourdomain.tld {
    reverse_proxy localhost:8901
    tls {
        dns cloudflare {env.CLOUDFLARE_API_TOKEN}
    }
}