D veco fields Scienific Visualizaion (Pa 6) PD D.-Ing. Pee Haseie Conens Inoducion Chaaceisic lines in veco fields Physical saegies Geneal consideaions Aows and glyphs Inoducion o paicle acing Inegaion of veco fields Applied Visualizaion, SS0
Inoducion We wan o visualize a funcion lie F: Ω R, wih F given only a ceain veices Fis idea (fom wha we now so fa) Visualize he wo scala fields F x and F y conou plos aibues Componens ae nomally no independen Theefoe, no insigh F = F If he daa epesens velociy F F i.e. diecion of moving paicles We wan o visualize he flow i 3 Applied Visualizaion, SS0 x i y i Inoducion Applicaion main aea is flow visualizaion Gas (ca indusy, aiplanes, ) Fluids (habo consucion, eacos, blood vessels, oil indusy, ) Impoan eniies Geomeic bounday condiions Velociy (flow) field v(x,) Pessue p, empeaue T, densiy ρ Voiciy ( Wibelsäe o Voiziä ): v Amoun of "ciculaion" (moe sicly, he local angula ae of oaion) Consevaion of mass, enegy, and momenum Navie-Soes equaions CFD (Compuaional Fluid Dynamics) 4 Applied Visualizaion, SS0
Inoducion Flow visualizaion based on CFD daa 5 Applied Visualizaion, SS0 Inoducion Flow visualizaion classificaion Dimension (D o 3D) Time-dependency saionay (seady) vs. insaionay (unseady) Gid ype Compessible vs. incompessible fluids In mos cases of flow visualizaion Numeical mehods equied 6 Applied Visualizaion, SS0
Chaaceisic lines in veco fields 7 Applied Visualizaion, SS0 Chaaceisic lines in veco fields Time lines / ime sufaces Pah lines Sea lines Seam lines 8 Applied Visualizaion, SS0
Chaaceisic lines in veco fields Time lines / ime suface Line/suface of massless elemens moving wih flow Poins of idenical ime Connec paicles ha wee eleased simulaneously Appoach δ λ) = δ ( λ, ) δ ( λ, ) ( 0 Elecolysis of wae Lines of hydogene bubble echnique Phoochemical echnique Poduce coloed line phoo-chemically wih lase v 9 Applied Visualizaion, SS0 Chaaceisic lines in veco fields Pah lines v Pah of a single massless paicle Inec paicle a poin x(0)=x 0 Long ime exposue phoo x0 0 3 4 x Solve dx( ) d = v( x( ), ) wih x(0) = x 0 Appoach Ligh emiing paicle (oil dop, magnesium powde) 0 Applied Visualizaion, SS0
Chaaceisic lines in veco fields Sea lines Tace of dye coninuously eleased a x 0 Insaionay fields Measuemen No paicle pah bu velociy diecion (on line descibed by dye) Repesenaion x0 x0 pahline v 0 pahline x pahline 3 sea line x Connecing line of all paicles saed wihin 0 < i < 0 a x 0 Calculaion Pah lines fo (x 0, x 0 ) Applied Visualizaion, SS0 Chaaceisic lines in veco fields Seam lines Physically difficul due o ineia (mainly wih compue) Tangenial o he veco field pah lines fo each i Veco field a an abiay, ye fixed ime 0 Solve dx( s) ds = v( x( s), ) wih x(0) = x 0 Phoo wih sho ime exposue of veco field v a i Infomaion abou whole veco field Appoximae wih pape seame Applied Visualizaion, SS0
Chaaceisic lines in veco fields Compaison 0 3 pah line sea line seam line fo 3 Noe fo seady flow pah lines, sea lines, and seam lines ae idenical 3 Applied Visualizaion, SS0 Physical saegies 4 Applied Visualizaion, SS0
Physical saegies Opical saegies Shadow Paallel ligh ays Measue shadows (dae, lighe aeas) due o diffeen efacion esuling fom densiy vaiaion Schlieen / seas (e.g. fluid on glass plae) Two diagams befoe, afe he flow Compaison povides infomaion abou gadien Inefeomey Based on phase shif Add enegy Ionizaion, adiaion exciaion paicle visible Hea change of densiy o pessue 5 Applied Visualizaion, SS0 Geneal consideaions 6 Applied Visualizaion, SS0
Geneal consideaions Lagangian poin of view Individual paicles Can be idenified Aached ae posiion, velociy, and ohe popeies Explici posiion Sandad appoach fo paicle acing = F( 0, ) Conside pah of a paicle depending on saing poin 0 and ime 7 Applied Visualizaion, SS0 Geneal consideaions Euleian poin of view No individual paicles Physical quaniy ae fields Velociy : v v( x, ) Pessue : p p( x, ) A poin x he empoal developmen of he field is given Popeies given on a gid Posiion is implici 8 Applied Visualizaion, SS0
Geneal consideaions Tansiion Eule epesenaion Lagange epesenaion d = v( x, ) ( ) : ( 0) = 0 d d F( 0, ) Lagange : v = d 9 Applied Visualizaion, SS0 Geneal consideaions Visualizaion pipeline Eule Repesenaion of fields Veco o line plos Isolines, isosufaces Lagange Time-lines Pah-lines Sea-lines Seam-lines 0 Applied Visualizaion, SS0
Aows and glyphs Applied Visualizaion, SS0 Aows and glyphs Visualize local feaues of he veco field Veco iself Voiciy v Exen daa Tempeaue Pessue Ec. Impoan elemens of a veco Diecion Magniude No he componens of a veco! Applied Visualizaion, SS0
Aows and glyphs Aows Place aow geomey a each (n h ) gid poin Geomey:,,, Lengh Repesens he magniude of he veco field Diecion Coincides wih diecion of veco field in ha veex In case of vey fas changing velociy Resuls ae ypically no good Then, bee use aows of consan lengh Indicae magniude sepaaely, e.g. using colo coding o diffeen inds of aows. 3 Applied Visualizaion, SS0 Aows and glyphs Example wih aows 4 Applied Visualizaion, SS0
Aows and glyphs Example wih aows 5 Applied Visualizaion, SS0 Aows and glyphs Glyphs Show moe complex infomaion Ofen moe difficul inepeaion Moe applied in 3D 6 Applied Visualizaion, SS0
Aows and glyphs Example 7 Applied Visualizaion, SS0 Aows and glyphs Advanages Simple Absolue value diecly visible D fields wihou complex small sucues Disadvanages s Inheen occlusion effecs s Vey small and ovelapping aows s Difficul fo 3D and ime-dependen fields s Poo esuls if magniude of velociy changes apidly - Use aows of consan lengh and colo code magniude 8 Applied Visualizaion, SS0
Inoducion o paicle acing 9 Applied Visualizaion, SS0 Inoducion o paicle acing Veco fields Usually combined wih anspo basic idea ace paicles Chaaceisic lines Mapping appoaches Lines, sufaces Someimes animaed 30 Applied Visualizaion, SS0
Inoducion o paicle acing Given Velociy field of paicles / fluid Tas Ty o deemine he pah ( x( ), y( )) of one (many) massless paicles in his field Saing poin Requiemen fo a ceain pah Find a soluion v(, ), ( = x( ) = y( ) Fo he following se of equaions d Inegaion = v( x( ), y( )) = v(, ) heeby ( ), ( ), K d Δ ( Δ) = ( ) v( ( ), ) d 3 Applied Visualizaion, SS0 0 ) 0 Inoducion o paicle acing Inegaion of veco fields Solving odinay diffeenial equaions (of fis ode) Lieaue Schwaz: Numeische Mahemai (Kapiel 9) Deuflhad/Bonemann: Numeische Mahemai II Klaus Baue: Numeische Behandlung gewöhnliche Diffeenialgleichungen (pdf-file on he web!) 3 Applied Visualizaion, SS0
Inegaion of veco fields 33 Applied Visualizaion, SS0 Inegaion of veco fields Odinay diffeenial equaion Iniial value poblem d v (, ), whee ( ) = 0 = d Numeical soluion Disceize he ime vaiable : {,,...} Deemine which appoximae he soluion ( ) Usually, we use consan sep size: = Δ 0 34 Applied Visualizaion, SS0
Inegaion of veco fields Disinguish he following mehods Single sep Muli sep Explici Implici i = φ i ( Δ, i, i ) i = φi ( Δ, i, i, i, i, K) (,,, ψ ) = 0 ψ Δ,,,,,, ) 0 i Δ i i i i ( i i i i i K = We mainly conside single sep mehods (wih fixed sep size) 35 Applied Visualizaion, SS0 Inegaion of veco fields Single sep mehods Posiion i depends only on i Good fo adapive saegy, since no ecalculaion is equied Example: Eule echnique Muli sep mehods Uses esuls of a fixed numbe of pevious ime seps Cos inensive fo adapiviy, since ecalculaion of all pevious seps is equied in case of efinemen Example: Adams Bashfoh Muli sage Single sep appoach wih muliple evaluaion of he funcion pe ime sep Due o cos effeciveness applied fo efinemen Example: Heun, Runge-Kua 36 Applied Visualizaion, SS0
Inegaion of veco fields Eule mehod (Runge Kua s ode RK) Explici = Δ v(, ) = Δ Implici Δ v(, ) = Δ Local disceizaion eo O(Δ ) 37 Applied Visualizaion, SS0 Inegaion of veco fields Explanaion in D Explici y n Δy = h y& y n y y y n n n h f ( y( n), ) h y& ( y( n), ) h y& n y n h = Δ Implici y y & n n h yn 0 (Evaluaion a igh side) 38 Applied Visualizaion, SS0
Inegaion of veco fields Example wih Eule Cul field y v(, x, y) = v( x, y) = x Exac soluion is y sin = C x cos This is a cicle whose cene lies in he oigin and whose adius depends on he saing poin 39 Applied Visualizaion, SS0 Inegaion of veco fields Calculaion wih explici Eule Obain velociy a cuen (x i, y i ) wih v(x i, y i ) Conside angen a saing poin (x i, y i ) Assuming velociy is consan ove he nex ime sep leads o ( x y ) = ( x, y ) Δ ( x, y ) i, i i v i i i Fom of a spial due o disceizaion eo! 40 Applied Visualizaion, SS0
Inegaion of veco fields Calculaion wih implici Eule Seach (x i, y i ) wih velociy v(x i, y i ) Conside angen a end-poin (x i,y i ) This esuls o ( x y ) ( x, y ) ( x y ) i, i = i i Δ i, i v Fom of a spial due o disceizaion eo! 4 Applied Visualizaion, SS0 Inegaion of veco fields Summay abou Eule inegaion Explici (x i,y i ) = (x i,y i ) Δ v(x i,y i ) Local eo (one sep) is O(Δ ) We need /Δ seps global eo is O(Δ) (if v is well behaved sabiliy ) Implici (x i,y i ) = (x i,y i ) Δ v(x i,y i ) Local eo O(Δ ), global eo O(Δ) Moe sable han explici If v is nown analyically, we have o solve fo x i, y i Ohewise, ieaion is equied (see lae: pedico-coeco) 4 Applied Visualizaion, SS0
43 Applied Visualizaion, SS0 Inegaion of veco fields Heun mehod (Runge-Kua nd ode RK ) Explici Some ind of aveage beween implici and explici Eule Applicaion of apezoidal ule Implici Local disceizaion eo O(Δ 3 ) ( ) Δ = i i ( ) ), ( ), ( Δ Δ = v v ), ( ), ( v v y Δ Δ = = 44 Applied Visualizaion, SS0 Inegaion of veco fields Pedico-coeco vesion (ieaive implici) Ty o successively impove pedicion Eule pedico do unil convegence ( ) ), ( ), ( Δ Δ = v v ), ( 0 v Δ = Ieaive coecion simila o Newon
Inegaion of veco fields Classical Runge-Kua (RK4) Applicaion of Simpson s ule (Keple sche Fassegel) Δ = ( ) 6 3 4 whee NOTE: = v(, ) = v(, Δ ) Δ 3 = v(, Δ ) Δ = v( Δ, Δ ) 4 Local disceizaion eo O(Δ 5 ) 3 Thee is also implici RK4 Noe ha sabiliy is achieved eihe by muliple funcion evaluaions o wih implici echniques. Hee: explici RK4 has muliple funcion evaluaions o! 45 Applied Visualizaion, SS0 Inegaion of veco fields Example Flow in a floaing zone funace fo cysal gowing Lef 4 h ode Runge-Kua Righ implici Eule 46 Applied Visualizaion, SS0
Inegaion of veco fields Example: cicula flow wih Eule Δ = 0.00 Δ = 0.00 Δ = 0.050 Δ = 0.05 47 Applied Visualizaion, SS0 Inegaion of veco fields Example: cicula flow wih Heun Δ = 0.800 Δ = 0.400 Δ = 0.00 Δ = 0.00 48 Applied Visualizaion, SS0
Inegaion of veco fields Example: cicula flow wih Runge-Kua Δ = 0.800 Δ = 0.400 Δ = 0.00 Δ = 0.00 49 Applied Visualizaion, SS0 Inegaion of veco fields Example: esuls depending on Δ Δ = 0.00 Δ = 0.400 Δ = 0.800 Δ = 0.00 Δ = 0.00 Δ = 0.400 50 Applied Visualizaion, SS0
5 Applied Visualizaion, SS0 Inegaion of veco fields Sep size conol Change sep size accoding o he eo Decease/incease sep size Δ depending on whehe he acual local eo is high/low: e.g. fo Runge-Kua: Δ < Δ > Δ 4 3 ε ε 5 Applied Visualizaion, SS0 Inegaion of veco fields Muli-sep mehods Explici 3-sep mehod: 3 d ode Implici -sep mehod: nd ode (Simpson-ule fo quadaue): = = = p p 0 0 ), v( β α ) (7 3 Δ = v v v ) 4 ), ( ( 3 Δ = v v v
Inegaion of veco fields Muli-sep mehods s Sep size conol difficul s Iniial condiions needed (v -, v -, ) Highe appoximaion ode wih one evaluaion of veco field pe ime sep 53 Applied Visualizaion, SS0 Inegaion of veco fields Abou he disceizaion eo Appoximaion popeies Appoximaion ode local eo O(Δ ) Fo nice veco fields Local eo O(Δ ) global eo O(Δ ) Single sep mehods Appoximaion ode = numbe of veco field evaluaions pe ime sep Muli-sep mehods Appoximaion ode = deph of muli-sep mehod = numbe of bacwad seps 54 Applied Visualizaion, SS0
Inegaion of veco fields Evaluaion Explici Simple Ofen unsable Implici Solving an equaion Ofen sable Sabiliy ensues Ode of global eo = ode of local eo - Lage ime seps possible Inegaion of highe ode o implici mehods allow lage sep sizes moe pecise and fase inegaion Avoid explici Eule mehods! 55 Applied Visualizaion, SS0 Inegaion of veco fields Impovemen of inegaion Adapive saegy Implici is slowe Idenical esuls fo lamina flow Use implici only if necessay E.g.: inense shea, oaion close o wall o in ubulences Adusmen of ode RK4 mos esablished saegy Bu inepolaion leads o appoximaion eo of veco field max pecision of inegaion is limied Assuming linea inepolaion Using RK3 one would be on he save side since eo of inegaion and inepolaion ae of he same ode 56 Applied Visualizaion, SS0
Inegaion of veco fields Dynamic sep size conol Idea: Calculae aecoies wih diffeen inegaion mehods RK() RK3() Eo esimaion by diffeence wih mehod of lowe ode If disance of end poins > heshold Then, epea wih educed sep size Resul: RK3() Sufficien pecision wih espec o eo of linea inepolaion Moe efficien (consideably!) han highe ode (e.g. RK4(3)) 57 Applied Visualizaion, SS0 Inegaion of veco fields Velociy v ae ypically calculaed wih bilinea / ilinea inepolaion in space and ime Quesion: Why no using highe ode inepolaion in ime? Answe: Requies oo many ime seps ha need o be ep in memoy 58 Applied Visualizaion, SS0