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