Skip to content

harshaverse/Assignment-4-Modification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌡️ Spatially Varying Wall Temperature Study on a Flat Plate using SU2

SU2 Python CFD ParaView

A CFD study of a compressible turbulent flat plate using the SU2 solver with Python wrapper.
The objective is to analyze how spatially varying wall temperature affects the boundary layer at different Mach numbers.


🚀 Project Overview

This project demonstrates:

  • 🔧 Using SU2 CFD solver for compressible flow simulation
  • 🐍 Implementing custom boundary conditions with Python wrapper
  • 🌡️ Studying Mach number effects on thermal boundary layer
  • 🔁 Running multiple simulations automatically using Python

📐 Simulation Cases

The simulations are performed for three freestream conditions:

🏷️ Case 🌀 Mach Number 🌡️ Wall Temperature Range
Case 1 0.2 500 → 700 K
Case 2 0.4 500 → 700 K
Case 3 0.6 500 → 700 K

The wall temperature increases linearly from the leading edge to the trailing edge of the plate.


🧮 Wall Temperature Distribution

The wall temperature varies along the plate according to:

$$T_{wall}(s) = 500 + 200s$$

where $s$ = normalized distance along the plate (0 → 1)

📍 Location 🌡️ Temperature
Leading edge 500 K
Mid plate 600 K
Trailing edge 700 K

🗂️ Repository Structure

Assignment-4-Modification
│
├── 📁 mach 0.2
│   ├── 2D_FlatPlate_Rounded.su2
│   ├── config_M0.02.cfg
│   ├── launch_unsteady_CHT_FlatPlate.py
│   ├── mach_sweep.py
│   ├── flow_00009.vtu
│   ├── surface_flow_00009.vtu
│   └── mach 0.2.png
│
├── 📁 mach 0.4
│   ├── config_M0.04.cfg
│   ├── launch_unsteady_CHT_FlatPlate.py
│   ├── flow_00009.vtu
│   ├── surface_flow_00009.vtu
│   └── temp mach 0.4.png
│
├── 📁 mach 0.6
│   ├── config_M0.06.cfg
│   ├── launch_unsteady_CHT_FlatPlate.py
│   ├── flow_00009.vtu
│   ├── surface_flow_00009.vtu
│   └── temp mach 0.6.png
│
└── 📄 README.md

⚙️ Numerical Setup

🔩 Parameter 📋 Value
Solver RANS (Reynolds Averaged Navier-Stokes)
Turbulence Model SST $k$-omega
Flow Type Compressible flow

📜 Governing Equations

The solver solves the compressible Navier-Stokes equations:

Mass conservation: $$\frac{\partial \rho}{\partial t} + \nabla(\rho \mathbf{u}) = 0$$

Momentum conservation: $$\rho \frac{D\mathbf{u}}{Dt} = -\nabla p + \mu \nabla^2 \mathbf{u}$$

Energy equation: $$\rho \frac{DE}{Dt} = -\nabla(p\mathbf{u}) + \nabla(k \nabla T)$$


🐍 Python Wrapper: Spatially Varying Temperature

The wall temperature is updated at every node along the plate using the Python wrapper:

s = float(iVertex) / float(nVertex_CHTMarker)

WallTemp = 500.0 + 200.0 * s

SU2Driver.SetMarkerCustomTemperature(CHTMarkerID, iVertex, WallTemp)

This creates a temperature gradient along the surface of the flat plate.


🔄 Mach Sweep Automation

A Python script is used to run simulations at multiple Mach numbers automatically:

mach_numbers = [0.02, 0.04, 0.06]

📊 Results

🔵 Mach 0.2

Temperature and velocity contours show the development of the thermal boundary layer along the plate.

Mach 0.2


🟡 Mach 0.4

Higher velocity increases convection, affecting the temperature distribution.

Mach 0.4


🔴 Mach 0.6

The thermal boundary layer becomes thinner due to higher flow speed.

Mach 0.6


🔍 Observations

  • 📏 Boundary layer thickness changes with Mach number
  • 🔥 Higher Mach number increases convective heat transfer
  • 🌡️ Wall temperature gradient affects temperature distribution in the boundary layer
  • 🐍 Python wrapper allows dynamic boundary condition control

▶️ How to Run the Simulation

Step 1 — Clone Repository

git clone https://github.com/harshaverse/Assignment-4-Modification.git
cd Assignment-4-Modification

Step 2 — Run Simulation

python launch_unsteady_CHT_FlatPlate.py -f config_M0.02.cfg

⚡ Parallel Run

mpirun -np 4 python launch_unsteady_CHT_FlatPlate.py -f config_M0.02.cfg --parallel

🖥️ Visualization

Results can be visualized using:

🛠️ Tool 📂 Files Used
ParaView flow_*.vtu, surface_flow_*.vtu
Tecplot flow_*.vtu, surface_flow_*.vtu
VisIt flow_*.vtu, surface_flow_*.vtu

🧰 Software Used

🔧 Tool 💡 Purpose
SU2 CFD solver
Python Automation & boundary conditions
ParaView Visualization
GitHub Version control

👨‍💻 Author

Harsha

Mechanical Engineering Student

GitHub

Interests:

🛩️ Aerodynamics  |  💻 Computational Fluid Dynamics  |  🚀 Rocket Propulsion  |  ⚡ High-Performance Simulation


Built with ❤️ using SU2 + Python | CFD Study — Spatially Varying Wall Temperature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages