c19-0 (779615)

Файл №779615 c19-0 (Numerical Recipes in C)c19-0 (779615)2017-12-27СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла

19.0 IntroductionThe numerical treatment of partial differential equations is, by itself, a vastsubject. Partial differential equations are at the heart of many, if not most,computer analyses or simulations of continuous physical systems, such as fluids,electromagnetic fields, the human body, and so on. The intent of this chapter is togive the briefest possible useful introduction. Ideally, there would be an entire secondvolume of Numerical Recipes dealing with partial differential equations alone. (Thereferences [1-4] provide, of course, available alternatives.)In most mathematics books, partial differential equations (PDEs) are classifiedinto the three categories, hyperbolic, parabolic, and elliptic, on the basis of theircharacteristics, or curves of information propagation.

The prototypical example ofa hyperbolic equation is the one-dimensional wave equation∂2u∂2u= v2 22∂t∂x(19.0.1)where v = constant is the velocity of wave propagation. The prototypical parabolicequation is the diffusion equation∂∂u=∂t∂xwhere D is the diffusion coefficient.Poisson equationD∂u∂x(19.0.2)The prototypical elliptic equation is the∂2u ∂2u+ 2 = ρ(x, y)∂x2∂y(19.0.3)where the source term ρ is given. If the source term is equal to zero, the equationis Laplace’s equation.From a computational point of view, the classification into these three canonicaltypes is not very meaningful — or at least not as important as some other essentialdistinctions.

Equations (19.0.1) and (19.0.2) both define initial value or Cauchyproblems: If information on u (perhaps including time derivative information) is827Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited.

To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).Chapter 19. Partial DifferentialEquations828Chapter 19.............Partial Differential Equations.........initial values(a)boundaryvalues(b)Figure 19.0.1. Initial value problem (a) and boundary value problem (b) are contrasted.

In (a) initialvalues are given on one “time slice,” and it is desired to advance the solution in time, computingsuccessive rows of open dots in the direction shown by the arrows. Boundary conditions at the left andright edges of each row (⊗) must also be supplied, but only one row at a time. Only one, or a few,previous rows need be maintained in memory. In (b), boundary values are specified around the edge ofa grid, and an iterative process is employed to find the values of all the internal points (open circles).All grid points must be maintained in memory.given at some initial time t0 for all x, then the equations describe how u(x, t)propagates itself forward in time.

In other words, equations (19.0.1) and (19.0.2)describe time evolution. The goal of a numerical code should be to track that timeevolution with some desired accuracy.By contrast, equation (19.0.3) directs us to find a single “static” function u(x, y)which satisfies the equation within some (x, y) region of interest, and which — onemust also specify — has some desired behavior on the boundary of the region ofinterest. These problems are called boundary value problems.

In general it is notSample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).boundaryconditions19.0 Introduction829Initial Value ProblemsAn initial value problem is defined by answers to the following questions:• What are the dependent variables to be propagated forward in time?• What is the evolution equation for each variable? Usually the evolutionequations will all be coupled, with more than one dependent variableappearing on the right-hand side of each equation.• What is the highest time derivative that occurs in each variable’s evolutionequation? If possible, this time derivative should be put alone on theequation’s left-hand side.

Not only the value of a variable, but also thevalue of all its time derivatives — up to the highest one — must bespecified to define the evolution.• What special equations (boundary conditions) govern the evolution in timeof points on the boundary of the spatial region of interest? Examples:Dirichlet conditions specify the values of the boundary points as a functionof time; Neumann conditions specify the values of the normal gradients onthe boundary; outgoing-wave boundary conditions are just what they say.Sections 19.1–19.3 of this chapter deal with initial value problems of severaldifferent forms.

We make no pretence of completeness, but rather hope to convey acertain amount of generalizable information through a few carefully chosen modelexamples. These examples will illustrate an important point: One’s principalcomputational concern must be the stability of the algorithm. Many reasonablelooking algorithms for initial value problems just don’t work — they are numericallyunstable.Boundary Value ProblemsThe questions that define a boundary value problem are:• What are the variables?• What equations are satisfied in the interior of the region of interest?• What equations are satisfied by points on the boundary of the region ofinterest? (Here Dirichlet and Neumann conditions are possible choices forelliptic second-order equations, but more complicated boundary conditionscan also be encountered.)Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.

Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).possible stably to just “integrate in from the boundary” in the same sense that aninitial value problem can be “integrated forward in time.” Therefore, the goal of anumerical code is somehow to converge on the correct solution everywhere at once.This, then, is the most important classification from a computational pointof view: Is the problem at hand an initial value (time evolution) problem? oris it a boundary value (static solution) problem? Figure 19.0.1 emphasizes thedistinction.

Notice that while the italicized terminology is standard, the terminologyin parentheses is a much better description of the dichotomy from a computationalperspective. The subclassification of initial value problems into parabolic andhyperbolic is much less important because (i) many actual problems are of a mixedtype, and (ii) as we will see, most hyperbolic problems get parabolic pieces mixedinto them by the time one is discussing practical computational schemes.830Chapter 19.Partial Differential Equationsxj = x0 + j∆,j = 0, 1, ..., Jyl = y0 + l∆,l = 0, 1, ..., L(19.0.4)where ∆ is the grid spacing. From now on, we will write uj,l for u(xj , yl ), andρj,l for ρ(xj , yl ). For (19.0.3) we substitute a finite-difference representation (seeFigure 19.0.2),uj+1,l − 2uj,l + uj−1,l uj,l+1 − 2uj,l + uj,l−1+= ρj,l∆2∆2(19.0.5)or equivalentlyuj+1,l + uj−1,l + uj,l+1 + uj,l−1 − 4uj,l = ∆2 ρj,l(19.0.6)To write this system of linear equations in matrix form we need to make avector out of u.

Let us number the two dimensions of grid points in a singleone-dimensional sequence by definingi ≡ j(L + 1) + lforj = 0, 1, ..., J,l = 0, 1, ..., L(19.0.7)In other words, i increases most rapidly along the columns representing y values.Equation (19.0.6) now becomesui+L+1 + ui−(L+1) + ui+1 + ui−1 − 4ui = ∆2 ρi(19.0.8)This equation holds only at the interior points j = 1, 2, ..., J − 1; l = 1, 2, ...,L − 1.The points wherej=0[i.e., i = 0, ..., L]j=J[i.e., i = J(L + 1), ..., J(L + 1) + L]l=0[i.e., i = 0, L + 1, ..., J(L + 1)]l=L[i.e., i = L, L + 1 + L, ..., J(L + 1) + L](19.0.9)Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use.

Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).In contrast to initial value problems, stability is relatively easy to achievefor boundary value problems. Thus, the efficiency of the algorithms, both incomputational load and storage requirements, becomes the principal concern.Because all the conditions on a boundary value problem must be satisfied“simultaneously,” these problems usually boil down, at least conceptually, to thesolution of large numbers of simultaneous algebraic equations. When such equationsare nonlinear, they are usually solved by linearization and iteration; so without muchloss of generality we can view the problem as being the solution of special, largelinear sets of equations.As an example, one which we will refer to in §§19.4–19.6 as our “modelproblem,” let us consider the solution of equation (19.0.3) by the finite-differencemethod.

We represent the function u(x, y) by its values at the discrete set of points83119.0 Introduction∆yLABy1y0x0x1...xJFigure 19.0.2. Finite-difference representation of a second-order elliptic equation on a two-dimensionalgrid. The second derivatives at the point A are evaluated using the points to which A is shown connected.The second derivatives at point B are evaluated using the connected points and also using “right-handside” boundary information, shown schematically as ⊗.are boundary points where either u or its derivative has been specified. If we pullall this “known” information over to the right-hand side of equation (19.0.8), thenthe equation takes the formA·u=b(19.0.10)where A has the form shown in Figure 19.0.3.

Характеристики

Тип файла
PDF-файл
Размер
118,74 Kb
Материал
Тип материала
Высшее учебное заведение

Тип файла PDF

PDF-формат наиболее широко используется для просмотра любого типа файлов на любом устройстве. В него можно сохранить документ, таблицы, презентацию, текст, чертежи, вычисления, графики и всё остальное, что можно показать на экране любого устройства. Именно его лучше всего использовать для печати.

Например, если Вам нужно распечатать чертёж из автокада, Вы сохраните чертёж на флешку, но будет ли автокад в пункте печати? А если будет, то нужная версия с нужными библиотеками? Именно для этого и нужен формат PDF - в нём точно будет показано верно вне зависимости от того, в какой программе создали PDF-файл и есть ли нужная программа для его просмотра.

Список файлов книги

Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7021
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее