Föreläsig, BE3002 & 3003 205 J.Oppelstrup Mikael v. Strauss http://www.ada.kth.se//kurser/su/be3002/suumf2/
. Reklam 2. Kursadmi &c. 3. Kursöversikt 4. GKN Ch. ff 2
BE3002 BE3003 Lektioer 0-2 FB42 FB42 Datorlab. 3-5 E2:009 Röd sal Eget arbete 5-8 d:o MvS Eamiatio Lab Lab, 2, 3, 4 Te Teta JO 3
A( i)coveiet truth t is hard to uderstad a ocea because it is too big. t is hard to uderstad a molecule because it is too small. t is hard to uderstad uclear physics because it is too fast. t 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 4
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. The purpose of computig is isight, ot umbers. (R.W.Hammig) "The Ureasoable Effectiveess of Mathematics" (980) 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 992) 5
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 formatio Future (Supplemet to the Presidet s FY 996 Budget) 6
Computatioal Materials Sciece From quatum mechaics to structures: Goals: 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 σ ij i µ(u, j Dislocatio field + u,i j ) λu,k k δ ij Navier cm 7
Success Story - Scietific Computig Algorithms: Fiite Elemets-Structural egieerig (Clough, Argyris,,960ff) FFT N 2 -> NlogN - JPEG, MPEG, (J.Cooley-Tukey 965) Multi-grid N (3-2/D) -> C N (A.Bradt,970 ff ) Liear programmig N 3 ->? (Karmarkar,990 ff) Multi-pole N 2 -> NlogN (L.Greegard, V.Rokhli,990) Hardware: Moore s law Parallel processig frastructure: PC revolutio, teret, WWW, 8
Success Story : MATLAB Major tool for egieerig computig, Numerical aalysis, visualizatio 974 Matri Laboratory C.Moler Now: MathWorks > 000 pers. 20th aiversary 2005: Success Story : comsol Multiphysics FE software S.Littmarck, Dr HC, KTH 995: MATLAB PDEToolBo Now: Comsol > 50 pers. 9
CSC (umera Matematik/SC)-skolas FK i beräkigstekik DN222 Applied Numerical Methods, part SC, TAEEM, alla DN2222 Applied Numerical Methods, part 2 SC, alla DN2223 Topics i Scietific Computig DN2230 Fast Numerical Algorithms for Large-Scale Problems D, E, F, SC DN2255 Numerical Solutios of Differetial Equatios SC, D, E, F, DN2258 troductio to High Performace Computig SC2, D, E, F, T DN2260 The Fiite Elemet Method SC, D, E, F, T åk 4 DN2264 Parallel Comp. for Large-Scale Problems, SC, D, E, F, T åk 4 DN2265 Parallel Comp. for Large-Scale Problems, SC, D, E, F, T åk 4 DN2266 Mathematical Models, Aalysis ad Simulatio SC, D, E, F, T åk 4 DN2274 Computatioal Electromagetics D, E, F, T åk 4, SC DN2275 Advaced Computatio i Fluid Mechaics SC2, F, T åk 4 DN2280 Comp. Methods for Micro- ad Macroscale D, E, F, T åk 4, SC DN228 Comp. Methods for Stochastic Diff.Equatios D, E, F, T åk 4, SC DN2295 Project Course i Scietific Computig DN2297 Adv. dividual Course i Scietific Computig F, T, SC Kurser som ges av adra skolor: Strömigsmekaik, aerodyamik, lätt-kostruktioer materialveteskap, biokemi,. ALLA RÄKNAR! Varför ite du också? 0
Några diff-ekvatiosmodeller : Kortaste väg Mikrovågstomografi Tsuami
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) 2
Grudkurs i umeriska metoder 20. Varför umeriska metoder? Vad ka beräkas? 2. Approimatio, iteratio, lijariserig, algoritm 3. Ordiära differetialekvatioer: simulerig, eempel 4. Partiella differetialekvatioer: simulerig, eempel 3
Metod: Approimatio Tekik: lijariserig rekursio, iteratio polyom Taylor-utvecklig: f ( + h) h k k! f (k) () k f () + f () h + 2 f () h2 + 6 f () h3 +... 4
De flesta lösigar är approimatioer: Räka ut me hur?. Räkare (me hur gör de?) 2. Matematik: 2 2 ± 2.44 (+ ) / 2 / 2 k + k 2 8 2 + 6 3 5 28 3 +... k0 5
(2) / 2 ( 25 6 + 7 6 )/ 2 5 4 (+ 7 25 )/ 2 5 4 + 2 7 25 8 7 25 2 + 6 7 25 3 5 28 7 25 3 +... ( + 0.400 0.0098 + 0.004...). 445.25 (Puh ) 6
202 7 Lijariserig och teratio: Newtos metod: Algoritm ( ) ( ) + + + f f f f 2 2, 2 : ) (..., 0 : ) ( 0 2 0.5.47.4426.44236 Mmm! BE3002&3003 F HT2 Muhammad ib Musa al-khwarizmi, * 780 AD, Khiva, + 850 AD (?)
Att dividera uta divisios-hårdvara: t e Cray-datorer 976 ff 0 a 0, + 3 2 ( 2 a ), 2 < a 3/4.5.325.3330078.3333332 8
Fel / käslighetsuppskattig w f (,y,z,...); ± E,y y ± E y,z z ± E z... w f (,y,z,...) w w w E + w y E y + w z E z +..., Derivatora ka uppskattas med differes-kvoter w w( + E,y,z,...) w E, etc. 9
Rekursio och istabilitet, 0 d. + 5 Rekursiosformel: Bestäm 4 0 l 5 6( + ) 6 5 < 0.2 / 2 0.04 + / 3 0.008 0.82, +,,2,... <,0.0333 < 5( + ) 4 < 0.0400 fel < 4 0-4 20
Rekursio och istabilitet, 2 / 5 Fel > 5Fel - 5 0.82 0.0090 2 3 4 / 2 5 0.0090 0.050 / 3 5 0.050 0.083 / 4 5 0.083 0.65 < 0!!! Fel 4 5 4 4 0-4 0.25 2
Rekursio och stabilitet 9 8 7 6 4 ( ) / 5 / 60 0.07 (/ 9 0.07) / 5 (/8 0.09) / 5 (/ 7 0.02) / 5 0.034,..., 0 0.09 0.02 0.025, 0.82 Fel - 0.2Fel..., 22
23 Rekursio: iitialvärdesproblem 0,,2,... ),, (... 3 2 ) : ( ), ( ) ( ) ( ), ( lim 0 + + + + + + + y hf y y h h h h O y f h y h y y f y Eulers metod Leohard Euler, * 707 Basel, + 783 St. Petersburg Algoritm: