ebook img

Numerical and Analytical Methods with MATLAB PDF

488 Pages·2009·12.76 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Numerical and Analytical Methods with MATLAB

NUMERICAL AND ANALYTICAL METHODS WITH MATLAB® 93568_Book.indb 1 7/22/09 10:27:59 AM CRC Series in COMPUTATIONAL MECHANICS and APPLIED ANALYSIS Series Editor: J.N. Reddy Texas A&M University Published Titles ADVANCED THERMODYNAMICS ENGINEERING Kalyan Annamalai and Ishwar K. Puri APPLIED FUNCTIONAL ANALYSIS J. Tinsley Oden and Leszek F. Demkowicz COMBUSTION SCIENCE AND ENGINEERING Kalyan Annamalai and Ishwar K. Puri EXACT SOLUTIONS FOR BUCKLING OF STRUCTURAL MEMBERS C.M. Wang, C.Y. Wang, and J.N. Reddy THE FINITE ELEMENT METHOD IN HEAT TRANSFER AND FLUID DYNAMICS, Second Edition J.N. Reddy and D.K. Gartling MECHANICS OF LAMINATED COMPOSITE PLATES AND SHELLS: THEORY AND ANALYSIS, Second Edition J.N. Reddy NUMERICAL AND ANALYTICAL METHODS WITH MATLAB® William Bober, Chi-Tay Tsai, and Oren Masory PRACTICAL ANALYSIS OF COMPOSITE LAMINATES J.N. Reddy and Antonio Miravete SOLVING ORDINARY and PARTIAL BOUNDARY VALUE PROBLEMS in SCIENCE and ENGINEERING Karel Rektorys 93568_Book.indb 2 7/22/09 10:27:59 AM CRC Series in COMPUTATIONAL MECHANICS and APPLIED ANALYSIS NUMERICAL AND ANALYTICAL METHODS WITH MATLAB® WILLIAM BOBER CHI-TAY TSAI OREN MASORY Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Group, an informa business 93568_Book.indb 3 7/22/09 10:27:59 AM MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB® soft- ware or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB® software. CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2009 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20131120 International Standard Book Number-13: 978-1-4200-9357-5 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit- ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Contents Preface ............................................................................................................xi Acknowledgments .........................................................................................xv Authors ........................................................................................................xvii 1 Numerical Modeling for Engineering ....................................................1 1.1 Computer Usage in Engineering ........................................................1 1.1.1 Importance of the Computer ................................................1 1.1.2 Computer Usage ...................................................................1 1.2 The Mathematical Model ..................................................................2 1.3 Computer Programming ...................................................................2 1.4 Preparing a Computer Program .........................................................3 1.5 Recommended Procedures for Writing a Program .............................3 1.6 Building Blocks in Writing a Program ...............................................3 2 MATLAB Fundamentals ........................................................................5 2.1 Introduction ......................................................................................5 2.1.1 The MATLAB Windows ......................................................5 2.2 Constructing a Program in MATLAB...............................................8 2.3 The MATLAB Program ....................................................................8 2.4 Program Examples ...........................................................................18 2.5 Debugging a Program......................................................................26 2.6 3-D and Contour Plots ....................................................................28 Projects ......................................................................................................29 References .................................................................................................44 3 Matrices ................................................................................................45 3.1 Matrix Operations ...........................................................................45 3.2 System of Linear Equations .............................................................48 3.2.1 The inv Function ................................................................49 3.2.2 The Gauss Elimination Function ........................................49 3.2.3 Examples ............................................................................50 v 93568_Book.indb 5 7/22/09 10:28:00 AM vi ◾ Contents 3.3 Gauss Elimination ...........................................................................55 3.4 The Gauss–Jordan Method ..............................................................61 3.5 Number of Solutions .......................................................................63 3.6 Inverse Matrix ................................................................................64 3.7 The Eigenvalue Problem ..................................................................68 Exercises .....................................................................................................72 Projects ......................................................................................................72 Reference ...................................................................................................76 4 Roots of Algebraic and Transcendental Equations ...............................77 4.1 The Search Method ........................................................................77 4.2 Bisection Method ...........................................................................77 4.3 Newton–Raphson Method ..............................................................79 4.4 The fzero Function ..........................................................................80 4.4.1 Example Programs .............................................................84 Projects ......................................................................................................83 Reference ...................................................................................................93 5 Numerical Integration ..........................................................................95 5.1 Numerical Integration and Simpson’s Rule ......................................95 5.2 Improper Integrals ...........................................................................98 5.3 MATLAB’s Quad Function...........................................................100 5.4 MATLAB’s DBLQUAD Function ................................................101 Exercises ...................................................................................................102 Projects ....................................................................................................103 6 Numerical Integration of Ordinary Differential Equations ...............105 6.1 The Initial Value Problem ..............................................................105 6.2 The Fourth-Order Runge–Kutta Method ......................................107 6.3 System of Two First-Order Equations ............................................108 6.4 A Single Second-Order Equation ...................................................108 6.5 MATLAB’s ODE Function ...........................................................110 6.6 Ordinary Differential Equations That Are Not Initial Value Problems ...................................................................112 6.7 Solution of a Tri-Diagonal System of Linear Equations .................112 6.8 Difference Formulas ......................................................................115 6.9 Deflection of a Beam .....................................................................118 Projects ....................................................................................................121 7 Simulink .............................................................................................141 7.1 Introduction ..................................................................................141 7.2 Creating a Model in Simulink .......................................................141 7.3 Typical Building Blocks in Constructing a Model .........................143 93568_Book.indb 6 7/22/09 10:28:00 AM Contents ◾ vii 7.4 Constructing and Running the Model ..........................................146 7.5 Constructing a Subsystem .............................................................146 7.6 Using the mux and fcn Blocks .......................................................146 7.7 The Relay Block .............................................................................148 7.8 The Switch Block ...........................................................................149 7.9 Trigonometric Function Blocks .....................................................150 Projects ....................................................................................................152 8 Curve Fitting ......................................................................................155 8.1 Curve-Fitting Objective .................................................................155 8.2 Method of Least Squares ...............................................................155 8.3 Curve Fitting with the Exponential Function ................................158 8.4 MATLAB’s Curve-Fitting Function ..............................................160 8.5 Cubic Splines .................................................................................162 8.6 The Function Interp1 for Cubic Spline Curve Fitting ....................164 8.7 Curve Fitting with Fourier Series ..................................................164 Projects ....................................................................................................167 9 Optimization ......................................................................................171 9.1 Introduction ..................................................................................171 9.2 Unconstrained Optimization Problems .........................................172 9.3 Method of Steepest Descent ..........................................................173 9.4 Optimization with Constraints .....................................................176 9.5 MATLAB’s Optimization Function ..............................................178 Exercises ...................................................................................................182 Projects ....................................................................................................182 Reference .................................................................................................186 10 Partial Differential Equations ............................................................187 10.1 The Classification of Partial Differential Equations .......................187 10.2 Solution by Separation of Variables................................................188 10.2.1 The Vibrating String .........................................................188 10.2.2 Unsteady Heat Transfer I (Bar) .........................................192 10.2.3 Unsteady Heat Transfer II (Cylinder) ...............................199 10.3 Unsteady Heat Transfer in 2-D ....................................................206 10.4 Perturbation Theory and Sound Waves ..........................................211 10.5 Review of Finite Difference Formulas ............................................217 10.6 Example of Applying Finite Difference Methods to Partial Differential Equations ...................................................................217 10.6.1 The Explicit Method .........................................................218 10.6.2 The Implicit Method .......................................................220 Projects ....................................................................................................221 93568_Book.indb 7 7/22/09 10:28:00 AM viii ◾ Contents 11 Iteration Method ................................................................................233 11.1 Iteration in Pipe Flow Analysis ......................................................233 11.2 The Gauss–Seidel Method .............................................................235 11.3 The Hardy–Cross Method .............................................................238 Projects ....................................................................................................241 References ................................................................................................248 12 Laplace Transforms ............................................................................249 12.1 Laplace Transform and Inverse Transform ....................................249 12.2 Transforms of Derivatives ..............................................................256 12.3 Ordinary Differential Equations, Initial Value Problem ................257 12.4 A Shifting Theorem ......................................................................260 12.5 The Unit Step Function .................................................................263 12.6 Laplace Transform of the Unit Step Function ...............................264 12.7 Convolution .................................................................................268 12.8 Laplace Transforms Applied to Partial Differential Equations .......271 12.9 Laplace Transforms and Complex Variables ..................................276 12.9.1 Residues and Poles ............................................................278 Exercises ...................................................................................................281 References ................................................................................................282 13 An Introduction to the Finite Element Method .................................283 13.1 Finite Element Method for Stress Analysis ....................................283 13.2 Structural Mechanics Plane Stress Analysis ...................................283 13.3 The Shape Function for a Linear Triangle Element ........................288 13.3.1 3-Node Triangular Element for 2-D Stress Analysis .........290 13.3.2 Shape Function in Area Coordinates ................................291 13.3.3 Finite Element Formulation Using Triangular Elements ...........................................................................292 13.4 Finite Element Analysis Using MATLAB’s PDE Toolbox .............299 13.5 Structural Mechanics Plane Strain Analysis ..................................320 13.6 Model Analysis of 2-D Structures .................................................321 13.7 Finite Element Analysis for Heat Transfer .....................................325 Projects ....................................................................................................339 References ................................................................................................341 14 Control Systems .................................................................................343 14.1 Introduction .................................................................................343 14.2 Representation of Systems in MATLAB .......................................346 14.2.1 Transfer Function Representation ....................................348 14.2.2 Zero-Pole-Gain Format of Transfer Function Representation ..................................................................350 14.2.3 State Space Representation ...............................................352 93568_Book.indb 8 7/22/09 10:28:01 AM Contents ◾ ix 14.3 Closed-Loop Systems .....................................................................355 14.3.1 DC Motor Modeling ........................................................355 14.3.2 Block Diagrams ................................................................357 14.3.3 MATLAB Tools for Defining the Closed-Loop System ....358 14.4 MATLAB Tools for the Performance Analysis of Closed-Loop Systems .................................................................361 14.4.1 Root Locus Plots...............................................................361 14.4.2 Nyquist Plots ....................................................................363 14.5 MATLAB’s SISOtool ....................................................................367 14.5.1 Example to Be Used with SISOtool ..................................367 14.5.2 SISOtool Main Features ...................................................370 14.5.3 Using SISOtool to Design the Controller for Example at Beginning of This Section .............................................371 14.6 Application of Simulink in Controls and Dynamic Systems ..........377 14.6.1 Example of Control of the Fluid Level in Coupled Tanks ................................................................................377 14.6.2 Design of a Feed-Forward Loop Using Optimality Criteria .............................................................................385 14.6.3 Active Suspension .............................................................391 14.6.4 Sampled Data Control System ..........................................394 14.6.5 Implementation of ADC and DAC in Simulink ...............397 14.7 Simulink’s Data Acquisition Toolbox ............................................405 14.7.1 Analog Input ...................................................................406 14.7.2 Analog Output .................................................................407 14.7.3 Digital Input....................................................................408 14.7.4 Digital Output ................................................................408 Projects ....................................................................................................412 Endnotes ..................................................................................................417 Appendix A ..................................................................................................419 Appendix B ..................................................................................................423 Appendix C .................................................................................................429 Index ...........................................................................................................439 93568_Book.indb 9 7/22/09 10:28:01 AM

Description:
Numerical and Analytical Methods with MATLAB® presents extensive coverage of the MATLAB programming language for engineers. It demonstrates how the built-in functions of MATLAB can be used to solve systems of linear equations, ODEs, roots of transcendental equations, statistical problems, optimi
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.