A Python desktop application for transient heat conduction analysis in plane walls, infinite cylinders, and spheres. Built as an educational tool for heat transfer coursework at Tanta University.
- Three geometries: Plane Wall, Infinite Cylinder, Sphere
- Automatic solver selection: uses lumped-capacitance, analytic one-term, or implicit finite-difference methods depending on Biot and Fourier numbers
- Interactive PyQt5 GUI: enter parameters, plot temperature response, and view analysis info instantly
- Excel export: save temperature results and metadata to
.xlsx - Optional geometry overrides: specify custom volume or surface area for advanced cases
- Python 3.8+
- PyQt5
- NumPy
- SciPy
- Matplotlib
- Pandas
- openpyxl
- Create a virtual environment:
python -m venv .venv- Activate the virtual environment:
- Windows:
.venv\Scripts\activate - Linux/Mac:
source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txtStart the application:
python main.pyEnter the required physical properties and analysis settings, then click Calculate and Plot.
| Parameter | Description |
|---|---|
| Thermal Cond (k) | Thermal conductivity (W/m·K) |
| Density (rho) | Density (kg/m³) |
| Specific Heat (cp) | Specific heat capacity (J/kg·K) |
| Conv Coeff (h) | Convection coefficient (W/m²·K) |
| Initial Temp (Ti) | Initial temperature (°C) |
| Ambient Temp (T_inf) | Ambient temperature (°C) |
| Time (sec) | Analysis time in seconds |
| Length (L or r0) | Half-thickness / radius (m) |
| Volume (V) [Optional] | Optional body volume override |
| Surface Area (A) [Optional] | Optional surface area override |
- Plane Wall — infinite slab with conduction through thickness
- Infinite Cylinder — long cylinder with radial heat flow
- Sphere — solid sphere with radial heat flow
The app evaluates dimensionless numbers and chooses the appropriate method:
- Lumped-capacitance model for Biot number
Bi < 0.1 - Analytic one-term solution for non-lumped cases with
Fo >= 0.2 - Implicit finite-difference numerical solver for non-lumped cases with lower Fourier numbers
Use Export to Excel (Time Series) after a calculation to save results in an Excel workbook with:
Temperature Data: temperature at 0.001 m intervals for half and full analysis timesMetadata: geometry, material properties, dimensionless numbers, solver method, and time constant
.
├── main.py # Application entry point
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── src/
├── physics/ # Geometry and heat transfer models
│ ├── base_case.py # Abstract heat transfer base class
│ ├── slab.py # Plane wall geometry
│ ├── cylinder.py # Infinite cylinder geometry
│ ├── sphere.py # Sphere geometry
├── solvers/ # Solver implementations
│ ├── analytic.py # Analytic solution formulas
│ ├── auto_solver.py # Auto-selection logic
│ └── numerical.py # Implicit finite-difference solvers
└── ui/ # GUI components
├── widgets.py # Application widgets and controls
└── styles.qss # Qt stylesheet
The application computes transient conduction using:
- Thermal diffusivity:
α = k / (ρ · cp) - Biot number:
Bi = h · Lc / k - Fourier number:
Fo = α · t / Lc²
It supports both spatially distributed solutions and lumped-capacitance behavior depending on the case.
Developed for educational purposes at Tanta University.