For diffusion equations (and many other equations), it can be shown the Crank–Nicolson method is unconditionally stable.[3] However, the approximate solutions can still contain (decaying) spurious oscillations if the ratio of time step times the thermal diffusivity to the square of space step, , is large (typically, larger than 1/2 per Von Neumann stability analysis). For this reason, whenever large time steps or high spatial resolution is necessary, the less accurate backward Euler method is often used, which is both stable and immune to oscillations.[citation needed]
Letting and evaluated for and , the equation for Crank–Nicolson method is a combination of the forward Euler method at and the backward Euler method at (note, however, that the method itself is not simply the average of those two methods, as the backward Euler equation has an implicit dependence on the solution):
forward Euler
backward Euler
Crank–Nicolson
Note that this is an implicit method: to get the "next" value of in time, a system of algebraic equations must be solved. If the partial differential equation is nonlinear, the discretization will also be nonlinear, so that advancing in time will involve the solution of a system of nonlinear algebraic equations, though linearizations are possible. In many problems, especially linear diffusion, the algebraic problem is tridiagonal and may be efficiently solved with the tridiagonal matrix algorithm, which gives a fast direct solution, as opposed to the usual for a full matrix, in which indicates the matrix size.
Example: 1D diffusion
The Crank–Nicolson method is often applied to diffusion problems. As an example, for linear diffusion,
applying a finite difference spatial discretization for the right-hand side, the Crank–Nicolson discretization is then
or, letting ,
Given that the terms on the right-hand side of the equation are known, this is a tridiagonal problem, so that may be efficiently solved by using the tridiagonal matrix algorithm in favor over the much more costly matrix inversion.
A quasilinear equation, such as (this is a minimalistic example and not general)
would lead to a nonlinear system of algebraic equations, which could not be easily solved as above; however, it is possible in some cases to linearize the problem by using the old value for , that is, instead of . Other times, it may be possible to estimate using an explicit method and maintain stability.
Example: 1D diffusion with advection for steady flow, with multiple channel connections
This is a solution usually employed for many purposes when there is a contamination problem in streams or rivers under steady flow conditions, but information is given in one dimension only. Often the problem can be simplified into a 1-dimensional problem and still yield useful information.
Here we model the concentration of a solute contaminant in water. This problem is composed of three parts: the known diffusion equation ( chosen as constant), an advective component (which means that the system is evolving in space due to a velocity field), which we choose to be a constant , and a lateral interaction between longitudinal channels ():
(1)
where is the concentration of the contaminant, and subscripts and correspond to previous and next channel.
The Crank–Nicolson method (where represents position, and time) transforms each component of the PDE into the following:
(2)
(3)
(4)
(5)
(6)
(7)
Now we create the following constants to simplify the algebra:
and substitute (2), (3), (4), (5), (6), (7), , and into (1). We then put the new time terms on the left () and the present time terms on the right () to get
To model the first channel, we realize that it can only be in contact with the following channel (), so the expression is simplified to
In the same way, to model the last channel, we realize that it can only be in contact with the previous channel (), so the expression is simplified to
To solve this linear system of equations, we must now see that boundary conditions must be given first to the beginning of the channels:
: initial condition for the channel at present time step,
: initial condition for the channel at next time step,
: initial condition for the previous channel to the one analyzed at present time step,
: initial condition for the next channel to the one analyzed at present time step.
For the last cell of the channels (), the most convenient condition becomes an adiabatic one, so
This condition is satisfied if and only if (regardless of a null value)
Let us solve this problem (in a matrix form) for the case of 3 channels and 5 nodes (including the initial boundary condition). We express this as a linear system problem:
where
Now we must realize that AA and BB should be arrays made of four different subarrays (remember that only three channels are considered for this example, but it covers the main part discussed above):
where the elements mentioned above correspond to the next arrays, and an additional 4×4 full of zeros. Please note that the sizes of AA and BB are 12×12:
The d vector here is used to hold the boundary conditions. In this example it is a 12×1 vector:
To find the concentration at any time, one must iterate the following equation:
Example: 2D diffusion
When extending into two dimensions on a uniform Cartesian grid, the derivation is similar and the results may lead to a system of band-diagonal equations rather than tridiagonal ones. The two-dimensional heat equation
can be solved with the Crank–Nicolson discretization of
assuming that a square grid is used, so that . This equation can be simplified somewhat by rearranging terms and using the CFL number
For the Crank–Nicolson numerical scheme, a low CFL number is not required for stability, however, it is required for numerical accuracy. We can now write the scheme as
Solving such a linear system is costly. Hence an alternating-direction implicit method can be implemented to solve the numerical PDE, whereby one dimension is treated implicitly, and other dimension explicitly for half of the assigned time step and conversely for the remainder half of the time step. The benefit of this strategy is that the implicit solver only requires a tridiagonal matrix algorithm to be solved. The difference between the true Crank–Nicolson solution and ADI approximated solution has an order of accuracy of and hence can be ignored with a sufficiently small time step.[4]
Crank–Nicolson for nonlinear problems
Because the Crank–Nicolson method is implicit, it is generally impossible to solve exactly. Instead, an iterative technique should be used to converge to the solution. One option is to use Newton's method to converge on the prediction, but this requires the computation of the Jacobian. For a high-dimensional system like those in computational fluid dynamics or numerical relativity, it may be infeasible to compute this Jacobian.
A Jacobian-free alternative is fixed-point iteration. If is the velocity of the system, then the Crank–Nicolson prediction will be a fixed point of the map If the map iteration does not converge, the parameterized map , with , may be better behaved. In expanded form, the update formula is
where is the current guess and is the previous time-step.
Even for high-dimensional systems, iteration of this map can converge surprisingly quickly.
A numerical solution of the Navier–Stokes equations in the vorticity form. In this case was needed for fixed-point iteration of Crank–Nicolson to converge.
The importance of this for finance is that option pricing problems, when extended beyond the standard assumptions (e.g. incorporating changing dividends), cannot be solved in closed form, but can be solved using this method. Note however, that for non-smooth final conditions (which happen for most financial instruments), the Crank–Nicolson method is not satisfactory as numerical oscillations are not damped. For vanilla options, this results in oscillation in the gamma value around the strike price. Therefore, special damping initialization steps are necessary (e.g., fully implicit finite difference method).
^Thomas, J. W. (1995). Numerical Partial Differential Equations: Finite Difference Methods. Texts in Applied Mathematics. Vol. 22. Berlin, New York: Springer-Verlag. ISBN978-0-387-97999-1.. Example 3.3.2 shows that Crank–Nicolson is unconditionally stable when applied to .
Раннее Новое время Часть света Европа Предыдущее по порядку постклассическая эра[d], Позднее Средневековье, Средние века, Возрождение и Великие географические открытия Следующее по порядку позднее Новое время[d] Дата начала XV век Дата окончания XVIII век Медиаф…
Pape Souaré Informasi pribadiNama lengkap Pape N'Diaye SouaréTanggal lahir 6 Juni 1990 (umur 33)Tempat lahir Mbao, SenegalTinggi 1,78 m (5 ft 10 in)Posisi bermain Left DefenderInformasi klubKlub saat ini Crystal PalaceNomor 40Karier senior*Tahun Tim Tampil (Gol)2007–2008 Diambars 2008–2012 Lille II 56 (7)2008–2015 Lille 56 (3)2012–2013 → Reims (pinjaman) 23 (0)2015– Crystal Palace 1 (0)Tim nasional‡2012 Olimpiade 4 (0)2012– Senegal 13 (0) * Penampilan dan go…
Ini adalah nama Tionghoa; marganya adalah Kuo. Amber KuoLahir19 Februari 1986 (umur 38)Taipei, TaiwanKebangsaanTaiwanAlmamaterUniversitas Taipei NasionalPekerjaan Pemeran Penyanyi Tahun aktif2007–kini Amber Kuo Hanzi tradisional: 郭采潔 Hanzi sederhana: 郭采洁 Alih aksara Mandarin - Hanyu Pinyin: Guō Cǎijié Karier musikNama lainGuo Cai-jieGenreMandopopInstrumen Piano Gitar LabelWarner Music Taiwan (2007–kini) Amber Kuo pada 2011. Amber Kuo Tsai-chieh (Hanzi: 郭采潔;…
Jurang Hranice Jurang Hranice (bahasa Ceko: Hranická Propast) adalah sebuah dolin karst yang terletak di dekat kota Hranice, Republik Ceko. Dibagian bawah Jurang Hranice terdapat sebuah gua vertikal berisi air, dengan kedalaman maksimum keseluruhan yang dikonfirmasi (per 27 September 2016) adalah 473,5 m (1.553 kaki), dimana 404 m (1.325 kaki) diantaranya berada di bawah permukaan air.[1] Kedalaman maksimum jurang ini diperkirakan antara 800-1200 m.[2] Pada bulan Agustus 2020, s…
Untuk orang lain dengan nama yang sama, lihat Philip Hart (disambiguasi). Philip Hart Senator Amerika Serikat dari MichiganMasa jabatan3 Januari 1959 – 26 Desember 1976 PendahuluCharles E. PotterPenggantiDonald RiegleWakil Gubernur Michigan ke-51Masa jabatan1 Januari 1955 – 1 Januari 1959GubernurG. Mennen Williams PendahuluClarence A. ReidPenggantiJohn Swainson Informasi pribadiLahirPhilip Aloysius Hart(1912-12-10)10 Desember 1912Bryn Mawr, Pennsylvania, Amerika Serikat…
قرية نيكولز الإحداثيات 42°01′12″N 76°22′07″W / 42.02°N 76.3686°W / 42.02; -76.3686 [1] تاريخ التأسيس 1903 تقسيم إداري البلد الولايات المتحدة[2] التقسيم الأعلى مقاطعة تيوغانيكولاس خصائص جغرافية المساحة 1.342746 كيلومتر مربع1.342747 كيلومتر مربع (1 أبريل 2010) …
Pour les articles homonymes, voir Serp. Exemple de page de résultats du moteur de recherche de Wikipédia, avec des miniatures pour les 3 premiers résultats. La page de résultats d'un moteur de recherche (également connue sous l'acronyme SERP, pour l'anglais search engine results page) est une page web qu'un moteur de recherche génère automatiquement en fonction de mots-clés saisis par un internaute, et qui consiste en un ensemble de liens pointant vers les ressources qu'il considère, pa…
2002 single by Ayumi HamasakiFree & EasySingle by Ayumi Hamasakifrom the album Rainbow ReleasedApril 24, 2002GenrePop rocksymphonic rockLength22:43LabelAvex TraxSongwriter(s)Ayumi Hamasaki (lyrics)CREA + DAI (music)Producer(s)Max MatsuuraAyumi Hamasaki singles chronology Daybreak (2002) Free & Easy (2002) H (2002) Official Music VideoFree & Easy on YouTube Free & Easy is a song written by Ayumi Hamasaki and Dai Nagao for Hamasaki's album Rainbow. The song, the first single from R…
CNN Philippines Network NewsPembuatSolar TV NetworkPengembangSolar NewsPresenterPia Hontiveros Roanna JamirNaratorPia HontiverosNegara asalFilipinaBahasa asliInggrisJmlh. episoden/a (mengudara setiap hari)ProduksiLokasi produksiCNN Philippines NewscenterMandaluyong CityDurasi1 jamRilis asliJaringanCNN PhilippinesRilis18 Juni 2012 –sekarang Program berita petang di televisi Filipina lbs ABS-CBN TV Patrol ABS-CBN Sports+Action News+ ANC Top Story / Primetime on ANC CNN Phil…
Raefرائف حجاجInformasi latar belakangNama lahirRaef HaggagLahir8 Agustus 1982 (umur 41)Washington, D.C., Amerika SerikatAsalAmerika SerikatGenre Rock Akustik Folk PekerjaanPenyanyiInstrumen penyanyi gitar Tahun aktif2011–sekarangLabelAwakeningArtis terkaitMaher Zain, Hamza Namira, Mesut Kurtis, Humood Alkhudher, dan Harris J.Situs webwww.awakening.org/raefmusic/ Raef Haggag (Arab: رائف حجاجcode: ar is deprecated ; lahir 8 Agustus 1982) adalah seorang penyanyi Amerika dari …
عبد السلام عارف الرئيس الثاني لجمهورية العراق الرئيس عبد السلام عارف عام 1964 رئيس جمهورية العراق القائد الأعلى للقوات المسلحة العراقية رئيس المجلس الوطني لقيادة الثورة في المنصب8 فبراير 1963 – 13 أبريل 1966 (3 سنواتٍ وشهران و5 أيامٍ) الحاكم رشيد مصلح التكريتي الحكومة قائمة ح…
جزء من سلسلة عنالثورات أنواع ملونة اشتراكية ديموقراطية سلمية دائمة سياسية اجتماعية موجة الطرق مقاطعة عصيان مدني حرب أهلية صراع الطبقات الاجتماعية انقلاب مظاهرات حرب عصابات عصيان مسلح مقاومة سلمية احتجاج تمرد إرهاب ثوري ساميزدات إضراب مقاومة ضريبية الأسباب سلطوية أوتوقرا…
American government-owned company This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article may rely excessively on sources too closely associated with the subject, potentially preventing the article from being verifiable and neutral. Please help improve it by replacing them with more appropriate citations to reliable, independent, third-party sources. (October 2018) (Learn how and when t…
Государственные символы Республики Таджикистан — установленные конституционным законом отличительные знаки государства — Таджикистана. К государственным символам относятся: Государственный флаг Таджикистана Государственный герб Таджикистана Государственный …
American politician (born 1955) This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: John Baldacci – news · newspapers · books · scholar · JSTOR (April 2008) (Learn how and when to remove this template …
The HonourableBob CarrCarr pada 2012 Menteri Luar Negeri AustraliaMasa jabatan13 Maret 2012 – 18 September 2013Penguasa monarkiElizabeth IIPerdana MenteriJulia GillardKevin RuddPendahuluKevin RuddPenggantiJulie BishopPerdana Menteri New South Wales ke-39Pemilihan: 1995, 1999, 2003Masa jabatan4 April 1995 – 3 Agustus 2005GubernurPeter SinclairGordon SamuelsMarie BashirWakilAndrew RefshaugePendahuluJohn FaheyPenggantiMorris IemmaPemimpin Oposisi New South WalesPemilihan: 1991…
Hệ thống cấp bậc trong phân loại khoa học Trong phân loại sinh học, một giới (kingdom hay regnum) là một đơn vị phân loại ở cấp cao nhất (theo lịch sử), hoặc là cấp ngay dưới lãnh giới (trong hệ thống ba lãnh giới mới). Mỗi giới được chia thành các nhóm nhỏ hơn, gọi là ngành (nói chung là phylum nhưng đối với thực vật thì hay dùng division). Hiện tại, các tài liệu về phân loại tại Hoa K…
Запрос «Пугачёва» перенаправляется сюда; см. также другие значения. Алла Пугачёва На фестивале «Славянский базар в Витебске», 2016 год Основная информация Полное имя Алла Борисовна Пугачёва Дата рождения 15 апреля 1949(1949-04-15) (75 лет) Место рождения Москва, СССР[1] …