aylor epasio: Let ƒ() be a ifiitely differetiable real fuctio. At ay poit i the eighbourhood of =0, the fuctio ca be represeted as a power series of the followig form: X 0 f(a) f() ƒ() f()= ( ) f( ) ( ) ( ) ( ) () f ( 0) f ( 0) f ( 0) f ( 0) 0 0 0 0 0 0! 1!!! where! stads for the factorial of ad f () ( 0 ) for the -th derivative of f at = 0. Eamples: he fuctio f()= e i the eighborhood of =0 has the followig aylor series: 4 e 1+ + 6 4 Q: 5 If the E of f()= si() aroud 0 is: si() = -! 5! e What is the aylor epasio E of f()= aroud =0? si( ) Hit: Let e si( ) e c +c +c +c si( ) has a epasio of the form: 1 5 e c 1+c +c +c -! 5! S.1
Iterpolatio techiques By iterpolatio we mea a procedure for estimatig the value of the fuctio at itermediate values. If for < < the fuctios f ( ) 1 1 ad f ( ) are used to evaluate f (), the the procedure is called iterpolatio. f(x 1) 1 F =? ( f(x ) By etrapolatio we mea a procedure for estimatig the fuctio f() at a eterior ew value: If for < < or < < the 1 1 fuctios f ( ) ad f ( ) are used to 1 evaluate f (), the the procedure is called EXRA-polatio. f(x 1) f(x ) F =? Liear iterpolatio ca be used for both procedures: y( ) - y( 1) y() - y( 1) = 1 1 1 y( ) - y( 1) = y() - y( 1) 1 1 y() = y( 1) - y( ) - y( 1) 1 1 S.
Polyomial iterpolatio: Assume we are give the followig +1 poits: (,y ), (,y ),, (,y ). 0 0 1 1 With the help of these poits, we wat to have a approimatio for the additioal poit (, y). he strategy here is to costruct a polyomial of degree, such that y() = a + a +... a. -1-1 0 As this polyomial goes through the above +1 poits, it therefore must satisfy the followig equatios: a + a +... a = y 1 0-1 0 0 0 1 1 0 0 0 1-1 1 0 1 1 1 1 1 a + a +... a = y a + a +... a = y 1-1 0 1 a y0 1 a 1 y1 1 1 1 a0 y `X Q1: what does it mea, whe the matri X is sigular? Give eamples! Q : Assume we are give the followig poits: (,y ) = (1,) Use these poits to fid a 0 0 (,y ) = (,) polyomial approimatio for 1 1 (,y ) = (,1) y at = 5/? S.
Lagrage iterpolatio: Assume we are give the followig poits: (,y ), (,y ),, (,y ). 0 0 1 1 Based o these poits, Lagrage suggested the followig approimatio for y at : N y =y( ) y() = y = y (), where - Eample k =0 () k - k Give are the followig set of poits (,y): 1 4 y 8 7 6 5 - - - 1 1 0() ( 0-1 0-0- 6 - - - 1 0 1() ( 1)( )( 4) 1-0 1-1- - - - 1 0 1 () ( 1)( )( 4) - 0-1 - )( )( 4) - 0-1 - 1 () ( 1)( )( ) - 0-1 - 6 1 1 y() = 8 ( )( )( 4) 7 ( 1)( )( 4) 6 1 1 + 6 ( 1)( )( 4) 5 ( 1)( )( ) 6 S.4
Fiite differece discretizatio: L 5 & 6: RelHydro/Basel How to represet u i fiite space? Forward differece (u < 0): fiite space = = Backward differece (u > 0): Δ ( ) - ( ) - Δ - h fiite space = -1-1 -1 Ad how good is this approatio? aylor epasio -1 = ( -1)= ( -h) = h + + O(h ) Subtitute this epressio: rucatio error Δ - -1 (- h +(h /) ) = + O(h) Δ h h Δ ( ) - ( ) - Δ - h +1 +1 +1 But how good is this approatio? aylor epasio +1 = ( +1)= ( h) = h + + O(h ) Subtitutig this epressio: rucatio error Δ +1 - h +(h /) = + O(h) Δ h h he scheme is first order accurate. h h = he scheme is first order accurate also. = S.5
Higher order derivatives: L 5 & 6: RelHydro/Basel F ( ) F, where F fiite space ΔF F( ) - F( -1) F +1 - F F = Δ - h F -1 Δ - Δ -, F -1 +1 +1 Δ = h Δ = h +1 Subtitute these epressio: ΔF F - F-1 1 1 = F - F -1 +1 - -1 Δ h h h But how good is this approatio? aylor epasio 1 = ( 1)= ( h) = h + + O(h ) h Δ Δ 1 ( ) +1 - -1 = + O(h ) Δ Δ h he scheme is secod order accurate. S.6
he oe-dimesioal heat equatio: Cosider the followig heat diffusio equatio: t. I the absece of trasport, the heat diffuses i a symmetric maer, provided the diffusio coefficiet, χ, ad the BC are symmetric too. If advectio (trasport) is icluded, the this symmetry will be broke as there is a preferable directio for heat trasport, which is eemplified i the followig two figures. u > 0 Assume that both edges of the metal rod are kept at certai costat temperatures u ad d. Let the rod be heated at the ceter for a certai period of time. How do the iitial, itermediate ad fial profiles of the temperature look like? S.7
Ituitively (without performig aalytical or umerical calculatio) we may epect that: the BCs ad the ICs may play a essetial role i determiig the form ad evolutio of the solutio at ay time t. here are two types of problems: Iitial value ad boudary value problems. he stregth of depedece o the ICs ad BCs determie the type of the problem. he heat equatio: discretizatio: he temperature depeds o t as well as o, i.e, = (t,). hus for each value of ad value of t there is a suitable value for (hopefully a uique value). t (t, ) = t t S.8
A eplicit discretizatio of this equatio yields the followig form: 1 1 1 1 ( ) f t (poitwise) ime Eplicit t where s = discretizatio 1 s 1 (1 s) s 1, Predictio power of eplicit procedures: Accuracy more poit to iclude larger domai (like weather forecast) he weather i Basel: time versus domai t S.9
t L a() = + O( t) + O( ) Cosistecy: he fiite space represetatio L ( ) a = χ is of the equatio t said to be cosistet, if the trucatio error goes to zero as t, 0. (local aalysis) Stability: he fiite space represetatio L ( ) a of the equatio t rucatio error = χ is said to be umerically stable, if accumulated errors do ot grow with time (o-local). S.10
Weak ad strog solutios of Navier-Stokes equatios he equatios describig the evolutio of icompressible viscous fluid flows are called the Navier-Stokes equatios (that were formulated aroud 180s) ad read: where u u u = (u,u y,u z), t, = viscosity, p = pressure, = domai i R, = boudary, I =(0, ) ad u 0= iitial value. For a give data, it was prove by Leray (194) that the Navier-Stokes equatios have at least oe weak solutio. However, it is still ot clear, whether the weak solutio is uique or ot. Now by a weak solutio we mea a solutio that satisfies the above partial differetial equatios o average, but ot ecessary i a poitwise maer. For eample, the derivatives may ot eist at certai poits. However, a strog solutio is said to satisfy the equatios everywhere ad at each poit of the domai La-Wedroff theorem: he umerical solutio Lq ( ) q is said to be a weak solutio for the aalytical equatio, if the umerical scheme employed is coservative, cosistet ad the umerical procedure coverges. Coservatio covergece weak solutio La theorem: If q has bee obtaied usig a coservative ad cosistet scheme, the q coverges to a weak solutio of the aalytical problem whe, i.e., whe the umber of grid poits goes to ifiity. For umerical mathematicias, the above-metioed theorems implies the followig: Differet coservative umerical methods may yield differet solutios, provided the umber of grid poits is relatively small. Differet coservative umerical methods that are umerically stable ad cosistet must coverge to the same weak solutio if the umber of grid poits goes to ifiity. You caot claim to have foud a solutio for the physical problem, uless you carried out the caculatios with sufficietly large umber of grid poits, beyod which doublig the umber of grid poits yield o oticeable improvemet. From Fletcher : Computatioal techiques... (1990) S.11
S.1
Q : Give is the heat equatio: i the domai D=[t] [] [0,1] [0,1] together with t the IC ad BC: (t=0) = 1, (t,0) =, (t,1)=. 1 Solve the equatio usig the FCS formulatio, i.e., s (1 s) s, where followig s-values: s = 0.1, 0., 0.4, 0.8, 1.., 1 1 s = t /, =1 ad N ( umber of grid poits i -directio) 100 for the Plot the solutios at times: t = 0.1, 0., 0.4 ad 1.0. S.1