Assignment 1.pdf - Assignment 1 AMME2000\/BMET2960 Engineering Analysis\/Biomedical Engineering 2 SID 480225063 Semester 1 2019 Tutorial Time Friday 9am

Assignment 1.pdf - Assignment 1 AMME2000/BMET2960...

This preview shows page 1 - 5 out of 26 pages.

Assignment 1AMME2000/BMET2960Engineering Analysis/Biomedical Engineering 2SID: 480225063Semester 1, 2019Tutorial Time: Friday 9am - 11amTutorial Room: Chem Eng Lecture Room 21
Background image
Contents1Taylor Series Approximations31.1First Derivative off(x). . . . . . . . . . . . . . . . . . . . . . . . . . . . .31.2Taylor Expansion of Difference Stencils. . . . . . . . . . . . . . . . . . . . .31.3Plotting Difference Stencils Compared to the AnalyticSolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51.4Euclidean Norm of Errors in Respect toΔx. . . . . . . . . . . . . . . . . .82Heat Equation using Fourier Series102.1Heat Equation ast→ ∞. . . . . . . . . . . . . . . . . . . . . . . . . . . .102.2Deriving the Temporal Solution and the Overall Solution toT(x, t). . . . .102.3Formulating the Final Solution ofT(x, t). . . . . . . . . . . . . . . . . . .112.4PlottingT(x, t)witht= 0andt= 0.1and Finding Time Within 10% ofthe Equilibrium atx= 0. . . . . . . . . . . . . . . . . . . . . . . . . . . .132.5Plotting Different and Finding Optimala. . . . . . . . . . . . . . . . . . .143Appendix163.1Appendix A: Matlab Code for Subsection 1.3. . . . . . . . . . . . . . . . . .173.2Appendix B: Matlab Code for Subsection 1.4 - Plotting the log-log plot ofL2-norm againstΔx. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193.3Appendix C: Matlab Code for Subsection 2.4 - PlottingT(x,0)andT(x,0.1)223.4Appendix D: Matlab Code for Subsection 2.4 - FindingtwhenT(0, t) =110% of the steady state. . . . . . . . . . . . . . . . . . . . . . . . . . . . .233.5Appendix E: Matlab Code for Subsection 2.5 - Plotting T(x,0.2) with varyinga243.6Appendix F: Matlab Code for Subsection 2.5 - Finding optimalasuch thattemperature reaches2oC beforet= 0.1s. . . . . . . . . . . . . . . . . . .252
Background image
1Taylor Series Approximations1.1First Derivative off(x)Sinceddxcos(2x) =-2 sin(2x)andddxsin(x)-12x2= cos(x)-xf(x) = cos(2x) (sin(x)-12x2)=f0(x) =ddxcos(2x)sin(x)-12x2+ cos(2x)ddxsin(x)-12x2=-2 sin(2x)sin(x)-12x2+ cos(2x)(cos(x)-x)= cos(2x)(cos(x)-x)-2 sin(2x)sin(x)-12x21.2Taylor Expansion of Difference StencilsFor simplicity, let’s allow the notationf(xi+n)fi+nsuch thatnZUsing Taylor Series expansion of the basic functions centered atx=xiup to the 5thderivativefi+1=fi+dfdxx=xiΔx+12!d2fdx2x=xix)2+13!d3fdx3x=xix)3+· · ·+15!d5fdx5x=xix)5(xi+1-xi= Δx)Similarly,fi-1=fi-dfdxx=xiΔx+12!d2fdx2x=xix)2-13!d3fdx3x=xix)3+· · · -15!d5fdx5x=xix)5(xi-1-xi=-Δx)fi+2=fi+dfdxx=xix+12!d2fdx2x=xi(2Δx)2+13!d3fdx3x=xi(2Δx)3+· · ·+15!d5fdx5x=xi(2Δx)5(xi+2-xi= 2Δx)3
Background image
fi+2=fi+ 2dfdxx=xiΔx+42!d2fdx2x=xix)2+83!d3fdx3x=xix)3+· · ·+325!d5fdx5x=xix)5Similarly,fi-2=fi+dfdxx=xi(-x)+12!d2fdx2x=xi(2Δx)2+13!d3fdx3x=xi(-x)3+· · ·+15!d5fdx5x=xi(-x)5(xi-2-xi=-x)fi-2=fi-2dfdxx=xiΔx+42!d2fdx2x=xix)2-83!d3fdx3x=xix)3+· · · -325!d5fdx5x=xix)5Computing the four point forward difference stencil1f+x(xi)-fi+2+ 6fi+1-3fi-2fi-1x=6dfdxx=xiΔx-124!d4fdx4x=xix)4-245!d5fdx5x=xix)5x=dfdxx=xi-x)312d4fdx4x=xi-x)430d5fdx5x=xi(1)Hence the leading order error for this stencil is denoted asO((Δx)3) =-x)312d4fdx4x=xiComputing the four point backward difference stencil1f-x(xi)2fi+1+ 3fi-6fi-1+fi-2x=6dfdxx=x
Background image
Image of page 5

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture