CHAPTER 01.01: INTRODUCTION TO NUMERICAL METHODS Mathematical Procedures: Part 2 of 2
In this segment we will continue to talk about the mathematical procedures for which numerical methods are required to be used. In the last segment we talked about nonlinear equations, differentiation, simultaneous linear equations and interpolation. And in this segment we are going to talk about how do we use numerical methods to do approximation of these mathematical procedures by using numerical methods.
So, let's go and see some examples so that we can figure out how numerical methods are used for these different procedures. Now, look at this example here. We are given the thermal expansion coefficient data for cast steel and you are given the thermal expansion coefficient for as a function of temperature. As you can see from the data points which are given to you, that the thermal expansion coefficient decreases with a decrease in temperature. So what we would like to do is to maybe get some relationship between the thermal expansion coefficient, alpha, and the temperature and try to see that whether we can come up with a simple formula for alpha vs temperature. So, in order to be able to do that what we resort to is something called regression, where we try to get an approximate curve which goes, which doesn't go through the data, but approximates the data itself, which will be evident in the next one. Here you are finding out that what we have done is that we have taken a straight line approximation, so we are trying to best fit alpha vs temperature data which you saw in the pervious graph by this particular straight line here. So now you got to understand that it doesn't mean that every time you have data which is given to you then you have to draw a straight line. It is quite possible that maybe a second order polynomial other than the first order polynomial which you saw before will be a better approximation of this particular data. So those are the kind of things which you are going to learn when we talk about regression in numerical methods for regression.
Let's go to the next mathematical procedure which is integration. So you have taken a whole course on integral calculus. Now, why do we need to do numerical approximations of integrals? This is another example here, so let's suppose you have a steel shaft and you are putting it from room temperature into liquid nitrogen. So you want to be able to find out what is the contraction in the diameter. So this is the diameter of the shaft let's suppose, and you want to find out what is the change in diameter of that particular shaft. Now as you can see from the data itself here that you have alpha as a function of temperature and alpha is not a constant function of temperature. As you decrease temperature alpha also decreases, so you cannot simply use your typical physics formula where you say delta D is equal to D times alpha times delta T. And the reason why you cannot do that is because this alpha is assumed to be a constant in this particular formula here. But as you can see from the graph itself that your alpha is not a constant. It is varying as a function of temperature, hence you have to use this particular formula to be able to calculate what your delta D is. So how would you calculate delta D? One way of doing it is since we are trying to figure out what is the area under the curve of alpha vs temperature. What you will do is, you will simply say ok hey, what I am going to do is I am going to draw some trapezoids like this here and that's the way I am going to find out the area under the curve. So you are just drawing these trapezoids between the various data points that are given to you. So what you will do is you will take this area, you will take this area, you will take this area of these trapezoids which you have. And what you are going to do is you are going to add all these areas and that is going to, this particular area here is going to give you the integral of alpha(dT). And, of course, what you have to do is from room temperature, let's suppose room temperature is given as 80 degrees Fahrenheit, liquid nitrogen temperature is given as minus 320 degrees Fahrenheit let's suppose. So this is what's going to give you the integral of the alpha under the curve. So that's what is going to give you this part of the integral, so you are basically approximating this integral by adding all these trapezoids. And then you multiply by the diameter and you get what the change in diameter is.
Okay, so this is the next one. The next one, we have ordinary differential equations. We want to be able to figure out how long does a, let's suppose a steel shaft which has been put into liquid nitrogen, this is what you are seeing here is that you have a steel shaft which has been put into liquid nitrogen so that it contracts, and we want to be able to figure out that hey, if we are putting it in liquid nitrogen, how long is it going to take to reach steady state? So in that case what we have to do is we resort to a simple first order differential equation which __ this cooling here. So it is a simplifed, one dimensional, view of it. So, m is the mass of the trunnion, c is the specific heat of the trunnion, theta is the temperature of the trunnion, h is the convection coefficient of liquid nitrogen with steel and then a is the cross sectional area which, the surface area, which is in contact with the liquid nitrogen. Theta here is the ambient temperature and this is the initial condition because your, the steel shaft is at room temperature to begin wtih. So in order to be able to do this, this seems to be that this is an ordinary differential equation which can be solved exactly. But how would, if you take a course in heat transfer you will find out that h, which is the convection coefficient, is actually not a constant function. So, it's not a constant so it is a function of temperature itself so you can see that this can result in a differential equation which you cannot solve by your regular classical solution techniques where you find the homogeneous part and particular part or if you take the Laplace Transform or separation by parts and things like that. So you may have to resort to numerical methods to be able to figure out what is the temperature as a function of time. So you are basically looking for what is the temperature vs time profile so that you can figure out what the time is when this temperature here reaches some steady state when you dip it in liquid nitrogen.
So these are some of the examples which you are seeing of mathematical procedures where we have to use numerical methods. And that's the end of this segment. |