Process Modelling and Simulation with Finite Element Methods SERIES ON STABILITY, VIBRATION AND CONTROL OF SYSTEMS Founder and Editor: Ardeshir Guran Co-Editors: M. Cloud 81 W. B. Zimmerman About the Series Rapid developments in system dynamics and control, areas related to many other topics in applied mathematics, call for comprehensive presentations of current topics. This series contains textbooks, monographs, treatises, conference proceed- ings and a collection of thematically organized research or pedagogical articles addressing dynamical systems and control. The material is ideal for a general scientific and engineering readership, and is also mathematically precise enough to be a useful reference for research specialists in mechanics and control, nonlinear dynamics, and in applied mathematics and physics. Selected Volumes in Series A VOl. 3 Vibration Analysis of Plates by the Superposition Method Author: Daniel J. Gorman VOI. 4 Asymptotic Methods in Buckling Theory of Elastic Shells Authors: P. E. Tovstik and A. L. Smirinov VOl. 5 Generalized Point Models in Structural Mechanics Author: 1. V. Andronov Vol. 6 Mathematical Problems of Control Theory: An Introduction Author: G. A. Leonov VOl. 7 Analytical and Numerical Methods for Wave Propagation in Fluid Media Author: K. Murawski VOl. 8 Wave Processes in Solids with Microstructure Author: V. 1. Erofeyev VOl. 9 Amplification of Nonlinear Strain Waves in Solids Author: A. V. Porubov Vol. 10 Spatial Control of Vibration: Theory and Experiments Authors: S. 0. Reza Moheimani, D. Halim, and A. J. Fleming Vol. 11 Selected Topics in Vibrational Mechanics Editor: 1. Blekhman Vol. 12 The Calculus of Variations and Functional Analysis: With Optimal Control and Applications in Mechanics Authors: L. P. Lebedev and M. J. Cloud Vol. 13 Multiparameter Stability Theory with Mechanical Applications Authors: A. P. Seyranian and A. A. Mailybaev Vol. 14 Stability of Stationary Sets in Control Systems with Discontinuous Nonlinearities Authors: V. A. Yakubovich, G. A. Leonov and A. Kh. Gelig SERIES ON STABILITY, VIBRATION AND CONTROL OF SYSTEMS Series A Volume 15 ~~ Founder & Editor: Ardkshir Guran Co-Editors: M. Cloud & W. 6. Zimmerman Process Modelling and Simulation with Finite Element Methods William B. J. Zimmerman University of Sheffield, UK K World Scientific - NEW JERSEY * LONDON SINGAPORE * BElJlNG SHANGHAI * HONG KONG TAIPEI * CHENNAI Published by World Scientific Publishing Co. Pte. Ltd. 5 Toh Tuck Link, Singapore 596224 USA oflice: 27 Warren Street, Suite 401402, Hackensack, NJ 07601 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE British Library Cataloguing-in-PublicationD ata A catalogue record for this book is available from the British Library. PROCESS MODELLING AND SIMULATION WITH FINITE ELEMENT METHODS Copyright 0 2004 by World Scientific Publishing Co. Re. Ltd. All rights reserved. This book, or parts thereoj may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher. For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher. ISBN 981-238-793-5 Printed in Singapore by World ScientificP rinters (S)P te Ltd ABOUT THE AUTHOR Dr William B. J. Zimmerman is a Reader in Chemical and Process Engineering. His research interests are in fluid dynamics and reaction engineering. He has previously created modules entitled Chemical Engineering Problem Solving with Mathematica, Modelling and Simulation in Chemical Processes, Numerical Analysis in Chemical Engineering, and FORTRAN programming. He has been modelling with finite element methods since 1986. He has authored over sixty scientific and scholarly works. He is a graduate of Princeton and Stanford Universities in Chemical Engineering, past Director of the M Sc in Environmental and Energy Engineering, originator of the M Sc in Process Fluid Dynamics, and a winner in US and UK national competitions of four prestigious fellowships: 2000-5 EPSRC Advanced Research Fellow 1994-99 Royal Academy of Engineering, Zeneca Young Academic Fellow. 1991-93 NATO postdoctoral fellow in science and engineering. 1988-9 1 National Science Foundation Research Fellow This page intentionally left blank FOREWORD I would especially like to thank the Engineering and Physical Sciences Research Council of the United Kingdom for the award of an Advanced Research Fellowship on the topic of “models of helical mixing and reaction: a new approach to chemical reaction engineering.” Without the flexibility of the fellowship, I doubt I would have felt adventuresome enough to afford the time to run so far - developing an intensive training module and writing a textbook on a topic that is relatively new to me and was not envisaged when I wrote the original research strategy for the fellowship in 1998. It has turned out to be integral to my plans for turbulence modeling, although this is not reflected in the book. Johan Sundqvist and Ed Fontes of COMSOL have been most supportive of my two projects, lending considerable resources to helping me to iron out difficulties in modeling, contributing to the intensive modules, and providing critiques of the draft chapters. I would have thought the crew at COMSOL would have tired with the endless e-mails from my research group. With most packages I use, I have no intention of being “cutting edge,” so the FAQs on the web site usually already have my queries asked and answered. It is both novel - and refreshing to have identified (and sometimes solved or worked around) new bugs or puzzles. To Ed and Johan, a wholehearted thanks for welcoming me to the FEMLAB developers community. Many thanks to the team of collaborators and chapter co-authors who have encouraged this effort. Buddhi, Alex, Kiran, Jordan, Peter, George and Julia have always had a kind word and a willingness to brainstorm and contribute. Finally, thanks to attendees at my intensive modules for spotting inconsistencies, patiently wading through “experimental” teaching material (guinea pigs who are so intelligent are a rare find!), and putting up with my sometimes convoluted explanations. Not to mention those awkward times as we uncovered clangers in the demonstrations. It has always been a conceit of mine that computer demonstrations should be realistic bugs and all since - - debugging is an integral programming skill that relies on intuition and experience. So thanks for sharing the experience! vii This page intentionally left blank CONTENTS About the Author V Foreword vii Introduction to FEMLAB 1 W. B. J. Zimmerman 0.1 Overview of the Book 1 0.2 An Example from the Model Library 11 0.2.1 k-&Modelo f a Turbulent Static Mixer 12 0.2.2 Why the Tour of k-E Model of a Turbulent Static Mixer? 14 0.3 Chapter Synopsis 16 References 22 1 FEMLAB and the Basics of Numerical Analysis 23 W. B. J. Zimmerman 1.1 Introduction 23 1.2 Method 1: Root Finding 24 1.2.1 Root Finding: A Simple Application of the FEMLAB Nonlinear Solver 25 1.2.2 Root Finding: Application to Flash Distillation 29 1.3 Method 2: Numerical Integration by Marching 33 1.3.1 Numerical Integration: A Simple Example 35 1.3.2 Numerical Integration: Tubular Reactor Design 38 1.4 Method 3: Numerical Integration of Ordinary Differential Equations 44 1.5 Method 4: Linear Systems Analysis 49 1.5.1 Heat Transfer in a Nonuniform Medium 55 1.6 Summary 59 References 59 2 Partial Differential Equations and the Finite Element Method 63 W. B. J. Zimmerman and B. N. Hewakandamby 2.1 Introduction 63 2.1.1 Poisson’s Equation: An Elliptic PDE 66 2.1.2 The Diffusion Equation: A Parabolic PDE 70 2.1.3 The Wave Equation: A Hyperbolic PDE 75 ix