Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) Usig Spreadsheets as a Computatioal Tool i Teachig Mechaical Egieerig AHMADI-BROOGHANI, ZAHRA Computer Egieerig Departmet The Uiversity of Birjad Birjad, Ira IRAN zahmadi@birjad.ac.ir or ahmadi.zahra@gmail.com Abstract: - Today computer is a powerful tool for research ad educatio i may fields, which ca be used by researcher ad teachers. Oe of the software which is used for iterative ad iteractive calculatio is the Spreadsheet software Excel. However the software was desiged for office applicatio but it has may computatioal features for egieerig aalysis. I this paper three case studies have bee preseted which show the capabilities of the metioed software to teach the Mechaical Egieerig studets. I the first case study the Excel s capability i a beam aalysis uder loadig has bee show. I the secod case study shape optimizatio of a rod uder tesile force has bee preseted. Fially a case study has bee preseted that shows the facility of Excel i real time calculatio ad dyamics problems. By these case studies it has bee show that use of the spreadsheet i educatio have may advatages that ca be used to teach studet complicated material i a simple way. Key-Words: Spreadsheet - Egieerig educatio - Computer aided learig - Computer aided teachig Computer based learig Itroductio Researchers i egieerig ad sciece fields use the computer as a tool for fast ad accurate computatios. May softwares ad programmig laguages have bee desiged ad produced to help researchers i doig their tasks more effective. The spreadsheet software of Ms Excel is oe of these softwares. The software has bee desiged for office use ad less bee oticed by egieers ad scietist for their complicated computatios. The Excel software has some features which ca be used for egieerig aalysis, ad the graphical facility ca be used to visualise the results of computatios. The author used these features i her courses ad may problems has bee aalysed by her. Some of these case studies have bee preseted here. The spreadsheet is used to teach the advaced ad itroductory umerical methods for some times [- 8]. Clemet used spreadsheets to teach the liear algebra [] ad umerical solutio of partial differetial equatios usig fiite differece method (FDM) []. Davies [3] ivestigated the partial differetial equatio goverig the heat ad wave equatio i spreadsheets. It has bee show by [3-6] that spreadsheet is a powerful tool i teachig FDM. It has bee used for teachig more advaced methods like fiite elemet Method [7] ad boudary elemet methods [8] too. Usig the high level programmig laguage, like FORTRAN or C, to teach a method i egieerig educatio may udermie the mai purpose of teachig which the method itself is. However for those people who are familiar with the programmig laguages this is ot the case. But the time savig of the programmig is still a advatage. For this reaso usig computer software which has the ability of doig complicated calculatio ad at the same time it is easy to use seems to be ecessary i teachig. Besides sometime oe eeds to test a idea or algorithm, i that case he/she must prepare a big computer code with may problems i ruig the Program ad the coclude if the algorithm or idea is ok to use or ot. I the other had, oe ca test the idea or algorithm usig Excel s fuctios ad its facility. If the result is satisfactory the the programmig stage ca be doe. There are some advatages i usig the spreadsheets software for egieerig educatio:
Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) The graphical facility to show the results It is possible to show the aimatios ad real time chages i results There is o eed to write a big computer program for a algorithm, sice the spreadsheet itself has some features which ca be used. To test a algorithm i actio, there is o eed to write a complicated program. Oe ca test his/her algorithm usig Excel. Usually the spreadsheet is istalled i most ew computers ad there is o eed to buy or fid a compiler. The Solver ad Goal Seekig tools i spreadsheet Excel ca perform optimizatio jobs. Based o the advatages of usig the spreadsheets i egieerig educatio, author has used the spreadsheet i her lectures as a meas to teach more effective. I this paper three case studies out of these applicatios have preseted here which are maily the mechaical egieerig applicatios. Case studies:. Case study : Usig spreadsheets i beam theory I this case study the spreadsheet Excel has bee used to fid the shear forces ad bedig momet of beams uder distributed ad poit loads. The the beam deflectio is calculated. The material ad sectioal properties of beam assumed to be costat. To calculate the bedig momet ad shear force the beam is divided to small elemets. It is assumed that the distributed load is varyig liearly over each elemet. For each elemet of the beam the equilibrium coditios have bee applied. Therefore the shear force at the ed poit of each elemet ca be calculated. Figure () shows the forces ad bedig momets applied o a elemet of the beam betwee x ad x +. The shear force ad bedig momet is calculated as: ( x x ) ( w+ + w ) + V+ = V+ () M + + V( x+ x) ( ) ( x ) + x w + w = M + + 6 () If a poit load or momet is applied o each elemet of the beam their effect ca be cosidered. Each cell I the Excel spreadsheet ca be evaluated i terms of other cells. Coordiates of ed poits of each part, x, is stored o cells of a row. The distributed ad poit loads also ca be placed o aother two other rows. Equatio () ca be calculated i cell C (which is V + ) as: =B+C4+C8 B is referred as shear force, C4 poit load ad C8 distributed load (( w+ + w)( x+ x) ). The equatio () (M + ) is calculated i cell C as: =B+B*(C-B)+(*B6+C6)*(C-B)^/6-C5 Cells B, B, B6, C6, B ad C are M, V, w, w +, x ad x + respectively. Therefore i each positio x the shear force V ad bedig momet M ca be calculated. The graph of the calculated shear forces V ad bedig momet M agaist coordiate x ca be draw usig Excel graph. Figure shows the geometry ad the loadig of the beam as a example. The correspodig shear force ad bedig momet diagram is show i figure 3. If the loadig is chaged, oe ca see the ew diagram i real time. The beam goverig differetial equatio for the deformatio of beam is a secod order differetial equatio: EI y = M (3) For a simply supported beam, boudary coditio ca be writte as: M w V w + M + N/m N.m N x x + V + Fig. Forces ad momets o part of Beam 3m m m Fig. beam loadig
Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) 6.E + v... 3. 4. 5. 6. M & V 8 4 M -3.E -5 y -6.E -5 3 4 5 6-4 Fig. 3 Shear force ad Bedig Momet Diagram x -9.E -5 Fig. 4 Beam Deflectio x y() = y( l) = M () = M ( l) = (4) Usually the fiite elemet or fiite differece method is used to solve the equatio (3) with the boudary coditio (4). These methods lead to a system of liear equatios. Sice the object of this paper is the use of the spreadsheet i teachig, the differetial equatio is solved directly, i a maer like shootig method. I this method the bedig momet is itegrated twice. The results for y(x) does ot satisfy the boudary coditio (4) ad y(l) is ot zero. O the other had the itegratio assumes that y ( ) = which is ot true i geeral. To resolve the problem the Goal Seekig optio i Excel is used. The cell related to y(l) ca be set to zero by chagig the cell related to y () usig Goal Seekig optio. The trapezoidal itegratio is used to calculate C3, which is EI y +, as follow =(C+B)*(C-B)/+B3 Where cells B, C ad B3 are M, M + ad EI y respectively. The results obtaied for EI y is itegrated agai to obtai the EIy. They are stored i cells like C4. Beam deflectio is show i figure 4 for the loadig preseted i figure. The error obtaied by this method is less tha 5%, which is the trapezoidal itegratio error. As it ca be see i this case study a problem has bee aalyzed with the least programmig code, which if oe is goig to do the problem by programmig laguage it eeds at least tes lies of codig.. Case study : Optimal shape of a rod uder tesile loadig I this case study a rod has bee cosidered which is uder its ow weight ad aother exteral load. The objective of this case study is to show the capability of Excel i miimizatio problems. The problem is to miimize the weight of a rod ad at the same time the stresses do ot exceed a prespecified stress. The Solver facility i Excel is a powerful tool for optimizatio. A rod with circular cross sectio has bee cosidered which is uder its ow weight ad a exteral loadig. Figure 5 shows the rod cofiguratio ad a elemet of the rod. The force P + is applied o sectio y +. This force is: P + =P +W (5) Which the weight of the elemet is W, ad calculated as: W ( r + r )( y y ) π γ (6) = V = γ + + Stress i each sectio is the force i that sectio divided by its cross sectio: r + P σ = (7) π r y y + F r L P + P W Fig. 5 a) The rod uder weight ad ed load b) A elemet of the rod
Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) r 8 6 4 3 4 5 6 7 8 9 y Fig. 6 The spreadsheet of optimum shape Weight of the rod is the sum of all elemets weight. The radius of each sectio is chaged to fid the miimum weight of the rod: N ( W) mi mi = W (8) = The reductio i the weight ad radius icreases the stress i each sectio. A costrait is added to prevet the stresses ot to exceed the specified stress (e.g. allowable stress σ ). Therefore the al optimizatio costrait is: σ σ al (9) The stress is calculated i its related colum. The resultig calculatio is show i figure 6. The the Solver optio i Ms Excel is used to miimize the cell related to total weight. I Solver optio it is ecessary to specify the desig variable, i here it is the rod radiuses i each sectio, ad the costrait, i this case study it is maximum stress. Figure 7 shows the radiuses of the rod uder the ed poit loadig ad its weight after optimizatio process. Agai i this problem a very complicated egieerig problem, optimizatio, has bee preseted which eeds may programmig codes, but simply i here the solver facility of Excel has bee used. I this way the shape optimizatio Fig. 8 The third case study s cofiguratio θ r Fig. 7 Optimum radius of the case study theory ad approach ca be taught easily..3 Case study 3: Particle movig o specified path The Egieerig dyamics is related to particle ad bodies movemet. The studet ca realize the course easier if the aimatio of the body or particle has bee show. I this case study the motio of a particle o a specified path has bee preseted. I additio the velocity ad the acceleratio vectors at each time step have bee show. The particle positio coordiate is fuctio of the time. I a specified time the positio coordiates ad the velocity ad acceleratio of the particle ca be calculated. Thus oe ca draw the positio, velocity ad acceleratio vectors at ay time. Sice these vectors are calculated versus b= c= 75 α= ω = θ = t= 7.769394 ω = =B3*B6+B4 θ = =B3*B6^/+B4*B6+B5 r= =B-B*COS(B8) dr/dt= =B*B7*SIN(B8) d r/dt = =B*(B7^*COS(B8)+B3*SIN(B8)) v r = =B v θ = a r = =B9*B7 =B-B9*B7^ a θ = =B9*B3+*B*B7 x= =B9*COS(B8) y= =B9*SIN(B8) dx/dt= =B*COS(B8)-B3*SIN(B8) dy/dt= =B*SIN(B8)+B3*COS(B8) d x/dt = d y/dt = =B4*COS(B8)-B5*SIN(B8) =B4*SIN(B8)+B5*COS(B8) Fig. 9 Excel Worksheet of case study 3
Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) 5 5 - - -5 - -5 5 5 - - -5 - -5 Fig. The particle positio i two time step time, by chagig the time the calculated vectors also chages. Therefore if the time chages cotiuously the graph will show aimated vectors. For this case study a specified path has bee cosidered which is described as [9] r = b c cosθ () The problem cofiguratio has bee show i figure 8. Figure 9 shows the calculatios of the specified problem. I the first colum the ames of the variables are show, which have bee calculated i secod colum. I the secod colum the formula related to the variable has bee show which is started from cell B. All of the calculatios are performed i a Excel worksheet ad the results are show there. All the calculatios are versus the cell B6 which represet the time. If the B6 is chaged, for example by usig a macro, all the calculatios i the worksheet will chage. If a graph has bee draw usig the calculated cells, the by chagig the value of the time the graph will chage immediately. I the preset case study a macro has bee used to chage the cell B6 by a DO LOOP. Figure shows the resultig graph i two differet time step. All the drawig has bee doe usig simple graphs i Excel. The advatage ad simplicity of usig Excel has bee preseted i this case study. As well, it has bee show that the real time calculatio ca be preseted ad graphical aimatio or chages i result ca be show easily. 3 Coclusio As it has bee show i the case studies, it is possible to use the Excel spreadsheet to teach the studet i a simple way. Without udermiig the high level computer programmig which are ecessary for aalyzig real egieerig problem, the advatage of usig Excel is that it do ot eeds to write a big computer program to perform the calculatios i class or teachig. The Excel has good graphical facility which shows the results o real time. Refereces: []. Clemets R.R., Teachig topics i umerical liear algebra usig spreadsheets, It. J. Math. Educ. Sci. Tech., 99,, 3-7. []. Davies A.J., Usig spreadsheet to ivestigate models of heat coductio ad vibratig strigs, IMA J. Teachig Mathematics Applicatios, 993,, 79-85. [3]. Davies A.J., The spreadsheets as a vehicle for teachig ad learig udergraduate mathematics, i Proceedigs of the 7 th Aual Coferece o Techology i Collegiate Mathematics, 994,-5, Addiso-Wesley. [4]. Lam C-Y., Applied umerical methods for partial differetial equatios, Pretice Hall, 994. [5]. Clemets R.R., Illustratig fiite differece solutioss of PDEs ad soreadsheets, Maths ad stats, 995, 6, 8-. [6]. Davies A.J. ad Cra D., Usig spreadsheets to solve partial differetial equatios, Poceedigs of ICTCM8, Housto, USA, 995.
Proceedigs of the th WSEAS Iteratioal Coferece o COMPUTERS, Vouliagmei, Athes, Greece, July 3-5, 6 (pp35-3) [7]. Davies A.J., The fiite elemet methods o a spreadsheets, It. J. Math. Educ. Sci. Tech., 995. [8]. Davies A.J. ad Cra D., Teachig the BEM; the use of a spreadsheets, It. J. Math. Educ. Sci. Tech., 995. [9]. Meriam J.L. ad Kraige L.G., Egieerig Mechaics DYNAMICS, 4 th ed. Joh Wiley & Sos, Ic. 998.