Course SD 2225 Heat transfer by conduction in
Course SD 2225 Heat transfer by conduction in a 2 D metallic plate Pau Mallol, Georgios Spanopoulos, Alan Vargas KTH, April 2008 1
Physical Background • Heat transfer: thermal energy in transit due to a spatial temperature difference within/between media. • Modes of heat transfer: 2
Differential Equation • The equation that governs the process is: Heat sources Radiation Convection with air • Assumptions: - no heat sources in plate - no convection - no radiation - constant conduction thermal conductivity k Poisson’s Equation 3
Boundary Conditions • One side is thermally insulated, whereas the rest kept at a certain constant temperature 4
Meshing • 3 meshes with both COMSOL and MATLAB a) 19 x 13 b) 49 x 31 c) 124 x 76 5
COMSOL: Resolution & Results 6
COMSOL: Resolution & Results 7
COMSOL: Resolution & Results COARSE 19 X 13 MEDIUM 49 X 31 FINE 124 X 76 Number of elements 247 1519 9424 Computing Time [s] 0. 094 0. 157 0. 939 67. 347493 67. 346702 67. 346667 Benchmark Temperature [o. C] Point (0. 2, 0. 6)m 8
MATLAB: Discretization • DG: using same stepsize h in both directions • DD: 2 nd order Finite Difference Method 9
MATLAB: Discretization • DD (cont. ): discretized DE • DB: 1 st and 2 nd order Finite Difference Method 1 st order 2 nd order 10
MATLAB: Linear Sytems of Eq. • Analytical 2 D problem results to be 1 D problem after discretization. 11
MATLAB: Linear Sytems of Eq. • Elliptic DE has been reduced to a linear system of Mx. N EQUATIONS to be solved. • There are Mx. N UNKNOWNS, the discretized temperatures in all points of the grid. • STIFFNESS & STABILITY ? COARSE 19 X 13 MEDIUM 49 X 31 FINE 124 X 76 λMAX -0. 0381 -0. 0064 -0. 0016 λMIN -7. 9215 -7. 9861 -7. 9964 A • System is of very SPARSE nature -> treat it this way to save computational effort. 12
MATLAB: Resolution & Results 13
MATLAB: Resolution & Results 14
COMSOL & MATLAB: comparison • COMSOL insensitive to mesh fineness. • MATLAB depends strongly upon mesh fineness -> ACCURACY 15
COMSOL & MATLAB: comparison Number of elements COMSOL Time [s] MATLAB Time [s] COARSE 19 X 13 MEDIUM 49 X 31 FINE 124 X 76 247 1519 9424 0. 094 0. 157 0. 939 0. 041 0. 082 1. 826 • COMSOL is more efficient with big systems. 16
Conclusions • STABILITY: numerical systems to these PDE’s are always stable, no matter what h. • ACCURACY: in COMSOL does not depend on h, in MATLAB strongly depends on h -> limitation: backward slash operator Ab size of A limited to about 10000. • Max/Min temperatures not consistent in COMSOL (depend on mesh); MATLAB is OK. • COMSOL: easier, faster, more accurate and efficient than MATLAB. • But COMSOL is particular use and MATLAB offers infinite possibilities (general). 17
- Slides: 17