c19-2 (779617), страница 2

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

Текст из файла (страница 2)

The replacement (19.2.22) with n → n + 1 leavesus with a nasty set of coupled nonlinear equations to solve at each timestep. Oftenthere is an easier way: If the form of D(u) allows us to integratedz = D(u)du(19.2.23)analytically for z(u), then the right-hand side of (19.2.1) becomes ∂ 2 z/∂x2 , whichwe difference implicitly asn+1n+1− 2zjn+1 + zj−1zj+1(∆x)2(19.2.24)Now linearize each term on the right-hand side of equation (19.2.24), for examplezjn+1 ≡ z(un+1) = z(unj ) + (un+1− unj )jj∂z ∂u j,n(19.2.25)= z(unj ) + (un+1− unj )D(unj )jThis reduces the problem to tridiagonal form again and in practice usually retainsthe stability advantages of fully implicit differencing.Schrödinger EquationSometimes the physical problem being solved imposes constraints on thedifferencing scheme that we have not yet taken into account.

For example, considerthe time-dependent Schrödinger equation of quantum mechanics. This is basically aparabolic equation for the evolution of a complex quantity ψ. For the scattering of awavepacket by a one-dimensional potential V (x), the equation has the formi∂2 ψ∂ψ= − 2 + V (x)ψ∂t∂x(19.2.26)(Here we have chosen units so that Planck’s constant h̄ = 1 and the particle massm = 1/2.) One is given the initial wavepacket, ψ(x, t = 0), together with boundarySample 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).The Crank-Nicholson method can be generalized similarly.The second complication one can consider is a nonlinear diffusion problem,for example where D = D(u).

Explicit schemes can be generalized in the obviousway. For example, in equation (19.2.19) write852Chapter 19.Partial Differential Equationsconditions that ψ → 0 at x → ±∞. Suppose we content ourselves with firstorder accuracy in time, but want to use an implicit scheme, for stability.

A slightgeneralization of (19.2.8) leads to"#"#n+1n+1ψj+1− 2ψjn+1 + ψj−1=−+ Vj ψjn+1(∆x)2(19.2.27)for whichξ=1k∆x4∆t2+ Vj ∆t1+isin(∆x)22(19.2.28)This is unconditionally stable, but unfortunately is not unitary. The underlyingphysical problem requires that the total probability of finding the particle somewhereremains unity. This is represented formally by the modulus-square norm of ψremaining unity:Z∞−∞|ψ|2 dx = 1(19.2.29)The initial wave function ψ(x, 0) is normalized to satisfy (19.2.29). The Schrödingerequation (19.2.26) then guarantees that this condition is satisfied at all later times.Let us write equation (19.2.26) in the formi∂ψ= Hψ∂t(19.2.30)where the operator H isH =−∂2+ V (x)∂x2(19.2.31)The formal solution of equation (19.2.30) isψ(x, t) = e−iHt ψ(x, 0)(19.2.32)where the exponential of the operator is defined by its power series expansion.The unstable explicit FTCS scheme approximates (19.2.32) asψjn+1 = (1 − iH∆t)ψjn(19.2.33)where H is represented by a centered finite-difference approximation in x.

Thestable implicit scheme (19.2.27) is, by contrast,ψjn+1 = (1 + iH∆t)−1 ψjn(19.2.34)These are both first-order accurate in time, as can be seen by expanding equation(19.2.32). However, neither operator in (19.2.33) or (19.2.34) is unitary.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).ψjn+1 − ψjni∆t19.3 Initial Value Problems in Multidimensions853The correct way to difference Schrödinger’s equation [1,2] is to use Cayley’sform for the finite-difference representation of e−iHt , which is second-order accurateand unitary:e−iHt '(19.2.35)In other words,1 + 12 iH∆t ψjn+1 = 1 − 12 iH∆t ψjn(19.2.36)On replacing H by its finite-difference approximation in x, we have a complextridiagonal system to solve.

The method is stable, unitary, and second-order accuratein space and time. In fact, it is simply the Crank-Nicholson method once again!CITED REFERENCES AND FURTHER READING:Ames, W.F. 1977, Numerical Methods for Partial Differential Equations, 2nd ed. (New York:Academic Press), Chapter 2.Goldberg, A., Schey, H.M., and Schwartz, J.L. 1967, American Journal of Physics, vol. 35,pp. 177–186. [1]Galbraith, I., Ching, Y.S., and Abraham, E. 1984, American Journal of Physics, vol. 52, pp. 60–68.

[2]19.3 Initial Value Problems in MultidimensionsThe methods described in §19.1 and §19.2 for problems in 1 + 1 dimension(one space and one time dimension) can easily be generalized to N + 1 dimensions.However, the computing power necessary to solve the resulting equations is enormous. If you have solved a one-dimensional problem with 100 spatial grid points,solving the two-dimensional version with 100 × 100 mesh points requires at least100 times as much computing. You generally have to be content with very modestspatial resolution in multidimensional problems.Indulge us in offering a bit of advice about the development and testing ofmultidimensional PDE codes: You should always first run your programs on verysmall grids, e.g., 8 × 8, even though the resulting accuracy is so poor as to beuseless.

When your program is all debugged and demonstrably stable, then you canincrease the grid size to a reasonable one and start looking at the results. We haveactually heard someone protest, “my program would be unstable for a crude grid,but I am sure the instability will go away on a larger grid.” That is nonsense of amost pernicious sort, evidencing total confusion between accuracy and stability.

Infact, new instabilities sometimes do show up on larger grids; but old instabilitiesnever (in our experience) just go away.Forced to live with modest grid sizes, some people recommend going to higherorder methods in an attempt to improve accuracy. This is very dangerous. Unless thesolution you are looking for is known to be smooth, and the high-order method youSample 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).1 − 12 iH∆t1 + 12 iH∆t.

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

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

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

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