Docsity

Environmental Modeling 2012, Notas de estudo de Engenharia Elétrica

Pré-visualização parcial do texto

Baixe Environmental Modeling 2012 e outras Notas de estudo em PDF para Engenharia Elétrica, somente na Docsity!

Environmental Modeling

Priv.-Doz. Dr.-Ing. Dipl.-Math. Ekkehard Holzbecher Georg-August Universit€at G€ottingen Goldschmidtstr. 3 37077 G€ottingen [email protected]

Additional material to this book can be downloaded from http://extra.springer.com.

ISBN 978-3-642-22041-8 e-ISBN 978-3-642-22042- DOI 10.1007/978-3-642-22042- Springer Heidelberg Dordrecht London New York

Library of Congress Control Number: 2011941398

Springer-Verlag Berlin Heidelberg 2012

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 to prosecution under the German Copyright Law. 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.

Printed on acid-free paper

Springer is part of Springer ScienceþBusiness Media (www.springer.com)

Dedicated to

my children Gesa and Gero

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 mathemat- ical insight. The book is designed to

  1. Be a door opener to the field for novices without any background knowledge of environmental modeling and of MATLAB®, and
  2. To surprise those, who have some expertise, with advanced methods which they have not been aware of For this book MATLAB® was chosen as the computer tool for modeling, because
  3. It is powerful, and
  4. 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® is rather unique in it’s strong capabilities in numerical linear algebra. There are 20 chapters in the book. The first chapters are concerned with environmental processes and their simulation: (1) transport, consisting of advec- tion, 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® modeling techniques. The first part of the book ends with chapters on ordinary differential equations and parameter estimation (inverse modeling).

vii

The second part of the book starts with chapters on flow modeling. Flow, if present, is an important, but mostly also complex part within an environmental compartment. Core MATLAB® allows simple flow set-ups only. Therefore the focus is on potential flow, which has applications in hydro (water) and aero (air)- dynamics as well as in porous media (seepage and groundwater). Concepts of MATLAB® are deepened within these chapters. At the very end special topics appear: image processing and geo-referencing, graphs, linear systems, the phase space and graphical user interfaces.

Berlin

viii Foreword

Preface

“Environmental Modeling using MATLAB®” by Ekkehard Holzbecher is an excellent publication and a novel approach covering the intersection of two impor- tant, growing worlds – the world of environmental modeling and of mathematical software. Environmental modeling is a science that uses mathematics and computers to simulate physical and chemical phenomena in the environment (e.g., environmental pollution). This science was initially based on pen-and-paper calculations using simple equations. In the last 50 years, with the development of digital computers, environmental models have become more and more complex, requiring often numerical solutions for systems of partial differential equations. Mathematical software, such as MATLAB®, has been developed in the last two decades. These packages have been particularly successful for users of personal computers. Mathematical software provides a set of tools for solving equations both analytically and numerically. This is a major improvement in comparison to the programming tools (e.g., FORTRAN) previously used by scientists. Mathematical software offers extremely valuable and cost-effective tools that improve the pro- ductivity of the programmer by at least an order of magnitude. The use of these tools also minimizes the risk of programming errors. In addition, mathematical software offers unique visualization tools that allow the user to immediately visualize and often animate simulation results. Scientists who become familiar with a tool like MATLAB® will never go back to previous ways of computer programming. The book “Environmental Modeling using MATLAB®” provides a clear, com- prehensive, and very instructive introduction to the science of environmental modeling, and more importantly, includes the MATLAB® codes for the actual solutions to the environmental equations. MATLAB® codes are listed in the book and also included as more complete versions in an attached CD 1.

(^1) The first edition of the book included a CD. Readers of the second edition obtain the

accompanying software via Internet.

xi

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 numerous others. As one and only exception I want to mention my wife Susanne for reading the first edition of the book, correcting stylistic errors, providing improved formulations and for mental support. Thanks to Humboldt University Berlin (HUB), the Leibniz Institute of Freshwa- ter Ecology and Inland Fisheries (IGB), to the Weierstrass Institute for Applied Analysis and Stochastics (WIAS), to the Geosciences of Freie Universit€at Berlin (FUB) and of Georg-August Universit€at G€ottingen. Special thanks to the students who attended the modeling courses in Berlin and G€ottingen, 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® software as well as other support by including the book in the MathWorks Book Program.

xiii

  • 1 Introduction Part I Primer to Modeling with MATLAB®
    • 1.1 Environmental Modeling Using MATLAB®
    • 1.2 Introduction to MATLAB®
      • 1.2.1 Getting Started with MATLAB®
      • 1.2.2 Matrices in MATLAB®
      • 1.2.3 Basic Matrix Operations
    • 1.3 A Simple Environmental Model
    • 1.4 MATLAB® Graphics – The Figure Editor
    • 1.5 MATLAB® Help System
    • References
  • 2 Fundamentals of Modeling, Principles and MATLAB®
    • 2.1 Model Types
    • 2.2 Modeling Steps
    • 2.3 Fundamental Laws
      • 2.3.1 Conservation of Mass
      • 2.3.2 Conservation of Momentum
      • 2.3.3 Conservation of Energy
    • 2.4 Continuity Equation for Mass
    • 2.5 MATLAB® M-files
    • 2.6 Ifs and Loops in MATLAB®
    • 2.7 Debugging of M-files
    • Reference
  • 3 Transport
    • 3.1 The Conservation Principle
    • 3.2 Fick’s Law and Generalizations
      • 3.2.1 Diffusion
      • 3.2.2 Dispersion
    • 3.3 The Transport Equation
      • 3.3.1 Mass Transport
      • 3.3.2 Fourier’s Law and Heat Transport
    • 3.4 Dimensionless Formulation
    • 3.5 Boundary and Initial Conditions
    • References
  • 4 Transport Solutions
    • 4.1 1D Transient Solution for the Infinite Domain
    • 4.2 A Simple Numerical Model
    • 4.3 Comparison Between Analytical and Numerical Solution
    • 4.4 Numerical Solution Using MATLAB® pdepe
    • 4.5 Example: 1D Inflow Front
    • References
  • 5 Transport with Decay and Degradation
    • 5.1 Decay and Degradation
    • 5.2 1D Steady State Solution
    • 5.3 Dimensionless Formulation
    • 5.4 Transient Solutions
    • References
  • 6 Transport and Sorption
    • 6.1 Interphase Exchange
    • 6.2 Retardation
    • 6.3 Analytical Solution
    • 6.4 Numerical Solutions
    • 6.5 Slow Sorption
    • 6.6 MATLAB® Animations
    • References
  • 7 Transport and Kinetics
    • 7.1 Introduction
    • 7.2 Law of Mass Action for Kinetic Reactions
    • 7.3 Monod, Michaelis–Menten and Blackwell Kinetics
    • 7.4 Bacteria Populations
    • 7.5 Steady States
    • References
  • 8 Transport and Equilibrium Reactions
    • 8.1 Introductory Example
    • 8.2 The Law of Mass Action for Equilibrium Reactions
    • 8.3 Speciation Calculations
    • 8.4 Sorption and the Law of Mass Action
    • 8.5 Transport and Speciation
    • References
    • 9 Ordinary Differential Equations: Dynamical Systems
      • 9.1 Streeter-Phelps Model for River Purification
      • 9.2 Details of Michaelis–Menten or Monod Kinetics
      • 9.3 1D Steady State Analytical Solution
      • 9.4 Redox Sequences
      • References
  • 10 Parameter Estimation - 10.1 Introduction - 10.2 Polynomial Curve Fitting - 10.3 Exponential Curve Fitting - 10.4 Parameter Estimation with Derivatives - 10.5 Transport Parameter Fitting - 10.6 General Procedure - References
  • 11 Flow Modeling Part II Advanced Modeling Using MATLAB® - 11.1 The Navier-Stokes Equations for Free Fluids - 11.2 The Euler Equations and the Bernoulli Theorem - 11.3 Darcy’s Law for Flow in Porous Media - 11.4 Flow in Unsaturated Porous Media - References
  • 12 Groundwater Drawdown by Pumping - 12.1 Confined Aquifer - 12.2 Unconfined Aquifer - 12.3 Half-confined Aquifer - 12.4 Unsteady Drawdown and Well Function - 12.5 Automatic Transmissivity Estimation - References
  • 13 Aquifer Baseflow and 2D Meshing - 13.1 1D Analysis - 13.2 1D Implementation - 13.3 2D Implementation - 13.4 Meshs and Grids - Reference
  • 14 Potential and Flow Visualization - 14.1 Definition and First Examples - 14.2 Potential and Real World Variables - 14.3 Example: Groundwater Baseflow and Well - 14.4 MATLAB® 2D Graphics - 14.5 MATLAB® 3D Graphics - References
  • 15 Streamfunction and Complex Potential
    • 15.1 Streamfunction
    • 15.2 The Principle of Superposition
      • 15.2.1 The Doublette
      • 15.2.2 Mirror Wells
    • 15.3 Complex Analysis and Complex Potential
    • 15.4 Example: Vortices or Wells Systems
    • 15.5 Example: Thin Objects in Potential Flow
    • References
  • 16 2D and 3D Transport Solutions (Gaussian Puffs and Plumes)
    • 16.1 Introduction
    • 16.2 2D Instantaneous Line Source
    • 16.3 2D Constant Line Source
    • 16.4 3D Instanteneous Source
    • 16.5 3D Constant Source
    • References
  • 17 Image Processing and Geo-Referencing
    • 17.1 Introduction
    • 17.2 Reading and Display
    • 17.3 Geo-Referencing
    • 17.4 Digitizing
    • 17.5 MATLAB® Functions
    • References
  • 18 Compartment Graphs and Linear Systems
    • 18.1 Compartments and Graphs
    • 18.2 Linear Systems
    • 18.3 Eigenvalues and Phase Space
    • References
  • 19 Nonlinear Systems
    • 19.1 Logistic Growth
    • 19.2 Competing Species
    • 19.3 Predator–Prey Models
    • 19.4 Chaos (Lorenz Attractor)
    • References
  • 20 Graphical User Interfaces
    • 20.1 The MATLAB® Guide
    • 20.2 The Transport GUI
    • References
  • 21 Numerical Methods: Finite Differences
    • 21.1 Introductory Example
    • 21.2 Finite Differences
    • 21.3 A Finite Difference Example
    • 21.4 Solution for the 2D Poisson equation
    • 21.5 Solution for the 2D Diffusion-Decay Equation
    • References
  • Supplements
    • Supplement 1: MATLAB® Data Import
    • Supplement 2: Data Export
    • Supplement 3: Data Presentation in a Histogram
    • Epilogue
    • References
  • MATLAB1 Command Index
  • Companion Software List
  • Index