Föreläsig 1, BE3002 & 3003 111031 J.Oppelstrup Mikael v. Strauss http://www.ada.kth.se//kurser/su/be3002/suumf11/ 1
1. Reklam 2. Kursadmi &c. 3. Kursöversikt 4. GKN Ch. 1 ff 2
BE3002 BE3003 Lektioer 10-12 FB42 FB42 Datorlab. 13-15 E2:1009 Röd sal Eget arbete 15-18 d:o MvS Eamiatio Lab Lab1, 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, 1990, 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" (1980) 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 1992) 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 1996 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 10 8, time 10 15 QM: May-D 1 A H=E DFT MD ij, j Fi ij i (u, j Dislocatio field u,i j ) u,k k ij Navier 1 cm 7
Success Story - Scietific Computig Algorithms: Fiite Elemets-Structural egieerig (Clough, Argyris,,1960ff) FFT N 2 -> NlogN - JPEG, MPEG, (Cooley-Tukey 1965) Multi-grid N (3-2/D) -> C N (Bradt 1970 ff ) Liear programmig N 3 ->? (Karmarkar 1990 ff) Multi-pole N 2 -> NlogN (Greegard, Rokhli, 1990) Hardware: Moore s law Parallel processig frastructure: PC revolutio, teret, WWW, 8
Success Story : MATLAB Major tool for egieerig computig, Numerical aalysis, visualizatio 1974 Matri Laboratory C.Moler Now: MathWorks > 1000 pers. 20th aiversary 2005: Success Story : comsol Multiphysics FE software S.Littmarck, Dr HC, KTH 1995: MATLAB PDEToolBo Now: Comsol > 150 pers. 9
CSC-skolas FK i beräkigstekik DN2221 Applied Numerical Methods, part 1 SC1, TAEEM1, alla DN2222 Applied Numerical Methods, part 2 SC1, alla DN2223 Topics i Scietific Computig DN2230 Fast Numerical Algorithms for Large-Scale Problems D, E, F, SC DN2255 Numerical Solutios of Differetial Equatios SC1, D, E, F, DN2258 troductio to High Performace Computig SC2, D, E, F, T DN2260 The Fiite Elemet Method SC1, D, E, F, T åk 4 DN2264 Parallel Comp. for Large-Scale Problems, SC1, D, E, F, T åk 4 DN2265 Parallel Comp. for Large-Scale Problems, SC1, D, E, F, T åk 4 DN2266 Mathematical Models, Aalysis ad Simulatio SC1, 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 DN2281 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å? 10
Några diff-ekvatiosmodeller : Kortaste väg Mikrovågstomografi Tsuami 11
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) 12
Grudkurs i umeriska metoder 2011 1. Varför umeriska metoder? Vad ka beräkas? 2. Approimatio, iteratio, lijariserig, algoritm 3. Ordiära differetialekvatioer: simulerig, eempel 4. Partiella differetialekvatioer: simulerig, eempel 13
Metod: Approimatio Tekik: lijariserig rekursio, iteratio polyom Taylor-utvecklig: f ( h) k h k k! f (k) () f () f () h 1 2 f () h2 1 6 f () h3... 14
De flesta lösigar är approimatioer: Räka ut me hur? 1. Räkare (me hur gör de?) 2. Matematik: 2 2 2 1.414 (1 ) 1/ 2 1/ 2 k 1 1 k 2 1 8 2 1 16 3 5 128 3... k0 15
(2) 1/ 2 ( 25 16 7 16 )1/ 2 5 4 (1 7 25 )1/ 2 5 4 1 1 2 7 25 1 8 7 25 2 1 16 7 25 3 5 128 7 25 3... 1 0.14000.0098 0.0014... 1. 4145 1.25 (Puh ) 16
Lijariserig och teratio: Newtos metod, 0... f () 0 : 1 f f f () 2 2 : 1 1 2 2 1 1.5 1.417 1.414216 1.4142136 Mmm! 17
Att dividera uta divisios-hårdvara: t e Cray-datorer 1976 ff 1 0 a 0, 3 2 1 2 a, 1 2 1 a = 3/4 1.5 1.3125 1.3330078 1.3333332 18
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. 19
Rekursio och istabilitet, 1 Rekursiosformel: 0 6( 6 l 5 5 1 1 0 1) d. 5 Bestäm 0.2 1/ 2 0.041/ 30.008 1 1, 1,2,... 1,0.0333 5( 1) 4 4 0.182, 0.0400 fel 410-4 20
Rekursio och istabilitet, 2 1/ 51 Fel > 5Fel -1 1 5 0.182 0.0090 1 2 3 4 1/ 2 5 0.0090 0.050 1/ 3 50.050 0.083 1/ 4 5 0.083 0.165 0!!! Fel 4 = 5 4 4 10-4 = 0.25 21
Rekursio och stabilitet 9 8 7 6 4 1 1 ( ) / 5 1/ 60 0.017 (1/9 0.017) / 5 (1/8 0.019) / 5 (1/ 7 0.021) /5 0.034,..., 0 0.019 0.021 0.025, 0.182 Fel -1 = 0.2Fel..., 22
23 Rekursio: iitialvärdesproblem 0,1,2,... ),, (... 3 2 ) : ( ), ( ) ( ) ( ), ( lim 1 2 0 y hf y y h h h h O y f h y h y y f y