Differential Models
Alexander Solodov Valery Ochkov
Differential Models An Introduction with Mathcad
With 169 Figures
123
Prof. Dr. Alexander Pavlovich Solodov Ass. Prof. Dr.-Ing. Valery Fedorovich Ochkov Moscow Power Engineering Institute (Technical University) Dept. of Theoretical Basis of Thermotechnics (A. Solodov) Dept. of Water and Fuel Technology (V. Ochkov) Krasnokasarmennaya ul., 14, MPEI 111250 Moscow, Russia e-mail:
[email protected], http://twt.mpei.ac.ru/solodov e-mail:
[email protected], http://twt.mpei.ac.ru/ochkov
Library of Congress Control Number: 2004111785
Mathematics Subject Classification (2000): 76-01, 76D10, 76N10, 76Exx, 76L05, 80A20
ISBN 3-540-20852-6 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 springeronline.com © Springer Berlin Heidelberg 2005 Printed in Germany 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. Typeset by the authors Cover design: design & production GmbH, Heidelberg Production: LE-TEX Jelonek, Schmidt & Vöckler GbR, Leipzig Printed on acid-free paper
SPIN: 10962121
40/3142YL - 5 4 3 2 1 0
Foreword This book includes mechanical engineering projects executed in Mathcad according to the following plan: • Problem-setting and physical model formulation • Designing the differential mathematical model, i.e. model in the form of the differential equations (DE) • Integration of the differential equations • Visualization of results. The common denominator forms a nucleus of projects. In all cases, this is the ordinary (ODE) or partial (PDE) differential equations. Though the projects included in the book are educational, they contain an element of research, have important practical applications and are demanding with respect to the computing aspect. The authors hope to present suitable combination of both problems of engineering significance and high computing complexity. It is hoped that this overview will motivate the reader to refer to some of the current mathematical software packages. For this purpose, Mathcad [24–26] is an effective and user-friendly tool and, as a whole, it may be considered the most accessible of the known mathematical packages. The purpose of the book is to help students and young engineers to design and solve differential equations. The book is designed as a textbook and consists of eleven chapters, each chapter covering a specific topic as follows. In the first chapter “Differential mathematical models” the origin of the differential equations is discussed. They do not appear at once on a working table of the engineer in a ready kind for integration, and more often should be designed by the researcher – as mathematical models of technological processes or devices. It is not unlikely, that this stage will be the most difficult in the engineering project, and we considered it to be useful to give examples, how from the indistinct verbal description the differential mathematical models of researched objects are born. The second chapter “Integrable differential equations” contains the list and brief manual for the equations of the specified type. It is shown, how to apply symbolical Mathcad processor at mathematical calculations in this case. The third chapter “Dynamic model of the system with heat generation” is devoted to systems that can develop under catastrophic scripts – with ignition and explosion. The concept of catastrophe as some destructive phenomenon is supplemented with a mathematical metaphor, namely, the description of dynamic system in the form of so-called fold catastrophe from the theory of R.Toma. In this chapter are used the elements of the qualitative theory of the differential equations. In the fourth chapter “Stiff differential equations” the problem of numerical integration of this special type of the equations is considered in detail. Despite the practical importance of the question, it is difficult for students or engineers to find
VI Foreword
the well-documented description of this phenomenon. Mathcad offers the effective built-in functions for integration of stiff equations, but the Mathcad HELP function does not give much input on this issue. Therefore, materials in chapter 4 are meant to fill this gap. There, the reader will find plenty of examples using the various integrators and discussion of the features of explicit and implicit numerical methods. The fifth chapter “Heat transfer near the stagnation point at cross tube flow” models the following situation, in which the novice engineer can find oneself by solving a real problem. Generally, in educational examples of manuals the right parts of the differential equations are always set by simple analytical expressions. In real problems the right part is almost always represented in the form of complex algorithm, and not as analytical expression. Therefore, we show in practical applications the Mathcad structures (the programs, the built-in functions of optimization etc.) that should be used when dealing with real differential models, and not only DE solvers as such. Chapter six “The Falkner–Skan equation of boundary layer” is devoted to numerical analysis of a fundamental problem of hydrodynamics and heat transfer. Together with Sect. 1.4 “Conservation laws”, the sixth chapter forms a brief theoretical course of convective heat transfer. Using Mathcad, the main topic is the numerical solution of two-point boundary-value problems for the ordinary differential equations set with application of built-in function reducing the boundary problem to an initial problem. In chapter seven “The Rayleigh equation: hydrodynamic instability” the stability of free shear flow by a method of small perturbations (linearization method) is analysed. The progressing perturbations, discovered through analysis, are the predecessors of turbulence. This chapter can serve as an elementary introduction into stability theory. The technique of operation with the differential equations in complex domain is considered. It shows how to integrate the equations with complex coefficients using the numerical method and how to interpret the complexvalued solutions. The eighth chapter “Kinematic waves of concentration in ion-exchange filter” continues the theme of partial differential equations begun in the first chapter by the problem of shock waves on a motorway. The physical and mathematical model of ion-exchange filter is offered. The ion-exchange filters provide ultrapure water to the steam plants of thermal and nuclear power stations. The solution of partial differential equation for the space-time distribution of impurity concentration is received by method of characteristics. Here we show, how the nonlinearity of differential model results in discontinuous multivalued solution. The ninth chapter “Kinematic shock waves” continues the topic of the wave equations. In this chapter we develop the Mathcad program for numerical integration of the partial differential equations with effective reproduction of shock waves. With the Mathcad program we are able to complete the research of problems about shock waves on motorways and filters. The problem of gravitational bubble flows (such as floating bubbles in a glass filled with beer or in a watersteam flow in an evaporator) is considered in detail. As we saw in the problems
Foreword VII about traffic jams and filters, shock wave formations will be observed, but with a steam content. The tenth chapter “Numerical modeling of the CPU-board temperature field” considers the numerical methods for PDE of second order. The new program supplements the standard Mathcad tools, simulates two-dimensional temperature fields for a dilated circle of problems and describes adequately the various forms of thermal interaction between an investigated object and its surrounding. The eleventh chapter “Temperature waves” is devoted to unsteady-state temperature fields. Applications of this part of thermal physics are numerous. For example, in power engineering for optimum control of starting procedure it is necessary to forecast the non-stationary temperature fields in elements of machines and equipment. The purpose is to exclude infringements of backlashes in moving elements due to unequal thermal expansion and to prevent occurrence of destructive thermal stress. Interesting problem is the modeling of action of superpower energy fluxes to construction units. Often, the high-power actions have periodic character, and in solid bodies the temperature waves arise. The onedimensional, non-stationary problem of heat conduction is surveyed as a model of the processes described above. The corresponding Mathcad-program has been designed on the basis of the TDMA method. The authors aspire to show with real examples how to effectively use Mathcad at all stages of an engineering project: • During analytical preprocessing of the mathematical description (during normalization, research of the special points, identical transformations, etc.) • During analytical decisions-making, whenever possible • During numerical decisions whenever analytical decisions are impossible or inefficient • For the presentation and visualization of results. In modern engineering research, in engineering design as well as in education – more and more computer models are used to take into account essential important effects and to work with adequate mathematical models of the objects. The engineer-researcher should not fear that the developed model might be too difficult for computing and that, therefore, it is necessary to simplify a problem appreciably. Can be, up to such degree, that the model absolutely will cease to be similar to real object. The bibliography at the end of the book includes references to the sources uses as well as selected general literature about numerical analysis and computer modeling. The index contains those books concerning our theme, which were read by authors, have seemed to them interesting and, hence, in the explicit or implicit form were used during our work. From R.Hamming's book [14] we would like to adopt the following motto for our own text: “The purpose of calculations – not numbers, but understanding”. Additional resources and electronic versions of Mathcad-programs contained in this book are available through the following website: www.thermal.ru, in part also in mode Mathcad Application Server. The authors can be contacted at:
[email protected],
[email protected].
Contents 1
Differential Mathematical Models ..........................................................1 1.1 Introduction .........................................................................................1 1.2 Laws in the Differential Form ..............................................................1 1.3 Models of Growth................................................................................8 1.4 Conservation Laws ............................................................................ 14 1.5 Conservation Law for Traffic Problem ............................................... 23 1.6 One-Dimensional Stationary Models: Fuel Element............................ 29 1.7 Conclusion......................................................................................... 33
2
Integrable Differential Equations.......................................................... 37 2.1 Introduction ....................................................................................... 37 2.2 First-Order Linear Equations.............................................................. 37 2.3 Linear Homogeneous Equations with Constant Coefficients ............... 41 2.4 Linear Inhomogeneous Equations....................................................... 43 2.5 Equations with Separable Variables.................................................... 43 2.6 Homogeneous Differential Equations ................................................. 44 2.7 Depression of Equation ...................................................................... 44 2.8 Conclusion......................................................................................... 46
3
Dynamic Model of Systems with Heat Generation ............................... 47 3.1 Introduction ....................................................................................... 47 3.2 Mathematical Model .......................................................................... 47 3.3 Phase-Plane Portrait. Stable and Unstable Equilibrium........................ 50 3.4 State Set Representation..................................................................... 51 3.5 Plotting the Bifurcation Set ................................................................ 53 3.6 Fold Catastrophe................................................................................ 54 3.7 Catastrophic Jumps at Smooth Variation of Parameters....................... 55 3.8 Time Evolution of System with Heat Generation ................................ 57 3.9 Conclusion......................................................................................... 60
4
Stiff Differential Equations ................................................................... 61 4.1 Introduction ....................................................................................... 61 4.2 Model Differential Equation............................................................... 62 4.3 Method rkfixed. Numerical Instability................................................ 63 4.4 Method rkadapt. Integration Step Problem.......................................... 68 4.5 Method stiffr. Solution of Stiff Model Equation.................................. 70 4.6 Method stiffr. Solution of Chemical Kinetics Equations...................... 72 4.7 Explicit and Implicit Methods ............................................................ 74 4.8 Jacobian Matrix ................................................................................. 76 4.9 Conclusion......................................................................................... 77
X Contents
5
Heat Transfer near the Stagnation Point at ross Tube Flow ............. 79 5.1 Introduction ....................................................................................... 79 5.2 The Integral Equation of a Thermal Boundary Layer .......................... 80 5.3 Mathematical Formulation of the Problem.......................................... 82 5.4 External Flow Velocity Distribution................................................... 84 5.5 Analysis for the Stagnation Point ....................................................... 86 5.6 Dimensionless Formulation................................................................ 89 5.7 Optimization Algorithm for the Right-Hand Side................................ 90 5.8 Numerical Integration with the Built-in Function Odesolve................. 91 5.9 Conclusion ........................................................................................ 93
6
The Falkner–Skan Equation of Boundary Layer ................................. 95 6.1 Introduction ....................................................................................... 95 6.2 Model Construction ........................................................................... 99 6.3 Boundary-Value Problem. Method sbval .......................................... 101 6.4 The Solution of the Initial Problem. Method rkfixed ......................... 103 6.5 Flow Field Imaging.......................................................................... 105 6.6 Boundary Layer on Permeable Walls................................................ 107 6.7 Thermal Boundary Layer. Heat Transfer Law................................... 112 6.8 Troubles with Odesolve ................................................................... 119 6.9 Conclusion ...................................................................................... 120
7
Rayleigh’s Equation: Hydrodynamical Instability ............................. 123 7.1 Introduction ..................................................................................... 123 7.2 Hydrodynamic Equations for Free Shear Flow.................................. 124 7.3 Perturbation Method. Linearization .................................................. 125 7.4 Transition to Complex Domain ........................................................ 127 7.5 Numerical Integration in the Complex Domain: Program Euler......... 130 7.6 Integration and Search of Eigenvalues.............................................. 131 7.7 Returning to the Real Domain .......................................................... 134 7.8 Conclusion ...................................................................................... 136
8
Kinematic Waves of Concentration in Ion-Exchange Filter............... 137 8.1 Introduction ..................................................................................... 137 8.2 Conservation Equation for Concentration in Filter ............................ 138 8.3 Wave Equation for Concentration..................................................... 140 8.4 Dimensionless Formulation.............................................................. 141 8.5 Isotherm of Adsorption .................................................................... 142 8.6 Solving a Wave Equation Using Method of Characteristics............... 146 8.7 Conclusion ...................................................................................... 150
9
Kinematic Shock Waves...................................................................... 151 9.1 Introduction ..................................................................................... 151 9.2 Conservation Equation in Finite-Difference Form............................. 152 9.3 Discontinuous Solutions. Shock Waves ............................................ 154 9.4 MacCormack Method. Computing Program McCrm......................... 156
Contents XI 9.5 9.6 9.7 9.8
Shock Waves of Concentration in a Filter......................................... 158 Shock Waves on a Motorway........................................................... 165 Gravitational Bubble Flow. Steam-Content Shock Waves ................. 170 Conclusion....................................................................................... 180
10
Numerical Modeling of the CPU-Board Temperature Field .............. 181 10.1 Introduction ..................................................................................... 181 10.2 Built-in Functions for Partial Differential Equations ......................... 183 10.3 Finite-Difference Approximation...................................................... 184 10.4 Iteration Method of Solution. Program Plate ..................................... 186 10.5 Thermal Model of the CPU-Board.................................................... 187 10.6 Problem of Orbital Platform. Function bvalfit ................................... 191 10.7 Conclusion....................................................................................... 196
11
Temperature Waves ............................................................................ 203 11.1 Introduction ..................................................................................... 203 11.2 Formulation of the Boundary-Value Problem.................................... 204 11.3 Discretization................................................................................... 204 11.4 TDMA: Computing Programs Coef and SYSTRD ............................ 208 11.5 Computational Modeling of Cyclical Thermal Action ....................... 211 11.6 Built-in Function Pdesolve ............................................................... 214 11.7 Conclusion....................................................................................... 217
Literature ...................................................................................................... 219 Appendix: Built-in Solvers for ODE............................................................. 223 Index.............................................................................................................. 231
1
Differential Mathematical Models
1.1
Introduction
The main purpose of the first chapter is to discuss the origin of the differential equations that should be solved by engineers. The student on examination receives the ready equation for the decision, however in real engineering the differential equation should be made, deduced as mathematical model for the device or technological process. Probably, this stage will be the most difficult in the engineering project, and we think, it is useful to show examples of how the differential mathematical models are born from the indistinct verbal description of researched objects. The second reason for this chapter is a problem of physical meaning and correctness of result. In particular at the initial stage of research, computer solutions may be liable to oscillations, or may be rapidly growing and resulting in overflow error, or containing discontinuity, etc. In real practice the strange behavior of solution is more likely than good. The kept control over physical meaning helps the engineer to advance further also in such complex mathematical situations: to localize the error, to optimize a numerical method, to refuse too strong simplification, and finally to accept or reject the solution. 1.2
Laws in the Differential Form
Newton's Second Law of Motion Some laws of nature are directly given in the differential form, i.e. in the form of the differential equations. The most simple and important example is Newton's second law of motion: m ⋅ a = F , “mass ⋅ acceleration = force”. The acceleration is the second time derivative of a way. Therefore, it is possible to write down the second law for rectilinear motion as the differential equation: d 2x F = . dτ 2 m
(1.1)
For the simple case of freely falling body we have F/m = g. The acceleration of gravity, symbolized as g, has an average value of 9.8 m/s2 near the surface of the Earth. Given this condition, the right hand side of (1.1) will be constant. Such differential equation is simple for integrating. Function, whose second derivative
2 1 Differential Mathematical Models
ferential equation is simple for integrating. Function, whose second derivative is constant, is quadratic parabola. The result is the position x as a time function: x = gτ2/2. More complicated problems arise, when the force depends on body position, its velocity and, possibly, acceleration. If the force is proportional to the displacement x of the mass from equilibrium position (x = 0) and opposite by sign, F = – b⋅x, the linear homogeneous differential equation with constant coefficients follows: d2x dτ 2
=−
b x; m
b = ω2 > 0; m
d 2x dτ 2
= − ω2 x ,
(1.2)
known as the harmonic oscillator equation. The constant b may be the spring constant or the pendulum weight mg, divided by length L (see Fig. 1.1). F = – bx m
friction= – c (dx/dt)
x
0
F = – (GMm /|r|2)(r/|r|) m
dr/dt
x
r M
F = – bx
Fig. 1.1. Examples from mechanics
Linearity of the differential equation (such as (1.2)) means, that derivatives of some function are proportional to the function itself. The exponential have such property. Therefore, the presumptive solution can be written down as x = C exp (k ), assuming indefinite parameters k and C, and then must be substituted in the differential equation. Necessary symbolical (analytical) transformations can be executed in Mathcad, as shown in Fig. 1.2. In the first line, Eq. (1.2) is symbolized as eq. We see further in block 2, that the substitution (keyword substitute) of the exponential function transforms the differential equation eq into the algebraic equation eq1 for eigenvalue k. The symbolical operator collect brings to light the structure of eq1 (line 3) collecting terms with indicated common subexpressions C and exp (k ). The operator solve gives the solution (line 4). Thus, two conjugate imaginary roots for eq1 and, accordingly, two complex exponents as solutions for eq (block 5) are present.
1.2 Laws in the Differential Form 3
(1) eq :=
d2
dτ
2
x( τ ) + ω ⋅ x( τ ) 2
0
(2) eq1 := eq substitute , x( τ )
C ⋅ exp ( k ⋅ τ ) →
2 d d C ⋅ exp ( k ⋅ τ ) + ω ⋅ C ⋅ exp ( k ⋅ τ ) dτ dτ
g
C ⋅ k ⋅ exp ( k ⋅ τ ) + ω ⋅ C ⋅ exp ( k ⋅ τ ) 2
2
eq1 := eq1 simplify →
(3) eq1 := eq1 collect , exp ( k ⋅ τ ) , C →
0
( k2 + ω2) ⋅C ⋅ exp( k⋅τ)
0
i ⋅ω
(4) k := eq1 solve , k →
0
i ⋅ω
k→
−i ⋅ ω
−i ⋅ ω
(5) C ⋅ exp ( k0⋅ τ ) complex → C ⋅ cos ( ω ⋅ τ ) + i ⋅ C ⋅ sin ( ω ⋅ τ ) C ⋅ exp ( k1⋅ τ ) complex → C ⋅ cos ( ω ⋅ τ ) − i ⋅ C ⋅ sin ( ω ⋅ τ )
Fig. 1.2. Exponents as solutions of the linear differential equation
The symbolical operator complex transforms exponents to trigonometric forms, sine and cosine. The constant C remains arbitrary. Pay attention: the symbolic evaluations start with the symbolic equal sign (right arrow). Solutions of Eq. (1.2) are harmonic functions (see Fig. 1.2, line 5). By itself Eq. (1.2) is known as the equation of harmonic vibrations or the equation of harmonic oscillator. It is one of the basic mathematical models of physics. The Mathcad help system contains some examples of such problems: Resource Center, Quick Sheets and Reference Tables, Calculus & Differential Equations: Simple Pendulum Motion; Extending Mathcad, Mathematics, Differential Equations: Stabilizing an Inverted Pendulum. The force F in the differential equation (1.1) may be written according to the law of gravity: F=−
GMm r , 2 r r
where r is a vector connecting mass M with mass m, G is the gravitational constant. Then the differential equation "
d 2r GMm r 1 = − 2 r m dτ r !
4 1 Differential Mathematical Models
will be suitable for the description of orbital Earth’s motion around the Sun or the satellite around the Earth (Resource Center, Quick Sheets and Reference Tables, Calculus & Differential Equations: Planetary Orbits). In the previous examples the force of environmental resistance was not taken into account. If taken into account, the circle of problems described by Eq. (1.1) will be extended considerably. The problem of relaxation oscillations of the pendulum is one such example solved in Mathcad (see Resource Center, Quick Sheets and Reference Tables, Calculus & Differential Equations: Damped Harmonic Oscillation). As another example we will consider the movement of water drop in air by gravity and resistance force. This problem can be useful when designing sprinkler systems for fire-fighting or for irrigation, or for direct contact heat and mass exchangers in power engineering and technology. It is important to calculate a trajectory, to determine, how far the drops scatter and how long they remain in the air. The equation of drop motion can be written again as Newton's second law “mass · acceleration= force”: #
.
π π d w = ρ f D3 g − ρ f D3 6 6 dτ +
.
,
,
,
-
*
%
'
*
-
%
%
'
%
)
(
&
$
)
(
drop mass
&
Cd ,
-
%
drag coefficien t
drop mass
. +
+
ρ air w w
+
.
(
'
2
,
,
)
)
*
%
*
%
)
&
πD 2 , 4 '
%
)
(
(1.3)
&
dynamic pressure midship
where acceleration is written as time derivative from velocity vector w. The terms on the right-hand side are the weight and the air resistance acting on the drop with diameter D. Quantities f and air in (1.3) mean density of water and air accordingly. Size and direction of weight force are set by vector g – acceleration of gravity. The resistance force is already explained in (1.3). Direction of this force is back to speed vector w. The drag coefficient Cd is a function of the Reynolds number: /
/
Re D =
wD ν air
,
where air is the kinematic viscosity of air. The relationship Cd(ReD) is taken from work1 and approximately submitted as Mathcad function in Fig. 1.3. Eq. (1.3) looks simpler after division by drop mass: 0
C (Re D ) d A w w; w=g− d dτ 2
A=
3 ρ air . 2D ρ f
(1.4)
Vector equation (1.4) can be projected on horizontal (x) and vertical (y) axes of coordinates, and that results in a system of four equations – for horizontal (u) and
1
Boyd F Edwards, Joseph W Wilder and Earl E Scime (2001) Dynamics of falling raindrops. Eur. J. Phys, 22:113–118
1.2 Laws in the Differential Form 5
vertical (v, positive upward) velocity components and their definitions through changing coordinates:
d C (Re D ) u=− d A w u; dτ 2
d C (Re D ) v = −g − d Aw v; dτ 2 (1.5)
d x = u; dτ
d y=v. dτ
The system of differential equations (1.5) is nonlinear, and consequently we address at once to one of the built-in integrators (Odesolve, see Appendix) to receive the numerical solution. In Fig. 1.3 the input data are submitted, such as drop diameter, physical properties, constants, initial values of velocity components. We fix to work in SI system (kg, m, s) and consequently do not write down the units explicitly. In the bottom half of Fig. 1.3 the auxiliary functions for calculation of the velocity module w(u,v) through its components, for Reynolds number and for drag coefficient are written down too. D := 0.001
g := 9.8
ρ air := 1.205
ρ f := 998.2
A :=
3 ρ air ⋅ 2 ⋅D ρ f
ν air := 1.5 ⋅ 10
−5
A = 1.811
ubeg := 10 vbeg := 10 _________________________________________ w( u , v) :=
(
)
2
2
Red ( u , v) :=
u +v
Cd ReD :=
Cd ←
w(u , v) ⋅ D ν air
24 if ReD < 4 ReD
otherwise Cd ←
12 ReD
if ReD < 576
Cd ← 0.5 otherwise Cd
Fig. 1.3. The input data and auxiliary functions for the drop movement problem
6 1 Differential Mathematical Models
Given
d dτ
d dτ
d dτ
d dτ
x( τ )
u( τ )
y( τ )
v( τ )
u( τ )
−
C d Red ( u( τ ) , v( τ ) ) ⋅ A ⋅ w ( u( τ ) , v( τ ) ) ⋅ u( τ ) 2
v( τ )
−
C d Red ( u( τ ) , v( τ ) ) ⋅ A ⋅ w ( u( τ ) , v( τ ) ) ⋅ v( τ ) − g 2
x( 0) 4 1
)
(
)
y( 0)
0
5
x 2
0
(
1
8
2
4
7
8
y 5
u 2
3
6
v
ubeg
v( 0)
vbeg
;
5
;
2
y
5
2
: 5
x
5
2
u( 0)
:= Odesolve 8
5
;
2
5
2
9
3
u
8
6
,τ ,2 ;
<
v
.
Fig.1.4. System of the movement equations and the numerical integrator Odesolve call
In Fig.1.4 the system of differential equations (1.5) is written inside of the Mathcad structural block Given, including also the initial conditions and the builtin integrator Odesolve call. The result of numerical integration is presented in Fig. 1.5 as the trajectory y(x) of drop movement. But before that the time end of drop flight has been determined using the equation for vertical coordinate at the moment of landing: y( end)=0. The solution is obtained by built-in solver root. Last two arguments of root determine the interval of search set by user. Further more we set the uniform sequence of the time moments for which the moving drop positions on plane (x, y) will be constructed. The drop of 0.001 m diameter leaving the sprinkler with horizontal speed 10 m/s and vertical speed 10 m/s, will rise in 1.5 m height, will cover a distance of about 3 m and will be in flight about 1 second (Fig. 1.5). Not taking into account the effect of air resistance the results will be as follows (given the same starting conditions): height ~ 5 m, distance ~ 20 m, time ~ 2 s. These results differ greatly from real parameters. Another will be also the shape of trajectory. It is easy to be convinced of it, having repeated calculations in Mathcad at zero value of A. Concluding topic of drop flight we shall note, that for severity it was necessary to estimate, whether the integrity of a drop will be kept at flight with such speed in the air and whether the drop will be influenced by neighboring drops. =
=
1.2 Laws in the Differential Form 7 τ end := root (y( t) , t , 0.1 , 2)
τ end = 1.096
τ := 0 , 0.1 .. τ end + 0.1 1.5
1 y(τ ) 0.5
0
0
0.5
1
1.5
2
x( τ )
2.5
3
Fig. 1.5. The calculated trajectory of drop movement (the drop locations are marked at subsequent identical time intervals)
Behind the simple examples discussed in this item (Fig. 1.1, Fig. 1.5) there is a wide range of important problems both cosmic and earthy: calculations of space movements of heavenly bodies, determination of satellite orbits and rocket trajectories, the resonance phenomenon and the dangerous vibrations of buildings and suspension bridges, the oscillation damping etc. [9]. Heat Conduction and Viscous Friction Laws
One more group of problems with ready differential formulations is formed with calculations of heat exchange and friction for one-dimensional flows. The Couette flow (Fig. 1.6) is the elementary problem of this group. y
y
t – t0
u
δ
Fig. 1.6. Couette laminar flow
In the gap between very long plates there is a liquid. The top plate moves from left to right with speed u , the bottom plate is fixed. The top plate is hot at a temperature t , bottom – cold at a temperature t0. It is required to find the velocity u >
>
8 1 Differential Mathematical Models
and temperature t fields in the gap and also to calculate the shear stress s and the heat flux q. It is easy to show, that the quantities s and q are constant across thickness of the gap. Then, according to the one-dimensional formulations of Newton's law for viscous friction and Fourier’s low for heat conduction: s≡µ
du = const , dy
(1.6)
q≡λ
dt = const , dy
(1.7)
where y is the normal to the flow direction axis, λ – thermal conductivity, and µ – viscosity. Expressions (1.6), (1.7) are the differential equations for unknown speed and temperature distributions. If thermal conductivity and viscosity are constants, as by laminar flow, integration gives the linear distributions of temperature and speed. Then Eqs. (1.6) and (1.7) yield for the shear stress and heat flux: ?
@
uδ t −t ; q=λ δ 0 . δ δ
τ =µ
At turbulent motion the quantities , are not constant any longer. They depend on the (unknown) distribution of speed. In this case the differential equations (1.6), (1.7) become nonlinear and the Couette flow problem becomes much more sapid and complex. A complete discussion of hydrodynamics and heat transfer problems is considered below in Sect. 1.4. The one-dimensional solutions of thermal conduction problems are considered in Sect. 1.6. ?
1.3
@
Models of Growth
Exponential Growth We shall consider here those cases where the differential equations appear as the result of direct translation of verbal representation of a problem into the mathematical form. Simplified it looks approximately as follows: • The verbal source: “for the accounting quarter, the company assets have increased from $100 up to $103” • The equivalent mathematical model introduces the growth parameter as F C
1 dP 1 103 − 100 1 = 0.01 = . P dτ 100 3 month month D
•
A
D
A
E
B
•
In the verbal description the question was growth within a given time interval. Clearly, the suitable mathematical model will be a derivative on time.
1.3 Models of Growth 9
You should not to be too serious regarding the next example. But it is useful as an illustration, that everyone, meditating about some technical problem or a vital situation, may design his own differential equation. In folk speak: “money to money”. Or: “the money makes money”. How to formalize this statement and then, perhaps, to take from a mathematical model the useful instructions, how to grow rich? Preparing the saying, we come to the formulation: dY = k ⋅Y , dτ
(1.8)
according to which the speed of the capital increase dY/d is proportional to capital Y itself. A function, for which the derivative is proportional to the function, is well known: it is the exponential function. Simple operations of variables separation in (1.8), integration, reduction to the explicit form and graphic representation of result are shown in Mathcad fragment in Fig. 1.7. So, the mathematical model of exponential growth (1.8) satisfies the initial verbal description, i.e. the saying “money makes money”. The solution of (1.8) is: G
Y = Y0 exp( kτ) .
(1.9)
It is apparent, that capital Y quickly grows, if its initial value Y0 is nonzero. dY dτ
dY Y
k⋅Y
K
O N
Y
L
H
I
L
I
L
J
M
Y0
τ H
1 dy y
I
J
k ⋅ dτ
k dt solve , Y → exp ( τ ⋅ k) ⋅ Y0 O
O
0 P
Y( τ , Y0 , k) := Y0 ⋅ exp ( k ⋅ τ ) 3
2 Y( τ , 0.2 , 0.5)
1
0
0
2
4 τ
Fig. 1.7. Exponential growth
6
10
1 Differential Mathematical Models
Logistic Model However, experience and common sense tell us, that the capital may not grow indefinitely. There is a limit of growth, and the popular saying “superfluous money, superfluous worry” may turn out to be true. Now we should find a mathematical model of this second statement. We shall introduce in operation the limit of saturation Sat, probably timedependent. According to the model of limited growth, the growth should stop, once we have reached the limiting value (Y = Sat). Hence, the derivative dY/d should become zero. To provide this condition, in the right part of the differential equation (1.8) the multiplier (Sat – Y) should appear: Q
dY = k ⋅ Y ⋅ (Sat − Y ) . dτ
(1.10)
This is the differential equation with separable variables, and Mathcad allows the symbolical transformations to receive the analytical results (see Fig. 1.8). dY dτ
dY Y ⋅ ( Sat − Y)
k ⋅ Y ⋅ ( Sat − Y)
U
Y X
Y
V
R
τ R
1 dy y ⋅ ( Sat − y)
S
V
S
V
T
W
Y
S
k dt solve , Y → T
Y
0
Y0
Z
Y0 ⋅ Sat ⋅ Y0 := 0.01
k ⋅ dτ
k := 0.5
exp ( τ ⋅ k ⋅ Sat )
( Sat − Y0 + Y0 ⋅ exp ( τ ⋅ k ⋅ Sat ) )
Sat := 1
g
exp ( τ ⋅ k ⋅ Sat ) Y( τ ) := Y0 ⋅ Sat ⋅ ( Sat − Y0 + Y0 ⋅ exp ( τ ⋅ k ⋅ Sat ) ) 1
Y( τ )
0.5
0
0
5
10
15
τ
Fig. 1.8. The logistic curve
20
1.3 Models of Growth 11
In the given fragment of Mathcad worksheet are consistently submitted: • The original Eq. (1.10) and the form with separated variables • The integral from both parts of this form • The solution for Y, received by means of symbolical operator solve • The diagram of this time dependence. The result is an S-curve. At an initial stage, exponential growth is observed (the “money makes money” principle), and then restrictions come into effect (the “superfluous money, superfluous worry” principle). The S-shaped curve in Fig. 1.8 and the appropriate mathematical model (1.10) are known as the logistic and have a surprising generality. Many technical, biological and even social systems submit to such a law of growth. For example, the concentration at self-catalyzed chemical reactions has the same kind of time dependence, as in Fig. 1.8. Apparently, the development of new technologies submits to the same law (though computer technologies are still at the stage of exponential growth). Similar S-curves are observed at fissiparity of bacteria, at growth of biological populations. Probably, civilizations on a large time scale are also S-shaped. Stochastic Model If we take into account that the limit of growth Sat is a function of time, we may advance creating more and more real models. Indeed, in economics we observe rise followed by recession to perform at regular intervals. In the Mathcad-document in Fig. 1.9 the limit of growth is given as a sine wave function. It is a rough imitation of a random periodic function. The right part of the differential equation (1.10) is designated as DY( ,Y). Since the differential equation is nonlinear and variables are not separable, it is necessary to take advantage of a numerical method. In this case it is rkadapt – explicit adaptive Runge– Kutta method. We make the series of calculations at different initial conditions IC, therefore it is convenient to write down the reference to rkadapt as function. The result is shown in Fig. 1.9. The distinctions in growth are clearly visible according to the initial value of capital (for comparison, values 0.01 and 0.1 are assumed). It is visible also, that the achieved greatest values oscillate like theoretical limit Sat( ), with some phase shift. In the following example we shall describe a real situation more accurately. A parameter (factor) of growth k (see Eq. (1.10)) is subject to random influences. In Mathcad fragment Fig. 1.10 the quantity k is given as random function of time in the form of sine series with random coefficients A. The built-in function rnorm is applied for creation of the set of such coefficients. An average value of A is zero, and their dispersion is the unit variance. The growth under influence of random factors is shown in Fig. 1.11. We shall emphasize, that the parameter of growth k is a stochastic function (random stationary function) of time. Diagrams in Fig. 1.11 show, as far as the main law, such as in Fig. 1.8, may be disguised by random influences. Q
Q
12
1 Differential Mathematical Models k ≡ 0.5
Am ≡ 0.1
τ beg ≡ 0
acc ≡ 0.000001
Nmax ≡ 200
save_int ≡ 0
τ end ≡ 20 g
Sat ( τ ) ≡ Am⋅ sin( τ ) + 1 DY( τ , Y) ≡ k ⋅ ( Sat ( τ ) − Y) ⋅ Y
(
)
S ( IC) := rkadapt IC , τ beg , τ end , acc , DY , Nmax , save_int [
\
0
τ a := S ( 0.01) [
[
\
1
Ya := S (0.01)
\
[
\
Yb := S (0.2) 1
τ b := S ( 0.2) 0 1.5
Capital
Ya
1
Yb
( )
Sat τ a
0.5
0
0
5
10
15
20
τa , τb Time
IC=0.01 IC=0.1 Sat
Fig. 1.9. Logistic law with floating limit of growth (see Appendix about rkadapt)
Let us make some remarks concerning the origin of the logistic equations. The name testifies that these equations are received on an external, logic level of system analysis. Really, we did not concern the actual mechanism of how or why money makes money, or, how or why the rate of chemical reaction depends on concentration. Therefore, the constants (for example, the parameter of growth k) may not be determined within the framework of logistic models. The actual analysis of real systems is necessary for this purpose – in economics (growth of the capital), in physics-chemistry (chemical reactions) etc. But any shortcomings are made up for by the remarkable generality of such model types.
1.3 Models of Growth 13 k0 := 0.5
iMax := 10
ω := 0.2
A := rnorm(iMax + 1 , 0 , 1) a ^
iMax
sum := ]
_
k ( τ ) := k0 ⋅ 1 +
( Ai) 2
_
`
i=0
1 ⋅ sum
iMax ]
Ai ⋅ sin( i ⋅ ω ⋅ τ ) b
c
i=1
2 Growth factor
b
Fig. 1.7
1
k( τ )
0 1
0
10
20
τ Time
Fig. 1.10. The growth factor as stochastic function
acc := 0.000001
Nmax := 200
save_int := 0
τ beg := 0
τ end := 20
Sat := 1
DY( τ , Y) := k ( τ ) ⋅ ( Sat − Y) ⋅ Y
(
)
S ( IC) := rkadapt IC , τ beg , τ end , acc , DY , Nmax, save_int d
e
d
τ b := S ( 0.2)
d
0
τ a := S ( 0.01)
e
1
Ya := S ( 0.01)
e
d
0
Yb := S ( 0.2)
Fig. 1.8.
e
1
1
Ya Yb
0.5
0
0
5
10
15
20
τa , τb
Fig. 1.11. Logistic curves by different initial conditions and by influence of random factors (see Appendix about rkadapt)
14
1 Differential Mathematical Models
1.4
Conservation Laws
Almost all differential equations that are designed and solved by mechanical engineers and technologists, are deduced on the basis of conservation laws of mass, impulse, energy. Problems are manifold and concern the processes with liquid and gaseous heat-carriers in thermal and atomic power stations, in chemical, petroleum, and gas industries, and also in nature. Many natural phenomena are described by the above mentioned equations. For example, a weather forecast is based on numerical modeling of thermo- and hydrodynamical processes in the Earth atmosphere. For that purpose the most powerful of existing computers are used. Another example is modeling of the environmental problems connected to distribution of harmful emissions into atmosphere and into water. General Form of Balance Equation The general description of this process looks as follows (Fig. 1.12).
ϕ(x,y,z,τ) Φ
γ z
dV
f
y x Fig. 1.12. The formulation of the generalized equation of conservation
The domain separated by boundary from an environment is filled with moving two-componential liquid or gas. The system state can be fully described by means of fields of temperature t(x, y, z, ), concentration c1 (x, y, z, ), pressure p(x,y,z, ), and velocity w(x,y,z, ). The nonuniformity of temperature and concentration force so called conductive (molecular, diffusion) flows: heat flux q(x, y, z, τ) and mass flux of 1st-component j1(x, y, z, τ). Fluid flow provides the convective fluxes of extensive (connected with mass) quantities, such as enthalpy ( wh), mass of a component ( wc1). Here, , kg/m3 is fluid (eventual mixture) density; h, J/kg is the specific enthalpy. On boundary there is an interaction with an environment. For example, across the border the streams of mass and energy may pass. This interaction must be described by boundary conditions. Usually, the boundary separates the device elements from streams of gas or liquid heat-carriers. g
h
i
i
i
j
j
j
g
g
1.4 Conservation Laws 15
Generally, the system evolves from some initial state that should be determined by initial conditions. The problem is formulated as follows: at given initial and boundary conditions find the fields t,c1,p,w for the given configuration and then calculate the mass and energy flows. Let us consider a differential control volume dV, inside which the parameters t,c1,p,w are assumed to be approximately constant. For the neighboring volumes, these parameters may be others, but this difference must be small. The flows of mass, impulse, and energy pass through its surface. Inside the control volume the internal sources (positive or negative) are working (e.g. thermal energy may be generated during nuclear transformations, as in a power reactor). Common sense prompts some general idea about the balance for control volume: if receipt of any substance exceeds expenditure – its amount should grow. The following universal form can yield accurate record of balance for unit control volume: ∂ϕ = −div( ) + γ . ∂τ
(1.11)
k
According to (1.11), the time rate of increase of any substance in the control volume (the left part) is a consequence of the inflow through its surface (the first term on the right hand side) and of the generation (production) thanks to an internal source (the second term). In Eq. (1.11): – density of some extensive quantity, • [ϕ] = (∗3) , m – flux density of this quantity, including conductive and convective • components, [Φ ] = (∗2) , m s – source power, • [γ ] = (∗3) . m s The asterisks in the dimension formulas replace the concrete dimension of transferable extensive quantity (mass kg, energy J, impulse kg·m/s). Let us emphasize, that the control volume is fixed in space. Therefore, we use a partial time derivative in the left part (1.11) and have an opportunity to count all changes on unit of control volume. Let us consider implications of the first term on the right hand side (1.11). According to definition, divergence is a total vector flux through the surface of a small control volume, directed outside and counting on volume unit. It is the very thing that is necessary, except for a direction. Indeed, we consider inflow, therefore the minus is necessary. The divergence in the Cartesian coordinates may be calculated as: l
l
n
m
16
1 Differential Mathematical Models
div( ) = o
∂Φ x ∂Φ y ∂Φ z . + + ∂z ∂y ∂x
(1.12)
Now we need to fill the universal form (1.11) with concrete content. Mass Conservation Law: Continuity Equation In this case ϕ ≡ ρ;
≡ ρ w; γ ≡ 0 , p
(1.13)
where , kg/m3 is fluid density, the source term for mass is definitely absent. Introducing (1.13) into (1.11) yields the equation of continuity: q
∂ρ = −div(ρw ) . ∂τ
(1.14)
Often the fluid density may be considered as constant. Then the equation of continuity can be simplified: div ( w ) = 0 .
(1.15)
Conservation Law for Species Concentration In this case ϕ ≡ ρ1 = ρc1 ; s
≡ j1 + ρ w 1 ; γ = 0 . r
(1.16)
It is assumed, that chemical reactions in volume do not occur, therefore the source of mass is assumed zero. After introducing (1.16) into the universal form (1.11) the conservation equation for 1st-component is received: ∂ρ 1 = −div( j1 + ρ w 1 ) . ∂τ u
t
(1.17)
For conductive mass flux Fick's law is used: j1 = −ρD gradc1 . When Fick's law is incorporated into the conservation equation (1.17), the differential equation of convective diffusion is received: ∂ (ρc1 ) = −div( −ρDgrad c1 + ρ wc1 ) ∂τ
(1.18)
which appears as the determining equation for the concentration field c1. Here we refer only to a two-componential mixture, and the second component concentration is easily calculated: c2 = 1 − c1 .
1.4 Conservation Laws 17
Let us note, that we have entered a restriction, having refused from chemical reactions in volume. On the other hand, in many cases the reactions occur on interfaces. These are so-called catalytic reactions. Their rate is controlled by diffusion processes in a gas phase. Such problems can be described with Eq. (1.18), as well as propagation of passive impurity, the process of evaporation or condensation of gas-vapor mixtures in technique and in nature, etc. Thermal Energy Conservation Law: Energy Equation For the majority of processes in power engineering, technology and environment, it is possible to apply some justified simplifications in recording of energy balance. Since the flow velocity usually is substantially smaller than sound speed, we shall neglect the contribution of kinetic energy and viscous heat. A pressure drop in such flow is usually small in comparison to the absolute value of pressure. Therefore, we shall consider the thermodynamic processes as isobaric. For such systems the conservation law of energy can be written as enthalpy balance: the heat input is spent for enthalpy increase: ϕ ≡ ρh; v
≡ q + ρwh; γ ≡ qV ;
∂ (ρh ) = −div(q + ρwh) + qV , ∂τ
(1.19) (1.20)
where qV – internal heat source power, W/m3. For a heat flux q Fourier’s law is used with the addition of diffusion term (the second term on the right hand side): q = −λ gradT + j1 (h1 − h2 ) .
(1.21)
where h1, h2 – the specific partial enthalpy of components. When (1.21) is incorporated into the conservation equation (1.20), the differential equation of energy is received: ∂ ( ρh ) = −div(−λ grad T + j1 (h1 − h2 ) + ρ wh ) + qV , ∂τ
(1.22)
which appears as the determining equation for the temperature field. Additional thermodynamic relations are necessary for enthalpy and density as functions of temperature and concentration. Let us write down the energy equation (1.22) in more simple form for usual heat exchangers, without diffusion: ∂ (ρh) = −div(−λ gradT ) − div(ρwh ) + qV . ∂τ
Applying the equation of continuity (1.14), we shall receive:
(1.23)
18
1 Differential Mathematical Models
ρ
∂(h) = −div(−λgradT ) − ρw ⋅ grad (h) + qV . ∂τ
Assuming that enthalpy depends only on temperature (as for incompressible liquids at constant pressure or as for ideal gases), then: ∂ h dh ∂ T ∂T ≡ ≡ cp ; ∂τ dt ∂τ ∂τ
∂T ∂ h dh ∂ T . ≡ cp ≡ ∂x ∂x dt ∂x
After substitutions we shall receive the energy equation concerning temperature: ρ w
p
∂T = −div(−λ gradT ) − ρc p w ⋅ gradT + qV . ∂τ
(1.24)
Conservation Law for Momentum: Motion Equation Speed is an impulse of unit mass, and the unit control volume will contain the following amount of movement: ϕ ≡ ρ w , (kg m/s)/m3. x
The impulse flux consists of parts caused by pressure, viscous shear stress and convective impulse flow: z
≡ pI − ′ + ρww , (kg m/s)/(m2 s). y
x
As body force (i.e. the impulse source) we shall consider the Archimedean buoyancy force: {
≡ (ρ − ρ ∞ ) g .
Then: ϕ ≡ ρ w; ~
≡ pI − ′ + ρ ww; }
|
≡ (ρ − ρ ∞ ) g .
(1.25)
After introducing (1.25) into the universal form (1.11) the impulse conservation equation is received: ∂ (ρw ) = −div( pI − ′ + ρww ) + (ρ − ρ∞ )g . ∂τ
(1.26)
For conductive impulse flux, i.e. for viscous stress tensor used:
′ = µ(grad w + (grad w )T ) −
2 µ(div w )I . 3
, Stokes law is
(1.27)
If we have included this expression in the conservation law (1.26), the flow equation would ensue as the determining equation for the velocity field.
1.4 Conservation Laws 19
Thermohydrodynamical Differential Equations Set Let us collect all the received above thermohydrodynamical differential equations. 1. The continuity equation: ∂ρ = −div(ρw ) ∂τ
(1.28)
2. The equation of convective diffusion: ∂ (ρc1 ) = −div(−ρDgrad c1 + ρw c1 ) ∂τ
(1.29)
3. The energy equation: ∂ (ρh) = −div(−λ gradT − ρD(h1 − h2 )gradc1 + ρ wh ) + qV ∂τ
(1.30)
4. The flow equation: ∂ (ρw ) = −div( pI − ′ + ρww ) + (ρ − ρ∞ )g ∂τ
(1.31)
with σ from (1.27). We enumerate the decision variables: 1) temperature, 2) concentration, 3) pressure and 4) speed. Their number is equal to the number of the equations, i.e. the closed description in the form of system of the partial differential equations (PDE) is received. The integration of the full system (1.28)-(1.31) is a very complicated problem. But in the subsequent chapters of the book we give examples of solution for this system in Mathcad. The following equations will serve as the initial formulation:
∂u ∂v + =0 ∂x ∂y
(1.32)
∂ 2u ∂ 2u ∂p ∂u ∂u ∂u +µ + =− + ρv + ρu ρ ∂x ∂y ∂x ∂τ ∂x 2 ∂y 2
(1.33)
∂ 2v ∂ 2v ∂p ∂v ∂v ∂v +µ + =− + ρv ρ + ρu ∂y ∂x ∂x ∂τ ∂x 2 ∂y 2
(1.34)
∂ 2T ∂ 2T ∂T ∂T ∂T =λ + . + ρc p v + ρc p u ρc p ∂y ∂x ∂τ ∂x 2 ∂y 2
(1.35)
These equations follow from the more general formulation (1.28), (1.31), (1.30) in the case of a two-dimensional problem with constant physical properties. Eqs.
20
1 Differential Mathematical Models
(1.32)–(1.35) keep the basic features of a full problem though it is necessary to recognize, that they are insufficient for the calculation of turbulent flows. However, with the equations written out we shall analyze a flow disturbance as initial stage of turbulence (Chap.7). After some transformations of (1.32)–(1.35) we come to the system of ordinary differential equations (ODE). Their solutions will constitute a brief course of heat transfer (Chaps. 5, 6). A more detailed discussion of the basic equations of heat mass transfer can be found in [50]. Conservation Law for Finite Control Volume The balance equations can be written down for finite control volume. For a onedimensional problem the general chart (Fig. 1.12) will be replaced by drawing the balance for control volume as a block with thickness ∆x, and the two other sizes accepted as units. Notice that the material object is three-dimensional as it appears in reality, but changes (e.g. in temperature) may occur only along one of the coordinate axes (for a one-dimensional problem).
γ(x,τ)
(x,τ)
(x,τ)
∆x
x
(x+∆x,τ)
x+∆x
Fig. 1.13. Balance for the one-dimensional problem
For finite control volume and for a small but finite time interval the balance will be written down as:
ϕ( τ + ∆τ) − ϕ( τ) (∆x ⋅ 1 ⋅ 1) ≅ ∆τ
The rate in control volume ¢
(1.36)
− Φ ( x + ∆x ) −
¡
⋅ (1 ⋅ 1) + γ ⋅ (∆x ⋅ 1 ⋅ 1)
Φ( x)
Outflow across right border
Inflow across left border
Source
Pay attention to this formulation. For most people such a way of deduction of the differential equation will be the most natural:
1.4 Conservation Laws 21
i. ii. iii. iv. If £
At first we draw the control volume, such as in Fig. 1.13, and represent the inflow and outflow by arrows. Then we write down the balance as in (1.36). Further we design the modeling expressions for flows as shown in Eqs. (1.13), (1.16), (1.19), (1.21), and (1.25). We proceed to the zero limits for time and distance increments. x and in (1.36) approach zero, then ¤
¥
Φ( x + ∆x ) − Φ ( x ) ≈
∂Φ ∂Φ ∆x; Φ ( τ + ∆τ) − Φ (τ) ≈ ∆τ , ∂x ∂τ
and we come back to the differential representation (for the one-dimensional problem): ∂ϕ ∂Φ =− +γ. ∂τ ∂x
(1.37)
When the equation of conservation is written in the finite (discrete) form (1.36), there is a question about the allowable size of x. It is necessary that the size of control volume is essentially smaller than the size of the whole object. The minimal requirement is the reduction of the size to one order, and professional – to two orders. Note that for the one-dimensional problem it is necessary to divide the object into 102 parts, for two-dimensional into 102 102 = 104, and for three-dimensional into 102 102 102 = 106 parts. With such splitting it is possible to assume, that a state variable , such as temperature, is constant within the boundaries of the control volume. An individual value is attributed to each volume, and together they form a very large array. Having written down equation (1.36) for each control volume, we receive the pertaining system of equations. The order of the system is equal to the number of control volumes. For example, for a three-dimensional problem it may be 106. To solve such a system is a difficult problem, even for modern computers. We have outlined now the idea of a numerical method for partial differential equations (PDE). The reader will find concrete examples and computing Mathcadprograms in Chaps. 9–11. The best manual for beginners in this field is S.Patankar's small book [31]. ¤
¦
¦
¦
§
Poisson’s Equation and Built-In Solvers There are special mathematical packages, such as Phoenics, ANSYS, STAR-CD, to solve large-scale practical problems, like nuclear reactor computations or modeling of car aerodynamics: http://www.cham.co.uk, http://www.ansys.com, http://www.cd.co.uk. However, working with such programs demands special training, and the packages are expensive commercial products. The purpose for this book is the study of basic ideas in computer modeling, and therefore simple programs with codes easy to use and to update will be more suitable.
22
1 Differential Mathematical Models
Estimating corresponding abilities of Mathcad, it is necessary to ascertain, that this mathematical package possesses rather modest means for the solution of elliptical PDE such as Poisson’s equation: ∂ 2 u ∂ 2u + = ρ( x , y ) . ∂x 2 ∂y 2
(1.38)
Using the built-in functions multigrid and relax, the Dirichlet problem for Poisson’s equation can be solved in square area. We shall consider the built-in functions and create more powerful user functions in Chap. 10, but here we will discuss Eq. (1.38) itself. The physical content of the Poisson’s equation may be various. For example, it describes the distribution of electric potential, when the electric charges density is given as (−ρ). In heating engineering, the Poisson’s equation determines a stationary temperature field in bodies with internal sources of heat. The generalized equation (1.11) ∂ϕ = −div( ) + γ ∂τ ¨
is reduced to the Poisson’s equation, if • the problem is steady-state, / = 0, • the dependence of gradient type for the conductive flux, Φ = – Γφ grad , is assumed • the transport coefficient Γφ is constant. Then, instead of (1.11) we have: ©
§
©
¥
ª
0 = −div(−grad ϕ) +
γ , Γϕ
(1.39)
or, in coordinate decomposition for a two-dimensional problem: ∂ 2ϕ ∂ 2ϕ γ . + 2 =− 2 Γϕ ∂x ∂y
(1.40)
In case of heat conductivity the generalized form is replaced with the following concrete expression: q ∂ 2t ∂ 2t + 2 =− V . 2 λ ∂x ∂y
(1.41)
The physical meaning of this equation may be explained as follows. All heat produced by an internal source leaves the control volume by means of heat conductivity. Therefore, the temperature remains constant at all times. Spatial distribution of temperature should be determined by integrating Eq. (1.41). The solution of this equation and its applications are considered in Chap. 10.
1.5 Conservation Law for Traffic Problem 23
In Mathcad 11, one-dimensional parabolic and hyperbolic PDEs can now be solved inside solve blocks using the new built-in function pdesolve() or the new function numol() (see Chap. 11). 1.5
Conservation Law for Traffic Problem
Eq. (1.11) (or the one-dimensional Eq. (1.37)) we have named “generalized”, since it looks the same for different substances: mass, energy, impulse. The list can be continued, creating mathematical models for other problems, far from the mechanics of continua. Let us demonstrate this using an example of road movement modeling [5]. The traffic jams, the general delay and the threat of a full paralysis of the transport system – these factors deliver sufficient stimulus for the investigation of this problem. Basis for the analysis will be the generalized equation (1.37). The source γ will be zero: cars will neither leave nor enter the highway. The highway is located along an axis x (Fig. 1.13), its width is constant. In the role of ϕ the linear concentration of cars will act: [ϕ ] = cars / (km of highway length). The flux Φ represents the number of cars, passing the highway per time unit: [Φ] = cars/s. The differential equation of conservation (1.37) for the highway problem is written as: ∂ ϕ ( x , τ) ∂ Φ ( x, τ) . =− ∂τ ∂x
(1.42)
Eq. (1.42) contains two unknown quantities: car concentration and car flux density. We need a relationship, as dependence of car flux from car concentration. Now we can begin the concrete modeling. The car flux can be expressed in car speed w, m/s: Φ = ϕw .
(1.43)
If this statement seems non-evident, it is necessary to argue as follows. Let us recede from checkpoint against movement on distance L that numerically is equal speed. On this piece the number L, it is |w|, of cars will be placed. For time unit all of them will pass through checkpoint. The formula (1.43) is proved. Two limiting situations are evident: 0 the speed w has some limits, for example, the maximum speed • At allowed on the road, w wmax. • At closest packing, max, speed will approach zero, as common sense and experience suggests. The desired expression for w can be written as a linear approximation between the limits: ª
ª
«
ª
«
ª
«
ª
24
1 Differential Mathematical Models
® ±
ϕ
¯
w = wmax 1 − ¯
°
¬
¬
ϕ max
.
(1.44)
When (1.44) is incorporated into (1.43), there follows: ·
Φ = (ϕ max wmax )
´
·
ϕ ¶
µ
µ
´
µ
µ
²
ϕ max
²
³
¶
1−
ϕ ϕ max
²
²
³
.
(1.45)
The equations thus obtained can be written in the following compact dimensionless form: ∂Φ r ( x r , τ r ) ∂ϕ r ( x r , τ r ) =− , ∂x r ∂τ r
(1.46)
where x ; 0 ≤ xr ≤ 1 L τ τr ≡ L wmax xr ≡
ϕr ≡
ϕ ϕ max
; 0 ≤ ϕr ≤ 1
Φr ≡
Φ ; Φ r = ϕr (1 − ϕ r ) ϕmax wmax
wr ≡
w ; wr = (1 − ϕ r ) wmax
(1.47)
As Φ r = Φr (ϕr), it is possible to differentiate the right part (1.46) as composite function and to represent the conservation equation in the form of the wave equation: dΦ r ∂ϕ r ( x r , τ r ) ∂ϕ r ( x r , τ r ) =− dϕ r ∂x r ∂τ r
or ∂ ∂ ϕ r + Vwave (ϕ r ) ϕr = 0 , ∂τ r ∂x r
(1.48)
where Vwave (ϕ r ) =
dΦ r dϕ r
(1.49)
1.5 Conservation Law for Traffic Problem 25
is the wave velocity (of car concentration waves), or, in other words, speed of expansion of constant values of concentration. This statement can be proved as follows. Writing the change of concentration as full differential and equating this change to zero, ½
º
½
º
∂ ∂ dϕ r = ϕ r ( x r , τ r ) dτ r + ϕ r (x r , τ r ) dx r = 0 , ∂τ r ∂x r »
¸
»
»
¸
»
¼
¸
¸
¼
¹
¹
(1.50)
we receive the equation of a trajectory on a plane (x, ) along which concentration does not change (in Fig. 1.14, moving along dl, concentration does not vary): ¾
∂ ϕr ∂τ r =− . ∂ ϕr ∂x r Ä
∂x r ∂τ r
ϕr
Á
Â
¿
Â
¿
Â
¿
Ã
Ç
À
r(xr , r) È
Å
r
(1.51)
¿
Â
d r
= const
dl
Æ
dxr 0
xr
xr,0
Fig. 1.14. Characteristic
Comparing this expression with Eq. (1.48), rewritten as ∂ ϕr ∂τ r Vwave (ϕ r ) = − , ∂ ϕr ∂x r Î
Ë
Ì
É
Ì
É
Ì
É
Ì
É
Í
Ê
we receive: ∂x r ∂τ r
= Vwave (ϕ r ) .
(1.52)
ϕr
Hence, the external observer moving with the speed Vwave along a motorway would find identical concentration of automobiles at all times. The formula (1.52) is named the equation of the characteristic. As the wave speed depends only on concentration (see Eq. (1.49)), and as the concentration is
26
1 Differential Mathematical Models
constant along the characteristic, the characteristics on a plane (x,τ) will be straight lines (Fig. 1.14). According to definition (1.49) and to Eq. (1.47): Vwave =
dΦ r = 1 − 2ϕ r . dϕ r
(1.53)
Formulas (1.47) for car speed and car flux, and also for wave velocity are submitted graphically in Fig. 1.15. As the wave speed depends on concentration, the wave equation (1.48) is nonlinear. Wave speed (and the slope of the characteristics) is nonconstant and even changes a sign by change of concentration. Therefore two observers, having started along two characteristics with different slope, may meet in one point. This means, that different values of car concentration will take place in the same point. In other words, the discontinuity arises in the solution. Physically inadmissible ambiguity can be interpreted as occurrence of a compression shock (shock waves). See Chaps. 8, 9 for more detail. 1
( ) ( ) Vwave ( φ r)
wr φ r
Φr φr
0
1
0
0.5
1g
φr Car concentration
Fig. 1.15. The car speed, flux and wave velocity as functions of car concentration
Calculations in Mathcad of the car concentration waves are shown in Fig. 1.16: 1. Computing block 1. The first equation gives the initial distribution of cars along the road in form of an error curve. The characteristic starts at some point x0, whose 0 will be kept. The second equation sets the wave speed as function of concentration (1.53). The third is the equation of the characteristic received by means of integration (1.52). 2. Computing block 2. Further calculations are based on the fact that characteristics are level lines of function (x, ). For construction of the three-dimensional diagram the parametrical method (Parametric surface plot) is chosen. The set of initial points x0 is determined, and also the set of time moments for which calculations will be made. 3. Computing block 3. The grid on the plane “coordinate – time” is created, with nodes indexed as (i, j). In these nodes the concentration field i,j is calculated. For two-dimensional arrays of coordinates and time the designations are Ï
Ð
Ñ
Ï
Ñ
1.5 Conservation Law for Traffic Problem 27
changed to the appropriate capital letters X,T. The results obtained by characteristics method are presented in form of the two diagrams of Fig. 1.16, and both are constructed using the same data.
(
)
Ö
Ò
2 1) φ 0 x0 , φ m := φ m ⋅ exp − x0
(
×
)
Ó
ÔÕ
ØÙ
(
) x( τ , x0) := x0 + τ ⋅Vwave ( x0 , φ m)
V wave x0 , φ m := 1 − 2 ⋅ φ 0 x0 , φ m 2) x0_min := −3 τ min := 0 i := 0 .. Ni
x0_max := 3
Ni := 40
τ max := 3
Nj := 80
j := 0 .. Nj
(
(
)
i x0 := x0_min + x0_max − x0_min ⋅ i Ni
(
3) X i , j := x τ j , x0
)
i
Ti , j := τ j
)
τ j := τ min + τ max − τ min ⋅
(
)
φ i , j := φ 0 x0 , φ m i
j Nj
φ m ≡ 0.85
1
φi, 0 φ i , 40
0.5
φ i , 80
0
(X ,T ,φ)
5
0
5
Xi , 0 , Xi , 40 , Xi , 80
Fig. 1.16. Expansion of nonlinear waves of car concentration along a motorway
The diagram on the left gives a three-dimensional representation with the concentration on the vertical axis, and the horizontal axes are coordinate X and time T. The diagram on the right represents the usual graph of distribution of car concentration along motorway for three instants: initially (the time index, i.e. the second index of array, equal 0) and two subsequent times with time indexes of 40 and 80. During the movement of automobiles the initial profile of concentration (curve i,0 on the right) is shifted along the motorway and deformed. The observed deformation of the initial distribution occurs due to the dependence of wave speed on concentration (see Fig. 1.15). Sites of a wave with small concentration move forward (from left to right) with big speed, and others with big concentration lag behind. The waves with r > 0.5 travel backwards (from right to left) that means, their speed is negative (see Fig. 1.15). Ï
Ï
28
1 Differential Mathematical Models
The phenomenon of wave overturning (umklapp) is clearly visible. If the right slope of a wave becomes more and more flat, the left slope becomes steeper and steeper. There is an ambiguity: two or three values of concentration take place in the same coordinate at the same moment. This is impossible from a physical point of view. Crossing of characteristics, i.e. lines of constant concentration, is well visible in Fig. 1.17, where the three-dimensional diagram from Fig. 1.16 is submitted as viewed from top.
T
(X ,T , φ)
X
Fig. 1.17. Crossing of characteristics
The reason of such complex behavior is nonlinearity of Eq. (1.48). For comparison we shall calculate the linear wave transmission, i.e. we shall accept a wave speed as non-dependent of concentration (Fig. 1.18). Changes have touched only the computing block 1 where constant value of wave speed now is given. From resulting diagrams it is visible, that such linear waves move without deformation. So, by analysis of a nonlinear wave we have received the discontinuous solution in spite of the fact that the initial distribution was continuous and smooth. For practical purposes, the discontinuous solution is an important feature of a nonlinear problem and the essential complication for the researcher. The method of characteristics gives the formal nonsingle-valued solution. The ambiguous solution found must be replaced by a piecewise function, i.e. by a jump of car concentration, similar to the shock wave in gas-dynamics. However, special numerical methods and computing programs are necessary for the reproduction of shock waves. We shall continue discussion of this problem further in Chap. 9. To assert the generality of differential models for physically different problems, we shall consider two additional examples for the wave equation (1.48) in Chaps. 8, 9. In one of them, the quantity will be the vapor or gas bubbles concentration in water (as in a glass of beer, or in a two-phase steam-generating circuit of a power reactor). In the other case the quantity will be the concentration of harmful impurity in water percolating through the water-purification filter. Ð
Ð
1.6 One-Dimensional Stationary Models: Fuel Element 29
1)
(
)
Þ
ß
(
2)
Ú
2
φ 0 x0 , φ m := φ m ⋅ exp − x0 Û
)
ÜÝ
àá
(
)
x τ , x0 := x0 + τ ⋅ V wave x0 , φ m
x0_min := −3
x0_max := 3
Ni := 40
τ min := 0
τ max := 3
Nj := 80
i := 0 .. Ni
j := 0 .. Nj
(
)
i x0 := x0_min + x0_max − x0_min ⋅ i Ni
3)
(
)
V wave x0 , φ m := 1
(
X i , j := x τ j , x0
)
Ti , j := τ j
i
(
)
j τ j := τ min + τ max − τ min ⋅ Nj
(
)
φ i , j := φ 0 x0 , φ m i
φ m ≡ 0.85
1
φi, 0 φ i , 40
0.5
φ i , 80
0
(X , T , φ )
5
0
5
Xi , 0 , Xi , 40 , Xi , 80
Fig. 1.18. Linear wave with constant wave speed
1.6
One-Dimensional Stationary Models: Fuel Element
Many important design procedures widely used by engineers in practice can be received as solutions of elementary one-dimensional steady-state problems. We shall demonstrate this for heat conductivity problems in basic elements of power devices – for flat, cylindrical and spherical walls. Let us accept for a basis of analysis the generalized equation (1.11), ∂ϕ = −div( ) + γ , ∂τ â
and go to a stationary problem:
0 = −div( ) + γ . ã
For heat conductivity problem we use the usual denotations for heat flux and internal heat source: å
ä
q γ ä
qv .
30
1 Differential Mathematical Models
That gives: div(q ) = qv .
(1.54)
We present now the divergence as a special expression, suitable for objects with plane, cylindrical and spherical geometry (Fig. 1.19). F ~ r2
F ~ const F~r
Fig. 1.19. Objects with plane, cylindrical and spherical geometry
The control surfaces F, to which the heat flux refers, will be expressed by formulas, respectively: F = const ; F ( r ) = 2 π r ; F ( r ) = 4 π r 2 .
Let us construct further the special control volume dV, restricted with control surfaces F and representing the plane, cylindrical or spherical layer with small width dr. Then, according to definition of divergence: ë
è
d q( r ) ⋅ F (r ) dr q( r ) ⋅ F (r ) r +dr − q(r ) ⋅ F ( r ) r dr div(q ) = = . F (r ) ⋅ dr F (r ) ⋅ dr é
æ
ê
ç
(1.55)
The heat flux for one-dimensional problem is expressed by the formula: ∂t . ∂r
q ( r ) = −λ
(1.56)
After rewriting (1.54) with the explanation (1.55) d (q( r ) ⋅ F ( r ) ) = F ( r ) ⋅ qv dr
and integrating we shall receive the following equation of balance: ö
ó
rx
ô
ñ
ð
ô
q( rx ) ⋅ F ( rx ) − q( r0 ) ⋅ F ( r0 ) =
qv F ( r ) ⋅ dr
ñ
ô
ñ
ï
ï
ì
ì
î
ì
ì
í
ì
î
ì
í
õ
ò
Heat outgoing
Heat incoming
r0 ï
ì
ì
î
ì
ì
í
Thermal energy generation in layer ( rx − r0 )
. (1.57)
1.6 One-Dimensional Stationary Models: Fuel Element 31
We shall calculate further the temperature field in the fuel element of a nuclear reactor. For the fuel element as a cylindrical rod, it is necessary to put in (1.57): F ( r ) = 2π r ;
r0 = 0 ;
q(r0 ) ⋅ F (r0 ) r →0 = 0 . 0
Then we receive, in view of expression (1.53), the following differential equation for the temperature field: −λ
∂t 2π r 2 . 2 π r = qv ∂r 2
(1.58)
We make further calculations in Mathcad (see Fig. 1.20, Fig. 1.21). -3
-6 2
λ ( t) := 8.2 − 8.1 ⋅ 10 ⋅ t + 2.6 ⋅ 10 ⋅ t 10 8 λ ( t)
6 4 2 0
0
500
1000
1500
t
Fig. 1.20. Thermal conductivity , W / (m K), of uranium dioxide ÷
qV := 5 ⋅ 10
8
r1 := 0.0038
Given ø
ù
λ ( t (r) ) ⋅ ú
d t (r) dr
t_Fuel( r) :=
ýû
ü
−
qV ⋅ r
( )
t r1
2⋅1
500
t := odesolve ( r , 0 , 40)
t ( r) if r > 0 t ( −r) otherwise 1000 800 t_Fuel( r)
600
t ( 0) = 994.154
( )
t r1 = 500
400
0 r
Fig. 1.21. The temperature field in the fuel element (see Appendix about odesolve)
32
1 Differential Mathematical Models
The parameter set is as follows: source power qV = 500 MW/m3; rod radius r1 = 3.8 mm. We have also taken into account the essential temperature dependence of the heat conduction coefficient of nuclear fuel (Fig. 1.20). The numerical integration of the nonlinear differential equation (1.58) is carried out in block Given by method odesolve (Fig. 1.21). The boundary condition in this example is set as temperature on surface (t(r1) = 500˚C). Generally speaking, this temperature depends on the cooling conditions. As a result of integration the temperature distribution in fuel element is received. The maximal value is reached on axis: t0 = 994.2ºC. It is an allowable temperature for uranium dioxide as hightemperature material. Another solution mode for Eq. (1.58) is possible, as it is an equation with separable variables. After integration on a complete interval we shall receive: t
∆t =
1 0 qV r12 ; λm = λ(t ) dt , 4λ m t 0 − t1 t
(1.59)
þ
1
where m – average value of thermal conductivity. Let us show how to carry out the calculations with these formulas, if the setting of a problem has remained, i.e. the source power qV and surface temperature t1 are given and the temperature at centre t0 must be found (Fig. 1.22). ÿ
(
)
( )
λ ta
λ m ta , tb :=
ta − tb < 0.001
if
tb
1 ⋅ λ ( t) dt tb − ta t a
otherwise
q v := 5 ⋅ 10
(
)
8
r1 := 0.0038
(
)
eq t0 , t1 := t0 − t1 −
q v ⋅ r1
2
(
4 ⋅ λ m t1 , t0
)
t1 := 500
( (
)
t0 := root eq t0 , t1 , t0 , t1 , 2000
)
t0 = 994.154
Fig. 1.22. Calculation of maximal fuel element temperature
The design formula (1.59) is represented as expression eq, which should be zero. The nonlinear equation eq is solved with built-in function root. That returns the value of t0 lying in interval from t1 to 2000, at which the function eq becomes zero. The outcome (t0 = 994ºC) coincides with the outcome obtained earlier by another method (see Fig. 1.21).
1.7 Conclusion 33
The same calculation procedures will be suitable for an electric rod-type heater, when the internal heat source is caused by resistance against electric current. Starting with Eq. (1.57) and working similarly, it is easy to receive the formulas for thermal resistances of all basic elements of a heat exchanger. All calculations of fuel element temperature were carried out on a onedimensional model, which will be correct, if only geometry, structure of materials and the cooling conditions will be axially symmetric. Complications beyond this are considered in Chap. 10. 1.7
Conclusion
In this chapter, we have discussed how differential mathematical models are established in the analysis of different problems. It was shown, that a source of such formulations could be the direct translation of the verbal description into mathematical language, as in a case of a logistic model, or the direct application of laws of nature given in the differential form, or the record of the balance equations for control volume. In result, the circle of mathematical models is outlined, with which the work will be continued further: · the ordinary differential equations, · the first order partial differential equations, · the second order partial differential equations. Mostly nonlinear equations are dealt with; therefore the numerical methods must be used for integration. The problem about kinematic waves on motorways (i.e. about solutions of nonlinear differential partial equations of the first order) will be expanded in Chaps. 8, 9 by two new models: waves of an impurity concentration and waves of gas content in two-phase mediums. The shock waves problems will be solved by means of special programs (Chap. 9) developed for this purpose. The new programs for solving PDE of second order will be added to built-in Mathcad functions (Chap. 10). They allow describing several kinds of thermal interaction with the environment and are suitable for various shapes of twodimensional domains. Another enhancement is the program for one-dimensional non-stationary problems, such as heat waves (Chap. 11). By means of boundary layer methods, the solutions of a composite system of thermohydrodynamic differential equations for laminar flows will be obtained in Chaps. 5 and 6. The effect of hydrodynamic instability as forerunner of turbulence will be analyzed in Chap. 7. Not only differential models, but also other types of mathematical models are applied in engineering practice. If the subject of research can be considered as a lumped-parameter system functioning at steady-state conditions or varying step by step on discrete time intervals, the mathematical model will be submitted by the algebraic equations. In these cases, a matrix model frequently will be utilized Y = A⋅X ,
34
1 Differential Mathematical Models
e.g.,
y1
y2
=
a11
a12
a21 a22
a11 x1 + a12 x2
x1
x2
≡
a21 x1 + a22 x2
,
assigning a linear transformation of vector X = (x1,x2) in vector Y= (y1,y2). In geometrical interpretation, the transformation consists in the rotation and the scaling of vector X. For a square matrix A there are eigenvalues and eigenvectors Xeig, such, that the scaling only is carried out, but not the rotation:
λ X eig = A ⋅ X eig . The elementary application of the matrix model consists of the demonstration on a computer display, how the initial figure will be deformed (rotation, distortion, shear) under matrix transformation. The volume change during the transformation is set by matrix determinant. Other applications of the matrix model can be offered in order to interpret transformation as a modification of components x1 and x2 as a result of flows in a system, which are proportional to magnitudes of x1 and x2 themselves, and to take into account an interchanging both between components and with a surrounding medium. For instance, such matrix model can be gained for radiation heat fluxes in self-contained system of surfaces with various temperatures (see e.g. [10]). The task of the modeler consists in shaping a suitable matrix A. If this creative part of a problem is solved, all operations with the matrix model are best fulfilled in Mathcad, as there is a complete set of tools available for matrix multiplication and inversion, evaluation of determinant, searching of eigenvectors and eigenvalues etc. A very special place among methods of modeling is occupied by cellular automatons – the models reducing an explored object to a low-level logic cell, whose behavior is defined by prime rules of interaction with neighboring identical cells [9]. It is supposed, that at exact selection of rules it is possible to simulate actual systems, including hydrodynamic. An example of the cellular automaton is the computer game “Life” imitating birth, life and death of populations. It is accepted, that a living cell is identified by value 1, and a dead cell by 0. The destiny of each cell is defined by state of eight neighboring. One of the rules says: if the sum of values of neighboring cells equals 2 or 3, the cell survives, otherwise it dies due to overpopulation or loneliness: 0 0 1 1 1 0 0 1 0
1
0 0 1 1 1 1 0 1 0
0
0 0 1 0 1 0
0.
0 0 0
If one wants to set some initial allocation of living and dead cells in form of a large matrix from unity and zero, the system will evolve, forming composite varying patterns. The purpose of this game can be to search for conditions which en-
1.7 Conclusion 35
sure the survival of populations. It is best to implement algorithms of cellular automata in a specially designed programming environment CAM. For the modeling of compound objects which can not be completely formalized, so-called expert systems are developed, whose database contains the information on objects as a gang of rules, formulated by experts in the relevant fields of knowledge. For example, the elementary expert system of a weather forecast could function on the basis of the following rule: if today's temperature is e.g. 10ºC, then tomorrow's will be the same, plus/minus one or two degrees. Such system will work quite well, making mistakes only during the rare phases of a sharp change of weather. The rules can be expanded and gradually improved according to experience. The solutions or recommendations are based on logic deduction. There are algorithms for self-training expert systems. Therefore professional expert systems, such as MYCIN for medical diagnostics or DENDRAL for a discernment of chemical structures, fall into the area of artificial intelligence. Apropos, when we start the symbolical processor Mathcad to receive analytical expression for an integral or derivative of composite function, we consult an expert system in the area of mathematics. It is said, that thus we find the assistant– mathematician with Ph.D.
2
Integrable Differential Equations
2.1
Introduction
For reasons, which have, apparently, philosophical character, the majority of differential equations born in engineering practice, are not integrable. More precisely, they cannot be solved in quadrature, i.e. it is not possible to reduce the problem to integration of known functions. Therefore, numerical methods are applied. A source of these difficulties is nonlinearity of mathematical models of complicated real processes and devices. There are situations when the analytical methods allow advancing near the solution, but then we need the numerical methods again to finish the decision (for example, as in the boundary layer problem, Chapt. 6). Sometimes, the analytical solutions look so bulky, that they appear practically useless, and therefore it is more suitable to solve a problem numerically. At last, it is also possible, that the practical engineer does not have enough mathematical skills or enough time to reduce the problem to quadrature by means of complicated and nonstandard transformation of variables while the numerical result may be obtained quite operatively. Keeping these reasons in mind, we can accept the absence in Mathcad of special instruments for analytical solutions of differential equations, such as in Maple. Listed below is a list of the simplest situations when analytical solutions are possible and may be easily obtained manually: i. General first-order linear equations ii. Linear homogeneous equations with constant coefficients iii. Linear inhomogeneous equations with constant coefficients and with special structure of the right hand side iv. Equations with separable variables v. Homogeneous differential equations y' = f(y/x) vi. Depression of equation This list is not complete. If deriving analytical solutions is preferable for some reason, to consult a special manual. A simpler way is to look for the equation in E.Kamke's manual [17], where about 1650 differential equations with solutions are collected and the basic theoretical background (without proofs) is given. 2.2
First-Order Linear Equations
The general first-order linear equation for an indeterminate function y(x) is: y′ = f ( x) ⋅ y + g ( x) ,
(2.1)
38
2 Integrable Differential Equations
where f(x) and g(x) are arbitrary functions of the independent variable x. An initial condition prescribes the given value η for y at given point x = ξ: y (ξ) = η . The analytical solution and a numerical example will be submitted below in Mathcad-documents in Fig. 2.1 and Fig. 2.2. But first we shall discuss the possible physical contents of Eq. (2.1) by comparing them with the generalized form of conservation equation (1.11). We shall show, that the differential equation (2.1) may serve with equal success as model of a chemical reactor or describe the propagation of thermal radiation through an active medium. Suppose that the independent variable x is time τ. In this case the generalized equation (1.11) will take the form: ∂ϕ =γ. ∂τ
(2.2)
The divergence operator is omitted, as spatial distribution of dependent variable is uniform. We deal with the ordinary differential equation containing the unique independent variable – time . Comparing the form (2.2) with Eq. (2.1) we present its left part as rate of increase y′ of some physical quantity y in a control volume due to a source (Eq. (2.2), term on the right),
γ ≡ f ( τ) ⋅ y + g ( τ) ,
having two components. The first of them f( )⋅y is proportional to y just as it was in the elementary model of exponential growth (1.8). The second component g is the internal production or inflow from an environment, independent of y. Coefficient of proportionality f(τ) and quantity g(τ) do not depend on unknown variable , they are given, prescribed to the system from outside as any time functions. Therefore they may be interpreted as external action. A good example is the chemical reactor in which the concentration y of an active component grows due to autocatalytic reaction with a rate f( )⋅y, and this component also is injected (or moved away) with rate g. A reaction is autocatalytic when it is accelerated by its own product. The considered differential equation may also be a suitable model for a thermal state of an object, whose temperature y varies with time as a consequence of heater on-off g, assumed that heat sink to environment (f⋅y, f<0) is proportional to excess temperature y. Suppose that the independent variable x in (2.1) is now the spatial value. In ordinary differential equations considered here there can be only a single independent variable therefore we must eliminate the time dependence in equivalent conservation equation of kind (1.11). In this case the generalized conservation equation should be written as
0 = −div( ) + γ .
2.2 First-Order Linear Equations
39
For a one-dimensional problem with single spatial value x, we obtain: 0=−
dΦ +γ, dx
or in standard ODE form: dΦ = γ. dx
(2.3)
Comparing the form (2.3) with the analyzed Eq. (2.1), y′ = f ( x) ⋅ y + g ( x) ,
we interpret the left hand side as spatial variation of flux density y (or Φ) of any substance, assumed that this variation arises due to source action, γ ≡ f ( x) ⋅ y + g(x) ,
again having two components. As an example, let dependent variable y be the radiation flux. Then the first term of a source, i.e. f·y, is proportional to the flux itself. The coefficient of proportionality f must be negative because of absorption of radiation by propagation through matter. If this description is not quite obvious, it is useful to imagine the shooting at targets: the number of hits will be proportional to the number of shots. The radiation flux in such analogy is bullets, and hits are the acts of photon absorption on targets – i.e. on matter particles. The second source term is the emission, not dependent on the radiation flux y itself but dependent on temperature. If the temperature is coordinate-dependent then g = g(x). Let us return to the integration of the differential equation (2.1). The solution in quadrature is shown (without derivation) in Fig. 2.1. In the first line the differential equation and the initial condition are written: (ξ, η) – a point through which a solution should pass. In the second line, an auxiliary function F and a solution are shown. By writing of integrals the designation of integration variable was changed so that it did not coincide with limits on integrals, as provided by Mathcad. y'
f( τ) ⋅ y + g ( τ)
y( ξ )
η
q
τ
F ( τ ) :=
f ( t) dt
y( τ ) := exp ( F ( τ ) ) ⋅ η +
g ( u) ⋅ exp ( −F ( u) ) du
ξ
τ
ξ
Fig. 2.1. Analytical solution of a linear differential equation
40
2 Integrable Differential Equations
Evaluations are continued further as shown in Fig. 2.2 (both Figs. 2.1 and 2.2 are parts of unit Mathcad-sheet). Analytical y( ) and numerical z( ) solutions are obtained. The coordination of exact and approximated solutions is very good. There is full coincidence, with the accuracy of graphical representation. Let us look at Fig. 2.2. In the first line the values of the initial parameters and concrete functions as variable coefficients of the differential equation are given. In the second line the operator of symbolic computation (arrow to the right) is applied. Symbolic processor of Mathcad makes substitution of known functions and values and fulfils integration. In the third line the correctness of the obtained solution is confirmed: the differential equation becomes zero for the analytical solution y( ). The numerical solution is produced in block Given including the original equation, bound condition and the call of built-in numerical integrator odesolve. The numerical sequence of argument is created, in this case in order to avoid the fusion of markers in one continuous bold curve on the diagram.
ξ ≡ 0
y( τ ) simplify → d dτ
g ( τ ) ≡ cos ( τ ) + 1
η ≡ 4
f( τ ) ≡ −1
5 1 1 ⋅ exp ( − τ ) + 1 + ⋅ cos ( τ ) + ⋅ sin ( τ ) 2 2 2
y ( τ ) − ( f ( τ ) ⋅ y( τ ) + g ( τ ) ) simplify → 0
Given d dτ
z ( τ ) − ( f ( τ ) ⋅ z( τ ) + g ( τ ) )
0
z( ξ )
η
z := odesolve ( τ , 20 )
τ := 0 , 0.5 .. 20 4
y( τ ) z (τ )
2
g(τ )
0
0
10 τ
Fig. 2.2. Comparison of exact and numerical solution
20
2.3 Linear Homogeneous Equations with Constant Coefficients 41
2.3
Linear Homogeneous Equations with Constant Coefficients
The second order equation of this type can be written as y ′′ + a1 ⋅ y ′ + a2 ⋅ y = 0 ,
(2.4)
where a1, a2 are constants. In general, the coefficients of the equation may be complex quantities. However, the independent variable x is a real quantity. Therefore the solution will be a complex-valued function from the real argument: y ( x ) = yr ( x ) + i ⋅ yi ( x ) .
(2.5)
For this expression, the operations of derivation and integration may be fulfilled above real and imaginary parts: y ′( x ) = y r ( x ) + i ⋅ yi ( x ) , x2
x2
y ( x ) dx = x1
x2
y r ( x ) dx + i ⋅ yi ( x ) dx . x1
x1
The structure of the differential equation (2.4) is that the decision function y and its derivatives form a linear combination. The second derivative is proportional to a linear combination of the first derivative and a function itself. The exponential function, generally, the complex exponential function from real argument x e λ x ≡ e (a +i⋅b )⋅ x ≡ e ax ⋅ e ibx ≡ e ax (cos( bx ) + i ⋅ sin(bx ) )
has such property. Complex exponential functions are treated the same as the usual exponent, for example: d λx e = λ ⋅ e λx , dx x2 !
e λx dx =
x1
1 λx e λ
x2 x1
.
We write down a putative solution as the exponential function with an, for the time being, undefined exponent , y = exp( x), and substitute this expression into the differential equation (2.4). The exponential factors will be cancelled, and instead of a differential equation (2.4) we will receive the so-called characteristic algebraic equation for : "
"
#
λ 2 + a1λ 1 + a2 λ 0 = 0 .
(2.6)
42
2 Integrable Differential Equations
For a second-order differential equation, it is the quadratic characteristic equation having two radicals (λ1, λ2). Thus, there are two approaching exponential solutions: exp(λ1x), exp(λ2x). Using the superposition principle for linear systems, it is possible to construct the common decision as a linear combination y ( x ) = C1 e λ1 x + C2 e λ2 x .
(2.7)
If among radicals there are multiple roots then instead of taking constant C it is necessary to take a polynomial of a degree, one unit smaller than order of root. For example, if radicals of quadratic equation (2.6) are identical and equal λ the order is 2, and degree of polynomial is 1. Then y ( x ) = (C1 + %
(
'
$
%
2 &
x )e λx ≡ C1 e λx + $
2
x e λx .
polynomial
If the differential equation is written down immediately as the conservation equation for any real system (see Sect. 2.2), the included constants or the given functions will be real (not imaginary). However, the roots of the characteristic equation may be complex-valued. For our example with a second-order equation it will happen, if a discriminant of the quadratic equation (2.6) is negative. Then the solution appears complex-valued. The question is, how to select a real solution having physical meaning. If we substitute a complex solution (2.5) in differential equation (2.4) with real coefficients, the original Eq. (2.4) will split. Two completely identical equations, identical also to the original, arise: one of them – for real, and another – for imaginary part of the complex solution. We have step by step: y ′′ + a1 ⋅ y ′ + a2 ⋅ y = 0 ;
( y r′′ + a1 ⋅ y r′ + a 2 ⋅ yr ) + i ⋅ ( yi′′+ a1 ⋅ yi′ + a 2 ⋅ yi ) = 0 ; y r′′ + a1 ⋅ y r′ + a2 ⋅ y r = 0;
y i′′+ a1 ⋅ y i′ + a 2 ⋅ y i = 0 .
Hence, both real and imaginary parts of the complex-valued solution are solutions. Therefore, the common solution in the real area should be built as a linear combination of the real and imaginary part of the complex-valued solution. An example with the equation of type (2.4) was considered earlier in the first chapter in a problem about a pendulum (see Eq. (1.2) and Fig. 1.2). The real and imaginary parts were cos( τ) and sin( τ). Hence, the solution for harmonious oscillator will be )
)
x ( τ) = C1 cos( ωτ ) + C2 sin(ωτ) , where is the eigenfrequency of the system. Let us mark one more important characteristic of solutions following from reality of coefficients in Eqs. (2.4), (2.6): if λ is a root of characteristic equation, then )
2.4 Linear Inhomogeneous Equations
43
the complex conjugate number λ is also a root of this equation. This property is proved by substituting λ in characteristic equation, in view of equality:
(λ) = (λ ). n
n
The last equality is obvious if using the exponential form of a complex number. Thus, complex roots for the equations with real coefficients occur as conjugate pairs. 2.4
Linear Inhomogeneous Equations
Let us consider the linear inhomogeneous equations with constant coefficients and with a right hand side term of special structure y ′′ + a1 ⋅ y ′ + a 2 ⋅ y = Pm ( x ) ⋅ e wx ,
(2.8)
where Pm – a polynomial of a degree m. Generally speaking, exponent w is a complex number and its imaginary part is frequency of an external action. If w is not the root of the characteristic equation (2.6) the particular solution of the inhomogeneous equation (2.8) looks like y ( x ) Part = Qm ( x ) ⋅ e wx ,
(2.9)
where Qm – a polynomial of the same degree as Pm. If w is the n-fold root of the characteristic equation (2.6) the particular solution of the inhomogeneous equation (2.8) looks like y ( x ) Part = x n Qm ( x ) ⋅ e wx ,
(2.10)
where Qm – a polynomial of the same degree as Pm. The general solution of the inhomogeneous equation (2.8) is created as the sum of the general solution of the appropriate homogeneous equation (2.4) and a particular solution such as (2.9) or (2.10). The case when w coincides with the root of characteristic equations is named a resonance, since frequency of an external action (the term on the right of (2.8)) coincides with eigenfrequency of the system. 2.5
Equations with Separable Variables
The equation with separable variables has the following structure: dy = f ( y ) ⋅ g ( x) . dx
We can rewrite it in a form with separated variables:
44
2 Integrable Differential Equations
dy = g ( x ) ⋅ dx , f ( y)
and then integrate both left and right hand sides in consistent limits: y *
y0
x
dy = g ( x ) ⋅ dx , f ( y) x *
0
where y(x0) = y0 – the initial condition. The solution of the differential equation is expressed in quadrature. The example of such an equation is considered above in Chap. 1 (see Eq. (1.10) and Fig. 1.8). 2.6
Homogeneous Differential Equations
The equation y′ =
Q ( x, y ) , P ( x, y )
(2.11)
where Q and P – homogeneous polynomials with equal exponent n, such as Q (tx, ty ) = t nQ ( x , y );
P (tx, ty ) = t n P( x , y ) ,
will result in the form +
0
y′ = f /
.
-
y x ,
(2.12)
by division of the numerator and the denominator of the right member (2.11) on a maximal degree of x. By substituting y = x⋅u(x) into (2.12) the following equation with separable variables is obtained x ⋅ u′ = f ( u ) − u . The integration of such an equation is described above in Sect. 2.5. 2.7
Depression of Equation
If the differential equation does not contain in the explicit form • dependent variable y • or independent variable x, then its order can be depressed by means of the change of variables, as shown in the Mathcad-document in Fig. 2.3.
2.7 Depression of Equation
45
7
8
1)
2
1
d2 8
d 2
2
9
y(x) + 3
dx
dx
y(x)
46
f(x) substitute, 5
:<
d
;
dx
d dx 7
2)
2
8
2
9
d2 2
3
y( x) +
dx
d dx
y( x) + y(x)
z( x) + z(x)
substitute,
1
8
z( x) →
y(x)
;
2 5
0
4
6
<:
d dx
y(x)
;
5
2
f (x)
p ( y(x)) →
simplify ;
t ← y( x) ⋅ t ← x
1 2
+ p ( y(x)) + y( x)
2
0 w
d y( t) dt
d p (t) dt 1
2
d
3
p ⋅p + 46
dy
5
2
p+ y
0
Fig. 2.3. Depression of differential equation
For the second case we duplicate the result (the first-order equation) in a more precise form by hand (see final string). Mathcad is not accommodating to an analytical solution of the differential equations. The symbolical processor Mathcad is a subset Maple – top system for analytical calculations. For comparison we shall show, how Maple works with the equation, which is not containing explicitly the independent variable (Fig. 2.4). > restart ; with ( DEtools ) d2 d y( x ) + y ( x ) + y( x )2 = 0 dx dx 2 > odeadvisor ( ODE ) ; dsolve ( ODE ) =
> ODE :=
?
?
?
@
>
A
B
B
B
[ [ _2nd_order , _missing_x ] ] I
C K
y( x ) = 0, y ( x ) = _a &where { E
K
E
K
J
d _b( _a ) _b ( _a ) + _b( _a ) + _a 2 = 0 }, d_a F
K
D
G
H
H
S
d y( x ), _a = y ( x ) } , y ( x ) = _a , x = { _b ( _a ) = dx
1 d_a + _C1 _b ( _a )
N
N
O
N
N
L
M
T
U
N
N
P R
N
N V
Q W
X
U X
U X
X
U
Fig. 2.4. An example from Maple
The function odeadvisor classifies ODE as a 2nd order equation, with missing x. The solver dsolve specifies, what change of variables should be produced, presents the result of such replacement, the reduced equation of first order, and shows
46
2 Integrable Differential Equations
how to return to initial variables, when the solution of the equation will be found. In the given example, the reduced nonlinear equation was not integrable analytically, and any numerical method should be applied for this purpose. 2.8
Conclusion
When solving actual engineering problems, it is fortunate to obtain a mathematical model in the shape of the integrable differential equations. The cause is nonlinear nature immanent to composite engineering objects and the nonlinear form of the modeling differential equations, accordingly. The basic tools for nonlinear equathcad submits a rich artions are the numerical methods, and for this purpose senal of proprietary solvers (see Appendix). The majority of the equations deduced and solved in the book are nonlinear. The behavior of nonlinear systems is characterized by considerable variety and complexity in comparison with linear systems. It is not possible for nonlinear systems to use the principle of superposition which will be utilized for linear equations to make up the common solutions from partial solutions, or to make up the response on collective exterior action of several harmonic components (Sects. 2.2– 2.4). One should not expect either, that the response of the nonlinear system to exterior periodic action with given frequency will be registered on the same frequency, as it was for a linear system (see example in Fig. 2.2). Some special properties of nonlinear systems will be illustrated in the subsequent chapters of the book. In Chap. 3 we shall see, that, due to nonlinear dependence of right-hand part of DE on dependent variable, there are some equilibrium points, stable and unstable, and at change of control parameters a cardinal modification of solution character is observed (bifurcation phenomenon). The effects of nonlinearity are considered for partial differential equations in Chaps. 1, 8, and 9 on problems about propagation of kinematic waves. It is shown, as the progressing strain of a wave profile results in discontinuous solutions, shock waves, whereas the linear waves run without profile modification. The mutual relation of linear and nonlinear exposition is considered in Chap. 7. It is possible near to an equilibrium state for small amplitudes of deviations to linearize initial nonlinear exposition and due to this to receive prime solutions. However, these solutions remain valid only on quick-transient initial stage of perturbations. The oscillations and waves with major amplitude become nonlinear. One of the remarkable manifestations of nonlinearity in differential models is an auto-oscillations phenomenon, i.e. undamped oscillations in the dissipative systems which have not been exposed to exterior periodic actions. The example of “singing” wires by even wind is generally known (Aeolian harp). A special course of differential equations as a basis for the analysis of instabilities in selforganizing systems is contained in [12]. Y
Z
3
Dynamic Model of Systems with Heat Generation
3.1
Introduction
Heat, or thermal energy generation in natural and technical objects can result from transformation of • nuclear energy in thermal energy, as in a fuel elements of a nuclear reactor • chemical energy in thermal energy at exothermal chemical reaction, • electrical energy in thermal energy at passing electric current (resistance heating). Functioning of systems with heat generation can be connected with the danger of uncontrollable fast temperature increase, exceeding of permissible temperature limit, resulting in melting, spontaneous combustion or explosion. The possibility of such disastrous scenario contains in the elementary dynamic model of the system according to which: • Heat source power is determined by rate of chemical reaction under Arrhenius equation • Heat exchange to an environment happens under Newton–Richman law. On this model N.N.Semyonov’s theory of thermal explosion is based [37, 38]2. The concept of catastrophe as some destructive phenomenon is supplemented by a mathematical metaphor, namely, description of a dynamic system in the form of so-called fold catastrophe from R.Thom’s catastrophe theory [33]. Let us note, that our considerations do not include a detailed analysis of combustion physics. The subject of our interest will be the special structure of the nonlinear mathematical model. 3.2
Mathematical Model
The thermal energy balance,
[
dE dτ
Increase of thermal energy
=
QV Heat generation \
− QF
,
Heat sink ]
for a material volume V with internal heat source and with heat sink through surface F to surroundings (Fig. 3.1) is written in the form of a non-linear differential equation concerning temperature T as a state variable [38]: 2
Nikolay Semyonov, U.S.S.R., joint winner, with Sir Cyril Hinshelwood, of the Nobel Prize for Chemistry in 1956, works on the kinetics of chemical reactions
48 3 Dynamic Model of Systems with Heat Generation
ρ V b
a
^
`
d T dτ ^
E ) − αF (T − T f ) , RT
= qvmV exp( −
a
^
a
^
^
`
^
^
_
`
^
_
Heat sink
_
Heat generation
Increase of thermal energy
(3.1)
where τ − time as independent variable; Tf – ambient temperature; α − heat transfer coefficient; ρ − density; – specific heat; E – activation energy, the parameter in Arrhenius equation: “reaction-rate constant” ~ exp(–E/RT); R – gas constant; qvm – preexponential factor (W/m3). Uniform distribution of temperature inside the body is supposed at formulation of this equation, due to good intermixing or as a result of high heat conduction of substance. c
F
V
T( ) d
e
(T-Tf)F
qvm exp(–TR / T)V
Fig. 3.1. The object with internal heat generation
Using the quantities TR = E/R and τ0 = ρcTR/qvm as scales for temperature and time accordingly, we write (3.1) in form:
f
d W dt
1 ) − A(W − W f ) , W
= exp( −
j
j
g
g
Increase of thermal energy
i
g
i
g
h
Heat sink
h
Heat generation
(3.2)
where • • • •
W = T/TR – dimensionless temperature, state variable, T = τ/τ0 – dimensionless time, independent variable, A = αFTR / Vqvm – heat transfer coefficient, numeric parameter, Wf = Tf /TR – the dimensionless ambient temperature, the numeric parameter. The thermal energy generation rate by chemical reaction depends on (dimensionless) temperature nonlinearly, k
p
m
QV = exp − n
o
1 , W l
as shown in Fig. 3.2. At low temperatures, the heat generation is insignificant because of a small chemical reaction rate. Then sharp increase and finally gradual passage to an asymptotic value is observed.
3.2 Mathematical Model 49 q
−1 Qv( W) := exp W r
s
vt
u
1
Qv ( W ) 0 0
2 W
Fig. 3.2. Nonlinear S-shaped temperature dependence of heat generation rate
Heat exchange with surroundings is given by Newton–Richman law:
(
)
QF = A W − W f ,
according to which the heat flux on a surface is proportional to temperature difference of solid W and medium Wf. The behavior of the right hand side member (3.2) as function of dependent variable W (temperature), |
(
y
)
1 Q(W, A, W f ) = QV − Q F = exp − − A W −Wf , W z
w
x
{
will play the key role in further analysis. In a physical meaning, Q(W,A,Wf) is the resulting source term in Eq. (3.2), i.e. the heat generation rate QV minus heat outflow QF through the surface of control volume. In Fig. 3.3 the partial dependence Q(W) is shown for the selected pair of control parameters (A, Wf). The temperature Wf of the surroundings is marked by a vertical dotted line.
(
)
}
~
Q W , A , Wf := exp
−1 − A ⋅ W − Wf W
(
)
0.1
(
)
Q W , A , Wf mark_Wf
0
0.5
1
W , Wf
Fig. 3.3. Representation of the right hand side of Eq. (3.2) at values: W f = 0.2, A = 0.46
50 3 Dynamic Model of Systems with Heat Generation
At the intersections of the curve with the abscissa axis the resulting heat input is zero. Therefore, the derivative dW/dt vanishes, and the temperature of the object will not vary in time. Such points are called stationary or equilibrium points. Due to the brightly expressed nonlinearity of the problem there are three stationary points (Fig. 3.3). Further we shall diagnose stability or instability of such states. We also shall see, how location of these critical points depends on control parameters (A, Wf). 3.3
Phase-Plane Portrait. Stable and Unstable Equilibrium
The problem of equilibrium state stability is solved as follows. A small deviation from equilibrium is assumed. The state is steady, if spontaneous resetting occurs. Otherwise the equilibrium is unstable: even the small initial deviation will result in progressing change of the state, until the system will end up in another equilibrium state (or will be destroyed). In Fig. 3.4 three equilibrium states are designated by numbers 1, 2 and 3. The sign of the differential equation (3.2) on different segments of W axis is shown in circles. Assume that the state of the system has deviated to the right from the equilibrium point 2. It is visible, that the right hand side of the differential equation (3.2) and, therefore, derivative dW/dt are positive. Therefore value W will increase, the state of system will displace all further to the right from an initial point 2, as indicated by arrow. So, the equilibrium state 2 is a unstable stationary point. It is easy to prove, that points 1 and 3, vice-versa, are stable equilibrium states. At the bottom of Fig. 3.4 the phase portrait of system is drawn. For the first order problem (with one differential equation of the first order) it is an axis of the state variable W, labeled by equilibrium points and arrows showing the direction of evolution from different initial states. The main content of phase portrait in our example is presence of three equilibrium points, two stable and one unstable in between.
dW/dt or Q(W,A,Wf) + 0 1
0
–
*2 *
+ 3
– W
W
Fig. 3.4. The stable (points 1, 3) and unstable (point 2) states
3.4 State Set Representation
51
The stable points 1 and 3 are centres of attraction for different initial deviations, and unstable point 2 constitutes the boundary parting these two attraction areas. Reverting to the model with heat generation, we shall qualitatively describe the system evolution depending on initial state. Let us rememeber, that the analysis is carried out for some individual combination of parameters (A, Wf). If the reference temperature of object is lower than in point 2, the system will aim at the stable state 1 with rather low temperature. Such state can be interpreted, for example, as self-heating of organic matters (a stack of wet hay, peat, coal), due to the sluggish oxidizing reaction with heat generation. If the reference temperature is higher than at point 2, the system will aim to state 3 with very high temperature. Such process can be interpreted as heat-up with the subsequent ignition, flashout or explosion. The dynamics of these processes will be explored further. However, before doing that the dependence of location and character of equilibrium points on the control parameters needs to be surveyed. In other words, for any point on the parameters plane (A, Wf) the number of stationary states is determined, their temperatures are evaluated, and their stability or unstability is analyzed. 3.4
State Set Representation
As was already said, at equilibrium state the internal heat generation is counterbalanced by heat removal to a surrounding medium. Thus, the right hand side of the differential equation (3.2) will be zero: 1 ) − A(W − W f ) . W
0 = exp( −
(3.3)
Heat sink
Internal heat generation
Eq. (3.3) gives the set of equilibrium states W at different values of control parameters (A, Wf). We do not specifically label the equilibrium values W, as some time we shall be concerned oneself with only such states. The set of equilibrium states can be presented in a different graphic form. Let us begin at the usual two-dimensional graph. On the horizontal axis, the excess equilibrium temperature dW=W–Wf, and on the vertical axis the dimensionless heat transfer coefficient A are plotted (Fig. 3.5). The parameter on this graph is the environment temperature Wf. The explicit shape of such representation is easily obtained from the original equilibrium condition (3.3):
1 1 A(W f , dW ) = . exp − dW W f + dW
(3.4)
If we fix some value of surroundings temperature Wf (i.e. we pick out one of the curves in Fig. 3.5) and draw a horizontal line with the given value of coefficient A, the equilibrium values of excess temperature of the system will be received at the resulting crosspoints.
52 3 Dynamic Model of Systems with Heat Generation
1 −1 A Wf , dW := ⋅ exp dW Wf + dW
(
)
2
A( 0.15 , dW ) 1.5
A( 0.25 , dW ) A( 0.3 , dW )
(
A W fcr , dWcr
(
)
A 0.15 , dW unst
)
( ) A( 0.15 , dW unst)
1
A W fcr , dWcr
0.5
0 0.01
0.1
1
10
dW , dW , dW , dW cr , dWunst , dW , dW
Fig. 3.5. Representation of the equilibrium states set in the form A(Wf, dW). (A=0.541, Wf=0.25, dW=0.25 – initial critical point; A=0.205, W f=0.15, dW=0.12 – an example of unstable equilibrium point)
The curve Wf = 0.25 plays a key role. If we go down from larger Wf to smaller, on this curve a critical point appears for the first time, i.e. the point with horizontal tangent. This initial critical point (with coordinates Acr = 0.541; Wfcr = 0.25; Wcr = Wfcr + dWcr = 0.25 + 0.25 = 0.5) is an inflection point, in which also the second derivative reverts to zero. At smaller values, Wf < Wfcr, from initial critical point two additional critical points are born: minimum and maximum with the inflection point between them. At large values Wf > Wfcr the critical point degenerates to the usual inflection point. The evaluations illustrated in Fig. 3.5 are within elementary analysis of singular points, but they can require bulky transformations together with a double differentiation of functions and solution of equations sets. Mathcad has executed this operation, having saved the author from routine evaluations. The diagram in Fig. 3.5 relates the location of equilibrium points W (or dW) to values of control parameters A and Wf. Therefore, results of the analysis can be expressed as follows. If parameter A is between minimum and maximum (i.e. between critical points), there are three equilibrium points – two stable and one unstable between them (for example, the horizontal line A = 0.205 crosses the curve Wf = 0.15 at three points). Otherwise, there is only one equilibrium point.
3.5 Plotting the Bifurcation Set 53
The profit from this elementary analysis of equilibrium points is a prediction of qualitative behavior of system on the basis of control parameters values, i.e. the answers to following questions: • to which equilibrium state the evolutionary system tends, when it starts from a given initial state, • how many equilibrium points are present for the system in view, • which ones are stable and which unstable, i.e. unrealizable. In practice, a main problem is to forecast whether there are dangerous states among equilibrium points, whose attraction area should be avoided at any price. We shall advance in solving these problems. With so-called bifurcation diagram we split the plane of control parameters in areas, with different phase portraits, and then we shall yield three-dimensional representation of equilibrium states in the shape of the so-called “fold catastrophe”. 3.5
Plotting the Bifurcation Set
Within the full set of control parameters let’s discover a bifurcation subset, whose crossing varies the phase portrait, i.e. the number and character of equilibrium points. The problem can be reduced to mapping the critical points on a plane of control parameters. At critical points, the dW-derivative of function A(Wf, dW) given by (3.4) must be zero. That results in the quadratic equation:
(
)
dW 2 + 2W f − 1 ⋅ dW + W f2 = 0 .
Both branches of the solution
1 = − Wf − 2
dW1, 2
2
1 Wf − 2
− W f2
should be substituted in expression (3.4) to receive the bifurcation set on a plane of control parameters (A, Wf). The results of these evaluations as a curvilinear wedge with vertex at initial critical point (A = 0.541, Wf = 0.25) are shown in Fig. 3.6. Inside the wedge (e.g. the point (A,Wf ) = (0.25, 0.15) in Fig. 3.6) there are three equilibrium points on the phase portrait, i.e. three values of equilibrium temperature, two stable and one unstable. Outside the wedge for each pair of parameters (A, Wf) there is one steady state with temperature W (or excess temperature dW). Transferring through the boundary inside of the wedge the bifurcation of the solutions is observed. At boundary one more equilibrium point is born, which bifurcates to two equilibrium states: one of them is stable and another unstable. The dashed line shows a boundary corresponding to Semyonov’s criterion of thermal ignition [37,38].
54 3 Dynamic Model of Systems with Heat Generation
Wf
0.4
0.2
w 0
0
0.5 A
1
Fig. 3.6. The bifurcation diagram and Semenov’s criterion (dashed line) of thermal ignition
In the following section we shall describe one more representation of set of equilibrium states, and then we shall return to the more detailed definition, how these representations will be used for demonstration of change of state by change of control parameters. 3.6
Fold Catastrophe
The equilibrium conditions of system (Eqs. (3.3) or (3.4)) can be viewed as an implicit function connecting the state variable, i.e. equilibrium temperature W (or excess temperature dW), with control parameters, i.e. with heat transfer coefficient A and ambient temperature Wf : dW=dW(A, Wf). The three-dimensional surface (Fig. 3.7) will be a usual representation of dependence (3.4).
( A , Wf , log_dW) a)
( A , Wf , log_dW) b)
Fig. 3.7. Equilibrium states surface (a–side view, b–top view)
3.7 Catastrophic Jumps at Smooth Variation of Parameters 55
The surface is built as parametric plot in Mathcad. The obtained surface is titled “fold catastrophe”. The presence of fold results in an ambiguity of function: several (three) equilibrium points may appear, as is visible in the left-hand graph (Fig. 3.7a). The localization of parameters area, in which there is an ambiguity, is especially well determined in Fig. 3.7b – this projection extends the bifurcation diagram in Fig. 3.6. The title “catastrophe” is used because the indicated shape predetermines a jump, a disastrous development of the system, as shown in the next section. 3.7
Catastrophic Jumps at Smooth Variation of Parameters
The changes of a system state can be viewed under two aspects: • As time evolution from some initial state at given constant values of control parameters • As transferring from one equilibrium state to another at change of control parameters. Let us consider the second case. The parameter plane (A, Wf) is divided into two characteristic subdomains by the bifurcation diagram (see comments to Fig. 3.6).
Wf
(0.46, 0.2)
0.3
(0.49, 0.2)
(0.3, 0.2)
0.2
0.1
.
0 0
0.5
A
1
Fig. 3.8. The bifurcation diagram and the initial points for time evolution analysis
The result is a special behavior of the system at transition through boundary between subdomains. Namely, the continuous change of parameters causes a discontinuous change of the state variable (temperature in the model concerned here). The arrow from inside of the wedge to the right (Fig. 3.8) depicts a discontinuous diminution (jump) of temperature as result of the smooth magnification of heat transfer coefficient A. The representation of this process on the threedimensional diagram of equilibrium states is given in Fig. 3.9. The jump is shown by arrow, which is oriented downwards. That can be interpreted as extinguishing of a flame, when the heat sink to environment become too major.
56 3 Dynamic Model of Systems with Heat Generation
If we smoothly decrease the heat transfer coefficient A located on the inferior sheet of equilibrium surface, the jump will happen with sharp rise in temperature. This is shown in Fig. 3.8 by the arrow coming out of the wedge to the left, and in Fig. 3.9 by the arrow which is oriented upwards. This transition is interpreted as autoignition, i.e. a spontaneous increase of chemical reaction rate resulting in ignition without any triggering from outside.
Fig. 3.9. The fold catastrophe: the jumps by ignition (explosion) or extinguishing of a flame
The theory of thermal autoignition (thermal explosion) was designed by N.N.Semyonov in 1928 [37]. Semyonov’s criterion of thermal inflaming obtained for an extreme case of low temperature of the surroundings and small excess temperature of the system can be written in our designations as (quoted in [38]): 2.718 1 1 exp( − ) = 1. A W f2 Wf
This boundary is shown in the bifurcation diagram (Fig. 3.6) as dashed line. As expected, the good coordination with our calculations is observed in the area of small values of reduced environment temperature (at Wf < 0.1). In the theory of catastrophes some important properties are stressed which are inherent in composite objects and which can be explained on the basis of an equilibrium surface such as a fold. First of them was just argued: this is the discontinuous change of state at smooth variation of control parameters. The other is hysteresis. After the jump upwards it is necessary to go long on the upper sheet of surface in a direction of magnification A, to return then by jump down towards the inferior sheet (see Fig. 3.9). In the next Sect. 3.8 the time evolution of system is described, if the control parameters are divided into different areas by bifurcation lines.
3.8 Time Evolution of System with Heat Generation 57
3.8
Time Evolution of System with Heat Generation
Let us consider three examples of time evolution for three combinations of control parameters (A, Wf ), as shown in Fig. 3.8 by the three solid points. The right-hand term of basic differential equation (3.2) has a different number of roots for this set of control parameters (Fig. 3.10), in other words, the different number of equilibrium temperatures W. The roots can easily be calculated by built-in solver root (Fig. 3.11). We number the roots in ascending order W1, W2, W3, and take into account their prehistory. Therefore, in case of unicity there is a root W1 or W3.
(
)
¡
Q W , A , Wf := exp ¢
−1 − A ⋅ W − Wf W ¥£
(
¤
)
Wf := 0.2
( ) Q ( W , 0.49 , W f) Q ( W , 0.3 , W f) Q W , 0.46 , W f
0.1
0
1
2
W
Fig. 3.10. The right hand side of (3.2) for various sets of control parameters 1 ) A := 0.46
Wf := 0.2 W1 := root Q W , A , Wf , W , 0.1 , 0.3
W1 = 0.226
W2 := root Q W , A , Wf , W , 0.3 , 0.7
W2 = 0.533
( ( ) ) ( ( ) ) W3 := root ( Q( W , A , Wf) , W , 0.7 , 2.0) Wf := 0.2 W1 := root Q W , A , Wf , W , 0.1 , 0.3
W3 = 0.999
2 ) A := 0.49
( (
3 ) A := 0.3
Wf := 0.2
( (
) )
)
)
W1 = 0.223
W3 := root Q W , A , Wf , W , 0.1 , 3
W3 = 2.396
Fig. 3.11. Calculating equilibrium states
In the first example the point (A,Wf ) = (0.46, 0.2) is located inside of the curvilinear wedge on the bifurcation diagram (Fig. 3.8). Here we get three equilibrium states: two stable at low W1 or high W3, and one unstable at intermediate value W2 of dimensionless temperature (Fig. 3.10, Fig. 3.13 ). ¦
58 3 Dynamic Model of Systems with Heat Generation
The time evolution from different beginnings (tb, W b) was calculated by numerical integration of the differential equation (3.2) with built-in method odesolve for the time interval t = 0 – 200 (Fig. 3.12) and was charted in Fig. 3.13. A := 0.46
Wf := 0.2
§
®
¨
Q( W) := exp ¯
©
−1 − A ⋅ W − Wf W ¬ª
(
«
W1 := root ( Q ( W) , W , 0.1 , 0.3)
W3 := root (Q ( W) , W , 0.7 , 2.0)
W2 := root ( Q ( W) , W , 0.3 , 0.7)
WExpl := W2
1)
tb := 10
Given
d W ( t) dt
2)
tb := 30
Given
d dt
W ( t)
3)
tb := 50
Given
d W ( t) dt
) °
²
±
w
Wb := 0.01
( )
Q (W ( t) )
W tb
W1 := odesolve ( t , 200)
Wb
Wb := WExpl − 0.05
( )
Q (W ( t) )
W tb
W2 := odesolve ( t , 200)
Wb
Wb := WExpl + 0.05
( )
Q (W ( t) )
W tb
W3 := Odesolve( t , 200)
Wb
Fig. 3.12. Integrating the differential equation (3.2) with various initial conditions W1 = 0.226
W2 = 0.533
W3 = 0.999
WExpl = 0.533
0.1 1
W 1 ( t)
0.05
Q(W)
W 2 ( t) W 3 ( t)
0
0.5
0.5
1
W Expl
0.05
0
W
0
100
200
t
a)
b)
Fig. 3.13. The right hand side of (3.2) ( ) and time evolution in case of three equilibrium states (b) ³
The temperature of unstable equilibrium W Expl = 0.533 is the boundary between domains of attraction to the two stable states with low or with high temperature.
3.8 Time Evolution of System with Heat Generation 59
The two modes, launched practically from the same temperature, a little below or a little higher than W Expl, separate very strongly, i.e. there is a strong, discontinuous dependence of result from initial state. The quantity W Expl can be called ignition temperature. W1 = 0.223 0.1
1
W 1 ( t)
0.05 Q(W)
W 2 ( t) W 3 ( t) 0
1
0.5
W1
0.05
0 W
0
100
200
t
a)
b)
Fig. 3.14. The right hand side of (3.2) ( ) and time evolution in case of an equilibrium state at low temperature (b). ³
W3 = 2.396 3
Q(W)
0.1
W 1 ( t)
2
W 2 ( t)
0.05
W3 0
1
2
0
0.05
0
100
W
200
t
a)
b)
Fig. 3.15. The right hand side of (3.2) ( ) and time evolution in case of an equilibrium state at high temperature (self-ignition, explosion) (b) ³
60 3 Dynamic Model of Systems with Heat Generation
Each of the two examples shown in Fig. 3.14 and Fig. 3.15 has one stable state, accordingly for parameters (A, Wf)=(0.49, 0.2) at low and for (A, Wf)=(0.3, 0.2) at high temperature. The last mode can be called autoignition, because eventually, irrespective of initial temperature, there occurs a sharp increase of chemical reaction rate and temperature. 3.9
Conclusion
Large technical systems usually work in stationary operating mode at certain nominal, optimal parameters. If nevertheless the regime must be changed, the previous state should be replaced by some new but near and also stable equilibrium state, when the control parameters are continuously, smoothly changed. It is the reasonable requirement ensuring reliability and safety of technical system maintenance. Indeed, if the small changes of control parameters result in equally small changes of system state, then the operator, having noted adverse reaction, can always return back by putting “operating handles” in their initial positions. However, even such cautious behavior does not guarantee safety. The problem consists in possible discontinuity described above. It can happen, that a small change of control parameters will put the system in an unstable state, and then the time evolution will push the system in a very far new state. Taking into account the hysteresis behavior, the way back will be a different and, probably, lengthy path, because it will be necessary now to significantly change the values of control parameters, to return to an initial state. Discontinuous, or crisis behavior of systems whereas the control parameters are changed continuously is often observed in nature and technics, in economics and even society. We were trying to show such complex behavior in an instructive example of nonlinear model for a system with heat generation (see also [47]).
4
Stiff Differential Equations
4.1
Introduction
Special numerical algorithms for stiff differential equations were developed about thirty years ago [13]. Approximately at that time the ozone hole above Antarctica was detected. These two diverse events were closely connected in the subsequent history of research of the ozone depletion3. The problem has caused growing concern in the world because stratospheric ozone protects life on Earth from pernicious ultraviolet solar radiation. The human-produced chlorofluorocarbons (CFCs) used as refrigerants (freons) and as loading of aerosol cans have been recognized for being responsible for destroying the ozone layer. According to the Montreal Protocol on Substances that Deplete the Ozone Layer, the global production of ozone-depleting substances has been drastically reduced. Now the ozone depletion is expected to gradually disappear by about the middle of the 21st century– due to a timely recognition of the dangers and measures accepted on a global scale. There exists a drama history of several decades of mathematical modeling of chemical processes in atmosphere, research of hundreds of chemical reactions with participation of ozone, development of ecological politics and, at last – acceptance of critical decisions in industry and business. Because chlorofluorocarbons have chemical lifetimes on the order of a century, it was early clear that laboratory experiments alone would not be enough to check various suggested mechanisms of ozone depletion, and to estimate various allowable alternative chemicals. As it turned out, mathematical modeling has played a key role, on the basis of the differential equations with stiff property. Some of numerous atmospheric ozone reactions composing complex transformation chains have time scales of a fraction of a second. As follows from comparison with characteristic life time of chlorofluorocarbons – a century or more – the time scales in the differential equations differ by more than ten orders. Thus, it was necessary during numerical integration not only to calculate very fast reactions with minimal time steps, but also to trace the system behavior over the enormous time interval of about one century. Properties of the differential equations was that the numerical integration using conventional methods (for example, Runge-Kutta) had to be executed with smallest time steps through out the all big interval of system evolution even if fast reactions had already been coming to an end. Otherwise, at attempts to increase the integration steps, a numerical instability occured. Effective modeling was made possible only due to special algorithms for stiff systems. 3
Davis P (1995) CFCs and Stiff Differential Equations at DuPont. SIAM News, vol 28, 9
62 4 Stiff Differential Equations
4.2
Model Differential Equation
Let us consider the elementary model of control for some object Y. The control system should ensure the behavior of object Y according to law F(X): Y = F(X ) .
(4.1)
Let us suppose that significant aberrations arise from the ordered law, for example, from a random action or by start from special initial state: Y − F( X ) ≠ 0 .
It is necessary to ensure fast return to equilibrium trajectory F(X). Therefore, the speed of returning, i.e. derivative dY/dX, should be proportional to the deviation and opposite in sign, and the coefficient of proportionality should be large. Such a model is represented by differential equations with large parameter α: dY = −α(Y − F ( X )) . dX
(4.2)
Let us explain the meaning of parameter α, estimating the order of period ∆X during which Y is reverted to a correct trajectory F(X) (Fig. 4.1). This is done by replacing in (4.2) the derivative with its finite-difference approximation (see Mathcad-fragment (4.3)). It was also accepted, that control function F(X) varies sluggishly on big intervals X.
Y0 Y X
F(X0) F(X)
X0
∆X
Fig. 4.1. Rapid deviation decrease by large parameter α
The solve operator solves the finite-difference equation concerning the characteristic interval ∆X: F ( X0) − Y0 ∆X
−α ⋅ ( Y0 − F ( X0) ) solve , ∆X →
1
α
(4.3)
4.3 Method rkfixed. Numerical Instability 63
From this solution follows, that if the parameter α is large, then the liquidation of deviations will occur very quickly, on small interval ∆X (Fig. 4.1) equal to inverse –value (on order). There are many examples of the systems described by differential equations of type (4.2): • The autopilot ensures the given small altitude h of flight above a relief [F(X) – h], where X is a route of flight on a map. The altitude deviations, which have arisen for this or that reason, should be quickly eliminated otherwise a catastrophe is possible. It is necessary to ensure the fast returning of Y to prescribed value F(X), therefore the parameter α should be large. • The temperature Y of any object is positioned at necessary level F(X) depending on time X with the help of a thermostat. Intensity of heat exchange α between object and a fluid in the thermostat should be large so that the thermal equilibrium (Y=F(X)) between object and thermostat can be quickly restored. • The concentration Y of any component in a chemical reactor quickly tends to equilibrium value F owing to high speed of reaction. • etc. We examine further behavior of such systems by means of a numerical integration using various methods, namely: the explicit Runge–Kutta method with fixed step of integration rkfixed, the explicit Runge–Kutta method with step-size adaptation rkadapt, the implicit method stiffr special for stiff differential equations. During this investigation the peculiar features of stiffness will be detected. We shall see, that the special method stiffr has an important advantage over the two other methods. By comparison of two basic numerical schemes – explicit and implicit – it will be shown, that the stiff equations should be solved with implicit methods like stiffr. ´
µ
µ
µ
4.3
Method rkfixed. Numerical Instability
As the control law we shall choose the slowly varying periodic function with wave number k, k ≈ 1: F ( X ) ≡ sin(kX ) .
(4.4)
The key parameter should be large to ensure fast return of control variable Y to the prescribed equilibrium value F(X), 10. Let us receive some trial solutions at various integration steps h and at various initial conditions. Meaning of parameters of the built-in function rkfixed must be clear from mnemonic designations. In the Appendix, detailed help about built-in solver can be found. The term on the right of model differential equation (4.2) is denoted as function DY(X,Y). ´
´
¶
64 4 Stiff Differential Equations
Initial Variant: Solution with Small Step Let us calculate the evolution of a system from an initial state (Xbeg, Ybeg), noticeably different from equilibrium: Xbeg=0, Ybeg=4 (Fig. 4.2). The interval of integration is taken large in comparison with period of fast change (Xend =2 >> 1/ ). Number of steps NofSteps must be relatively large (32) and the integration step h small, ensuring an acceptable accuracy of calculations. If we try to increase the step, there will be a numerical instability (see below Sect. Variant 2). Now we call the built-in integration function with fixed step rkfixed. The obtained function Y(X) is demonstrated in Fig. 4.3. ·
¸
k≡ 1
F ( X) ≡ sin ( X ⋅ k)
α ≡ 10
DY( X , Y) ≡ −α ⋅ ( Y − F ( X) )
Xbeg := 0
Ybeg := 4
F ( Xbeg ) = 0
Xend := 2π
NofSteps := 32
h :=
Xend − Xbeg NofSteps
h = 0.1963
InitCond0 := Ybeg S := rkfixed ( InitCond , Xbeg , Xend , NofSteps , DY) º
X := S
»
0
º
Y := S
¹
»
1
Fig. 4.2. Initial variant of solution
Variant 1: Calculation of an Intermediate Deviation with Small Step Supposing that in intermediate point Xbeg (0 < Xbeg < Xend) a significant deviation arises, we calculate the evolution of this deviation keeping the former integration step. The results of the numerical integration for two versions calculated above are presented in Fig. 4.3 as functions Y(X) and Y1(X1). The equilibrium solution F(X) is shown in the same place. The initial deviation given in point X=0 dampens fast due to a large value α. Further change of Y happens slowly according to the given control function F(X). Such behavior of a solution is conserved for all areas of integration. The deviations originating in any point X, evolve similarly, as illustrated by branch of solution Y1. The solution of the model problem is characterized by the change of phases of fast and sluggish variation of control variable Y. The deviations, which have arisen in any point, generate the rapidly relaxing solutions (see Fig. 4.3). These features define a stiff problem. Now we extend the investigation of the model stiff equation (4.2) further and consider effectiveness of modified integration steps.
4.3 Method rkfixed. Numerical Instability 65
i_beg NofSteps
i_beg := 6
X1beg := 2 ⋅ π ⋅
Y1beg := −4
F ( X1beg ) = 0.9239 h :=
Steps := NofSteps − i_beg
X1beg = 1.1781
Xend − X1beg Steps
h = 0.1963
InitCond0 := Y1beg S1 := rkfixed ( InitCond , X1beg , Xend , Steps , DY) ¼
X1 := S1
½
¼
0
Y1 := S1
½
1
5
Y Y1
0
F ( X)
5
0
2
4
6
X , X1 , X
Fig. 4.3. Evolution of deviations originating at different points X
The special behavior of control variable Y – fast and slow phases of change – suggests the idea to use variing integration steps: small in the area of a fast change and large in the area of sluggish change, with the apparent purpose to save computational time and memory. Follow-up calculations confirm that this will happen as Fig. 4.4 demonstrates. Variant 2: Instability by Increased Step Let us double the integration step h in the area of weak changes of control variable Y. We start from point i_beg = 6 with value Yi_beg using the solution obtained in initial variant above. This solution is saved as array Y (see Fig. 4.2), so it is enough to select an element with index i_beg. The step is multiplied by two by dividing of stayed area (Xend –X2beg) into a twice smaller number of intervals than in the examples considered above. So, up to point i_beg the solution Y is obtained in Fig. 4.2, and then we continue with doubled step. The result is shown in Fig. 4.4.
66 4 Stiff Differential Equations
i_beg := 6
X2beg := 2 ⋅ π ⋅
i_beg NofSteps
X2beg = 1.1781
Yi_beg = 0.8781 h :=
Xend − X2beg
h = 0.3927
( NofSteps −i_beg ) 2
InitCond 0 := Yi_beg ¾
¿
S2 := rkfixed InitCond , X2beg , Xend , À
Ä
X2 := S2
Å
Ä
0
Y2 := S2
( NofSteps − i_beg ) , DY 2 Ã Á
Â
Å
1
5
Y Y2
0
F ( X)
5
0
1
2
3
4
5
6
X , X2 , X
Fig. 4.4. Instability by numerical integration of stiff problem with rkfixed after step increase
Curve Y (circles) represents the correct solution that was obtained by integration with constant small step. Solution Y2 (diamonds) starts with doubled step from point X2beg = 1.1781 where the fast changes already have ended. It is obvious that this attempt is unsuccessful. Disastrous deviations occur and function Y2 has nothing common with the correct Y. The described behavior is typical for stiff equations if explicit methods with fixed step such as rkfixed are used for numerical integration. The stiff equations have latent rapidly varying solutions. As soon as more or less noticeable deviations from equilibrium state F(X) arise in consequence of random actions (in the original) or computational errors (in the model) – even during slow change – it is necessary at once to adequately describe the fast relaxation process (reequilibration), i.e. to integrate with small step. Actually, the integration of stiff equations with rkfixed must always be made with the smallest step, even in spite of the fact that the solution varies very slowly. It is a paradox of stiff systems.
4.3 Method rkfixed. Numerical Instability 67
Variant 3: Instability at Increase of Relaxation Parameter Æ
Let us consider two more versions of integration – with doubled parameter α and the same steps as in the successful initial version in Sects. Initial Variant and Variant 1. Numerical integration is done in Fig. 4.5, and the results are demonstrated in Fig. 4.6. We start from different points X3beg and X4beg, to demonstrate once again that difficulties with stiff differential equations can arise in any point of integration interval. The initial deviations from the equilibrium solution F(X) are given zero, and we should hope, the solutions remain on the control curve F(X). α ≡ 20 DY( X , Y) ≡ − α ⋅ ( Y − F ( X ) ) X3beg := 0
Xend := 2π
NofSteps := 32
h :=
Y3beg := F ( X3beg )
F ( X3beg ) = 0
Xend − X3beg NofSteps
h = 0.1963
InitCond0 := Y3beg S3 := rkfixed ( InitCond , X3beg , Xend , NofSteps , DY) Ç
È
Ç
X3 := S3 0
È
Y3 := S3 1
________________________________________________________ α = 20
X4beg := 2 ⋅ π ⋅
i_beg := 15
i_beg NofSteps
X4beg = 2.9452
Xend := 2π
Xend − X4beg NofSteps − i_beg
NofSteps := 32
h :=
Y4beg := F ( X4beg )
F ( X4beg ) = 0.1951
h = 0.1963
InitCond0 := Y4beg S4 := rkfixed [InitCond , X4beg , Xend , ( NofSteps − i_beg ) , DY] Ç
X4 := S4
È
0
Ç
Y4 := S4
È
1
Fig. 4.5. Integration using enlarged value of relaxation parameter É
But the result of integration is quite another (see Fig. 4.6). Though the solution remains some time close to the equilibrium curve, but then the deviations grow disastrous because of numerical instability. To show measure of solution instability, it was necessary to select a large scale on a vertical axis. The step should
68 4 Stiff Differential Equations
be considerably reduced for given large value of to receive acceptable results with the rkfixed method. Concerning a step setting at use rkfixed, we need to note that it is difficult to select a priori such an integration step, which would ensure a necessary exactitude of a numerical solution. Therefore, in practice, the integration is conducted with some reasonably selected step and the result is stored. The step is further reduced twice. The difference between new and old results of integration will be good error estimation. Finally, the numerical examples show, that the rkfixed method is poorly applicable for the stiff equations, and we shall pass now to the analysis of a method with an adapted step. Ê
2000
Y3 Y4
0
F ( X)
2000 0
2
4
6
X3 , X4 , X
q.
Fig. 4.6. Instability of solution by large parameter α
4.4
Method rkadapt. Integration Step Problem
The idea of method rkadapt is to change the step automatically, in order to finetune it to the solution character, just as we tried to do “manually” in the previous Sect. 4.3. The argument list of this procedure is as follows: rkadapt ( InitCond , Xbeg , Xend , acc , DY , Nmax , save_int ).
The three additional parameters to rkfixed have the following meaning: o acc – accuracy level; the procedure reduces the step automatically, for the error on each step not to exceed the value of acc, o Nmax – the maximal number of points to be selected for output; if we set Nmax small the output points will be concentrated at the left border of the interval. o save_int – the minimum step for results to be shown in the output.
4.4 Method rkadapt. Integration Step Problem 69
If we set save_int = 0 and Nmax = “very large number” the output array will contain all points in which the solution was calculated, even if they are located very closely to each other. If we take save_int equal to full integration interval, only the end point of solution will be selected for output. The following example shows, how the input data are introduced and how the solution of stiff problem is obtained by rkadapt method (Fig. 4.7). k ≡ 1
F ( X ) ≡ sin ( X ⋅ k)
α ≡ 10
DY ( X , Y) ≡ − α ⋅ ( Y − F ( X ) )
Xbeg := 0
Xend := 2π
InitCond 0 := 4
acc := 0.001
Nmax := 200
save_int := 0
S := rkadapt ( InitCond , Xbeg , Xend , acc , DY , Nmax , save_int ) Ë
Ì
Ë
Ì
Y := S 1
X := S 0
last ( X ) = 29
5
Y F ( X)
0
0
2
4
6
8
X
Fig. 4.7. Integration of stiff problem with rkadapt
The built-in function last, returning the last index of an array, allows finding the number of integration steps (in the example of Fig. 4.7: 29). Apparently, the adapted algorithm copes with the stiff problem. Having treated the fast solution near to initial point, further the program tries to increase the step, but submitting to the requirement to keep the necessary calculation accuracy, leaves the step rather small. Due to this, there is no solution failure (because of numerical instability of explicit method) as it happened in the example with rough manual step magnification (see above Sect. Variant 2). However, there are also shortcomings when using rkadapt with stiff differential equations: in the area of sluggish modification the step should remain small, more or less the same as for a transient phenomenon in an origin of coordinates. If the area of integration would cover hundreds or thousand of periods, the concernment of this shortage would become even more apparent. Let us show now how much more effectively rkadapt works with the conventional, not stiff problem. To make the matching vivid, we shall integrate a secondorder differential equation:
70 4 Stiff Differential Equations
Y = – Y; Í
Y(0) = 0;
Y (0) = 1, Î
whose plain solution is the same function, as for the stiff problem, namely: Y = sin(X). The following Mathcad-sheet shows, how the second-order differential equation is transformed to the system of two first-order differential equations, how the input data are introduced and how the solution of the system is obtained by the rkadapt method (Fig. 4.8). Ï
Ï
Y1 Ð
DY( X , Y) := Ñ
−Y0
0 Ð
ÔÒ
InitCond := Ó
acc := 0.001
Ñ
Xbeg := 0
Ô
Ó
1 Ò
Nmax := 200
Xend := 2π
save_int := 0
S := rkadapt ( InitCond , Xbeg , Xend , acc , DY , Nmax , save_int) Õ
X := S
Ö
Õ
0
Y := S
Ö
1
last ( X ) = 7
2
Y sin ( t)
0
2
0
2
4
6
X,t
Fig. 4.8. Integration of the conventional, not stiff problem with rkadapt
Let us compare Fig. 4.7 and Fig. 4.8. In the conventional problem, a significantly lower number of integration steps (7 vs 29) was required. With higher α = 40, the difference of 7 vs 80 would be even more impressive. 4.5
Method stiffr. Solution of Stiff Model Equation
Let us now compare the explicit adapting method rkadapt with a special method for stiff equations stiffr at integration of the model differential equation (4.2). Conditions of matching will be very harsh – at very large parameter α = 1000. The results for rkadapt and for stiffr are compared in Fig. 4.9 and Fig. 4.10. Number of integration steps for stiffr is rather small (73), rkadapt needs many steps (1685) therefore points on the graph merge in a heavy line. Both methods have coped with a handling of fast transient phenomenon in the origin of coordinates, but the effectiveness of calculations in the area of solutions for slow changes differs strikingly – compare above-mentioned numbers of integration steps (1685 and 73).
4.5 Method stiffr. Solution of Stiff Model Equation
71
The rkadapt method spends uselessly computer time and memory for calculation of sluggish variations with very small step, while the stiffr method proves very capable to be fine-tuned to special character of the desired solution. In Sect. 4.7 we shall discuss an essence of these distinctions, taking into account that the compared procedures are on different sides of a principal watershed in the numerical analysis – of the watershed between explicit and implicit methods. α ≡ 1000 k ≡ 1
F ( X ) ≡ sin ( X ⋅ k )
DY ( X , Y) ≡ − α ⋅ ( Y − F ( X ) )
Xbeg := 0
Xend := 2π
IC0 := 4
acc := 0.001
Nmax := 2000
save_int := 0
S := rkadapt ( IC , Xbeg , Xend , acc , DY , Nmax , save_int ) ×
Ø
×
Ø
Y := S 1
X := S 0
last ( X ) = 1685
5
Y 0
F ( X)
0
2
4
6
8
X
Fig. 4.9. Integration of stiff problem with the rkadapt method Ù
d Ú
J (X , Y) := Û
dX
DY(X , Y)
d dY
DY(X , Y)
ÞÜ Ý
→ ( 1000 ⋅ cos (X ) −1000 )
S1 := stiffr( IC , Xbeg , Xend , acc , DY , J , Nmax, save_int) ß
X1 := S1
à
ß
0
Y1 := S1
à
1
last(X1 ) = 73
5
Y1 F ( X)
0
0
2
4
6
8
X1 , X
Fig. 4.10. Integration of stiff problem with the stiffr method; J(X,Y)– Jacobi matrix (see explanations in Sect. 4.7)
72 4 Stiff Differential Equations
4.6
Method stiffr. Solution of Chemical Kinetics Equations
Let us demonstrate one more example of effective work of the stiffr method – now for a stiff system of chemical kinetics equations [12]: Y0′ = α 0 Y0 − Y0 Y1
(4.5)
Y1′ = − α1 Y1 + Y0 Y0
(4.6)
Decision variables are concentrations Y0, Y1 of two reagents, independent variable is time T. Parameter values are defined by inequalities: α1 >> 1, α0 << 1. Eq. (4.5) describes a slow change of concentration of the 0-component owing to autocatalysis (the first term on the right) and reaction of the 0-component with the 1component (the second term on the right). According to Eq. (4.6), concentration of the 1-component decreases during fast disintegration (first term) and will increase due to a bimolecular reaction (second term). The solution is submitted in Fig. 4.11. DY(T,Y) is the 2-element vector-valued derivative function of equation set (4.5), (4.6); T – independent variable (time); Y = (Y0,Y1) – dependent variable, vector function, whose components Y0 and Y1 are the concentrations of components of reaction mixture. The Jacobian matrix and initial conditions vector are designated accordingly as J(T,Y) and IC. α 0 ≡ 0.02
Tbeg := 0
α 1 ≡ 10 ä á
α 0 ⋅ Y0 − Y0 ⋅ Y1 â
DY ( T , Y) :=
ç
−α 1 ⋅ Y1 + ( Y0)
2
0 α 0 − Y1 −Y0 è
å
J ( T , Y) :=
â
ã
Tend := 50
å
æ
è
é
0
2 ⋅ Y0
−α 1
ìê
ë
ë
ç
0.6 è
IC := é
acc := 0.0001 ì
0.2
Nmax := 2000
ê
ë
S := stiffr( IC , Tbeg , Tend , acc , DY , J , Nmax , 0) í
î
í
î
í
Y0 := S 1
T := S 0
î
Y1 := S 2
1
Y0 Y1
( Y0) 2
0.1
α1
0.01
10
0
10
20
30
40
50
T
Fig. 4.11. Integration of stiff problem of chemical kinetics by stiffr method
4.6 Method stiffr. Solution of Chemical Kinetics Equations
73
Obtained time dependence of reagents concentrations is presented in the diagram of Fig. 4.11. The time history covers a large time space, but at first there is also a very rapid decrease of concentration Y1 on a small time interval ~ 1/ 1. The stiffr method catches this fast change of Y1 (practically the jump) near the origin of coordinates due to the calculation with very small step, and then ensures economical evaluations with large steps in area of slow concentration change. If the rapid phase is not of interest, the mathematical model can be simplified. Instead of a differential equation (4.6) for 1-component the so-called adiabatic approximation can be used obtained by eliminating the left-hand side of (4.6): ï
− α1 Y1, ad + Y02 = 0 , whence follows: Y02 . α1
Y1, ad =
(4.7)
In Fig. 4.11 the coincidence of the “exact” solution (rhombs) and the adiabatic approximation (solid line) is visible after a very short initial phase. The adiabatic approximation is efficiently used for the analysis of complicated nonlinear systems [12]. This example allows us to briefly consider a common definition of stiff problem [13]. It is said, that the system of differential equations is stiff, if eigenvalues of Jacobian matrix strongly differ one from another. Therefore, these eigenvalues are calculated in Fig. 4.12, having applied built-in Mathcad function eigenvals. ó ð
α 0 − Y1 − Y0 ñ
Ja ( Y0 , Y1) :=
ô
ô
ñ
ò
−α 1
2 ⋅ Y0
õ
ó ð
ô
EV 0 ñ
i := 0 .. last ( T)
i
ö
ö
ô
:= eigenvals Ja ÷
ñ
ò
EV 1
õ
÷
( Y0) i , ( Y1) i øù
øù
i
0 EV0 EV1
10
0
10
20
30
40
50
T
Fig. 4.12. Eigenvalues of Jacobian matrix for stiff problem of chemical kinetics
74 4 Stiff Differential Equations
The Jacobian matrix is evaluated from the partial derivatives of DY with respect to dependent variables Y0, Y1. The local eigenvalues are evaluated, that is for serial instants on integration interval. We see that at full solution interval the eigenvalues differ more than an order, therefore, it is the stiff problem. It is simple to show, that at least locally (i.e. on small intervals of independent variable T) the small and large eigenvalues determine respectively the slow and fast solutions as exponential curves: exp(EV0T) and exp(EV1T). In our problem the greatest eigenvalue is approximately equal to parameter α1: EV1 ≈ −α1. 4.7
Explicit and Implicit Methods
Let us consider the elementary model of stiff equation: dY = − αY , dX
(4.8)
with the initial condition Y(0) = 1. The obvious solution is Y = exp(− αX ) . The stiff property will be exhibited, if α >> 1 and if the integration area is extended enough in comparison with interval of fast change 1/α. The finite-difference approximation of (4.8) on an interval h, h = X i − X i −1 , can be written in two different modes: by explicit scheme: Yi − Yi −1 = −α Yi −1 h
(4.9)
Yi − Yi −1 = −α Yi h
(4.10)
by implicit scheme:
The value Yi is to be defined, and the value Yi–1 is known from the initial condition or from the previous solution step. The fundamental difference of the two numerical schemes consists in the method how to define the term on the right: • the explicit scheme uses the known value Yi–1 (value from “the past”) • the implicit scheme uses unknown quantity Yi to be defined (value from “the future”) From these definitions the formulas for required Yi have to be deduced.
4.7 Explicit and Implicit Methods 75
In case of the explicit definition (4.9) there are no problems, since the unknown is present linearly only at the left part. The scheme is named explicit because we have already the expression exposed for Yi . After elementary transformations we shall receive: Yi = Yi −1 (1 − α h ) .
(4.11)
In case of the implicit scheme we solve Eq. (4.10) with unknown Yi and obtain: Yi =
Yi −1 . (1 + α h )
(4.12)
Due to linearity of the original differential equation one can easily resolve the finite-difference approximation (4.10) manually. But if we have a system of equations or/and we have nonlinear equations, we do need a solver for the implicit scheme. However this complication of the implicit scheme is outweighed by its remarkable property – absolute stability during calculation. We demonstrate this by comparative solving of a stiff equation with both explicit (Yexpl) and implicit (Yimpl) schemes, see Fig. 4.13. X 0 := 0
α := 10
h := 0.21
i := 1 .. NofSteps
NofSteps := 10
ý ú
Xi
Yimpl 0 := 1
Yexpl i û
þ
:=
ÿ
Yimpl i
i := 0 .. NofSteps
Yimpl i−1
ü
Yexpl i− 1 ⋅ ( 1 − α ⋅ h)
þ
û
Yexpl 0 := 1
X i− 1 + h
þ
û
1 + α ⋅h
2 Yexpl i Yimpl i
0
exp ( − α ⋅ t)
0.5
1
1.5
2 Xi , Xi , t
Fig. 4.13. Comparative solving of a stiff equation with explicit and implicit scheme
As we see from the graph in Fig. 4.13, the implicit scheme ensures satisfactory consent with the exact solution (compare circles and bold curve), taking into account the large integration steps. On the other hand, the explicit scheme yields a totally useless solution in the form of ghost oscillations with increasing amplitude showing clearly the numerical instability of this scheme.
76 4 Stiff Differential Equations
Instability can be avoided by reducing the step. The stability condition can be obtained from Eq. (4.11). The multiplier on the right-hand side (4.11) must be positive to eliminate the oscillations: 1 – h > 0 or h < 1/ . Thus, the calculation of fast-relaxing solution (α >> 1) requires a very small step ~1/α otherwise the numerical instability arises by using the explicit method. For stiff problems the computation with such small steps must also proceed in the area of slowly-varying solution (for x >> 1/α) as we have seen in above mentioned examples with explicit methods rkfixed, rkadapt. The big expenses of computer time, the apparent difficulties to diagnose oscillations, the aesthetically disagreeable necessity to compute slowly-varying functions by very small steps, all these reservations disqualify the explicit methods for solution of stiff problems. The implicit scheme as it is visible immediately from (4.12), is stable at every (positive) step. Therefore, implicit schemes should be preferred for stiff problems. In research, when the first numerical experiments are made without information about special behavior of a simulated system, the important advantage of implicit schemes are the reasonable, physically correct solutions even at rough scanning with large steps. Effectiveness of implicit schemes is explained by saying that in predicting “an information from the future” is used: the right side term of a differential equation is expressed through even unknown values of dependent variable from the following integration step (see (4.10)). Hereby, both the virtues of algorithm stability, and the complexity of its realization are determined.
4.8
Jacobian Matrix
Now, we have to discuss one more problem of built-in functions stiffr, stiffb, namely the computing of Jacobian matrix J(x,y) from the right side term of a differential equation: dy = f ( x, y ) . dx
The finite-difference approximation with implicit scheme can be written in the form: ∆y = f ( x0 + ∆x, y 0 + ∆y ) ; ∆x
∆ x = x − x0 ;
∆y = y − y0 .
If the differential equation is nonlinear, the linearization of the term on the right will be carried out by means of series expansion in the neighborhood of an initial point x0:
∂ f (x , y ) = f ( x 0 , y 0 ) + f ( x, y ) ∂x
∂ f (x, y ) ⋅∆x + ∂y
x 0 , y0
⋅ ∆y .
x0 , y 0
4.9 Conclusion 77
As all values in point (x0, y0) are known, the linear equation concerning unknown quantity y is obtained, as in our elementary example (4.12). If the system of differential equations of the order (N+1) is decided then the function f, the increment of y, and the derivative of f with respect to must be considered as column vectors with components:
f k ; ∆y k ;
∂f k ; ∂x
k = 0..N ,
and for the set of the partial derivatives of f with respect to dependent variables y a matrix should be used with components: ∂f k ; ∂y m
k = 0.. N ; m = 0..N .
In Mathcad reference system the Jacobian matrix is considered as a rectangular matrix resulting by augment of column vector ∂fk/∂x and square matrix ∂fk/∂ym. Such a matrix is necessary by calling of stiffr, stiffb. In the mathematical literature the Jacobian matrix more often is the square matrix with components ∂fk/∂ym. In numerical algorithms, the linearization is used together with iterations to obtain y. Expansion of f is adapted as follows for iterative procedure:
∂ f (x , y ) = f (x, y (x )) + f (x, y ) ( y − y (x )) , ∂y
there y(x) is the “old” value of y, taken from the previous iteration, is the desired new value.
4.9
Conclusion
The stiff differential equations are frequently met at mathematical simulation of engineering systems (see, e.g. [35, 41, 43, 45]). Practically any sufficiently complicated device or installation is characterized by several strongly differing time constants. On the one hand, there are the fast transient phenomena which arise in the initial phase or in any intermediate state due to random disturbances, errors etc. On the other hand, in a basic regime, the system parameters are usually constant or vary slowly on large time intervals. In other words, the engineering systems often are stiff systems, and special methods must be applied to their investigation. Despite the practical importance of the problem, it is difficult for a student or an engineer to find sufficient teaching material in this field. The Mathcad help system contains hardly anything about the inherent features of the problems to be solved. In this chapter, efficient solutions of such problems with built-in Mathcad instruments have been demonstrated using simple examples. The basic outcome was obtained through analysis of the differential equation of kind (4.2) with large multiplier within the term on the right. It is important here to
78 4 Stiff Differential Equations
emphasize, that the derivative should become very large already at small deviations from equilibrium. If we transfer parameter to the left-hand part, the relation will turn out as differential equation with small parameter at higher derivative:
ε
dY 1 = −(Y − F ( X ) ); ε ≡ → 0 . dX α
Such equations belong to problems from the class of special (singular) perturbations. Their solutions are considered within the framework of perturbation methods [56]. Perturbations parameter approaching zero, the asymptotic solutions are obtained. But formal substitution of limiting value = 0 will result in the depression of the differential equation. In an example with a differential equation of the first order, it changes to an algebraic equation, and an initial condition remains unclaimed. Such collision is resolved by special asymptotic technique, for example, using the method of asymptotic expansions [56]. The application of this method for a singular thermal physics problem with integro-differential equation is described in [15]. The detailed discussion of perturbation methods is not a subject of book. Instead, we use the approach of numerical methods, such as stiffr. The common character of special solutions is clear from Fig. 4.10 or Fig. 4.11. It is obvious, that the equilibrium solution Y = F(X) coincides with the complete solution throughout the range of X definition, except in the neighborhood of singular point X=0, where the initial condition is located (Fig. 4.10). An area of sharp modification is called a boundary layer. Problems with hydrodynamic and thermal boundary layers will be surveyed in Chap. 6. Along with singularities, there are regular perturbations, when the basic nonperturbed solution, uniformly applicable in all ranges of the argument, approaches on the limit = 0. In this case the perturbation technique provides the small corrections necessary for modifying the basic solution. A problem of this class is solved in Chap. 7 in connection with the topic of hydrodynamic instability.
5
Heat Transfer near the Stagnation Point at ross Tube Flow
5.1
Introduction
The most dangerous temperature conditions for steam-superheater pipes in a power plant steam-generator or for blades of gas turbines arise usually in the forward stagnation point S of cross flow where the flow is branching, see Fig. 5.1.
tw(x) x
u∞ (x)
tin
S
W tout
αout(x)
αin
R
δ Fig. 5.1. Heat transfer at cross tube flow
The analysis of local heat transfer under these conditions is a difficult problem, because the flow is accompanied by a variable pressure field, and the thermal boundary conditions on a wall can differ from the often used formulations with constant temperature or constant heat flux. To tackle problems of this kind in engineering practice, e.g. with complex boundary conditions, at flow acceleration or delay, at blowing or suction through transparent walls, an approximate integral method of boundary layer is applied [18, 36, 42, 44, 48]. The mathematical apparatus of the integral method includes the solution of the ordinary differential equations and nonlinear algebraical equations. Mathcad provides all necessary mathematical arsenal for the effective treatment of such problems. We shall give a brief description of the integral method in the following Sect. 5.2. However, being interested only in the computing aspect of the problem, it is possible to go to Sect. 5.3 at once.
80
5 Heat Transfer near the Stagnation Point at ross Tube Flow
5.2
The Integral Equation of a Thermal Boundary Layer
The boundary layer concept is explained in detail in Chap. 6. Before doing so, we start in the following discussion with the general empiric knowledge that the changes of speed or temperature in flow fields usually concentrate within a thin layer near a wall. Therefore, changes of all quantities in cross direction to the wall (on coordinate y) will be very sharp in comparison with longitudinal changes (lengthways x), see Fig. 5.2. The integral equation of thermal boundary layer represents the energy conservation law for special control volume, which covers the thickness of the entire boundary layer, but being differentially small in longitudinal direction. y
u∞
u∞
x
δT** t∞
t∞
tw
tw
δT** Fig. 5.2. Model of thermal boundary layer
The elementary way of the energy equation derivation is based on model approximations of thermal boundary layer in Fig. 5.2. The hot fluid flows along a cool wall. The main-stream velocity and temperature are designated as u∞ and t∞. The heat transfer occurs from the fluid to the wall. The wall is assumed to be permeable to include, e.g. the analysis of protection from a high-temperature stream by means of blowing. In the left part of the figure the real variation of speed and temperature distribution from the wall with tw, uw = 0 to the undisturbed fluid region with t∞, u∞ is shown. The image that is equivalent by enthalpy is represented on the right-hand side of the figure. It is accepted for the model approximations, that all fluid in layer δ ** is cooled down completely to wall temperature tw and that the flow velocity inside this layer remains equal to u∞ down to the wall. It is said, that the fluid loses its excess enthalpy within δ **. With this model, the mass flow of cooled down liquid can be written as ( u∞δ **), and the enthalpy loss per mass unit as (cp(t∞ –tw)). The quantity δ ** introduced to evaluate the excess enthalpy is called enthalpy thickness. This approximation of thermal boundary layer thickness is defined by:
∞
p 0
(t∞ − t( y ) )ρ u ( y ) dy ≡ (ρ u∞ δT ** )(c p (t∞ − tw )) .
5.2 The Integral Equation of a Thermal Boundary Layer
81
On the right side, the model expression of enthalpy loss is presented, and on the left the exact description of this quantity. We accept the elementary relationship between temperature and specific enthalpy dh = cpdt for fluid flow with approximately constant pressure. Thus, according to definition: ∞
ρc p u( y )(t ∞ − t ( y ))dy δT ** =
0
ρc p u ∞ ( t ∞ − t w )
(5.1)
.
After these preliminary remarks, it is possible to formulate immediately an integral equation for energy of thermal boundary layer:
[
]
d ρ u∞ δ T **c p (t ∞ − t w ) = − qw + jw c p (t ∞ − t w ) dx
(5.2)
according to which the enthalpy loss (the left part of the equation) increases at flow of fluid along the cool wall due to: • heat sink to the wall (the first term on the right) and • expenditures on heating of the injected medium jw from tw up to t∞ (the addend on the right-hand side). Such a statement of conservation law is apt for incompressible flows. Note also that for longitudinal (lengthwise x) directions only convective transfer is taken into account, because longitudinal thermal conductivity can be neglected in boundary layer approximation (see Sect. 6.7). Designations in integral equation are decrypted as follows: • (– qw) – the conductive heat flux to the wall (against the y direction), proportional to the temperature gradient near the wall: ∂t fluid qw = −λ fluid y = +0 , ∂y • jw – the mass flux on permeable boundary at blowing through a perforated wall or at mass transfer on interface. The thermal boundary layer equation (5.2) contains two unknown quantities. If surface temperature tw is given as boundary condition, the quantities sought are enthalpy thickness δ ** and heat flux on the wall qw. If qw is given, the quantities δ ** and tw should be found. The necessary padding relation between unknown quantities is set by Eq. (5.8), see below. Let us make following note concerning the mathematical structure of Eq. (5.2). Strictly speaking, it is an integro-differential equation, as the quantity δ ** within the differential is itself an integral from a priori unknown speed and temperature distributions in the boundary layer (see Eq. (5.1)). The efficiency of the integral method results from separately establishing the heat transfer law as algebraic relation (5.8) between integral quantity δ ** and heat flux qw. Due to this, Eq. (5.2) can be solved as an ordinary first-order differential equation.
82
5 Heat Transfer near the Stagnation Point at ross Tube Flow
A stricter derivation of Eq. (5.2) is shown below. Let us start with the energy equation (1.24), written for steady-state problems without internal heat sources:
0 = −div(−λ gradt ) − div(ρwh ) . We have further for a two-dimensional, laminar flow with (u,v) as longitudinal and transverse velocities:
∂ ∂ ∂ (ρuh ) ∂(ρvh ) ∂t ∂t 0= + − λ λ − . ∂x ∂x ∂y ∂y ∂x ∂y "
%
%
"
#
#
#
$
!
$
!
For boundary layer: ∂t ∂t ∂t . << ; q ≈ q y = −λ ∂x ∂y ∂y
The principal part for obtaining an integral equation is the integration over transversal coordinate y: ∂ (ρu(h − h∞ )) ∂ (ρv (h − h∞ )) ∂ dy + dy = − q y dy . ∂x ∂y ∂y 0 0 0
∞
∞
∞
)
,
*
'
&
&
&
*
'
(
+
Enthalpy h must be counted off from h to get convergence of the improper integrals: -
∞
d ρu (h∞ − h )dy − ρv w (h∞ − hw ) = − q y ,w . dx 0 .
Rearranging yields: ∞
d ρu (h∞ − h ) dy = − q y ,w + ρv w (h∞ − hw ) . dx 0 /
Eqs. (5.3) and (5.2) are identical, because qy,w 5.3
qw , vw
jw, h = cp t. 3
1
0
(5.3)
2
0
Mathematical Formulation of the Problem
According to Fig. 5.1, the hot fluid (gaseous products of combustion, in this example) flows perpendicular to the tube containing the cold fluid (steam). Heat is transferred from the hot fluid to the cold through the tube wall (through the heating surface). It is necessary to find the distributions of the exterior heat transfer coefficient αout(x), wall temperature tw(x), heat flux q(x) = –qw. The coordinate x is counted from the stagnation point S of the pipe. 4
4
4
5.3 Mathematical Formulation of the Problem 83
Values of heat transfer coefficient αin and temperature tin of the fluid in the tube are given, as well as temperature tout = t and upstream velocity W for the exterior fluid. For the main-stream velocity outside the boundary layer uinf(x) = u (x) we must still obtain the required distribution (see Sect. 5.4). The mathematical formulation of the problem includes the following equations: Overall heat transfer: 5
5
6
(tout − tin )
q(x ) =
1
α out (x )
+
,
1 αin
(5.4)
where heat transfer resistance of tube wall is neglected. Heat transfer on the external side: 6
q (x ) =
(tout − tw (x )) . 1 α out (x )
(5.5)
Integral equation for the thermal boundary layer on the external side: 6
[
]
d ρ u inf (x ) δTxx (x ) c p (tout − t w (x )) = q(x ) , dx
(5.6)
with δTxx = δT** as enthalpy thickness. Distribution of the main-stream velocity uinf(x) along tube wall: 6
<
9
x ; uinf (x ) = 2W sin R :
7
;
8
x π < . R 4
(5.7)
Heat transfer law for the laminar boundary layer: =
0.22 1 ; Pr 4 / 3 Re Txx u (x ) δTxx (x ) αout (x ) ν St ≡ ; Re Txx ≡ inf ; Pr ≡ , a ν ρ uinf (x ) c p St =
(5.8)
where St is Stanton number, ReTxx is Reynolds number based on enthalpy thickness δTxx as a linear scale, and Pr is the Prandtl number, the ratio of the kinematic viscosity to the thermal diffusivity. It is remarkable for laminar flow that the local heat transfer coefficient varies inversely to the local thickness δTxx of thermal boundary layer (see Eq. (6.27) and associated commentary in Chapt. 6). Boundary conditions in the forward stagnation point following from symmetry of the problem: =
d δ Txx dx
= 0; x =0
d θw dx
=0. x=0
(5.9)
84
5 Heat Transfer near the Stagnation Point at ross Tube Flow >
From now on, we use the excess temperature: θ w ( x ) ≡ t out − t w ( x ) . According to Eq. (5.4), the heat flux is transferred from the hot fluid on the outside to the cold fluid in the tube under the influence of temperature difference (potential drop) passing thermal resistances 1/ αout and 1/ αin. Eq. (5.4) brings to mind Ohm's law for series connection from electrical engineering. The problem is, that exterior thermal resistance 1/ αout in Eq. (5.4) is unknown and that it is a composite function of system geometry, flow velocity, and physical properties of fluid. Mathematical simulation of thermal resistance 1/ αout is a central point of the model calculation considered here. The aim is to find a functional dependence of heat flux q on some argument list including exterior fluid velocity and tube radius. Designers try to increase heat flux to miniaturize the bulky heat exchangers. But the first thing to be ruled out is that wall temperature exceeds the allowable value. Let us remember, that danger is connected to high temperature of an exterior gas flow and to high pressure of pipe steam. As we will show, the problem comes to a numerical solution of the thermal boundary layer equation (5.6) that represents the heat balance for fluid flow near the wall. The term in square brackets on the left is the enthalpy loss of the stream ρuinfδTxx being cooled from tout down to tw. Derivation indicates, that the enthalpy loss will increase along the cool wall, due to heat sink q(x). For a better understanding, it is useful to read Sect. 5.2 once again. Development of heat transfer law (5.8) is treated in Sect. 6.7 of following chapter. 5.4
External Flow Velocity Distribution
From Eqs. (5.6) and (5.8) follows, that we need the velocity distribution at cross flow around cylinders (Fig. 5.1). This can be obtained from solving of the classical problem of inviscid cross flow around cylinders. The complex-valued function defining vector of a complex conjugate velocity as result of potential flow theory is written as: w( z ) = 1 −
1 , z2
(5.10)
where z = x + iy, i – imaginary unit, x,y – coordinates. Let us set a square grid and calculate the longitudinal and cross velocity components for an area outside of a circle with unit radius, with help of intrinsic function if, as shown in Fig.5.3. To chart a vector field it is necessary to call the Mathcad menu Insert, Graph, Vector Field Plot and to insert – instead of a placeholder – the designation of arrays (U,V) assigning velocity projections, as shown in Fig. 5.4.
5.4 External Flow Velocity Distribution 85
1
w( z) := 1 −
2
z n := 10
i := 0 .. n
j := 0 .. n
?
?
@
xi := i − A
n 4 ⋅ 2 n DB
@
yj := j −
C
A
n 4 ⋅ 2 n BD
zi , j := xi + i ⋅ yj
C
Ui , j := if ( zi , j ≥ 1 , Re ( w( zi , j) ) , 0) Vi , j := if ( zi , j ≥ 1 , −Im( w( zi , j) ) , 0)
w
Fig.5.3. Calculation of velocity vector field in Mathcad
( U , V)
Fig. 5.4. Ideal cross flow around a cylinder Uinf ( X ) ≡
if X <
sin ( X )
π 4
E
π F
sin G
HJ
4
I
otherwise
1 Uinf ( X) sin ( X)
0.5
0
0
1 X
Fig. 5.5. Velocity distribution near the forward stagnation point
86
5 Heat Transfer near the Stagnation Point at ross Tube Flow >
At high velocities, the real flow on leeward side differs from this picture strongly due to separation of the boundary layer, approximately on the cylinder midship (Fig. 5.1). However, in the frontal part the inviscid flow yields good representation for a substantial stream. The assumption that the boundary layer is very thin allows calculating uinf(x) as velocity of inviscid flow immediately on tube contour. By employing (5.10) for points on the tube surface the sine function is obtained (Fig. 5.5). Operator if, however, confines use of this solution only to the area around the stagnation point. 5.5
Analysis for the Stagnation Point
For forward stagnation point x = 0, the simple, but rather bulky (if manually done) analytical transformations result in following formulas: StW 0 ≡
1 αout (0) 0.938 = 2/ 3 ρ W c p Pr 2R W ν N
M
K
P
O
1/ 2
;
δTxx (0) 1 = StW 0 . 2 R
(5.11)
L
The development of these formulas is shown in Fig. 5.6. The necessary calculations on the Mathcad-worksheet including derivations, substitutions and identical transformations for simplification of outcomes, was made by symbolic Mathcad processor, also a great time-saving tool. Let us briefly describe these symbolic computing processes. The idea of the first stage of analysis was to write the differential equation (5.6) immediately for stagnation point x = 0 and to receive a relationship between boundary layer thickness and heat transfer coefficient at this point. Consecution of analytical transformations of Eq. (5.6) is demonstrated in the upper part of Fig. 5.6. First two substitute operators fulfill the substitution of binomial series 0. Such expansion for temperature and boundary layer thickness at x decomposition follows from the boundary conditions (5.9), according to which the first derivative in the stagnation point comes to zero. The third operator orders to make evaluations exactly at the stagnation point x = 0 The fourth operator realizes the substitution of Newton–Richman law Operator factor makes a possibility obvious to cancel quantity W (0) The solve operator decides the equation for out(0) received as a result of preceding operations. The outcome is shown in the next line of this fragment. At the second stage (lower part of Fig. 5.6) the formula for out(0) is considered together this Eq. (5.8). The system for unknowns out(0) and txx(0) is again solved with symbolic processing. The outcome is returned as matrix of roots. Only two positive radicals have physical meaning, and they are finally submitted by formulas (5.11). Q
R
Q
Q
Q
Q
S
T
T
T
U
5.5 Analysis for the Stagnation Point 87 V
x uinf ( x) ≡ 2 ⋅ W ⋅ sin R W
X
Y[
Z
2
substitute , θ w ( x)
d dx
δ Txx( x) ⋅ θ w ( x) ⋅ uinf ( x) −
θ w ( 0) + a ⋅ x
2
substitute , δ Txx( x)
q ( x)
substitute , x
ρ ⋅ cp
δ Txx( 0 ) + b ⋅ x
→
0
substitute , q ( 0)
α out ( 0 ) ⋅ θ w ( 0 )
factor solve , α out ( 0 ) 2 ⋅ δ Txx( 0 ) ⋅ W ⋅ ρ ⋅
cp R
_____________________________________________________ V
V
W
α out ( 0 ) W
2 ⋅ δ Txx( 0 ) ⋅ W ⋅ ρ ⋅
cp
α out ( 0 ) W
Y
solve , Z
R
δ Txx( 0 )
W
W
W
X
α out ( 0 )
0.22 ⋅ c p ⋅ ρ ⋅ ν δ Txx( 0)
⋅ Pr
4 − 3 Z
.663 ⋅
Z
→
simplify Z
Z
]
]
Z
[
[
\
]
Y
W
X
Z
( W ⋅ ν ⋅ R)
]
Pr ]
1 2
2 3
_
⋅ρ ⋅
cp R
.331 ( W ⋅ ν ⋅ R) ⋅ 2 W
`
1 2 `
`
`
`
Pr
3 `
]
]
]
− .663 ⋅ ]
( W ⋅ ν ⋅ R)
]
^
Pr
2 3
1 2
`
⋅ρ ⋅
cp R
− .331 ( W ⋅ ν ⋅ R) ⋅ 2 W Pr
3
1 2 `
`
`
a
Fig. 5.6. Development of formula for heat transfer coefficient in cross flow stagnation point
In further calculations (see Sect. 5.6), both of these values are used as convenient scales for reduction of the equations to a dimensionless form. Eqs. (5.11) allow to calculate the heat transfer coefficient and thermal boundary layer thickness at the stagnation point, starting from specified values of approach flow velocity, tube radius R and fluid properties. Numerical examples are given in Fig. 5.7. The wall temperature is calculated from the relationship obtained by termwise division of the formulas (5.5) and (5.4). Thermal properties (density, heat capacity, kinetic viscosity, Prandtl number) are received from reference data tables for combustion gas at temperature 1000°C.
88
5 Heat Transfer near the Stagnation Point at ross Tube Flow b
Let us note, that properties should be selected at average temperature in boundary layer. Therefore, more exact accounts need an iterative procedure: after definition of the wall temperature the physical parameters must be updated and the calculations will be repeated. Graphs yield useful information for the designer. For example, it is well visible, that the increase of flow velocity may result in overheating of the wall. The influence of the tube radius as geometrical parameter is also reflected in the diagrams. ρ := 0.26 ⋅
kg m
cp := 1300 ⋅
3
J kg ⋅ K
ν := 174 ⋅ 10
2 −6 m
⋅
s
Pr := 0.58
°C := 1 ⋅ K tout := 1200 ⋅ °C
tin := 500 ⋅ °C
α in := 200 ⋅
watt 2
m ⋅K
0.938
α out_0( W , R) := ρ ⋅ cp ⋅ W ⋅ 2 3
1 2
c
Pr ⋅
2 ⋅ R⋅ W d
e
hf
g
ν 1
(
)
tw ( W , R) := tout − tout − tin ⋅
W := 1
m m .. 30 s s
α out_0( W , R)
1 1 + α out_0( W , R) α in
R1 := 0.01m
R2 := 0.02m
300
( ) α out_0( W , R2) α out_0 W , R1
(
R3 := 0.03m
1000
( ) tw ( W , R2) tw ( W , R3) tw W , R1
200
)
α out_0 W , R3 100
800
600
0
0
10 20 30 W
0 10 20 30 W
Fig. 5.7. Heat transfer coefficient out_0(W,R) and wall temperature tw(W,R) in cross flow stagnation point as functions from approach flow velocity W, for various tube radii R i
j
5.6 Dimensionless Formulation
5.6
89
Dimensionless Formulation
We return now to the main problem – calculation of circumferential distribution of thermal characteristics on the tube. Preliminary simple operations of variable scaling, which we omit, result in the dimensionless formulation, including: the differential equation for the dimensionless enthalpy loss H (obtained from (5.6)): k
d H (X ) = Q (X , H ); dX H (0) = 0
(5.12)
and the set of algebraical equations (5.13), (5.14), and (5.15), which establishes a functional dependence Q(X,H) for the right-hand side of Eq. (5.12) and encloses again: expression for enthalpy loss H through the given speed distribution Uinf (see below (5.19)) and unknown dimensionless values of enthalpy thickness D (see (5.18)) and thermal head T (see (5.16)): k
H = U inf (X ) D T
(5.13)
the overall heat transfer equation, including given numerical parameter R (obtained from (5.4) and from (5.18)): k
Q= k
1 D + Rα
l
(5.14)
the outside heat transfer equation (obtained from (5.5) and from (5.18)): Q=
T . D
(5.15)
The dimensionless dependent variables are determined through appropriate dimensional quantities by following equations. Dimensionless thermal head “external flow – wall”: T=
t − t (x ) θw (x ) = out w tout − tin t out − t in
(5.16)
1 q( x ) ρ c p W (tout − tin ) St w0
(5.17)
Dimensionless heat flux: Q=
Dimensionless (relative) thickness of thermal boundary layer and also reciprocal of relative heat transfer coefficient (as to this, see also the comment to Eq. (5.8) for heat transfer law in the laminar boundary layer):
90
5 Heat Transfer near the Stagnation Point at ross Tube Flow b
δ (x ) α out (x ) D ≡ txx = δ txx (0) α out (0)
−1
r
o
p
m
p
m
q
n
.
(5.18)
Dimensionless parameters and given functions are determined by the following formulas. External flow velocity distribution: U inf ( X ) =
uinf (x ) 2W
(5.19)
Ratio of heat transfer coefficients: α out (0) = Rα . αin
(5.20)
Rα is the single numerical parameter of the dimensionless problem. With growth of this parameter, the wall temperature will approach the high temperature of external heating and can exceed an allowable limit. 5.7
Optimization Algorithm for the Right-Hand Side
For numerical integration of (5.12), the built-in Mathcad functions can be used, e.g. rkfixed, rkadapt, Odesolve. But previous to that it is necessary to design the user function Q(X,H) for the right-hand side of (5.12). The problem is, that there is no explicit expression for Q(X,H). To define this function, we should develop a special program to solve the nonlinear set of equations (5.13), (5.14), (5.15). The appropriate program unit written in built-in programming language Mathcad is presented in Fig. 5.8. Solution of the nonlinear system (5.13)–(5.15) is organized by minimizing user’s function F with the help of built-in Mathcad function Minimize. Function F (Q,T,D,X,H,R ) is constructed in such a way that • F becomes zero if variables Q, T, D satisfy the set of equations (5.13)– (5.15) at given values X, H, R , • F grows unbounded when variables Q, T, D move away from the solution of this system. Further we create the new user function Mini() with the complete list of parameters that call the built-in function Minimize: s
s
Mini(Q,T,D,X,H,R ) := Minimize(F,Q,T,D). t
In the argument list of Minimize there is the goal function F and objective variables Q,T,D.
5.8 Numerical Integration with Built-in Function Odesolve 91 u
u
π π , sin ( X ) , sin Uinf ( X ) ≡ if X < 4 4 v
v
w
w
F ( Q , T , D , X , H , Rα ) ≡
zx
y
zx
y
eq1 ← H − Uinf ( X ) ⋅ D ⋅ T eq2 ← Q −
T D
eq3 ← Q −
1 D + ( Rα )
2
2
eq1 + eq2 + eq3
2
Mini ( Q , T , D , X , H , Rα ) := Minimize ( F , Q , T , D ) RH ( X , H) :=
D0 ← 1 Q0 ←
1 D 0 + Rα
T0 ← Q0 ⋅ D 0 Mini ( Q0 , T0 , D 0 , X , H , Rα )
Q ( X , H) := RH ( X , H) 0
Fig. 5.8. Program unit for definition of right hand side of differential equation (5.12)
The user function RH assigns an initial estimate as set of varied parameter values Q0,T0,D0 in the stagnation point and call function Mini() described above. RH is vector function with following components: the dimensionless heat flux Q, the dimensionless thermal head T, the dimensionless enthalpy thickness D. Thus, the last line of program fragment in Fig. 5.8 sets the right hand side of differential equation (5.12) as RH component with index zero. 5.8
Numerical Integration with Built-in Function Odesolve
Now it is possible to call the built-in function Odesolve for numerical integration of differential equation (5.12) and to present results graphically, as shown in Fig. 5.9. Using the obtained solution for enthalpy loss H, we finally calculate and represent graphically the circumferential distributions of the normalized (relative) values of heat transfer coefficient on the outer tube surface, heat flux and temperature difference “exterior stream – wall” as is done in Fig. 5.10. Index “rel” in designations in Fig. 5.10 indicates that values are referred to an appropriate scale and are dimensionless. The dimensionless heat flux qrel(X) (or Q) is connected to basic heat flux q(x), W/m2 with formula (5.17). In Fig. 5.10, the user function Q(X,H) from program block in Fig. 5.8 is applied to calculate qrel(X).
92
5 Heat Transfer near the Stagnation Point at ross Tube Flow {
Rα ≡ 1 X start := 0
X fin := 1.57
Given
d H( X) dX
H ( X start )
Q ( X , H ( X) )
0
H := Odesolve ( X , X fin) 1
H( X)
0.5 0
0
1
2
X
Fig. 5.9. Numerical integration of the thermal boundary layer equation
The relative heat transfer coefficient on the tube defined as α rel ( X ) =
αout (x ) αout (0)
is calculated using Eqs. (5.18) and (5.14). The resulting formula α rel =
qrel 1 1 Q = = = 1 1 − Rα Q 1 − Rα qrel D − Rα Q
allows calculating the distribution rel(X) by means of qrel(X). The dimensionless temperature difference defined by (5.16) as |
∆ t rel = T =
is evaluated from qrel and |
rel
tout − t w (x ) tout − tin
using (5.15):
T = QD =
q Q = rel . α rel α rel
As can be seen from Fig. 5.10, the greatest intensity of heat transfer on the front side of the tube is reached in the stagnation point x = 0. Also the temperature difference between the hot exterior flow and the tube wall is minimal here, i.e. the wall temperature tw is closest to the high temperature tout. Therefore, we find the most dangerous conditions for the tube material in point x = 0.
5.9 Conclusion 93 X := 0 , 0.1 .. 1.57 qrel ( X ) := Q ( X , H ( X ))
α rel ( X) :=
qrel (X ) 1 − Rα ⋅ qrel ( X)
∆trel ( X) :=
qrel (X ) α rel ( X )
1 α rel ( X) qrel ( X)
0.5
∆trel ( X)
0
0
0.5
1
1.5
X
Fig. 5.10. Distributions of the normalized values of heat transfer coefficient on the tube, heat flux and temperature difference
Let us notice, that the considered model for local heat transfer is fair for laminar boundary layer, within the area from the forward stagnation point up to a separation point or up to transition to turbulence. Furthermore, the local heat transfer maximum found at the stagnation point is a global maximum for the whole tube surface only with the restriction of not too high Reynolds numbers 2RW/ . }
5.9
Conclusion
The problem considered is connected to the reliability of high-temperature heating surfaces such as the steam superheater in thermal power stations. It is commonly satisfied by calculating the average wall temperature for comparison with permissible temperature for tube material. Such elementary calculations can be carried out using the following simple formulas for heat transfer: q=
(tout − tin ) 1 1 + αout αin
;
q=
(tout − tw ) , 1 αout
in which all values are considered as surface-averaged, or circumferentially constant. If the safety factor is selected small, however, an emergency situation is probable, when the average wall temperature will be below the permissible, but the maximum one will be higher. Therefore, to increase the reliability of superheater performance, it is necessary to calculate the circumferential distribution of heat transfer, as we did in our design. The differential model was necessary for calcula-
94
5 Heat Transfer near the Stagnation Point at ross Tube Flow ~
tion of local temperature. Evidently, Mathcad is the efficient instrument for such a complex problem. Under computational aspects, the central point of the model was integration of an ordinary differential equation. Mathcad provides the whole set of built-in functions for numerical integration. Therefore, no computational difficulties should arise for such a problem. Nevertheless, for the beginner the following collision may appear difficult: • In educational examples of manuals, the right-hand sides of differential equations are always represented by simple analytical expressions. • In engineering practice or scientific research, the right-hand sides of differential equations are represented as complex algorithms realized in the form of program modules, but not as analytical expression (see also [46,53]). Therefore, we thought it to be useful to demonstrate the operation of the typical structures of the Mathcad program for the solution of a real problem with differential equationes, whose right hand side is realized in the form of an optimization algorithm.
6
The Falkner–Skan Equation of Boundary Layer
6.1
Introduction
The Falkner–Skan equation [4] f ′′′ + f f ′′ + β (1 − f ′ 2 ) = 0
(6.1)
with boundary conditions η = 0;
f (0) = f w ;
f ′(0) = 0; (6.2)
η → ∞;
f ′(∞) → 1 ,
describes the class of so-called similar laminar flows in boundary layer on a permeable wall (Fig. 6.1) and at varying main-stream velocity. The dependent variable f is a dimensionless stream function, the independent variable η is a dimensionless distance from the wall, a so-called similarity variable. The first derivative of f with respect to η, i.e. f ', defines the dimensionless velocity component in x-direction, the second one, i.e. f'' defines the dimensionless shear stress in the boundary layer. Solutions of the boundary problem defined by Eqs. (6.1), (6.2) create the theoretical background for the analysis of friction resistance and heat or mass transfer for the following practical problems: flows along curvilinear profiles, such as gas turbine blades or airplane wings, flows on permeable (perforated) surfaces with blowing or suction, flows with condensation or evaporation on interfaces, flows with intensive catalytic reactions on a wall.
y
u∝
δ (x) v(x,y=0)
x
Fig. 6.1. Velocity boundary layer on permeable wall
96
6 The Falkner–Skan Equation of Boundary Layer
The mass-transfer parameter fw in the boundary condition sets the measure for the mass flow rate through the wall boundary in either direction. Positive values determine flows with suction, negative with blowing (Fig. 6.1) through the wall boundary. The zero value corresponds to flow along impermeable wall with zero mass transfer. The numerical parameter β (positive or negative) in the Falkner–Skan equation sets a degree of acceleration or deceleration of main stream. The flows with zero value for this parameter will be considered, i.e. the flows without longitudinal pressure gradient in main stream. The Falkner–Skan equation (6.1), together with similar Eq. (6.22) for thermal boundary layer (see Sect. 6.7), constitute the theoretical basis of convective heat and mass transfer. Both ordinary differential equations (6.1) and (6.22) mentioned above are obtained from more common partial differential equations of pulse and energy transport (1.32)–(1.35) using two fundamental ideas: boundary layer and similarity transformations. 0) fluids flow over body sur1. Boundary layer. When low-viscous ( / faces, the cross changes of velocity should be concentrated within a boundary layer near the wall so that the viscous force might ensure the necessary deceleration (loss of pulse) of main stream from u∞ down to zero at the wall, as can be shown by estimations of order in continuity and motion equations from Sect. 1.4:
∂u ∂v = 0; + ∂x ∂y u v x δ
v≈
δ u∞ x
(6.3)
∂u ∂u ∂p ∂ 2u ∂ 2u + ρv = − +µ +µ µ ∂x ∂y ∂x ∂x 2 ∂y 2 2 u u ρu ∞ ∞ ρ u ∞ δ u ∞ ρu ∞ µ u∞ d µ ∞ x x δ x x2 δ2 µ u∞ u u2 u∞ ∞ ≈ ∞ + ρ δ2 x x ρu
(6.4)
δ ≈ x
1 u∞ x ν
Here, we assume ( / ) 0, but not vanishing entirely, because the viscous force O( u / ) should exist in our problem, to ensure adhesion to the wall. This is rel0, << x. ized by very thin boundary layer
6.1 Introduction
97
An unacceptable alternative would be to generally neglect viscosity forces. Thus the second (i.e. the higher) derivatives would vanish. The mathematical degree of differential equation would be depressed, and the zero velocity condition on the wall could not be realized. From (6.4) apparently follows that the indistinct expression about “lowviscosity” fluid may be replaced by the stricter statement about flows in the asymptotical case of large Reynolds numbers Rex ≡ u∞x/ν >> 1. From (6.3), (6.4) the asymptotical simplified equations for velocity boundary layer follow: ∂u ∂v + = 0; ∂x ∂y u
(6.5)
1 dp ∂ 2u ∂u ∂u =− +v 2 . +v ∂y ρ dx ∂x ∂y
(6.6)
Within the limits of boundary layer δ/x << 1 (Fig. 6.1), the longitudinal velocity u quickly varies from u∞ down to zero on the wall, and transversal velocity v remains very small, v << u∞. The pressure variation over the cross-section can be neglected; only its longitudinal changes have to be taken into account. The following differential equation for thermal boundary layer is derived from energy equation (1.35) in an analogous manner:
u
∂ 2t ∂t ∂t =a 2; +v ∂y ∂x ∂y
a≡
λ . ρc
(6.7)
2. Similarity transformation. Now, similarity transformation allows us to proceed from partial differential equations to ordinary differential equations. Two independent variables x and y are combined into a unique independent variable = y/ (x), where (x) represents boundary layer thickness (Fig. 6.1). Thus, the similar variable is the distance from the wall, measured on the scale of boundary layer thickness. After entering a flow function as new dependent variable, such that
u=
∂Ψ ∂Ψ ; v=− , ∂y ∂x
the continuity equation (6.5) is automatically satisfied. The meaning of the new variable becomes clear by looking at relationships: y
d Ψ = u dy by x = const , Ψ = u dy , 0
according to which the flow function determines a fluid flow rate within the limits of the boundary layer.
98
6 The Falkner–Skan Equation of Boundary Layer
The scale for Ψ may be u∞δ, where boundary layer thickness δ, as we saw earlier (Eqs. (6.4)), is evaluated as: δ ≈ x
1
.
Re x
So, the idea is to proceed from variables u(x, y), v (x, y) to similar variables ( /(u ), ). The efficiency of such replacement depends not only on differential equations, but also on the structure of the boundary conditions. Generally, at the exterior boundary the distribution of main-stream velocity u (x) must be prescribed, as well as the cross mass flow rate at the wall boundary, also as function of x. In some cases (for example, at the power-behaved change of main-stream velocity, at the cross mass flux as reciprocal square root from x, at the power-behaved change of temperature drop in heat transfer problems), similar (automodel) solutions of such boundary problems can be obtained. Let us briefly write the designations for similar flows:
u∞ = c ⋅ x m ,
where m≡−
dP x /(ρ u∞2 ) dx
is modified Euler number. Parameter β in Falkner–Skan equation is connected to Euler number by: β=
The similar variable given as: η= y
2m . m +1
and the dimensionless stream function, f = 1 du∞ ⋅ ; νβ dx
f =
Ψ u∞
/(u ), are
1 du∞ ⋅ . νβ dx
Thus, due to asymptotic model of boundary layer and to similar transformations, the complicated original formulation (1.32)–(1.35) with partial differential equations is reduced to the ordinary differential equation problem (6.1), (6.2). However, even being the result of essential simplifications, the Falkner–Skan equation remains a complicated mathematical object, due to nonlinearity and boundary conditions mode [22, 54]. We will show now, that Mathcad provides the efficient tools to solve such complex problems. In addition, our educational purposes are: solution of the applied problem and elaborate the necessary technique. It is important to understand, how the velocity and temperature fields near the wall are established, how the flow resistance and heat transfer rate are to be calculated and how the process can be controlled. We shall reach this goal by varying
6.2 Model Construction 99
control parameters, such as main-stream velocity, properties of fluid, rate of blowing or suction, and representing the results visually. The principal technique issue will be the numerical solution of a two-point boundary problem for the system of ordinary differential equations using the builtin Mathcad function sbval. The design infrastructure includes integration with methods rkfixed and odesolve, evaluation of the radical by root, interpolation by cspline, interp, matrix operations with stack, matrix, etc. 6.2
Model Construction
As velocity profile and shear stress, i.e. the first and second derivatives f, are of main interest, it is expedient to present differential equation (6.1) of the third order as a system of three first-order differential equations. The required function, its first and second derivatives are considered as components of vector-function (F0, F1, F2). After apparent substitutions: ∂ ∂ f = F0 = F1 ; ∂η ∂η
∂ ∂2 f = F1 = F2 ; ∂η ∂η2 f = F0
∂ ∂3 f = F2 ; ∂η ∂η3
we receive the vectorial equations (6.8) instead of (6.1): ∂ F = D (η, F ) , ∂η
(6.8)
where the dependent variable and the right-hand side are defined as vector functions:
F0 F = F1 ;
F1 F2
D (η, F ) =
F2
.
(
− F0 F2 − β 1 −
F12
)
(6.9)
Because this system of differential equations is nonlinear (contains quadratic terms F0⋅F2 and F12), numerical integration is required. Boundary conditions (6.2) should be rewritten in new denotations as follows: F0 (0) = f w ;
F1 (0) = 0 ;
F1 (∞ ) = 1 .
(6.10)
The first of these conditions represents the mass flux through the wall boundary. The quantity fw is the given numerical parameter. The second condition sets longitudinal component of velocity to zero at the wall (at η=0) corresponding to the fundamental adhesion condition.
100 6 The Falkner–Skan Equation of Boundary Layer
The third condition determines the longitudinal velocity on infinity as the mainstream velocity outside the boundary layer. At numerical integration, this condition is given on some large enough, but finite coordinate η, η=ηinf, such that its further increase does not result in any deformation of velocity profile. That can be achieved during several trial numerical experiments. One can also formalize the selection ηinf so that the computational program itself would determine the necessary value of exterior boundary ηinf, satisfying the given calculation accuracy. The purpose of further calculations is to obtain the flow field near the wall by different values of parameter fw : negative, appropriate to blowing (or to evaporation), and positive for suction (or condensation). As to the second parameter β, we shall limit our further investigation to its zero value, i.e. with zero velocity-gradient in the main stream outside the boundary layer. By numerical integration of system (6.8), the functions F0(η), F1(η), F2(η) will be obtained. Then the flow field in physical coordinates x,y should be calculated and graphically represented, and also shear stress at the wall, i.e. hydrodynamic resistance is evaluated. Relationships between physical variables (i.e. longitudinal u(x,y) and transversal v(x, y) components of velocity, flow function ψ(x,y)), on the one hand, and similar Falkner–Skan variables (i.e. the dimensionless flow function f(η) and the dimensionless distance from wall η) on the other, are given by following formulas: Longitudinal velocity: U=
u ∂ = f = F1 . u∞ ∂η
(6.11)
Transversal velocity: £
v = V = u∞
ηF1 − F0 ∂ f − f = η . ∂η 2 Re L X 2 Re L X 1
¡
¡
¢
(6.12)
By zero value for η, eq. (6.12) determines connection between flow function at the wall and blowing or suction velocity: v = u∞
1 2 Re L X
(−
fw) =
− F0,w 2 Re L X
.
(6.13)
The second derivative calculated at the wall yields the friction coefficient:
cf 2
=
τw ρu∞2
µ =
∂u ∂y
w
ρu∞2
=
f w'' 2 Re L X
=
F2,w 2 Re L X
.
(6.14)
6.3 Boundary-Value Problem. Method sbval
The self-similar variable
101
¤
η=
Y X 2 Re L
. (6.15)
is evaluated by means of physical coordinates (x, y). The dimensionless flow function f (or F0) is connected to the original flow function ψ by: f =
Ψ Re L . u∞ L 2 X
(6.16)
Formulas (6.15), (6.16) are obtained for the case of constant main-stream velocity. The common relations for the similar variables ( , f) have been given at the end of Sect. 6.1. Let us remember the physical meaning of flow function: ¤
¥
ψ 2 − ψ1 =
y2 y1
u dy ,
(6.17)
saying that the difference of values on two streamlines in a stream cross-section is equal to the volume flow (Fig. 6.5). Reynolds number is determined by distance parallel to the wall L: Re L =
u∞ L . ν
Physical coordinates (x, y) are normalized by reference to length L: X=x/L, Y=y/L.
6.3
Boundary-Value Problem. Method sbval
Boundary conditions (6.2) for the Falkner–Skan equation are given on both borders of integration interval: at the wall, η = 0, and far from it, at η → ∞, in fact, however, in some large, but finite distance η = ηinf. In other words, it is necessary to decide a boundary problem, or as it is sometimes called, two-point boundary problem. Numerical algorithms for such problems are more complicated than for an initial problem when all boundary conditions are given in an initial point. For initial problems, the computational mathematics disposes of efficient numerical methods. The Runge–Kutta process with the fixed or adapted step is mostly used. It can be applied, reducing the boundary problem to the integration of series of initial problems with trial values of missing initial conditions in initial point. Then, in end point, one can measure the “distance” between calculated
102 6 The Falkner–Skan Equation of Boundary Layer
(trial) value of dependent variable and the one prescribed by boundary condition, and then judge the success or failure of each such attempt. The analogy to shooting becomes obvious when the aim is adjusted by distance of the hit from the target. The numerical method, grounded on this analogy, is named “shooting method”. Let us discuss this idea more concretely with reference to our problem. At initial point, two conditions are given, i.e. values F0(0) and F1(0). Missing initial condition is value F2(0) in initial point, instead of this the value F1(ηinf) = 1 at end point is given. The initial problem can be solved with initial condition F2(0) = ξ, where ξ is trial value taken by guess. As a result, some value F1,inf will be obtained at the end point. It is unlikely that the correct value F1,inf =1 will be received after first integration already, but obtained value can be considered as function of trial initial ξ. Now it is clear how to proceed further. There are two options: • To solve equation F1,inf (ξ)−1=0, for example, by secant method, realizing that trial values F1,inf (ξ) are not evaluated by simple substitution in some formula, but are obtained by numerical integration of a system of differential equations • To minimize the discrepancy (F1,inf (ξ)−1)2 → 0 using any optimization algorithm, for example, the coordinatewise optimization, or the simplex Nelder–Mead method, or any other available method. In Mathcad there is a built-in function sbval that helps to find the missing conditions at initial point. We do not really know the interior structure of this function, but apparently, it works on one of the versions mentioned above. In Mathcad reference system the title sbval is decrypted as follows. The part “bval” corresponds to “boundary value”. Character “s” means “shooting method”. As users, we can be content with this common view, but we should know how to write the call to this function (Fig. 6.2). As soon as the missing initial value will be returned by sbval function, the initial problem can finally be solved with the numerical method (for example, rkfixed). The set of numerical parameters in our example will be as follows: Numerical parameter of problem giving acceleration of main stream: β=0 (for uniform main stream) Numerical parameter of problem giving blowing (fw<0) or suction (fw >0): fw=0 (zero mass flux through the wall boundary) The fixed zero value of coordinate at the wall (service parameter): ηw=0 The numerical parameter giving exterior boundary(service parameter): ηinf =6. Use of built-in function sbval is demonstrated in Fig. 6.2. The sequence of operations is as follows: The parameter values are entered, the right-hand side (6.9) of equation set (6.8) is written The vector of initial conditions according to (6.10) is created by user's function SetInit ¦
¦
¦
¦
¦
¦
6.4 The Solution of the Initial Problem. Method rkfixed 103 ¦
¦
¦
The trial value of the second derivative at η=0 is entered as component of vector with zero index ξ0. In other problems, more than one initial condition may be missing, therefore ξ should be vector. User's function discrepancy evaluates the discrepancy at the end point of integration interval (F1–1). It should be equal to zero, see (6.10). Function call sbval is written, and the output, i.e. the missing initial condition, is introduced in vector MissingInitCond. We shall remember, that this missing condition is the value of the second derivative at the wall, i.e. F2(0). β := 0
η w := 0
η inf := 6
§
F1 «
D ( η , F) :=
© ¬
¬
«
F2 ¬
«
§
¨
−F0 ⋅ F2 − β ⋅ 1 − ( F1) ¨
fw := 0
2 ©ª
ª
ξ 0 := 0.1 °
(
)
±
®
SetInit η w , ξ :=
0 ®
¯
(
±
fw ®
ξ0
±
²
)
discrepancy η w , F := F1 − 1
(
MissingInitCond := sbval ξ , η w , η inf , D , SetInit , discrepancy
)
MissingInitCond = ( 0.4696 )
Fig. 6.2. Application of built-in function sbval returning the missing conditions at initial point (F2(0) = 0.4696 in case of zero mass transfer)
6.4
The Solution of the Initial Problem. Method rkfixed
As all initial conditions are known now, it is possible to call any built-in function of numerical integration, for example rkfixed (Fig. 6.3). Parameters of this function are: vector of initial conditions InitCond, coordinates of initial and end points, number of integration steps N and vector function of right-hand sides of system of differential equations. We shall remark, that the fragment of evaluations in Fig. 6.3 is the prolongation of the Mathcad document in Fig. 6.2, where the right-hand side D was already submitted.
104 6 The Falkner–Skan Equation of Boundary Layer
(
InitCond := SetInit η w , MissingInitCond InitCond
T
= ( 0 0 0.4696 )
(
η := S
)
S := rkfixed InitCond , η w , η inf , N , D
N := 200 ³
)
´
³
0
´
f := S
1
(
T
T
Uarray := stack U , U
³
U := S
´
2
³
Stress := S
´
3 µ
)
Zero ( i , j) := 0 V as_0 := matrix ( rows ( Uarray ) , cols ( Uarray ) , Zero )
fw = 0
( Uarray , V as_0 ) Fig. 6.3. Longitudinal velocity distribution in the boundary layer on an impenetrable surface
The output of integration is returned as array S, the column vectors of which are independent variable , dimensionless flow function f, longitudinal component velocity U and shear stress, as shown in line 4. The velocity profile is constructed in such manner that the wall is identified by the horizontal coordinate, and the stream is considered moving from left to right. On vertical axis the dimensionless distance from the wall and on horizontal axis velocity U are represented. It deserves attention that the graph in Fig. 6.3 is constructed as Vector Field Plot but so many horizontal arrows of velocity are drawn, that they merge creating the black area as distribution diagram. The last three lines above the diagram in Fig. 6.3 produce the data arrays required for diagram by built-in Mathcadfunctions stack and matrix. In Fig. 6.3, the classical velocity profile is shown in boundary layer on impermeable surface without cross mass flow through the wall. In the following, the calculations for permeable surface will be carried out, and we shall see, how blowing or suction control the velocity profiles in boundary layers. But beforehand, we present the output in two different manners (Fig. 6.5). At first, we construct a visual pattern of the vector flow field, and, secondly, we produce a diagram of the streamlines. It is useful to compare these pictures created by computer to photos of flows in album [57]. ¶
¶
6.5 Flow Field Imaging 105
6.5
Flow Field Imaging
For visualization of flow field in original physical coordinates it is necessary to fill the flow area by a square net of coordinates (x, y), to calculate the values of the similar variable for each mesh point by formula (6.15), and then to find the values of longitudinal U and transversal V velocity projections, and also the flow function from Eqs. (6.11), (6.12), and (6.16). These evaluations are realized in the Mathcad-program by interpolation using built-in function linterp as logical centre (Fig. 6.4). ¸
·
Fields ( S , Re L , X min ) ≡
( X max ← 1
nX ← 10 nY ← 40 )
(
»
¼
½
¹
Y max ← max S
º
0
)⋅
2
Y min ← 0
Re L
À ¾
¿
for i ∈ 0 .. nX − 1 Xi ← X min + i ⋅
X max − X min nX − 1
for j ∈ 0 .. nY − 1 Yj ← Y min + j⋅
Y max − Y min nY − 1
Re L
η i , j ← Yj
2 ⋅ Xi
(
¹
º
¹
º
)
Ui , j ← linterp S 0 , S 2 , η i , j
(
¹
fi , j ← linterp S Vi , j ←
0
¹
,S
1 2 ⋅ Re L ⋅ Xi
Ψ i , j ← fi , j ⋅
(U
º
º
1
)
, ηi , j
⋅ ( Ui , j ⋅ η i , j − fi , j)
2 ⋅ Xi Re L
V Ψ Y max )
Fig. 6.4. Interpolation routine to create flow field in physical coordinates
The results are shown in Fig. 6.5. On the leading edge of the wall (at X=0), the solution has a singularity, and construction of the graph starts with some small finite value Xmin. Two-dimensional arrays of U and V are defined on uniform grid, and the Vector Field Plot diagram is applied to construction of the flow field (upper figure). is also calculated as two-dimensional array on the same grid. Flow function Constant values correspond to streamlines, and for their construction, diagram Contour Plot is applied (lower figure). Á
Á
106 6 The Falkner–Skan Equation of Boundary Layer
fw = 0
(U
ReL := 100
Xmin := 0.01
V Ψ Ymax ) := Fields ( S , ReL , Xmin )
( U , V) X min = 0.01
Ymax = 0.849
Ψ Fig. 6.5. Vector flow field and flow function for the impermeable wall
As is visible in the upper figure, the boundary layer becomes gradually thicker downstream. Streamlines are directed almost parallel to the wall, although some upward deviation is noticed due to deceleration, as fluid is “adhering” the wall (lower figure). Both longitudinal and transversal velocity components are zero on the solid impermeable surface. The drag coefficient cf on the impermeable flat plate can be expressed by Eq. (6.14), in which the following substitution must be made using above obtained value of MissingInitCond (see Fig. 6.2) for the second derivative at the wall: f w'' ≡ F2 (0) = 0.4696 .
6.6 Boundary Layer on Permeable Walls 107
Thus we receive: cf 2
=
6.6
0.4696
1
2
u∞ x ν
=
0.332 u∞ x ν
.
(6.18)
Boundary Layer on Permeable Walls
At intensive blowing through permeable walls (see Fig. 6.6, Fig. 6.7, and Fig. 6.8), an abrupt change of flow structure in the boundary layer is observed. The velocity profile (Fig. 6.6) turns to the characteristic S-shaped form. The shear layer appears to be pushed aside from the wall. The phenomenon of flow separation appears. The shear stress at the wall decreases by actuation of blowing and will finally become zero at so-called critical blowing. The value of permeability parameter f w = –0.7 taken in this numerical example, is close to critical, and the friction coefficient practically becomes zero (f″w = F2(0) = 0.05458 , see Fig. 6.6, vs. f″w = F2(0) = 0.4696 for impermeable wall). Let us note, that the evaluation of the missing initial condition F2(0) by means of function sbval was carried out just as shown in Fig. 6.2 for the case of the impermeable wall, but with a modified set of parameters: ( = 0, f w = – 0.7), instead of ( = 0, f w = 0). Â
Â
(
InitCond := SetInit η w , MissingInitCond
)
T
InitCond = ( − 0.7 0 0.054577 ) N := 200 Ã
(
S := rkfixed InitCond , η w , η inf , N , D
Ä
η := S 0
Ã
Ä
Ã
f := S 1
(
T
Ã
) Ä
U := S 2
Stress := S 3
)
Zero(i , j) := 0
T
Uarray := stack U , U
Ä
Vas_0 := matrix( rows ( Uarray) , cols ( Uarray) , Zero)
fw = −0.7
( Uarray , Vas_0) Fig. 6.6. Longitudinal velocity distribution in the boundary layer at blowing (fw = –0.7, f″w = F2(0) = 0.05458)
108 6 The Falkner–Skan Equation of Boundary Layer
(U
V Ψ Ymax ) := Fields ( S , ReL , Xmin)
( U , V) Xmin = 0.2
Ymax = 0.849
Ψ Fig. 6.7. Vector flow field and flow function at blowing
( U , V) Fig. 6.8. Vector field of velocity near the wall at blowing
6.6 Boundary Layer on Permeable Walls 109
Flow in boundary layer with suction is presented in Fig. 6.9, Fig. 6.10, and Fig. 6.11. We observe essential differences compared to the case of the impermeable wall. Now the boundary layer is pressed to the wall. The boundary layer thickness decreases noticeably in comparison with an impermeable surface and, especially, with flow under intensive blowing. Since the boundary layer becomes very thin, the second derivative of flow function or, being the same, the first derivative of velocity becomes very large. Therefore, the shear stress will be increased by actuation of suction as it is visible from (6.14). The second derivative at the wall, proportional to shear stress, becomes f ″w = F2(0) = 7.0692 (by permeability parameter fw = 7). It is a very large value compared to f″w=F2(0) = 0.4696 for the original case of impermeable wall. Let us note, that the evaluation of the missing initial condition F2(0) by means of function sbval was carried out just as shown in Fig. 6.2 for the case of impermeable wall, but with a changed set of parameters: ( = 0, f w = 7) instead of ( = 0, f w = 0). To see the flow structure near the wall in more detail, the vector velocity field is made scaled-up in Fig. 6.8 (blowing) and Fig. 6.11 (suction). As always, due to adhesion condition, the longitudinal component at the wall equals zero. The transversal velocity component, in contrast to the impermeable surface, is nonzero (positive for blowing and negative for suction). Therefore, the velocity vector at the wall is nonzero and is directed normal to the surface. Å
Å
(
InitCond := SetInit η w , MissingInitCond InitCond
T
N := 200 Æ
η := S
= ( 7 0 7.069198 )
(
S := rkfixed InitCond , η w , η inf , N , D
Ç
0
)
Æ
f := S
(
Ç
Æ
1 T
U := S T
Uarray := stack U , U
Ç
2
)
Æ
Stress := S
) Ç
3
Zero ( i , j) := 0
V as_0 := matrix ( rows ( Uarray ) , cols ( Uarray ) , Zero )
fw = 7 È
( Uarray , V as_0 ) Fig. 6.9. Longitudinal velocity distribution in the boundary layer at intensive suction (fw = 7, f″w = F2(0) = 7.0692)
110 6 The Falkner–Skan Equation of Boundary Layer
fw = 7
(U
ReL := 100
Xmin := 0.2
V Ψ Ymax ) := Fields ( S , ReL , X min)
( U , V) X min = 0.2
Ymax = 0.849
Ψ Fig. 6.10. Vector flow field and flow function at suction
( U , V)
Fig. 6.11. Vector field of velocity near the wall at suction
6.6 Boundary Layer on Permeable Walls 111
In three numerical examples considered above (zero cross mass flux, blowing, suction), the parameter varied was the value of flow function fw on the wall, also called parameter of permeability (see Eq. (6.13)). Each time, at the numerical integration of the boundary value problem for the given parameter fw, the appropriate value of second derivative on the wall fw″ was obtained. The results are shown graphically in Fig. 6.12 in the form of functional dependence fw″(fw). Apparently, we discover from the graph the asymptotic f w″ fw for large positive parameter fw, i.e. for intensive suction. É
Ê
f''w Ë
Ì
ÏÍ
fw
3
1 Î
asympt
2
f''w 1
fw 1
0
1
2
3
1
fw
Fig. 6.12. Dependence of stress parameter fw" from mass flux parameter fw
Assuming this asymptotic in Eqs. (6.13) and (6.14) we obtain for intensive suction:
cf 2
=
− vw u∞
(6.19)
or, identically: τ w = [ρ ⋅ ( −v w )]⋅ u∞ .
(6.20)
The physical meaning of the asymptotic formula (6.20) can be explained as follows: the part in square brackets is the cross mass flow from exterior main stream into the permeable wall, and the second factor is the longitudinal impulse, contained in each mass unit of cross flow. The product of both factors produces a momentum flux through the wall boundary which is equivalent to the stress at the wall. Remarkable feature of the asymptotic law (6.19) or (6.20) is independence of stress (or friction coefficient) from viscosity of fluid (it is useful to compare the
112 6 The Falkner–Skan Equation of Boundary Layer
asymptotic formula (6.19) with equation (6.18) for viscous friction on the impermeable wall). Another important result already considered above is zero stress value on the wall by intensive blowing (Fig. 6.6). This case of boundary layer separation is seen on the graph (Fig. 6.12) in the area of extreme negative values fw of blowing where the wall velocity gradient fw″ will be zero. 6.7
Thermal Boundary Layer. Heat Transfer Law
If the temperature difference between wall and fluid (Fig. 6.1) is nonzero, there is a heat flux through the boundary layer that in engineering calculations is determined by the Newton–Richman law: qw = α(t w − t ∞ ) ,
(6.21)
where α is the heat transfer coefficient, a measure of heat exchange intensity between wall and fluid, an intricate function of velocity and flow regime, geometry, thermal properties of fluid. Finding this function is the main practical application of the theory of convective heat transfer. Thermal Boundary Layer Equation Let us remember, that the partial differential equations for velocity boundary layer (6.5), (6.6) after similar transformations turn into ordinary differential equations (6.1), whose integration yields the full information on velocity and stress distribution. Analogously, the partial differential equation (6.7) for thermal boundary layer is reduced to following ordinary differential equation: g ′′(η) + Pr⋅ f (η) ⋅ g ′(η) = 0 ,
(6.22)
with boundary conditions g ( 0) = 0 g ( ∞ ) = 1 .
(6.23)
The integration of this boundary problem yields the temperature and heat flux distribution and eventually the heat transfer coefficient. The similar variable has been defined previously, see (6.15). The required function g represents the dimensionless temperature in the fluid flow: Ð
g=
t( x, y ) − tw . t∞ − tw
(6.24)
Numerical parameter Pr (Prandtl number) is the ration of kinematic viscosity to thermal diffusivity of fluid.
6.7 Thermal Boundary Layer. Heat Transfer Law 113
Simple calculations show that heat transfer coefficient and Nusselt number Nu as its dimensionless form are expressed by following formulas which can be used after integration of the boundary problem (6.22), (6.23): Ò
Ñ
−λ α=
qw = tw − t∞
∂t ∂y
y= + 0
t w − t∞ Nu x =
=λ
dg dη
y= + 0
αx g w' = λ 2
u∞ ∂η ; = λg w' ∂y 2νx
(6.25)
u∞ x . ν
For integration (6.22) we need a solution for the flow field. Only flow function f (but not its derivatives) is needed immediately, therefore it is convenient to use built-in function Odesolve for integration , as shown in Fig. 6.13. Let us restrict the problem to heat exchange on impermeable surface, therefore fw = f(0) = 0. N := 200 Given f''' ( η ) + f ( η ) ⋅ f'' ( η )
0
f ( 0)
0
f' ( 0 )
f' ( 6 )
0
1
f := Odesolve ( η , 6 , N) i := 0 .. N
X i :=
6⋅i N
Yi := f ( X i) fspl ( η ) := interp ( Spl , X , Y , η )
Spl := cspline ( X , Y)
fa ( η ) :=
fspl ( η ) if η ≤ 6
(
η − 6 − fspl ( 6 )
U ( η ) :=
d dη
fa ( η )
)
otherwise
η inf := root ( 0.99 − U ( η ) , η , 1 , 10 )
η inf = 3.472
10
10
η η
5
0
η inf
0
fa ( η )
5
5
0
0
0.5
U( η )
1
Fig. 6.13. Velocity boundary layer on impermeable wall (solution with Odesolve)
114 6 The Falkner–Skan Equation of Boundary Layer
Referencing solver Odesolve takes only two lines of the program text. The computed distribution f is stored for further use in the form of spline-function fspl obtained with the built-in functions cspline and interp. To present clearly the area of boundary layer, the velocity distribution is constructed and the distance from the wall = 3.472 is marked on which 99% of all longitudinal velocity variation is completed. For finding of this boundary, the method root was used to solve the non-linear equation U( )=0.99. Outside of layer = 3.472, the velocity is practically constant already, and flow function varies linearly with distance from the wall. Good approximation for the flow function at any given will be user's function f a, which is applied further at integration of the thermal boundary layer equation. The integration of Eq. (6.22) and temperature distribution in the thermal boundary layer are demonstrated in Fig. 6.14. In the graph, the horizontal axis merges with the wall, and this axis also represents dimensionless temperature g. On the vertical axis, dimensionless distance from the wall is plotted. So we have the temperature profile in common presentation. Ó
Ó
Ó
Ó
Ó
Pr := 1 Given g'' ( η ) + Pr ⋅ fa ( η ) ⋅ g' ( η )
0
g ( 0)
0
g ( 6)
1
gPr_1 := Odesolve ( η , 6 , N) 10
Distance
8 6 4 2 0
0
0.2
0.4 0.6 Temperature
0.8
Pr=0.1 Pr=1 Pr=10 Wall
Fig. 6.14. Temperature distribution for various Prandtl numbers
6.7 Thermal Boundary Layer. Heat Transfer Law 115
The calculations are carried out for a large interval of Prandtl numbers. It should be remembered that values of the Prandtl number close to unit are characteristic for heat transfer with gases, much larger values for viscous lowconductivity organic liquids, much smaller unit values for molten metals. The graph in Fig. 6.14 shows, that the separation of heat-carriers in three such groups has a clear physical meaning. To distinguish between the results for different values of the Prandtl number, we have supplied g with an appropriate literal subscript. • In case Pr = 1, the profiles of velocity and temperature completely coincide and the thicknesses of hydrodynamic and thermal boundary layers are identical. Therefore, the curve labeled as Pr = 1 should also be considered as velocity profile for all of the three cases shown. • At Pr << 1 (see numerical example with Pr = 0.1), the thermal boundary layer thickness exceeds by far that of velocity. Therefore, velocity will be constant within most part of the thermal boundary layer, except in the very close neighborhood of the wall. • At Pr >> 1 (see numerical example with Pr = 10), quite the contrary occurs, and the thermal boundary layer only exists at the bottom of the velocity boundary layer. As a consequence, velocity will be low throughout the thermal boundary layer, diminished by proximity to the wall. The results of calculations at different Prandtl numbers are collected in the table of Fig. 6.15, where the first line indicates numbers 2 to 11 of the 10 variants, the second gives the Prandtl numbers are indicated, and the third the pertaining values of the dimensionless temperature gradient g w. These results are also presented as graphs containing the following data: • results of numerical integration (circles), • asymptotic solutions for large (dashed line) or small Prandtl numbers (dotted), respectively • approximated general-purpose equation g'appr for wall temperature gradient g'w (solid line, obtained by superposition of asymptotes, applicable in all ranges of Prandtl numbers). Values g'w are substituted in formulas (6.25) to calculate a required value of heat transfer coefficient as a measure of heat exchange intensity. Using this theory, we are able to calculate the heat transfer coefficient for three different heat-transfer mediums, mercury, air and oil, presenting three characteristic groups and also for the very important case of water (Fig. 6.16, fluids identified by indexes). Thermal properties are taken for standard conditions. Dimensional data are written in SI (kg, m, s, K): thermal conductivity , W/(m K), kinematic viscosity , m2/s; wall length L, m; main-stream velocity U, m/s; heat transfer coefficient , W/(m2 K). The wall length and main-stream velocity were selected small as to guarantee laminar conditions. Ô
Õ
×
Ö
116 6 The Falkner–Skan Equation of Boundary Layer 2
Pr_g T = 0
0.01
3
4
0.1
0.5
5
1 0.073 0.198 0.367 Ø
6
1
7
8
2
9
4
8
0.47 0.597 0.756 0.955
Ù
Ø
10
20
11
100
1.03 1.299 2.226
Ù
g' w := Pr_g 1
Pr := Pr_g 0
− 0.25
à
á
−4
Ú
Û
á
â
g' appr ( Pr) :=
10
Ü
0.479 ⋅ Pr
1 3
Û
Ýß
−4
Ú
Ü Þ
+ 0.798 ⋅ Pr
1 2
Ýß
Þ
ã
å
ä
ä
10
g'w 1
⋅ 0.479Pr
1
3
1
⋅ 0.798Pr
2
0.1
g'appr ( Pr )
0.01. 3 1 10
0.01
0.1
1
10
100
Pr
Calcul Pr >> 1 Pr << 1 approx
Fig. 6.15. Dimensionless temperature gradient as function of Prandtl number
The heat transfer coefficient is estimated by formula (6.25): α=λ
g w' 2
u∞ . νL
The graphs in Fig. 6.16 demonstrate, how strongly the intensity of heat exchange depends on physical properties of fluid. The heat transfer coefficient to mercury (molten metal with high thermal conductivity) on three orders exceeds the one to air. Evidently, water is a much better cooling agent, than viscous oil or air with its small density and thermal conductivity. Therefore, projects of replacing air-cooling of personal computers and even notebooks are seriously considered. It would make the cooling systems also silent. Another important result of the theory is essential increase of heat exchange intensity with increasing main-stream velocity: the heat transfer coefficient is proportional to the square root of velocity (see (6.25)).
6.7 Thermal Boundary Layer. Heat Transfer Law 117 é æ
æ
Hg ç
é
ê
ê
ê
0 ç
ê
ç
ê
ç
ê
Water ç
è
ê
2 è
2.6 ⋅ 10
ê
ç
ç
ë
λ := ç
−2
1.5 ⋅ 10
ê
ç
ê
ν :=
0.6
ç
ç
1.0 ⋅ 10 ç
ë
è
ê
0.03 ç
−5
è
1.5 ⋅ 10
1 −4 3 é
æ
æ
−6 −3
è
0.479 ⋅ Pr
α ( fluid , U , L) := λ fluid ⋅
Pr :=
7.0
ê
ç
è
ë
+ 0.798 ⋅ Pr
g' appr ( Prfluid) 2
L ≡ 0.1
⋅
ë
ê
ç
1.6 ⋅ 10
ê
4 ë
− 0.25
ê
ç
ë
î
1 −4 2 é
ê
ç
í
0.7 ç
è
0.15
í
ê
ê
ì
g' appr ( Pr) :=
é æ
ê
ë
3
Oil
ê
ê
ç
ç
:=
−7
ê
1
ê
ç
7.8 ç
ç
Air
1.2 ⋅ 10
é æ
é æ
ñ ï ð
ð
U ν fluid ⋅ L
U ≡ 0.1 , 0.2 .. 1 1 .10
4
α ( Hg , U , L)
1 .10
3
α ( Air , U , L) α ( Water , U , L) α ( Oil , U , L)
100
10
1
0
0.5
1
U
Fig. 6.16. Convective heat transfer to different heat-transfer mediums
Though these results are obtained for laminar conditions, the qualitative content of deduced relationships also holds for turbulent flows that are more important in practice (although more complicated for calculation). Heat Transfer Law Eq.(6.25) will now be presented in greater generality than the one deduced for longitudinal flow of the isothermal plate. Let us rewrite (6.25) as a relationship linking • the local value of heat transfer coefficient, made dimensionless by means of scaling with cu , • and the Reynolds number constructed on local values of boundary layer thickness and main-stream velocity: ò
ó
118 6 The Falkner–Skan Equation of Boundary Layer
g w' ⋅ δ txx, rel 1 α , = Pr Re txx ρ u∞
(6.26)
ô
where Re txx =
u∞ δ txx ; ν
δtxx , rel =
δtxx 2 νx u∞
.
Enthalpy thickness txx may be calculated under formula (5.1), if profile of velocity and profile of temperature are known. In dimensionless form: õ
∞
δ txx, rel = U (η) (1 − g (η))dη . ö
0
Results of relative enthalpy thickness computed by this formula are presented as graphs in Fig. 6.17. δ xx_rel := 0.4696
δ txx_rel
0.4
i
δ xx_rel
0.2
0
0
5
10
Pri
Fig. 6.17. Dimensionless enthalpy thickness as function of Prandtl number
For comparison, the value of the relative momentum thickness is marked in the same graph: δ xx _ rel =
δ xx 2 νx u∞
.
The thickness ratio of thermal and velocity boundary layers was considered above (see Fig. 6.14), and all numerical data needed for formula (6.26) were obtained already (see Fig. 6.13 and Fig. 6.14). The result will be as follows:
6.8 Troubles with Odesolve
St ≡
α ϕ(Pr) = , ρ cu∞ Re txx
ϕ(Pr) ≅
0.22 Pr 4 / 3
.
119
(6.27)
Approximation function (Pr) in (6.27) is suitable for gases and nonmetallic liquids. Within the integral method of boundary layer (see previous chapter), the relation (6.27) for Stanton number St is also called the heat transfer law at laminar condition. Let us accentuate that the formulation was obtained immediately for the limited conditions of heat exchange for the isothermal flat plates in parallel laminar flows. Calculations and experiments show, however, that this law can also be applied with satisfactory accuracy for convective heat transfer on not isothermal surfaces and with variable main-stream velocity. A practical example of such problems was considered in the previous chapter. ÷
6.8
Troubles with Odesolve
The built-in integrator, which appeared in Mathcad 2000 version, is intended for integration of ordinary differential equations, including two-point boundary problems. The Odesolve call (see e.g. Fig. 6.14) practically does not differ from the routine mathematical notation and looks much easier than the use of the sbval method. Solution of the Falkner–Skan equation is written in one line. By reference to Odesolve, a function will be returned, but not an array, when using other solvers such as rkfixed etc. The problem is, that manipulating with this return function the peculiar results may be obtained as is demonstrated in the examples of Fig. 6.18, Fig. 6.19. The first error is identified by evaluation of the first and second derivatives at an initial point (Fig. 6.18). It is apparent, that the zero value of the first derivative given by the initial condition is not reproduced. For the second derivative, zero is obtained instead of the correct value (0.4696, see Fig. 6.3). It looks like a serious mistake, rather than an allowable error of solution. Apparently, the return function f is not a routine function since it is not possible to apply standard mathematical operation of a series expansion. Fig. 6.19 illustrates the peculiarities detected at attempts to sequentially apply the spline interpolation and then the derivation. The first fragment shows that at small interpolation steps (0.01) the same improper results are returned as by direct evaluation of the derivatives. The second fragment shows, that interpolation steps may be selected (0.1) that yield satisfactory results but looking at the last fragment, countenance gets lost again, because minor step variation (0.09) gives rise to an abrupt change in the result. The user could eventually find reasons why Odesolve behaves in this manner (it would be better, however, the producer to explain its features more clearly).
120 6 The Falkner–Skan Equation of Boundary Layer TOL = 0 Given f :=
f''' ( η ) + f ( η ) ⋅ f'' ( η )
Odesolve ( η , 6 )
η := 0
d dη
0
f ( 0)
f' ( 0)
0
f' ( 6)
1
f = function d2
f ( η ) = 0.0135565
f ( η ) series , η
0
dη
2
f( η ) = 0
w e
0 ,2 →
Fig. 6.18. Odesolve and series expansion i := 0 .. 5
Spl := cspline ( X , Y) η := 0
Yi := f ( X i)
X i := 0.01 ⋅ i
d
fs ( η ) := interp ( Spl , X , Y , η ) d2
fs ( η ) = 0.013557
2
fs ( η ) = 1.781474 × 10
− 15
dη dη __________________________________________________________
i := 0 .. 5
X i := 0.1 ⋅ i
Spl := cspline ( X , Y)
Yi := f ( X i)
fs ( η ) :=
interp ( Spl , X , Y , η )
fs ( η ) = −3.976486 × 10
−6
d2
fs ( η ) = 0.469747 2 dη __________________________________________________________
η := 0
d
dη
i := 0 .. 5
X i := 0.09 ⋅ i
Spl := cspline ( X , Y) η := 0
d dη
Yi := f ( X i) fs ( η ) := interp ( Spl , X , Y , η )
fs ( η ) = 2.225674 × 10
−3
d2 dη
2
fs ( η ) = 0.417474
Fig. 6.19. Odesolve and spline interpolation
6.9
Conclusion
Use of the blowing technique can protect the surfaces from action of hightemperature gas flows or from chemically hostile environments. Patterns of vector flow fields show, that by blowing through permeable walls under large negative values of parameter fw = – 0.7 the phenomenon of separation of boundary layer takes place (Fig. 6.7, Fig. 6.8). In immediate proximity to the wall, the velocity is directed vertically, and not before some distance from the wall a longitudinal shear flow will be formed.
6.9 Conclusion 121
By varying the parameter value fw, the influence of mass flow through the boundary layer can be observed. At fw = 0 the standard flow pattern on impermeable walls is received, and at positive values – the flow pattern with suction. In aerodynamics, the suction technique is used for prevention of the dangerous phenomenon of boundary layer separation by flow over a wing with large angle of attack, as is the case during the landing of aircrafts. In heat exchangers, problems with suction arise in case of intensive condensation of vapours. Interesting effects may occur as happen combined effect of parameters of acceleration β and permeability f w. Varying these two parameters, the engineerdesigner can realize a boundary layer control, for example, applying the suction to prevent a flow separation in the case of an adverse pressure gradient (i.e. with flow in the direction of increasing pressure). Solution of the Falkner–Skan equation and the similar equation for thermal boundary layer explores the basic function relations for hydrodynamic resistance and heat transfer, showing the role of flow rate, geometry, and the physical properties of a fluid. Presented in the form of laws of resistance, heat and mass transfer for laminar flow (like Eq. (6.27)), the solutions are used within the integral method oriented on engineering applications [18, 44]. An example of such problems has been considered in Chap. 5. Application for the boundary layer concept near the phase boundary is described in [40]. The main purpose of the present chapter in the sphere of computing technique is the solution of two-point boundary problems for systems of ordinary differential equations. We have achieved this by using the built-in function sbval based on the shooting method. But this method does not always work [22]. There are problems with a strong dependence of the solution on the initial data. Then numerical instability will hinder convergence of the sbval method. Apparently, the built-in function bvalfit as a special modification of the shooting method will be more stable. An appropriate example is considered in Sect. 10.6. Another, more radical alternative would be the finite difference method in combination with TDMA (see Chap. 11). For systems of high order, the TDMA for tridiagonal block matrix may be used [1,22].
7
Rayleigh’s Equation: Hydrodynamical Instability
7.1
Introduction
In nature and engineering we deal with different steady-flow and time-varying (transient) processes. Though from the philosophical standpoint “all flows, and all varies” (by Heraclitus of Ephesus), it is necessary to recognize, that for engineering thinking the stationary approach is more intimate. There are two reasons for this. Firstly, large engineering systems work in steady-state, optimized conditions. For example, nuclear power plants are intended to work in basic, constant load. Secondly, the steady processes are easier to study and understand. However, such style of engineering thinking is fraught with serious danger. Any system is subject to random disturbances to which also accidental personnel mistakes can be added. The behavior after perturbation is one of the basic characteristics of the system. If restitution occurs, the system is stable and reliable. If the perturbations will grow, the system is unstable, and special stabilizing control will be necessary whose failure may result in catastrophe. We have considered earlier (Chap. 3) such problems and have analyzed the stability of three equilibrium points, one of which appeared to be unstable. Stability research starts with the analysis of the system response to small perturbations. If the deviations from equilibrium position are small, then the linearization of mathematical formulation is possible. To work with linearized models is much easier, than with original, very often non-linear mathematical formulations. The fundamental idea consists in expanding the putative solution near the equilibrium point in powers of the small parameter, which is a measure of the small deviation from equilibrium. If the system is stable against small perturbations this can be accepted as a positive but preliminary result, because stability must then be checked against finite perturbations, which are commonly non-linear. But this is a special research problem already. If the system is unstable to small perturbations, then the system is absolutely unstable. It would be an unwise decision, to design a plant or process with such an inherent property and to rely only on special stabilizing control. In case of natural phenomenon, this is the question about its observability, realizability. To be or not to be – that is the pressing question for an appearance, if any small perturbations destroy it. The topic of this chapter is instability in fluid flows. The examples of such problems are water waves generated by wind, or transition from laminar to turbulent flow. Impressive photos on this theme exist in literature [57]. The special interior tension of these problems is that the smooth solutions, without waves and turbulence, can be obtained naturally from the complete (not reduced) set of the governing differential equations (1.28), (1.31). There are no
124 7 Rayleigh’s Equation: Hydrodynamical Instability
visible reasons, why Poiseuille's solution with parabolical velocity profile, such as in blood capillary, should not be fit for big gas pipelines. It is not clear, why the wind not only accelerates surface layer of water due to friction, but also generates waves. This chapter gives some answers by means of analyse of Rayleigh’s equation (see e.g. [2, 55]): ý
ú
U b′′ v′′ = + k2 ⋅v , Ub − c ø
û
(7.1)
ø
û
ù
ü
where •
v – complex amplitude of velocity perturbations, sought as function of transverse (perpendicular to basic flow direction) coordinate y, • Ub(y) – the basic flow velocity profile, • k – wavenumber, – complex rate of propagation of the perturbations, or phase velocity • c = cr + i⋅ci , i – imaginary unit, • primes denoting differentiation with respect to y. For various wave lengths (various k), the phase velocity c will be obtained, and it will be shown that if the imaginary part of the phase velocity c will be positive, then instability will take place. From the viewpoint of the computing technique in Mathcad, it will be shown how to integrate the differential equations with complex coefficients and how to interpret the complex solutions. Introductory information on this problem can be found in Sect. 2.3. þ
7.2
Hydrodynamic Equations for Free Shear Flow
We consider the dynamic stability of the two-dimensional parallel steady flow with an S-shaped velocity profile (Fig. 7.1). The axis x is directed along the basic shear flow, the axis y – perpendicular to it. It is supposed, that the basic flow velocity varies only along axis y, Ub = Ub(y). Main changes of velocity are concentrated in a layer 2H thick near the point of inflection of the velocity profile. x U0
y -U0 2H
Fig. 7.1. The basic flow velocity profile
7.3 Perturbation Method. Linearization 125
The quantities U0 and H are used for scaling velocity and coordinates. Therefore, independent variables x,y, and the unknown functions – velocity W and pressure P – should be considered as dimensionless quantities according to following transformation formulas: ÿ
x⇐
x H
;
y⇐
τU 0 P y W ; τ⇐ ; W⇐ ; P⇐ . H H U0 ρU 02
(7.2)
The profile of the dimensionless velocity of basic flow is well approximated by the hyperbolic tangent: Ub ( y) = f ( y ) = tanh( y ) . U0
(7.3)
As a prototype of such velocity distribution, the shear flow away from a permeable wall, induced by intensive blowing, can be used (see Fig. 6.6, Fig. 6.7). A similar velocity profile would be formed on the periphery of jet exhaust, or at a river flowing into the sea. In other words, there is a wide area of such practical problems. When the formulation for nonstationary two-dimensional motion (1.32)–(1.34) is written in normalized form, it becomes: ∂U ∂V + =0; ∂x ∂y
(7.4)
∂P 1 ∂ 2U ∂ 2U ∂U ∂U ∂U ; + + =− +V +U ∂x R ∂x 2 ∂y 2 ∂y ∂x ∂τ
(7.5)
∂P 1 ∂ 2V ∂ 2V ∂V ∂V ∂V , + + =− +V +U ∂y R ∂x 2 ∂y 2 ∂y ∂x ∂τ
(7.6)
where R = U0H / ν – Reynolds number, ν – kinematic viscosity of fluid. Now we look at the stability of such a flow in relation to small perturbations. 7.3
Perturbation Method. Linearization
The idea of the perturbation method is to separate the perturbed flow (W,P) into the basic undisturbed flow (f(y),P0) and the perturbation (u,v,p): W = (U,V ); U ( x , y , τ) = f ( y ) + ε ⋅ u( x,y, ); V ( x, y , τ) = ε ⋅ v( x,y, );
P( x , y , τ) = P0 + ε ⋅ p( x , y , τ);
(7.7)
126 7 Rayleigh’s Equation: Hydrodynamical Instability
where << 1 is the small numerical parameter characterizing deviation from equilibrium. These expansions are then substituted into the full system (7.4)–(7.6). As a result, the equations will contain terms with different powers of the small parameter ε. The principal idea is to collect the terms with identical power of small parameter, i.e. to collect the terms of one smallness order. Symbolic processor of Mathcad may execute these operations with the built-in operator collect, as shown below. Let us begin with substitution of expansions (7.7) in continuity equation (7.4) (see Fig. 7.2).
∂ ∂x
U( x , y , τ ) +
∂ ∂y
V ( x , y , τ)
0
substitute, U( x , y , τ )
f(y) + ε ⋅ u( x , y , τ )
substitute, V ( x , y , τ )
ε ⋅ v( x , y , τ )
→
collect, ε
∂
∂x
u( x , y , τ ) +
∂
v( x , y , τ ) ⋅ ε
0
∂y
Fig. 7.2. Perturbations of continuity equation
The parameter ε can be cancelled, and as a result the continuity equation for velocity perturbations is obtained, which is formally not distinguished from original equation (7.4). Let us substitute now (7.7) on the left-hand side of Eq. (7.5) (see Fig. 7.3). ∂ ∂t
substitute , U ( x , y , t)
U ( x , y , t)
collect , ε
f ( y) + ε ⋅ u ( x , y , t) ∂ → ε ⋅ u ( x , y , t) ∂t
_________________________________________________________
U( x , y , τ ) ⋅
∂
∂x
U(x , y , τ)
substitute , U ( x , y , τ )
f ( y) + ε ⋅ u ( x , y , τ ) →
collect , ε
u( x , y , τ ) ⋅
∂ ∂x
u(x , y , τ ) ⋅ ε
2
+ f ( y) ⋅
∂ ∂x
u(x , y , τ ) ⋅ ε
_________________________________________________________
V(x , y , τ) ⋅
∂
∂y
U(x , y , τ)
substitute , U ( x , y , τ ) substitute
, V (x , y , τ)
f ( y) + ε ⋅ u ( x , y , τ ) ε ⋅ v( x , y , τ )
→
collect , ε
v( x , y , τ ) ⋅
∂ ∂y
u( x , y , τ ) ⋅ ε
2
+ v( x , y , τ ) ⋅
Fig. 7.3. Perturbations of motion equation
∂ ∂y
f ( y) ⋅ ε
7.4 Transition to Complex Domain 127
The convective contributions (second and third terms) contain items of order ε2 and ε. It is evident, that non-linear items with products of perturbations and their derivatives have higher order of smallness (ε2 << ε), and can therefore be neglected (Fig. 7.3). This linearization is an essential simplification of the problem. Further evaluations are of the same type, which we do not need to reproduce. Collecting the terms of equal order, we obtain the following system of differential equations for flow perturbations, i.e. for pulsations u, v, p: longitudinal velocity, transversal velocity, and pressure, respectively: ∂u ∂v + =0; ∂x ∂y
(7.8)
∂u ∂u ∂( f ( y)) ∂p 1 ∂ 2 u ∂ 2 u ; + + f ( y) +v =− + ∂τ ∂x ∂y ∂x R ∂x 2 ∂y 2
%
(7.9)
"
∂p 1 ∂ 2 v ∂ 2 v ∂v ∂v . + + =− + f ( y) ∂y R ∂x 2 ∂y 2 ∂x ∂τ #
#
$
!
(7.10)
The nonlinear items of order ε2 are eliminated as negligibly small. The principal advantage of Eqs. (7.8)–(7.10) over the origin formulation (7.4)–(7.6) is their linearity. Due to this, it is possible to pass from partial differential equations to ordinary differential equations, as will be demonstrated below. 7.4
Transition to Complex Domain
Analyzing structure of differential equations (7.8)–(7.10), we can make a priori assumptions about the solution. • First, the linearity of Eqs. (7.8)–(7.10) can be interpreted as proportionality between sought functions u, v, p and their derivatives. The complex exponential function h(x, )= exp(ik(x– )) has such remarkable property, and we can therefore use it for the description of wave propagation along the x axis, i.e. in the direction of flow, with wavenumber k and phase velocity c as with for the present indefinite parameters (see first block in Fig. 7.4). • Secondly, the nonconstant coefficients f(y) and f′(y) depend only on the transversal coordinate y, and that gives us the possibility on the separation of variables. These tips help to construct solutions as products of complex amplitudes pa(y), ua(y), va(y) depending on cross coordinate y, and wave exponential factor exp(ik(x– )), see second block in Fig. 7.4. '
(
&
&
&
128 7 Rayleigh’s Equation: Hydrodynamical Instability
∂ ∂x
∂
exp i ⋅ k ⋅ ( x − c ⋅ τ ) → i ⋅ k ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ ) )*
)*
+,
+,
exp i ⋅ k ⋅ ( x − c ⋅ τ ) → − i ⋅ k ⋅ c ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ ) )
)
*
+,
*
+,
∂τ ________________________________________
p ( x , y , τ ) := p a ( y) ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ ) )
*
u( x , y , τ ) := ua ( y) ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ )
+,
)
+,
*
v ( x , y , τ ) := va ( y) ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ ) ________________________________________ )
+,
*
∂ ∂x
u( x , y , τ ) +
∂ ∂y
v( x , y , τ )
0 simplify → 0
-
i ⋅ exp i ⋅ k ⋅ ( x − c ⋅ τ ) ⋅ k ⋅ ua ( y) − i ⋅ .
)
+,
*
∂
/
∂y
va ( y) 2
1
0
Fig. 7.4. Passage to complex area
Now the supposed solutions from the second block should be substituted in the system (7.8)–(7.10). These operations are demonstrated in the third block on example of equation of continuity. After automatic substitutions and derivation, the operator simplify will considerably simplify the original expression. The complex exponent is then canceled, and the result can be presented as follows: v ′( y ) = −i k u( y ) . To avoid bulky denotation, the complex amplitudes will be written further without the index “a”. As these depend only on y, they are easy to distinguish from perturbations of itself (for example, from u(x, y, τ)). At this working stage, we should decide about the role of viscosity of the fluid, and we consider it to be small and therefore neglect the operators with second derivatives on the right-hand side of Eqs. (7.9) and (7.10). Formally, we pass to the limit of large Reynolds numbers (R →∞). Therefore, the terms containing operators with second derivatives and factors (1/R) tend to zero. More rigorous study confirms, that fully viscous solution in this asymptotic limit comes to solution of inviscid perturbations problem in main. Omitting routine intermediate calculations, we can write out the obtained system of ordinary differential equations in complex domain as follows: v ′( y ) = −i k u( y ) ;
(7.11)
7.4 Transition to Complex Domain 129
− i k u( y ) ( f ( y ) − c ) − v ( y )
d f ( y ) = i k p( y ) ; dy
− i k v( y ) ( f ( y ) − c ) = p ′( y ) .
(7.12) (7.13)
It is easy to eliminate the pressure from these equations after preliminary differentiating Eq. (7.12). Simple transformations yield finally the following system for inviscid perturbations (u, v): 8
i u′ = k
f ′′( y ) + k2 ⋅ v ; f ( y) − c 5
6
3
6
3
7
4
v ′ = −i ⋅ k ⋅ u .
(7.14)
(7.15)
The following second-order differential equation (Rayleigh’s equation) is obtained by combining Eqs. (7.14) and (7.15), after differentiating (7.15) and substituting u′ from Eq. (7.14): v ′′ =
f ′′( y ) + k2 ⋅ v . f ( y) − c ;
>
9
9
=
<
<
:
(7.16)
The system (7.14), (7.15) and the equivalent Eq. (7.16) are linear and homogeneous. However their coefficients are nonconstant: they are functions of the independent variable y. Therefore, the differential equations are to be integrated numerically. If at given wave number k there is a solution, such that the imaginary part of the phase velocity c is positive, then instability will take place. It is evident from the expression for the wave exponential factor (see second block in Fig. 7.4.) h( x, τ) = exp(ik ( x − cτ)) = exp(ik (x − (cr + ici )τ )) =
= exp(kci τ ) exp(ik ( x − cr τ))
(7.17)
that the first factor on the final right-hand side will yield exponential growth of the perturbations, if ci > 0. The second factor describes the sinusoidal and cosine waves, which are running along the x-axis with phase velocity cr. For a fully symmetrical system with a fixed centerline (see Fig. 7.1), cr = 0 is to be expected, that corresponds to a standing wave. Let us summarize once again the features connected with the use of complex variables. Differential equations (7.14), (7.15) and (7.16) are written in the complex domain; their coefficients are complex quantities (the imaginary unit is present obviously, and the phase velocity c is the complex parameter). Independent variable y (integration variable, perpendicular to flow direction) is a real quantity. The desired solutions (u, v) will therefore be complex-valued functions of the real variable y.
130 7 Rayleigh’s Equation: Hydrodynamical Instability
7.5
Numerical Integration in the Complex Domain: Program Euler
The plan for the further operations is as follows. We shall assign certain value of wave number k and then try to find admissible solutions for pulsation amplitudes u(y) and v(y). As a second-order system is used, we will need two boundary conditions. We are interested in those perturbations, which are generated in the shear layer. Far from it, in the uniform stream, perturbations should be damped just as perturbations in motionless fluids are damped. From this, the zero conditions at infinity will follow. There is some freedom of selection of the complex phase velocity c. The real part should be zero due to symmetry, as was illustrated above, but the imaginary part may be varied. We should select a value for the phase velocity (its imaginary part ci) for the given wavenumber k so that at infinity the solution will be damped. After these preliminary notes we could begin with integrating Rayleigh’s equation, but we find an unexpected hurdle. Let us first apply any built-in solver, for example, rkfixed, in our case when initial conditions (vector IC) or right hand side terms (Dy) contain imaginary numbers: S:=rkfixed(IC,–3,3,N,Dy). Mathcad denotes an error by marking in red IC or Dy with a message as follows: “This value must be real. Its imaginary part must be zero”. The help system gives the following explanation: “This expression contains an imaginary or complexvalued expression somewhere in which it is not allowed. Examples are subscripts and superscripts, differential equation solvers, mod, and angle”. Thus, built-in Mathcad solvers do not work with differential equations in imaginary domain. It is necessary to develop a user's function for numerical integration of systems of differential equations, free from limitations on the type of variables. For the numerical method we shall select the modified Euler method, which is both exact enough and simple to use.
ymdl
y
yR yL
xL
xmdl
xR
x
Fig. 7.5. The second-order Euler method
The algorithm of this method is illustrated in Fig. 7.5. The slope of tangent is evaluated at an initial (left) point and then the half step is performed along this
7.6 Integration and Search of Eigenvalues 131
tangent. As a result, the predicted value Ymdl is calculated in the bisecting point Xmdl. The new tangent calculated in point (Xmdl, Ymdl) is close to true. Now the full step can be done from the left point along the tangent obtained in center. Due to symmetry of the middle point the order of method is heightened: using the half step, the error becomes one quarter. The realization of this algorithm in Mathcad language is shown in (Fig. 7.6). The output matrix of program Euler is composed by built-in function augment from X and Y. Structure of the output matrix is the same as for the built-in integrator rkfixed: the first column contains vector of the independent variable X, the second, the third, and et cetera columns are vectors of solution Y, in sequence as they are indicated in vector of right-hand sides Dy of system. The calculation by the Euler method at each integration step is repeated in cycle for. The designations in the program are chosen without any connection to concrete problem about hydrodynamic perturbations; x and y mean argument and function, as shown in Fig. 7.5. Argument P is a reserve parameter. A
(Y 0 ?
B
Euler ( IC , xL , xR , N , Dy , P ) :=
) ( X 0 ← xL)
@
CD
← IC
( xR − xL ) N
h←
for n ∈ 0 .. N − 1
( xL ← Xn) A
B
( yL ← Y n ) E
F
C
D
h xmdl ← xL + 2
(
) yR ← yL + h ⋅ Dy ( xmdl , ymdl , P ) ( X n+1 ← xL + h) ( Y n+1 ← yR)
1 ymdl ← yL + ⋅ h ⋅ Dy xL , yL , P 2
A
E
B
(
T
augment X , Y
)
F
C
D
g
Fig. 7.6. Mathcad-program of Euler method
7.6
Integration and Search of Eigenvalues
With the program Euler available it is now possible to begin integration of the differential equations set (7.14), (7.15). The general sequence of operations will be as follows: 1) It is necessary first to write the vector Dw of the second members of differential equations (7.14), (7.15) equivalent to Rayleigh’s equation (7.16) and to set the vector of the appropriate initial conditions IC for velocity
132 7 Rayleigh’s Equation: Hydrodynamical Instability
components (w0,w1) (u,v) on one of the edges of the integration segment (Fig. 7.7). 2) As the system must be repeatedly integrated with different values of the phase velocity, it is useful to include the varied imaginary part cIm in the Euler argument list and to design a function (uDv(t) in Fig.7.8) estimating the acceptability of a trial value cIm. 3) An automatic scan of the appropriate value of cIm (block Given … Find in Fig.7.8) must be organized. 4) And, finally, the results may be presented in graphic form (Fig. 7.9, Fig. 7.12). G
k := 0.4
f ( y) := tanh( y)
c ( cIm) := ( 0 + i ⋅ cIm) Q
K
N
H
d2 I
O
I
2
O
f ( y)
L
R
L
R
L R
dy i 2 ⋅ + k ⋅ w1 k f ( y) − c ( cIm)
Dw ( y , w , cIm) :=
I
O
O
J
R
M
−i ⋅ k ⋅ w0 P
S
w
K H
L
i I
IC := J
M
1
Fig. 7.7. The right-hand sides of system and initial conditions (z0=u, z1=v)
The appropriate initial conditions IC (Fig. 7.7) on the left edge of the integration segment (at y = –3) are formulated in the following way. Let us consider the solution of (7.16) outside the shear layer, i.e. at y < –3 and at y > 3. The second derivative of the basic flow velocity profile is equal to zero here (see Fig. 7.1). Therefore, the following equation with constant coefficients is obtained from (7.16): v ′′ = k 2 ⋅ v
(7.18)
v = A1 exp(− ky ) + A2 exp(ky ) .
(7.19)
with solution (see Sect. 2.3):
Clearly, for y < –3 the second term of solution (i.e. damping on negative infinity) must be chosen: v −∞ = A2 exp(ky ); u− ∞ =
v −′ ∞ A2 k exp(ky ) , = − ik − ik
(7.20)
where the expression for u was received from (7.15). The value A2 can be taken as exp(3k), without loss of generality. Then for point y = –3, we get the following simple conditions ensuring damping on negative infinity: u(–3) = i ; v(–3) = 1, which are written in the form of initial conditions vector IC in Fig. 7.7.
(7.21)
7.6 Integration and Search of Eigenvalues 133
As a result of integration with initial conditions IC, an appropriate point (u(3), v(3)) on the right edge y = 3 of integration segment is obtained. For an admissible solution this point should belong to the branch of solution damping on infinity (7.19): v ∞ = A1 exp(− ky ); u∞ =
v ∞′ − A1k exp(− ky ) ; = − ik − ik
u v
= −1 ⋅ i .
(7.22)
∞
Finally, information from Eqs. (7.22) sets the boundary condition that should be fulfilled on the right edge of the integration segment. The realization of this algorithm including Euler call and reference to uDv(t) is given in Fig.7.8. A valid value, an eigenvalue cimag of the problem, can be received as the solution of the non-linear equation in block “Given … Find”. Certainly, an explicit formulation of this non-linear “equation” does not exist, but there are the calling functions YUV, Euler, and uDv to calculate the ratio (u/v) on the right edge of integration segment. To make this ratio correct (equal to –i, see (7.22)) by means of selection of value cimag, the built-in function Find is used. N := 100
YUV( cIm) := Euler (IC , −3 , 3 , N , Dw , cIm)
(
V
uDv( t) := W
T
U
)
(
T
U
)
uinf ← YUV( t) 1 N vinf ← YUV( t) 2 N XY
uinf vinf
____________________________________________________ t := 0.45
Given
(
cimag = 0.46986
(
yuv := YUV cimag
−1
Im( uDv( t))
(
Re uDv cimag
cimag := Find ( t)
) ) = −1.336 × 10− 4
)
Fig.7.8. Search for eigenvalue cimag and eigenfunctions yuv (t – temporary name for cimag; 0.45 – first approximation)
In this example the calculations yield the value of phase velocity = i ⋅ 0.46986 for wave number k = 0.4. Thus, there is a solution with a positive imaginary part of the phase velocity. This implies, that exponential growth of perturbations will be observed (see (7.17)). For a certain time interval, originally small linear pulsations become large and already nonlinear and finally reach values, commensurable with the basic flow velocity. A real estimation is approximately 10% from U0, and there will be a passage from laminar to turbulent flow. Similar evaluations can be carried out also for other wavelengths. The perturbations with dimensionless wave numbers k (see (7.2)) within interval (0 ÷ 1) will be unstable. Z
134 7 Rayleigh’s Equation: Hydrodynamical Instability
7.7
Returning to the Real Domain
Distributions of real and imaginary parts of complex amplitudes calculated for longitudinal u and transversal v velocity pulsations are shown in Fig. 7.9. The distributions have extrema in the area of the shear layer, where the basic flow velocity (Fig. 7.1) strongly varies, and the first and second derivatives are nonzero (Fig. 7.10). On both sides of the shear layer, damping of perturbations occurs. [
y := yuv
\
[
0
u := yuv
\
[
1
\
v := yuv
2
i := 0 .. N
2
2
Re( v) Im(v)
Re( u)
1
0
Im( u)
2
0
4
2
0
2
4
4
4
y
2
0
2
4
y
Fig. 7.9. Distributions of complex amplitudes in shear layer f ( y) := tanh( y) 1
d2 f ( y) 2 dy d f ( y) dy f ( y)
0.5
0
0.5
1
2
0
2
y
Fig. 7.10. The basic flow velocity and its derivatives
Automatically a question arises as to the analysis of these distributions: how can the complex (imaginary) amplitudes represent the real flow field. To answer the question we should return to presentation of the pulsations through the complex amplitudes (ua va) and the wave factor h in Fig. 7.4 and Eq. (7.17):
7.7 Returning to the Real Domain 135
u ( x, y, τ ) = u a ( y ) ⋅ h ( x, τ ) ; v ( x, y , τ) = v a ( y ) ⋅ h( x , τ) ;
(7.23)
h( x , τ) = exp(ik ( x − cτ)) = exp(kci τ ) exp(ik (x − c r τ )) . These complex (imaginary) expressions are solutions of the linear system of partial differential equations (7.8)–(7.10) with real coefficients. We have already analysed a similar problem in Sect. 2.3. Those results can be transferred practically without modifications to the problem considered here: If there is any complex solution of a linear system with real coefficients, then the complex conjugate function will also be a solution. Consequently, the real solution can be obtained from two complex conjugate solutions (see also Fig. 7.11) by: u r ( x, y , τ ) =
u := ur ( y) + i ⋅ ui ( y)
(
)
1 u a ( y ) ⋅ h ( x, τ ) + u a ( y ) ⋅ h ( x, τ ) . 2
(
)
(
h := exp k ⋅ ci ⋅ τ ⋅ exp i ⋅ k ⋅ x − cr ⋅ τ
(7.24)
)
cr ≡ 0
complex simplify → −exp k ⋅ ci ⋅ τ ⋅ −ur( y) ⋅ cos ( k ⋅ x) + ui ( y) ⋅ sin ( k ⋅ x)
(
Re (u⋅ h)
)(
)
factor
⎯complex u⋅ h + ( u⋅ h) simplify → −exp k ⋅ ci ⋅ τ ⋅ −ur( y) ⋅ cos ( k ⋅ x) + ui ( y) ⋅ sin ( k ⋅ x) 2 w factor
(
)(
)
Fig. 7.11. Calculation of longitudinal pulsation in real domain (ur(y), ui(y) – real or imaginary part of complex amplitude)
Alternatively, pulsations may be characterized by their mean square value. For a given value of coordinate y, space averaging (along x) of squared pulsation can be performed: L
u2 =
1 2 1 ur ( x , y , τ)2 dx = ua ( y ) exp(2ci kτ ) ; L0 2 ]
L=
2π , k
(7.25)
where L is any wavelength. We see that the module of complex amplitude is a measure of the root-mean-square pulsation. Distribution of root-mean-squares across a shear layer is shown in Fig. 7.12. The most energetic pulsations are concentrated on the stream centerline combined with a point of inflection in the basic flow velocity profile.
136 7 Rayleigh’s Equation: Hydrodynamical Instability
4 3
vi ui
2 1 0
4
2
0 yi
2
4
.
Fig. 7.12. Mean-square velocity pulsations in shear layer
7.8
Conclusion
So, having assumed existence of very small (infinitesimal) perturbations in an originally smooth shear flow, we have detected that their amplitudes will increase exponentially. The subject of the analysis was free flow with an inflection point in velocity profile, and we concluded that such flows appear absolutely unstable to small deviations. Originally small linear pulsations become quickly large and nonlinear and finally reach values, commensurable with the basic flow velocity. Irregularly moving curls fill the stream – and there will be a passage from laminar to turbulent flow. Though the considered linear theory describes only initial stages when the disturbances are still smallish, and one simple model problem was solved only, we have received an explanation of apparent dominance of turbulent flows in nature and engineering. Nevertheless, the account is detailed enough to help the interested reader when experimenting with solutions in the Mathcad programming environment and to advance further understanding of hydrodynamic stability theory. More complicated problems than considered here occur in research of wall boundary layers, of flow in pipes, or of two-phase stratified streams. Particular examples can be found in the literature [2, 41, 45, 55]. The general theory of perturbation methods (regular and singular) is also explained in books [23,56]. Area of application of these methods is much wider than only hydrodynamic instability problems. Therefore, familiarization with both the basic ideas of perturbation methods and with adequate computing techniques in Mathcad will often be useful in practice.
8
Kinematic Waves of Concentration in Ion-Exchange Filter
8.1
Introduction
The problem which we consider below in connection with kinematical waves phenomenon (see Sect. 1.5) arises in mathematical modeling of ion exchangers. These units are applied to treat water for steam plants at heat and nuclear power stations [11, 20, 27] and sometimes for domestic use. Ion exchangers can be employed for extracting precious metals from solution in hydrometallurgy. There are many other areas that use ion-exchange method. w
c0
ε
L
1− ε
z
Fig. 8.1. Ion exchanger (schematic)
A ion exchanger (below briefly, filter) is presented in Fig. 8.1. The filter, L in depth, contains ion-exchange beads (with ionite). An aqueous solution together with undesirable ions (pollution) percolates through the porous bed of ionite. The following quantities are important parameters of the filter: • Porosity, or water volume fraction: ε=
•
volume filled with water entire volume of filter
Ion-exchange (ionite) volume fraction: (1 – ) ^
•
Concentration of impurities in the water at input: c0 =
mass of impurities volume of water
(8.1)
138 8 Kinematic Waves of Concentration in Ion-Exchange Filter
•
Superficial water velocity defined by volume flow rate related to the empty cross section (perpendicular to coordinate z) of filter column: w,
volume flow rate of water . area of entire cross section of filter column
Velocity w is called superficial because we assume water to pass through the entire cross section of filter column; (actual velocity being 1/ times as large). Further if we refer to porous bed it will mean the certain volume part which is filled with water, and (1– ) is occupied by ionite. If the concentration of impurities absorbed by the ionite is less than the limiting equilibrium value q0, the water will be purified. When this limiting value will be reached, purification stops. The mathematical model to simulate the process of purification should describe the spatial-time distribution of the concentration in the column and estimate the time at which the ionite is exhausted. In other words, our intention is to determine the distribution c(z, ) of impurities throughout the column depth (co-ordinate z in Fig. 8.1) for different times and to forecast the moment when the concentration of impurities in treated water leaving the filter will reach the acceptable limit. The main stages of work in this chapter are: • To formulate the differential equation of impurity concentration in water • To analyze different adsorption isotherms and to formulate equation of adsorption as the closure equation for differential mathematical model • To solve differential equation of concentration and to find the distribution c(z, ) of impurities. ^
^
^
_
_
8.2
Conservation Equation for Concentration in Filter
To formulate the conservation equation of adsorbed impurities, two other quantities should be determined: • The concentration of the impurity ions in the ionite q,
•
mass of impurities in the ionite beads entire volume of filter
The total concentration of the impurity ions in filter ρ,
mass of impuities in filter . entire volume of filter
Certainly, these quantities are local characteristics: q = q( z, τ); ρ = ρ(z, τ )
8.2 Conservation Equation for Concentration in Filter 139
The quantities c, q, their definitions: a
ρ
are interconnected by Eq. (8.2) obtained immediately by `
=
mass of impurities volume of filter
+
q b
mass of impurities volume of filter
(ε
⋅
c
volume of water volume of filter
c) d
mass of impurities volume of water
(8.2)
The meaning of the quantity in parentheses is: the impurity concentration in water multiplied by the porosity gives the impurity concentration in water per entire volume of porous bed (which includes water and the ionite beads). Now we can write the conservation equation for the control volume of filter based on the general form of the balance equation (1.11). The impurity density , i.e. the impurity content in a unit of control volume, we have just discussed. The generalized flow of conserved quantity (impurity in this case) is cal