DN40 vt för I Numeriska metoder 0-0- DN40 umi
F Översikt F, 6 Ö, X Lab. - följer Lärare Ashraful Kadir Doghoay Arjmad Jesper Oppelstrup Eamiatio Matlab-lab, mutlig redovisig, projekt, skriftlig Teta som alla Numme GK (,4, ) kryssfrågedel för betyg E med räkeuppgifter 0-0- DN40 umi
A( i)coveiet truth It is hard to uderstad a ocea because it is too big. It is hard to uderstad a molecule because it is too small. It is hard to uderstad uclear physics because it is too fast. It is hard to uderstad the greehouse effect because it is too slow. [Super]Computers break these barriers to uderstadig. They, i effect, shrik oceas, zoom i o molecules, slow dow physics, ad fast-forward climates. Clearly a scietist who ca see atural pheomea at the right size ad the right speed lears more tha oe who is faced with a blur. Al Gore, 990, Scietific Computig 0-0- DN40 umi 3
Wikipedia: Scietific computig (or computatioal sciece) is cocered with costructig mathematical models ad umerical solutio techiques ad [ ] usig computers to aalyze ad solve scietific, social scietific, ad egieerig problems. Scietific Computig Numerical aalysis is the study of algorithms for the problems of cotiuous mathematics [ ] to compute quatities that are typically ucomputable, [ ] with lightig speed (L.N.Trefethe 99) The purpose of computig is isight, ot umbers. (R.W.Hammig) "The Ureasoable Effectiveess of Mathematics" (980) DN F6 00309 4
Computer simulatio is the third paradigm of sciece Simulatio has become recogized as the third paradigm of sciece, the first two beig eperimetatio ad theory. High Performace Computig ad Commuicatios: Foudatio for America's Iformatio Future (Supplemet to the Presidet s FY 996 Budget) DN F6 00309 5
Atea i rear-view mirror: Directivity, EMC, Dedritic solidificatio Mawell simulator (T.Rylader & al, CTU) Phase-field simulator (G.Amberg & al, KTH) There are three kids of lies: Lies, dam lies, ad colorful computer pictures (P.Colella) DN F6 00309 6
Differetial Equatio Models Shortest path Micro-wave tomography Tsuami DN F6 00309 7
Computatioal Materials Sciece From quatum mechaics to structures: Goals: σ ij i µ(u, j Predict macroscopic properties from first priciples Desig ew materials (e. ao-techology) Scale: space 0 8, time 0 5 QM: May-D A HΨEΨ DFT MD ij σ, j Fi Dislocatio field + u,i j ) λu,k k δ ij Navier cm DN F6 00309 8
Success Story I: MATLAB Major tool for egieerig computig, Numerical aalysis, visualizatio 974 Matri Laboratory C.Moler Now: MathWorks > 000 pers. 0th aiversary 005: Success Story II: comsol Multiphysics FE software S.Littmarck 995: MATLAB PDEToolBo Now: Comsol > 50 pers. DN F6 00309 9
Numerical Methods 0" 0. Why umerical methods? What ca be computed?. Approimatio, iteratio, liearizatio, algorithm 3. Ordiary differetial equatios: simulatio, eamples. Partial differetial equatios: simulatio, eempel DN F6 00309 0
Most solutios are approimatios! Compute but how? ±. Calculator... but how does it do it?. Mathematics: ±.44 (+ ) / / k + k 8 + 6 3 5 8 3 +... k0 DN F6 00309
() / ( 5 6 + 7 6 )/ 5 4 (+ 7 5 )/ 5 4 + 7 5 8 7 5 + 6 7 5 3 5 8 7 5 3 +... ( + 0.400 0.0098 + 0.004...). 445.5 (Puh despite the covergece acceleratio) DN F6 00309
DN F6 00309 3 Liearisatio ad iteratio: Newto's method ( ) ( ) + + + f f f f : ) (..., 0 : ) ( 0.5.47.446.4436 Mmm!
Lijära ekvatiossystem Fi (,,, ) så att A b, A (a ij ) NAM:.4,.5,.6 (ite.6.),.7,.8 eller mistakvadrat-lösig mi A b NAM Olijär ekvatio Fi så att f()0 NAM 6 Olijära ekvatiossystem Fi så att f() 0 NAM 6.8, 6.9 eller mistakvadrat-lösig mi f() NAM 6.0 0-0- DN40 umi 4
Iitialvärdesproblem för ordiära differetialekvatioer Fi y(t) för t > 0 då dy/dt f(t,y), y(0) c NAM 8.-8.6 plus etra Radvärdesproblem för ordiära differetialekvatioer Fi y() för a < < b då dy/d f(,y), G(y(a),y(b)) 0 NAM 8.7 plus etra 0-0- DN40 umi 5
Kvadratur Beräka b I f ( ) d a I f, y) ddy Beräka f ( ) då f ( i ) yi, i,,..., m ( Iterpolatio / Approimatio D - Tabeller NAM 5 Ite 5..4,5..5; - Polyom P k () Optimerig - Splie-fuktioer Fi ma. för f() i - Bézier-kurvor a < < b NAM 7 (ite 7..) plus etra 0-0- DN40 umi 6
Lijära ekvatiossystem Fi (,,, ) så att A b, A (a ij ) NAM:.4,.5,.6 (ite.6.),.7,.8 Formulerig Gauss-elimiatio Pivoterig Arbetsvolym k i j Pivot - rad k :för i k +, k +,..., a ij a ij m ik a kj, j k +,..., m ik a a ik kk Atal mult.& add :, k ( k) 3 3 + O( ) 0-0- DN40 umi 7
Eempel: Approimatio, iteratio, lijariserig, algoritm: Newto-Raphsos metod för lösig av f() 0. Approimatio med lijariserig: av y f() med tagete i ( 0,f( 0 )), som har ollställe i f ) / f ( ) 0 ( 0 0. Iteratio: Upprepa! f ( ) / f ( ),,... 3. Algoritm: a) välj 0 och toleras ε b) Iterera med (*) tills ε c) är ärmevärde till ollstället y f() 0-0- DN40 umi 8 y 0 y f(0)+(-0)f (0)
Eempel. Kvadratrote (Heros metod) 0-0- DN40 umi 9 +... : ) (, ) ( f f. Divisio uta divisios-istruktio ( ) / : ) ( ) ( a a f a f Cray, 976 60 Mflops