Skip to content

hariaravindh/cfd_numerical_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Numerical Solver for 1-D Unsteady Heat Conduction

Project Overview

This repository contains the Python implementation for Computational Fluid Dynamics , which solves the One-dimensional unsteady heat conduction equation in a homogeneous wall.


Objective

Implement and compare Three finite difference methods:

  • Explicit FTCS
  • Implicit Laasonen
  • Crank-Nicolson

All methods are benchmarked against the analytical solution for six test cases to analyze accuracy, stability, and efficiency.


Features

  • Three Numerical Methods: Explicit FTCS, Implicit Laasonen, Crank-Nicolson.
  • Analytical Benchmark: Compares numerical results to an analytical series solution.
  • Multiple Test Cases: Six configurations with varying mesh sizes and Courant numbers.
  • Automated Plots: Generates solution plots for visual comparison.
  • Simple, Modular Python Code: Easy to extend or adapt.

Governing Equation

∂T/∂t = α ∂²T/∂x²

  • T(x, t): Temperature distribution
  • α = 0.02 m²/hr: Thermal diffusivity

Initial & Boundary Conditions:

  • Initial: Triangular profile — T = 0 K at x = 0 and x = 1 m; T = 100 K at x = 0.5 m
  • Boundaries: T(0, t) = T(1, t) = 0 K

⚙️ Numerical Methods

Explicit FTCS

  • Forward time, centered space.

Implicit Laasonen

  • Solves a tridiagonal system.

Crank-Nicolson

  • Averages time levels.

Language License


Releases

No releases published

Packages

 
 
 

Contributors

Languages