Skip to content

sjoblomtech/heat_transfer_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Heat Transfer Calculator

Description

A Python-based Streamlit app for calculating heat transfer rates across conduction, convection, and radiation scenarios.

Overview

This Heat Transfer Calculator is a web-based tool I developed using Python and Streamlit to compute heat transfer rates for engineering applications. It supports three fundamental modes—conduction (walls and pipes), convection (fluid-surface interactions), and radiation (single and two-surface)—making it valuable for thermal engineering analysis, such as designing HVAC systems or analyzing heat loss in structures. My expertise in Python enabled precise scientific computations, while Streamlit allowed me to create an intuitive, interactive user interface, showcasing my ability to blend coding and UI development.

Features

• Conduction:

    ◦ Wall: Multi-layer heat transfer with customizable materials and thicknesses. 
    ◦ Pipe: Radial heat transfer for cylindrical geometries.

• Convection: Heat transfer between surfaces and fluids (e.g., Air, Water) with natural/forced options.

• Radiation:

    ◦ Single-surface: Heat exchange with surroundings. 
    ◦ Two-surface: Net radiation between two objects.

• Material Selection: Predefined thermal properties (k, h, ε) for common materials (e.g., AISI 304, C12200 Copper).

• Interactive UI: Real-time input and output via Streamlit widgets.

How to Use

1. Run the App:

    ◦ Install dependencies (see below). 
    ◦ Execute streamlit run app.py in your terminal.

2. Select Mode: Choose "Conduction," "Convection," or "Radiation" from the sidebar radio buttons.

3. Input Parameters:

    ◦ Conduction (Wall): Select materials, enter thicknesses, temperatures, and area. 
    ◦ Conduction (Pipe): Input pipe dimensions, materials, and temperatures. 
    ◦ Convection: Pick fluid, convection type, enter h, area, and temperatures. 
    ◦ Radiation: Choose material(s), input emissivity (custom or preset), area, and temperatures; toggle two-surface mode if needed.

4. Calculate: Click "Calculate" to see the heat transfer rate (q, in watts) and debug info (e.g., ε, T).

Technical Details

• Equations:

    ◦ Conduction (Wall): Fourier’s Law, q = A * (T_inner - T_outer) / Σ(thickness / k). 
    ◦ Conduction (Pipe): q = (T_inner - T_outer) / Σ[ln(r_outer / r_inner) / (2 * π * L * k)]. 
    ◦ Convection: Newton’s Law, q = h * A * (T_surface - T_fluid). 
    ◦ Radiation (Single): Stefan-Boltzmann, q = ε * σ * A * (T_surface^4 - T_surroundings^4). 
    ◦ Radiation (Two-Surface): q = σ * A * (T_1^4 - T_2^4) / [(1/ε_1) + (1/ε_2) - 1].

• Material Properties:

    ◦ pipe_k: e.g., Stainless (AISI 304) = 16.2 W/m·K, Copper (Pure) = 401 W/m·K. 
    ◦ conv_h: e.g., Air = 10/50 W/m²·K, Water = 50/1000 W/m²·K (Natural/Forced). 
    ◦ rad_epsilon: e.g., Black Paint = 0.95, Galvanized Sheet Metal (Oxidized) = 0.28.

• Implementation: Python handles calculations; Streamlit manages UI with forms, columns, and real-time outputs.

Dependencies

• Python 3.8+: Core language. 
• Streamlit: Web app framework (pip install streamlit). 
• math: For power operations (built-in).

Installation

1. Clone the repository: git clone <your-repo-url>. 
2. Navigate to directory: cd heat-transfer-calculator. 
3. Install dependencies: pip install -r requirements.txt. 
4. Run: streamlit run app.py.

Limitations

• Assumes steady-state conditions and simplified geometry (e.g., `F_12 = 1` in two-surface radiation).   
• Convection uses static `h` values, not dynamically calculated from flow conditions. 
• Lacks input validation for negative or zero material properties (`k`, `h`, `ε`).

Future Improvements

• Add view factor (F_12) for two-surface radiation. 
• Integrate Nusselt correlations for dynamic h in convection. 
• Support file uploads for custom material properties (beyond manual inputs).

Author

Tobias Sjöblom
Portfolio: http://www.sjoblomtech.com
Contact: tobias.sjoblom@sjoblomtech.com

About

Heat transfer calculator for quick conduction, convection, and radiation estimates (Python).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages