in this video I'm going to introduce numerical method to solve onedimensional two-dimensional heat conduction problems under steady state conditions uh so far we in chapter one through chapter 3 we solved heat conduction problems in cian coordinate or rectangular coordinates and cylindrical coordinates and sperical coordinates um first we use the heat diffusion equations uh simplify the heat division equations with appropriate assumptions uh Express the boundary conditions uh in proper mathematical form uh to determine the integration constant and solve the differential equation um by solving the differential equations we acquired temperature distributions uh in the system um and we only solved highly simplified problems such as um heat conduction through um plain wall or heat conduction through uh fin or heat conduction through a pipe cylindrical shape or heat conduction through a spherical shape so the by using um analytical method um you know we were able to solve very simple problems but actual engineering problem may require complex geometries uh such as uh you can see this wall uh and some area of the world is protruded and you can also see uh part of the boundary conditions is a heat flux uniform heat flux and part of the wall may be uh un uh constant temperature and we may want to analyze the heat uh temperature distributions uh in enine Block uh which is very complication which has very complicated shape uh so we are not able to use analytical method to solve the heat division equations in these complex geometries and thermal conditions so we need to use a take a different approach to solve the complicated uh problems and numerical method is very useful uh to solve the uh the complex uh heat transfer problems so I'm going to introduce um the very basic uh method to uh the numerical method um and in this uh in this class we are only cover very simple um geometry uh for the numerical method uh so first now let's take a look uh let's take a look at this example con a cylindrical fin this is a cylindrical fin so cross-section of the fin is a circle base temperature of the fin is 100° C and the length of the fin is24 M diameter 025 m thermoconductivity 160 wat per M kin H is the convection heat trans coefficient uh of the surrounding fluid and the surrounding fluid temperature T Infinity is 20° C so there may be heat conduction through the fin also heat convection from the fin to the surrounding uh since the suface temperature is greater than the surrounding Fleet temperature heat will be conducted through the fin and uh heat uh is going to be removed um to the surrounding Fleet by convection uh we may be able to solve this questions uh using the fin equations and in previous video we uh introduced the same similar problems and using the equation uh we are able to get the temperature distribution and the rate of heat transfer through the fin and now we are going to use a numerical method to solve it Sol uh to determine the temperature distribution along the fin so let me explain uh how to do the numerical method um so first thing uh is to Sol divide the solid medium into uh volume element so replace the object with a set of nodes with a set of nodes so this node each node represent the temperature every you can say that this is the average temperature of each volume element each volume element so we so replace the object with a set of nodes so this is the volume element so this is one volume element and another volume element another volume elements at the fin tip we have another volume element so here here uh we you should note that the temperature the Nole points is at the boundary right T1 is at the fin base that is the boundary of the fin another Nole point is at the fin tip so the compare the size of the volume element so Nole points is at the center of of the volume element and the volume element size of the volume element uh at the boundary is actually half the size so T1 has half the size compared to uh the volume elements at T2 or T3 and T4 also volume element is half the sides uh so this is a cylindrical f so actually the volume elements is a short cylinder shape so if this is T2 this is the volume elements for T2 okay so you can take this Nole points represent the temperature of this volume element or average temperature of this volume element why we have four Nole points uh that's you know we can determine how many no points we want to have uh in this cylinder you could have you know different number of no points um so for uh Simplicity I just uh you know defined four um no points as an example okay second formulate the problem in finite difference form so there are different ways to formulate the uh numerical equations so we are going to use we are going to take energy uh balance approach since we are already familiar with energy balance approach to um you know to get the heat defion equations so we are going to to take the energ balance approach to establish the numerical uh equation so under Ste State one dimensional heat conduction constant properties no heat Generations uh we can write uh energy balance equations as this so take the energy balance on each volume elements each volume element so let's consider this volume elements for node node the second node T2 uh so there will be a um heat transfer by conduction so heat transfer by conduction at the left surface right and there will be another heat transfer at the right surface and there will be heat transfer from the outer surface again this is the Nole point at T2 right no heat generation there will be heat conduction from left to right and there will be heat convection from Outer surface to the surrounding so this is all energy transfer across the volume element assuming there is no heat generation so but when we establish the nodal equations or numerical uh equations uh to simplify to uh to avoid any confusion so it's always good idea to assume that heat transfer all heat transfer occurs in into the volume element into the volume element into the volume element so hit transfer directions is into the volume element uh this is just to you know uh to simp uh to avoid any confusion so realistically you know the it's not possible that uh heat transfer of course into the volume element but this is for just uh for simpli simplification so ql so heat trans heat conduction at the left surface QR heat transfer at the right surface Q outo surface or Q convection right so ql go into the volume element plus QR heat conduction into the volume element plus Q convection also into the volume element that's why I added them all equals on the right hand side what do we need what do we have so energy going in minus energy leaving equals the rate of change of the energy content in the volume element so in this case on the St State there is no energy change uh in the volume element so right hand side is zero so this is the energy balance equations again we assumed energy going in all the energy going in to the volume element so ql ql Q convection or goes to the volume elements T2 and the size um so actually here also it has a Dimensions right so assuming that we have 08 so 0.08 um so 08 so we are assuming that it has a four no points so so this is8 eight8 right another 08 and this is 04 this is 04 okay so at T2 so we the rate of heat conduction at the left surface by conduction so we use f low of heat conduction to uh Express ql so ql from left to right energy going in to the volume element you using F low of heat conduction K * a * DT over DX so we in for low conduction we have negative sign since DT / DX is negative so here K * a c time DT / DX DX 08 M which is positive right 08 positive T1 minus T2 so we assume heat transfer from left to right according to our assumption T1 is greater than T2 right T1 is greater than T2 that's why heat flow from left to right so T1 is greater than T2 which is T1 minus T2 is positive length positive so we don't need to add negative sign here since T1 minus T2 positive divide by positive distance okay so okay a DT over DX or delta T over Delta X AC AC what is AC it's a heat transfer area C subscript C denotes a cross-sectional area so heat flow left from left to right so the heat transfer area is actually crosssection of the fin cross-section of the fin AC which is pi R square R is the radius of the fin Pi R square is the heat transfer area so this is the ql and ql plus QR so what is QR also we assume heat transfer from right to left from T3 to T2 k a c T3 minus T2 heat flow from right surface to left because our assumption is heat flow into the volume element T3 minus T2 distance between the two Nole points is 008 M plus sign because we assume heat flow into the volume element right we don't need negative sign because Delta t/ Delta X is positive okay plus what we have is Q convection plus Q convection H * a s time delta T so here a s is the heat transfer area by convection so what is the heat transf area by convection outter surface area of the volume element so a it's different from AC right AC is the heat transfer area by conduction as s is the heat transfer area by convection it's part uh so parameter of the cylinder is 2 pi r 2 pi r p times what is the distance of the volume element size of the volume element 08 M so P * 08 m p 2 pi r or Pi D we assume that heat transfer by convection is into the volume element so into the volum element so we assume heit uh temperature to Infinity is greater than T2 so T Infinity minus T2 = 0 so again note that ql QR Q convections are all into the volume element that's why they are all have positive values since heat transfer into the volume element we take T1 minus T2 we take T3 minus T2 we take T Infinity minus T2 okay so this is the volume uh um this is the no equations for T2 so in this uh schematic so T2 is interior node T3 is also interior node okay so we take the same approach so heat heat conduction at the left surface plus heat conduction at the right surface and there will be heat convection from the outer surface so actually T2 and T3 will have the very similar noed equations right the only change is the temperature difference T1 minus T2 instead of T1 - T2 we have T2 - T3 instead of 3 2 we have 4 3 instead of T Infinity minus T2 we have t Infinity minus T3 same format only the temperature are different and T4 T4 is at the fin tip that is the fin tip temperature okay so this examples we only assume that there are four four Nole points but uh in general we can assume that uh it has a n number of Nole points so at the fin tip the Nole point is TN at the base this is t uh one right T1 at the base T1 is TB okay and we have uh n minus n minus uh n uh minus one number of Nole points uh actually nus 2 Nole points at the Interior right n minus two no points at the interior uh so for the any interior noes so from T2 to t n minus1 so this is the general expression for the Nole points so heat transfer so this is the general expression uh for the interior Nole points so heat conduction at the left surface plus heat conduction at the right surface uh plus uh heat convection at from the outer surface we just move this from left to right um and we simplify this equation rearrange the equations and this is the result and we introduce Omega so we just uh put this relation as Omega so we can write this equations for TM TM represents a temperature at Nole points M okay temperature at no points M and T M minus1 is the Nole points right before TM TM + one is the Nole points right after TM so we have [Music] TM and the no points before TM is TM minus one no points after TM is T n +1 okay also note that all interior nodes uh have the full size no uh volume elements and TB and TN they have the half size no uh volume element so this is the general expression for this particular problem uh if you encounter any other uh shape of uh any shape of um medium and different boundary condition you need to establish the appropriate energy balance equations and get the no equation uh this particular problems uh we you know Omega was defined as this and plug in all values and Omega is 04 so H the unit of H convection heat trans Co wat per M Square Kelvin p is parameter so meter and Delta x square Delta X is the size of the volume element so me Square over K thermoconductivity 1 per meter Kelvin uh a m squar so actually this is dimensionist Omega is dimensionist 04 uh no equation this no equation can be Rewritten as this okay and so this is the no equation for the interior node and we also have another no point so TB TB is typically the temperature of the surface temperature of the solid medium so TV equals temperature of the surface TN TN is the temperature uh at the fin tip and TN vary uh depending on the boundary condition so in previous video we learned uh four different boundary conditions so we are going to uh find the appropriate uh no equations at different boundary condition so first insulated tip insulated tip which means there's no heat transfer from the fin tip this is fin tip that is insulated so no heat transfer from the fin tip again this is the Nole points at the fin tip TN and the size of the volume element is half the size that's why we have Delta x/ 2 all other interior nodes has the size full size so they are Delta X Delta X at the fin tip Delta X over 2 so when uh the reason why we have a Nole points at the boundary is uh we are typically interested in the temperature at the boundary also want to apply the boundary conditions um so uh so we apply the energy balance equations uh for the Nole points at the boundary so there will be heat conduction right heat conduction and there will be heat convection and there's nothing going in from the right surface since this is insulated a fin tip so that's why uh so we only have two we only have two uh TS so this is ql this is Q convection so Q L is k a c TN minus one minus TN again heat transfer into the volume element so TN minus one is the temperature of the neighboring Nole points okay so before TN it's the uh the temperature is TM minus one it's a full size the distance between the Lo points remain constant Delta X and heat transferred by convex from the outer surface H * a s times temperature difference TN minus t Infinity why why it's not t Infinity minus TN um since we move the this heat convection ter from left to right that's why it has TN minus t infinity and why do we have P * Delta X overide by 2 uh because this volume element is half the size so this the width of this volume element is Delta x/ 2 again we can simplify the equations so the final result is shown here or here the same equations same expression so this is case uh a uh insulated tip so if we have a th t with convection so we still consider the TN um the no points at the fin tip and if it has a convection heat transfer there's one additional term which include the heat convection from the fin tip the only change is this compared to the previous one you know previous one we assume there's no heat convection from the fin tip but we if we consider the heat convection this is the additional heat transfer area this is the outer surface area and AC at the fin tip there's also heat convection that's why we have AC okay again no equations and seter is just to you know simplify this equation set is defined as this you know setet is it's just uh to simplify the no equation and if the fin tip with a prescribed temperature uh the process is even simpler TN is simply specified temperature so if we have 13 noal points n is 13 1 Nole point then no you can we have a cylindrical fin so this is t113 this is T1 T2 3 4 5 6 7 8 9 10 11 12 13 okay where have total 13 Nole points so you can tell that the volume and volume element is half the size for T1 half the size for t113 and full size from T2 to T12 from T2 to T12 they have the full size volume element from T3 to T2 through T 12 full size for size volume elements so how many so this is uh um 11 right 11 volume element has a full size and T1 and T 30 T1 and t13 has the half sides okay um so we can express uh the Nole points T1 assuming that why the Y T1 is 100 since we uh actually the in the problem statements we are actually we are solving the same problems but with a different number of no points so TS is 100° C which is given L length is24 M24 M so solve the questions with a different number of loed points okay so how many uh what's the distance uh what's the width of the volume elements uh so total length is24 M how many divide by 12 right divide by 12 and this is half size half size so we have 12 / by 12 so Delta X is2 Delta x is2 uh so T2 through T12 they are interior node from T2 to t112 are interior noes and for the interior node we already got um from T2 to T12 we got the general expression right so this is the no equations from T2 to T12 right so now so if m is two so if m is two we can write minus T1 + 2.04 * * T2 - T3 = 3 uh8 if m is 3 - T2 + 2.04 T3 - T4 = 8 if m is 4 - T3 + 2.04 T4 - T5 = 8 so in this manner we can write a no equations from T2 to T12 T2 to T12 they are interior nodes full size volume element they have the similar format right so we can write a no equation from T2 to T12 t13 if we assume that the at the tip the temperature is given as 60° C t13 is 60 so we get the no equation from T1 to t113 right so this is the no equation and how do we solve this from T2 to T12 uh sorry from T1 to t13 we uh we have 13 equations and we have uh from T2 to T12 unknown right so T2 to T12 12 equation 12 unknown sorry 11 equations and 11 unknown so we can solve them uh algebraically uh since you know we can solve them simultaneously and 11 unknown 11 equations we can solve them so uh we can first we can solve it using a matrix invers method so here we can express the no equations in Matrix so 13 equation uh so you know T1 = 100 can be written as 1 0 0 0 you know 12 0 equal on the right hand side we have temperature 100 and the second equation becomes what is the second equation this is the second equation okay or it can be Express as this um this equation can be also written as T1 um + T3 +8 = 2.04 2.04 time time T2 right so this equations is shown uh in The Matrix same equation is shown in the Matrix so in The Matrix actually the equation was uh T the equation uh the the equation was T1 so actually is divide by 2.04 uh you we can divide this equation by 2.04 so 1/ 2.04 T1 minus T2 t2+ T3 and8 / 2.04 2.04 okay so this equation may be uh also expressed in Matrix okay so 13 equations is expressed in uh Matrix form so to solve this uh so let's say the co coefficients uh is uh Matrix a and temperature 1 uh 13x 1 Matrix and B another 13 by1 Matrix to solve this we can multiply inverse of a matrix a on both sides right so we can get temperature T1 through t113 so we just need to get the inverse Matrix and multiply it on both sides here I'm going to show you how to solve the inverse Matrix calculations using Excel so first we can plug off inverse Matrix a and type a matrix inverse and select the Matrix that we'd like to take inverse and um press shift control and enter and you see um it automatically fill out the inverse Matrix and now we are going to multiply uh inverse Matrix uh with the temperature T so you can block off uh the temperature that we are going to acquire and type uh Matrix multipli ation and we want to multiply inverse Matrix with temperature then and press shift control and enter and this is the temperature from T1 through t13 so uh this problem can be solved uh with Excel and the second way to solve this is to use a numerical method so there are different software uh or different programming language uh that you we uh we may use like a c or fortron uh python or any other prog Pro programming language may be used but just for a demonstration purpose I'm going to use Excel um so here the it's exactly the same problem um so here I actually showed uh the distance this is the distance of the Nole points so since we have a 13 no points it has a 13 cell so this is T1 T2 so the green one T3 T4 red one on T4 blue on T5 right and this on the very right hand side 60 this is t113 okay so each cell represent the no point so T1 is 100° C um and T T1 is actually the value is already given 100° C t13 60 C so we don't need to plug in any uh equation and T2 so T2 what is T2 so go back to our note and what was T2 so T2 is T1 + T3 +8 / 2.04 T3 T2 + T4 so neighboring temperature +8 / by 2.04 so same format from T2 to T12 right T12 is t11 + t13 +8 / 2.04 so we plug in the no equations for T2 so T2 is what c9+ E9 9 C9 is T1 E9 is T3 +8 / 2.04 right so the same equation goes to T3 so if you just copy the equations and drag the same equations up to T12 right they are all the same equation so you can just copy and paste face the equation and then it will automatically you see the T12 T12 is m 9 M9 is T10 o9 is t13 +8 / 2.04 and so we just need to plug in equation for T2 and just copy and paste the equations uh up to to T12 since they are all the same uh equations uh interior noes full size so here actually this graph shows the temperature distribution along the fin T1 through T 13 so you know the advantage of using uh numerical method is you know when you do the parametric study you can easily um uh find the you can get the result very quick so let's say the surface temperature is not 100 but instead it's 120 then you just change the surface temperature and then it give you the result immediately let's say 150 and you see the update of the graph and tables almost immediately and you can also change the fin tip temperature instead of 60 let's say 30 you can see how the temperature distribution look like along the fin uh let's say it's uh 40 right in base temperature 200° C we can get the result almost immediately so so we have 133 no points we can actually uh change the number of no points as we wish if we have more no points it just take more comp computation time or it takes more uh computation resource but the you know we can get the result very conveniently uh very fast so this is a one-dimensional uh stady stage uh numerical method uh problems uh so compared to so let's compare the amical analytical solution and numerical solution so in the analytical Solutions we solve the ordinary differential equations well if it's a Trent heat conduction problems it's a partial differential equation so we need the appropriate boundary condition to solve the analytical solution in numerical Solutions uh we had a series of algebraic algebraic equations and solve them simultaneously uh using a numerical method so we get the noal equations and solve them um using um uh numerical method so next the we don't actually see what's going on behind the calculations so in using Excel but actually it use a uh iterative method so to get the final result until the value converges um so resulting temperature of analytical solution is in function of X or XY if it's two Dimension if it three dimension XYZ or if it's also function of temperature uh time then it will be txt or txy t or txy CT and the resulting temperature uh by the numerical solution will be discrete temp points so we get the temperature at discrete points loer Point how many it depends on how many loader points we have T1 through T3 then we will have a 13 uh temperature if we have uh we could have uh like 100 no points uh for the same problems then we will have 10 um temperatures solution is exact for analytical Solutions so uh but uh in numerical Solutions we what we get is the approximate Solutions against to improve the accuracies uh we can minimize the Distance by increasing the number of no points if a tent we can also minimize the temperature uh sorry time step okay so this is a onedimensional uh heat conduction problem using numerical method uh we are going to study two dimensional problems uh in next video