ebook img

Advanced Numerical Methods with Matlab 2: Resolution of Nonlinear, Differential and Partial Differential Equations PDF

211 Pages·2018·4.24 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 Advanced Numerical Methods with Matlab 2: Resolution of Nonlinear, Differential and Partial Differential Equations

Advanced Numerical Methods with Matlab® 2 Mathematical and Mechanical Engineering Set coordinated by Abdelkhalak El Hami Volume 7 Advanced Numerical ® Methods with Matlab 2 Resolution of Nonlinear, Differential and Partial Differential Equations Bouchaib Radi Abdelkhalak El Hami First published 2018 in Great Britain and the United States by ISTE Ltd and John Wiley & Sons, Inc. Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case of reprographic reproduction in accordance with the terms and licenses issued by the CLA. Enquiries concerning reproduction outside these terms should be sent to the publishers at the undermentioned address: ISTE Ltd John Wiley & Sons, Inc. 27-37 St George’s Road 111 River Street London SW19 4EU Hoboken, NJ 07030 UK USA www.iste.co.uk www.wiley.com © ISTE Ltd 2018 The rights of Bouchaib Radi and Abdelkhalak El Hami to be identified as the authors of this work have been asserted by them in accordance with the Copyright, Designs and Patents Act 1988. Library of Congress Control Number: 2018934991 British Library Cataloguing-in-Publication Data A CIP record for this book is available from the British Library ISBN 978-1-78630-293-9 Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Part1.SolvingEquations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter1.SolvingNonlinearEquations . . . . . . . . . . . . . . . . . . 3 1.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2.Separatingtheroots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.Approximatingaseparatedroot . . . . . . . . . . . . . . . . . . . . . . 4 1.3.1.Bisectionmethod(ordichotomymethod). . . . . . . . . . . . . . . 4 1.3.2.Fixed-pointmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.3.Firstconvergencecriterion . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.4.Iterativestoppingcriteria . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.5.Secondconvergencecriterion(localcriterion) . . . . . . . . . . . . 9 1.3.6.Newton’smethod(orthemethodoftangents) . . . . . . . . . . . . 10 1.3.7.Secantmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.3.8.Regulafalsimethod(orfalsepositionmethod) . . . . . . . . . . . . 17 1.4.Orderofaniterativeprocess . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5.1.Findingtherootsofpolynomials. . . . . . . . . . . . . . . . . . . . 19 1.5.2.Bisectionmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.5.3.Newton’smethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Chapter2.NumericallySolvingDifferentialEquations . . . . . . . . . 25 2.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.2.Cauchyproblemanddiscretization . . . . . . . . . . . . . . . . . . . . 27 2.3.Euler’smethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.1.Interpretation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.3.2.Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 vi AdvancedNumericalMethodswithMatlab2 2.4.One-stepRunge–Kuttamethod . . . . . . . . . . . . . . . . . . . . . . . 31 2.4.1.Second-orderRunge–Kuttamethod . . . . . . . . . . . . . . . . . . 32 2.4.2.Fourth-orderRunge–Kuttamethod . . . . . . . . . . . . . . . . . . 33 2.5.Multi-stepAdamsmethods . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.5.1.OpenAdamsmethods . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.5.2.ClosedAdamsformulas. . . . . . . . . . . . . . . . . . . . . . . . . 39 2.6.Predictor–Correctormethod . . . . . . . . . . . . . . . . . . . . . . . . 41 2.7.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Part2.SolvingPDEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Chapter3.FiniteDifferenceMethods . . . . . . . . . . . . . . . . . . . . 49 3.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.2.Presentationofthefinitedifferencemethod. . . . . . . . . . . . . . . . 51 3.2.1.Convergence,consistencyandstability . . . . . . . . . . . . . . . . 53 3.2.2.Courant–Friedrichs–Lewycondition . . . . . . . . . . . . . . . . . 56 3.2.3.VonNeumannstabilityanalysis . . . . . . . . . . . . . . . . . . . . 57 3.3.Hyperbolicequations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.3.1.Keyresults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.3.2.Numericalschemesforsolvingthetransport equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.3.3.Waveequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.3.4.Burgersequation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.4.Ellipticequations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.4.1.Poissonequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 3.5.Parabolicequations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.5.1.Heatequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3.6.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Chapter4.FiniteElementMethod . . . . . . . . . . . . . . . . . . . . . . 83 4.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.2.One-dimensionalfiniteelementmethods . . . . . . . . . . . . . . . . . 83 4.3.Two-dimensionalfiniteelementmethods . . . . . . . . . . . . . . . . . 88 4.4.Generalprocedureofthemethod . . . . . . . . . . . . . . . . . . . . . 93 4.5.Finiteelementmethodforcomputingelasticstructures . . . . . . . . . 93 4.5.1.Linearelasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.5.2.Variationalformulationofthelinearelasticity problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 4.5.3.Planarlinearelasticityproblems . . . . . . . . . . . . . . . . . . . . 99 4.5.4.Applyingthefiniteelementmethodtoplanar problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.5.5.Axisymmetricproblems . . . . . . . . . . . . . . . . . . . . . . . . 105 4.5.6.Three-dimensionalproblems . . . . . . . . . . . . . . . . . . . . . . 107 Contents vii 4.6.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 4.6.1.SolvingPoisson’sequation . . . . . . . . . . . . . . . . . . . . . . . 108 4.6.2.Solvingtheheatequation . . . . . . . . . . . . . . . . . . . . . . . . 111 4.6.3.Computingstructures . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Chapter5.FiniteVolumeMethods . . . . . . . . . . . . . . . . . . . . . . 117 5.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5.2.Finitevolumemethod(FVM) . . . . . . . . . . . . . . . . . . . . . . . 118 5.2.1.Conservationpropertiesofthemethod . . . . . . . . . . . . . . . . 118 5.2.2.Thestagesofthemethod . . . . . . . . . . . . . . . . . . . . . . . . 119 5.2.3.Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.2.4.Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.2.5.Stability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.3.Advectionschemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.3.1.Two-dimensionalFVM . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.3.2.Convection-diffusionequation . . . . . . . . . . . . . . . . . . . . . 129 5.3.3.Centraldifferencingscheme . . . . . . . . . . . . . . . . . . . . . . 131 5.3.4.Upwind(decentered)scheme. . . . . . . . . . . . . . . . . . . . . . 133 5.3.5.Hybridscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 5.3.6.Power-lawscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 5.3.7.QUICKscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 5.3.8.Higher-orderschemes . . . . . . . . . . . . . . . . . . . . . . . . . . 139 5.3.9.Unsteadyone-dimensionalconvection-diffusion equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.3.10.Explicitscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 5.3.11.Crank–Nicolsonscheme. . . . . . . . . . . . . . . . . . . . . . . . 142 5.3.12.Implicitscheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 5.4.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Chapter6.MeshlessMethods . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6.2.LimitationsoftheFEMandmotivationofmeshless methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 6.3.Examplesofmeshlessmethods . . . . . . . . . . . . . . . . . . . . . . 148 6.3.1.Advantagesofmeshlessmethods . . . . . . . . . . . . . . . . . . . 149 6.3.2.Disadvantagesofmeshlessmethods . . . . . . . . . . . . . . . . . . 150 6.3.3.Comparisonofthefiniteelementmethod andmeshlessmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.4.Basisofmeshlessmethods . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.4.1.Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.4.2.Kernel(weight)functions. . . . . . . . . . . . . . . . . . . . . . . . 152 6.4.3.Completeness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 6.4.4.Partitionofunity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 viii AdvancedNumericalMethodswithMatlab2 6.5.Meshlessmethod(EFG) . . . . . . . . . . . . . . . . . . . . . . . . . . 153 6.5.1.Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 6.5.2.MovingLeast-SquaresApproximation . . . . . . . . . . . . . . . . 153 6.6.Applicationofthemeshlessmethodtoelasticity . . . . . . . . . . . . . 163 6.6.1.Formulationofstaticlinearelasticity . . . . . . . . . . . . . . . . . 163 6.6.2.Imposingessentialboundaryconditions. . . . . . . . . . . . . . . . 165 6.7.Numericalexamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.7.1.Fixed-freebeam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.7.2.Compressedblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.8.UsingMatlab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Part3.Appendices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Appendix1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Appendix2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Preface Most physical problems can be expressed in the form of mathematical equations (e.g. differential equations, integral equations). Historically, mathematicians had to findanalyticsolutionstotheequationsencounteredinengineeringandrelatedfields (e.g. mechanics, physics, biology). These equations are sometimes highly complex, requiring significant work to be simplified. However, in the mid-20th Century, the introduction of the first computers gave rise to new methods for solving equations: numerical methods. This new approach allows us to solve the equations that we encounter(whenconstructingmodels)asaccuratelyaspossible,therebyenablingus to approximate the solutions of the problems that we are studying. These approximate solutions are typically calculated by computers using suitable algorithms. Practicalexperiencehasshownthat,comparedtostandardnumericalapproaches, a carefully planned and optimized methodology can improve the speed of computation by a factor of 100 or even higher. This can transform a completely unreasonable calculation into a perfectly routine computation, hence our great interest in numerical methods! Clearly, it is important for researchers and engineers to understand the methods that they are using and, in particular, the limitations and advantages associated with each approach. The computations needed by most scientific fields require techniques to represent functions as well as algorithms to calculatederivativesandintegrals, solvedifferentialequations, locatezeros, findthe eigenvectorsandeigenvaluesofamatrix,andmuchmore. The objective of this book is to present and study the fundamental numerical methods that allow scientific computations to be executed. This involves implementing a suitable methodology for the scientific problem at hand, whether derived from physics (e.g. meteorology, pollution) or engineering (e.g. structural mechanics,fluidmechanics,signalprocessing). x AdvancedNumericalMethodswithMatlab2 This book is divided into two parts, with two appendices. The first part contains twochaptersdedicatedtosolvingnonlinearequationsanddifferentialequations.The secondpartconsistsoffourchaptersonthevariousnumericalmethodsthatareusedto solve partial differential equations: finite differences, finite elements, finite volumes andmeshlessmethods. Each chapter starts with a brief overview of relevant theoretical concepts and definitions, with a range of illustrative numerical examples and graphics. At the end of each chapter, we introduce the reader to the various Matlab commands for implementing the methods that have been discussed. As is often the case, practical applications play an essential role in understanding and mastering these methods. Thereislittlehopeofbeingabletoassimilatethemwithouttheopportunitytoapply themtoarangeofconcreteexamples.Accordingly,wewillpresentvariousexamples and explore them with Matlab. These examples can be used as a starting point for practicalexploration. Matlabiscurrentlywidelyusedinteaching,industryandresearch.Ithasbecome astandardtool invariousfields thanksto itsintegratedtoolboxes(e.g.optimization, statistics, control, image processing). Graphical interfaces have been improved considerably in recent versions. One of our appendices is dedicated to introducing readerstoMatlab. BouchaibRADI AbdelkhalakELHAMI March2018

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.