




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































Ekkehard Holzbecher Weierstraß-Institut für Angewandte Analysis und Stochastik (WIAS) Mohrenstr. 39 10117 Berlin Deutschland [email protected]
Library of Congress Control Number: 2007929736
ISBN 978-3-540-72936-5 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable for prosecution under the German Copyright Law.
Springer is a part of Springer Science+Business Media springer.com ©c (^) Springer-Verlag Berlin Heidelberg 2007 The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
Typesetting: by the author and Integra, India using a Springer LATEX macro package Cover design: deblik, Berlin Printed on acid-free paper SPIN: 11531234 5 4 3 2 1 0
Dedicated to my wife Susanne and my children Gesa and Gero
VIII Preface
I highly recommend this book to both beginners and expert environmental professionals. The book will be particularly useful to those scientists who have postponed the learning and using mathematical software. This book will open a new world to them!
Paolo Zannetti President, The EnviroComp Institute Editor of Book Series on Environmental Modeling
Foreword
The book has two aims:
A. to introduce basic concepts of environmental modeling and B. to exercise the application of current mathematical software packages. To the target group belong all natural scientists who are dealing with the environment: engineers from process and chemical engineering, physicists, chemists, biologists, biochemists, hydrogeologists, geochemists, ecologists.. .! As the book is concerned with modeling, it inevitably demands some math- ematical insight. The book is designed to
i. it is powerful, and ii. it is available at most academic institutions, at all universities and at the research departments of companies. Other mathematical products could have been selected from the market, which would perform similarly well for most application problems presented in the various chapters. But MATLAB ©R is rather unique in it’s strong capa- bilities in numerical linear algebra. There are twenty chapters in the book. The first chapters are concerned with environmental processes and their simulation: (1) transport, consisting of advection, diffusion and dispersion, (2) sorption, (3) decay or degradation, (4) reaction, either kinetic or thermodynamic. Following aim (B) there are sub- chapters inserted for the introduction of MATLAB ©R modeling techniques. The first part of the book ends with chapters on ordinary differential equations and parameter estimation (inverse modeling).
Acknowledgements
A book on such a wide topic as this one includes experiences and knowledge shared with lots of other people. I ask for understanding that I mention no names here. To be fair, giving one name would make it necessary to add nu- merous others. As one and only exception I want to mention my wife Susanne for reading the entire book, correcting stylistic errors, providing improved formulations and for mental support. Thanks to Humboldt University Berlin (HUB), the Leibniz Institute of Freshwater Ecology and Inland Fisheries (IGB), to the Weierstrass Institute for Applied Analysis and Stochastics (WIAS), and to Freie Universit¨at Berlin (FUB). Special thanks to the students who attended the modeling courses at FUB, for their questions and for their ideas. Without them I would not have become so familiar with the software. Parts of the book are based on seminar scripts. Especially I want to thank The MathWorks, Inc (http://www.mathworks. com/) for providing the most recent versions of the MATLAB ©R software as well as other support by including the book in the MathWorks Book Program.
De groei van de reken – en geheugencapaciteit van computers is nog steeds indrukwekkend, maar de spectaculaire ontwickelingen zien we momenteel toch gebeuren of het gebiet van de software. Geladen met moderne wiskundpro- gramma’s zijn computers allang geen domme nummerkrakers meer, en de toekomst ligt weer helemaal open voor methoden die een groter appel doen doen op de menselijke geest. In dit artikel willen we ... laten zien hoe analytis- che formules ... hanteerbaaar worden, door gebruik te maken van – het klinkt tegenstrijdig – het numerieke wiskundepakket MATLAB.
(Maas K./ Olsthoorn T., Snelle oudjes gaan MATLAB, Stromingen, Vol. 3, No. 4, 21–42, 1997; in Dutch)
The growth of performance and storage capacity of computers is still im- pressive, but we see the most spectacular development in the field of software. Equipped with modern mathematical packages computers are not stupid num- ber crunchers any more, and the future lies again wide open for methods, which appeal more to the human mind. In this contribution we show... how analytical formulae become manageable by using – it sounds contradictory - the numerical mathematical tool MATLAB ©R.
(translated by E.H)
Part I
Primer to Modeling with MATLAB ©R
4 1 Introduction
of earth atmosphere and oceans, of the global atmosphere, of the sea, of rivers, lakes and glaciers, of watersheds, of the soil, of terrestrial or aquatic sediments, of aquifers, and of parts of streams, and so forth. There are models of techni- cal devices for environmental purposes, in addition. Experimental set-ups in laboratories are simulated in order to understand relevant processes. The methods presented in this book are deterministic, throughout. A search for any statistics would be in vain. The description of processes is trans- lated into mathematical terms. Often the approach leads to differential equa- tions, which are conditions concerning the change of a variable, like concentra- tion or population density, in space and time. Nowadays the solution of such equations is not as tedious as in former times. Using core MATLAB ©R, prob- lems in 0 and 1 space dimensions can be solved comfortably. Core MATLAB ©R is also convenient for solving 2 and 3-dimensional problems with analytical solutions. For more complex modeling in more than one dimension, toolboxes, especially the MATLAB ©R partial differential toolbox, can be recommended. The aim of the book is to introduce basic concepts of environmental mod- eling. Starting from basic concepts the problems are transformed into mathe- matical formulations. Strategies for the solution of the mathematical problems on the computer are outlined. The main aim of the book is to communicate the entire path of such a modeling approach. At some points algorithmic details will be omitted for the general aim. Who is interested strictly in computer algorithms, will be better served with a book on numerics, applied mathemat- ics or computational methods. It is important that the modeler has a basic understanding of the underlying numerics. There is no need, however, to dive so deep into the algorithms that one would be able to program them oneself. In fact, it is an advantage of the chosen software that modeling tasks, which could be handled only by people with profound programming knowledge and skills, become now available to a wider audience. Who is addressed? In a broader sense everyone is addressed, who is dealing with or is interested in the simulation of environmental systems on a com- puter. In a considerable part of the book concepts of environmental modeling are introduced, starting from basic principles, tackling differential equations and numerical solutions. In another similarly big part of the book special implementations are introduced and described. If someone is very familiar with another mathematical software, the book may be of help too, as most of the described models can also be realized using other maths computer programs. There are several good and excellent books on environmental model- ing and on MATLAB ©R. Richter (1985) deals with ecological systems and with time dependencies (but no space dependencies), as well as Deaton & Winebrake (1999) using STELLA ©R^1. Shampine et al. (2003) also present MATLAB ©R modeling of ordinary differential equations; concerning appli- cations they do not address environmental modeling particularly; concerning
(^1) See: http://www.iseesystems.com/
1.1 Environmental Modeling using MATLAB ©R 5
methods, they do not address partial differential equations. Gander & Hrebicek (1997) offer little to the specialized environmental modeler, although some of the presented mathematical tools could be applied to environmental problems. Christakos et al. (2002) focus on the connection of time dependent simulation and GIS using MATLAB ©R. McCuen (2002) treats statistical methods (which do not appear here) for modeling hydrologic change. Cantrell & Cosner (2004) examine spatial ecology via reaction-diffusion models, without reference to any specific software package. Lynch (2005) addresses scientists and engineers in his general introduction to numerical methods without preference for any specific software and with few references to applied environmental model- ing. In his introduction to MATLAB ©R Kiusalaas (2005) addresses engineers in general. The topic of Zimmerman (2004) is chemical process simulation using FEMLAB^2 code. Hornberger & Wiberg (2005) have the hydrologist’s perspective on numerical methods. Trauth (2006) focuses on image- and data- processing, as well as statistical methods for geoscientists. Finlayson (2006) deals with the chemical aspects and gives an introduction to MATLAB ©R as one of several modeling tools. All these books^3 differ concerning scope and methods; and none of them has the same constellation of scope and methods, as it is presented in this book. The book is divided into twenty chapters which differ concerning scope and complexity. The first ten chapters form a primer on fundamental concepts and basic environmental modeling. All of the model examples presented are 0- or 1-dimensional. In the further ten chapters more complex models, as for example spatial 2D, are outlined with an explanation of the underlying methods. Concepts of flow modeling are introduced. In this book the focus on basic ‘core’ MATLAB ©R^4 is intended. There is the hope to address a wider audience, as not all readers may have access to the complete palette of MATLAB ©R toolboxes. On the other hand, there are lots of powerful commands in core MATLAB ©R and novice users might be confused being confronted with more specialized tools. It turns out that this is not a severe restriction, as most basic tasks, which are of interest to the en- vironmental modeler, can be performed using core MATLAB ©R. For advanced higher dimensional and coupled problems the MATLAB ©R partial differential equation toolbox has to be used, or COMSOL alternatively. COMSOL has developed a multi-physics software environment, which can be applied with MATLAB ©R in the background, and which is also known under the former name FEMLAB. Although other mathematical codes have developed a similar extension from a special purpose module to a toolbox for mathematical calculations
(^2) Now COMSOL; see: http://www.comsol.com/ (^3) There are numerous other books on MATLAB ©R, which could not all be checked by the author. The reader can get a list on the MathWorks Website http://www.mathworks.com/support/books (^4) For this book MATLAB version 7, release 14 was mainly used. Thanks to Math- Works for providing access to the most recent MATLAB ©R versions during the work on the book.