{ Th2LS_1.PDE - program for FlexPDE } title "Heat flow in 2D region" select errlim = 1e-3 {error tolerance} Variables Temp {variable for temperature} definitions hl=1.4 {height} wl=0.8 {width} wwl=0.2 {wall width} hal=0.7 {additional dimensions} K = 46.7 {thermal conductivity} Source = 0 {heat generation rate per unit volum (can be omitted)} hf=60 {film coefficient} Text = 0 {bulk temperature of the adjacent medium} Tinp1 = 90 {temperature on left bottom boundary} Tinp2 = 180 {temperature on right bottom boundary} flux = -K*grad(Temp) {thermal flux vector} pel=(hal/2)/(wl-wwl) {elliptic factor} equations div(flux) = Source {thermal conductivity equation} { (or in the form div(flux) = 0 with Source = 0) } boundaries {problem domain and boundary conditions} Region 1 {domain 1} start (0,0) value(Temp)=Tinp1 {boundary with specified temperature} line to (wwl,0) natural(Temp)=0 {heat flux is equal to zero} line to (wwl,hl-hal-wwl) line to (wl-wwl,0) value(Temp)=Tinp2 {boundary with specified temperature} line to (wl,0) natural(Temp)=0 line to (wwl,hl-hal) arc (center=wwl,hl-hal/2) to (wl,hl-hal/2) {arc in the form of ellipse part} arc (center=wwl,hl-hal/2) to (wwl,hl) natural(Temp)=-hf*(Text-Temp) {convective heat transfer} line to (0,hl) natural(Temp)=0 line to close natural(Temp)=0 start (wwl,hl-hal/2-(wl-2*wwl)*pel) {hole in the domain} arc (center=wwl,hl-hal/2) to (wl-wwl,hl-hal/2) arc (center=wwl,hl-hal/2) to (wwl,hl-hal/2+(wl-2*wwl)*pel) line to close monitors contour(Temp) {show contour plots of solution in progress} plots {resulting plots} grid(x,y) as "Finite element mesh" contour(Temp) painted as "Temperature" contour(magnitude(flux)) painted as "Heat flow vector magnitude" vector(flux) as "Heat Flow vector" end