Beruflich Dokumente
Kultur Dokumente
Numerical Methods
in Heat Transfer
Numerical Methods in
Heat Transfer: Objectives
source: Siemens NX
source: Solidworks
source: adapco
SEM 300 Thermo-Fluid System Design
y=x*x+1
T 2T
= 2
t dx
Example: Finite-Difference Method
SEM 300 Thermo-Fluid System Design
PDE Discretization
T 2T
L = 2
t dx
Beam heated up
in the centre
T x
L
Uneven Temperature
distribution along the beam
SEM 300 Thermo-Fluid System Design
PDE Discretisation
PDEs are discretized on a mesh
Example: temperature distribution on a one-dimensional beam
Beam:
T T=T(x) T 2T
= 2
t dx
x
Mesh:
i= 1 2 3 n
Array: T1 T2 T3 Tn
Function
Given that the temperature distribution Ti is given on represented by
the mesh, how to compute the derivatives?
discrete values.
SEM 300 Thermo-Fluid System Design
PDE Discretisation
PDE Terms: Using Taylor Theorem
1 2 1 3
f (x + x) = f (x) + x f (x) + x f (x) + x f (x) + O(x 3 )
2 6
x x
SEM 300 Thermo-Fluid System Design
PDE Discretisation
Example of the temperature distribution:
1 2 1 3
T(x + x) = T(x) + x T (x) + x T (x) + x T (x) + O(x 3 )
2 6
On a 1-D mesh:
1 2 1 3
Ti+1 = Ti + x Ti+ x Ti+ x Ti+ O(x 3 )
2 6
T
i= 1 2 3 n
T1 T2 T3 Tn
SEM 300 Thermo-Fluid System Design
First Derivative
(forward)
Taylor Theorem:
fi fi+1
f i+1 f i
f i = + O(x)
x
First Derivative
(backward)
Taylor theorem (backward)
1 1
f (x x) = f (x) x f (x) + x 2 f (x) x 3 f (x) + O(x 3 )
2 6
On a mesh
1 2 1 3
f i1 = f i x f i+ x f i x f i + O(x 3 )
2 6
First order:
f i1 = f i x f i+ O(x) fi-1 fi
f i f i1
f i = + O(x)
x
Backward difference, first order accurate
SEM 300 Thermo-Fluid System Design
f i+1 f i1 = 2 x f i+ O(x 2 )
fi-1 fi+1
f i+1 f i1
f i = + O(x 2 )
2 x
Central difference, second order accurate
SEM 300 Thermo-Fluid System Design
Second Derivative
Second Derivative
1 2
Forward (1) f (x + x) = f (x) + x f (x) + x f (x) + O(x 2
)
2
1
Backward (2) f (x x) = f (x) x f (x) + x 2 f (x) + O(x 2 )
2
f i+1 + f i1 = 2 f i + x 2 f i+ O(x 2 )
fi-1 fi fi+1
f i+1 2 f i + f i1
f i= + O(x 2
)
x 2
Discretization of Heat
Conduction Equation
Discretisation:
Discretize:
T 2T t in time
= 2 Ti
t dx in space
Mesh:
t3
t2
t1
t
time t0
i= 1 2 3 n x
SEM 300 Thermo-Fluid System Design
Discretization of Heat
Conduction Equation
T Tit +1 Tit
Discretization in time:
1. order
T T t
2 t
= 2 2
t
Discretization in space: dx T T t
2T t
+ T t
i+1 i i1
2. order
2
dx 2
x
Ti t+1 Ti t t
Ti+1 2Ti t + Ti1
t
=
t x 2
Resolving for Tit+1:
T t
2T t
+ Ti1
t
Ti = t
t+1 i+1 i
+ T t
x
2 i
Explicit discretization
SEM 300 Thermo-Fluid System Design
t t
2 ( i+1 i1 )
Ti t+1
= T 2T t
+ T t
+ T t
x
i i
T t
2T t
+ Ti1
t
T_new[i]= t+1
= t
delta_t*alpha/(delta_x**2)*
i+1 i
T(T_old[i+1]-2*T_old[i]+T_old[i-1])+
+ T t
x
i 2 i
T_old[i]
SEM 300 Thermo-Fluid System Design
x 2
i
t3
t2
t1
t time t0
i= 1 2 3 n x
Boundary Conditions
Boundary Conditions
t3
! !
t2
t1
t
time t0
i= 1 2 3 n x
Boundary Conditions
Dirichlet boundary conditions:
Value at boundary is prescribed
E.g.: Cooling at the sides of the beam to constant T
T0 = const; Tn = const
T t
2T t
+ Ti1
t
Ti = t
t+1 i+1 i
+ Ti ; i = 0,...,n 1
t
x 2
5. Set boundary conditions (T for i=0 and i=n)
6. Repeat 4. And 5. until desired time span is computed
SEM 300 Thermo-Fluid System Design
Discretisation of 2-D
PDE
Additional dimension
Mesh: t2
m
y t
t1
3
2
Multiple variables can
j=1 t0
be stored on the mesh,
i= 1 2 3 n e.g. T, u, v, p,
x
SEM 300 Thermo-Fluid System Design
Discretize 2-D
Continuity Equation
Continuity:
u v t
ui+1, u t
v t
v t
+ =0 j i1, j
+ i, j +1 i, j1 = 0
dx dy 2x 2y
u v
+ + =0
t dx dy
+ j i, j i1, j
+ i, j i, j +1 i, j i, j1
=0
t 2x 2y
SEM 300 Thermo-Fluid System Design
f i+1 2 f i + f i1 f i+1 f i
f i= + O(x 2
) f i = + O(x)
x 2
x
Non-Linear Equations
Fluid Mechanics is full of non-linear PDEs
Example: Euler equation: u u u p
+u +v =
t x y x
v v v p
+u +v =
t x y y
Matrix components dependent on solution
uit +1 t +1 1 t +1 uit +1 t +1 1 t
ui+1 + ui ui1 = ui
2x t 2x t
!
Iterative Solution Methods required!
SEM 300 Thermo-Fluid System Design
Iterative Solutions
PDEs are solved iteratively!
Each iteration improves solution
Residuals (e.g. from continuity) provide measure of
accuracy and consistency of solution
u v w
+ + + =0
t x y z
Residuals to be
monitored during
computation.
SEM 300 Thermo-Fluid System Design
Meshes
1) Create geometry
2) Create mesh
- solution will be computed for each cell
Geometry
Mesh Source:cfd-online.com
SEM 300 Thermo-Fluid System Design
Meshes II
Computational Meshes
Source:wright.edu
Mesh Generation
Imports geometry from CAD software:
1) Geometry
import
Source: fluent.com
SEM 300 Thermo-Fluid System Design
Mesh Generation
3) Surface meshing
4) Volume meshing
Source: fluent.com
SEM 300 Thermo-Fluid System Design
Mesh Generation
What is a good mesh?
Not the first mesh provided by software (!)
Engineers discretion:
Refine mesh in location where it much is happening
Coarsen, where nothing is going on
Mesh refinement study
Verification and
Validation
All numerical simulations are inaccurate (!) due to:
Numerical error
Model error
Bugs
User error
Verification and
Validation
Verification: Am I solving the equations right?
Validation: Am I solving the right equations?
Validation
Flow over an airfoil
3rd Mesh
0.2
2nd Mesh
1st Mesh
0.4
Experimental
P/Ho
0.6
0.8
1
0 0.2 0.4x/c 0.6 0.8 1
SEM 300 Thermo-Fluid System Design
Numerical Methods