Übung 4 - SIMPLE-Verfahren Musterlösung C. Baur, M. Schäfer Fachgebiet für Numerische Berechnungsverfahren im Maschinenbau 27.11.2008 TU Darmstadt FNB 27.11.2008 1/26
Aufgabe 1 - Problembeschreibung Geometrie NW N NE nw n ne W P E Gesucht: ( ) u n une unw x (CDS) Mit Interpolation von u ne, u nw : y x 1. ( ) u n 1 4 x (u NE u NW + u E u W ) 2. ( ) u n 1 2 x (u NE u NW ) TU Darmstadt FNB 27.11.2008 2/26
Aufgabe 1 - Vorgehensweise Interpolation von u e mit der Taylor-Reihen-Entwicklung: u E = u e + ((x i ) E (x i ) e ) + O( xi 2 ) i e u P = u e + ((x i ) P (x i ) e ) + O( xi 2 ) i Kombinieren der beiden Gleichungen ergibt: u e = γ P u P + γ E u E + λ i i y P x e E TU Darmstadt FNB 27.11.2008 3/26 e e + O( x 2 i ) } {{ } Abbruchfehler
Aufgabe 1 - Vorgehensweise Interpolation von u e mit der Taylor-Reihen-Entwicklung: y P x e E (xp x e ) γ E = 2 + (y P y e ) 2 (xe x P ) 2 + (y E y P ) 2 (xe x e ) γ P = 2 + (y E y e ) 2 (xe x P ) 2 + (y E y P ) 2 λ 1 = (x P x e )γ P + (x E x e )γ E λ 2 = (y P y e )γ P + (y E y e )γ E TU Darmstadt FNB 27.11.2008 4/26
Aufg. 1 - Interpolation Möglichkeit 1 NW nnw N nne NE nw n ne W snw P sne E y x ( u ) n 1 4 x (u NE u NW + u E u W ) Benötigte Punkte: NW, N, NE, W, P, E TU Darmstadt FNB 27.11.2008 5/26
Aufg. 1 - Interpolation Möglichkeit 1 Approximation von u nw u NW = u nnw + (x NW x nnw ) u N = u nnw + (x N x nnw ) nnw nnw + O(( x) 2 ) + O(( x) 2 ) Durch Kombinieren der beiden Gleichungen erhält man: u nnw = 1 2 (u NW + u N ) + O(( x) 2 ) TU Darmstadt FNB 27.11.2008 6/26
Aufg. 1 - Interpolation Möglichkeit 1 Approximation von u nw u W = u snw + (x W x snw ) u P = u snw + (x P x snw ) snw snw + O(( x) 2 ) + O(( x) 2 ) Durch Kombinieren der beiden Gleichungen erhält man: u snw = 1 2 (u W + u P ) + O(( x) 2 ) TU Darmstadt FNB 27.11.2008 7/26
Aufg. 1 - Interpolation Möglichkeit 1 Approximation von u nw u nnw = u nw + (y nnw y nw ) u snw = u nw + (y snw y nw ) nw nw + O(( y) 2 ) + O(( y) 2 ) Durch Kombinieren der beiden Gleichungen erhält man: u nw = 1 2 (u nnw + u snw ) + O(( y) 2 ) = 1 4 (u NW + u N + u W + u P ) + O(( x) 2, ( y) 2 ) TU Darmstadt FNB 27.11.2008 8/26
Aufg. 1 - Interpolation Möglichkeit 1 Approximation von u ne erfolgt analog zu u nw : u nne = u ne + (y nne y ne ) + O(( y) 2 ) ne u sne = u ne + (y sne y ne ) + O(( y) 2 ) Durch Kombinieren der beiden Gleichungen erhält man: u ne = 1 2 (u nne + u sne ) + O(( y) 2 ) = 1 4 (u NE + u N + u E + u P ) + O(( x) 2, (( y) 2 ) ne TU Darmstadt FNB 27.11.2008 9/26
Aufg. 1 - Interpolation Möglichkeit 1 Approximation der Ableitung in n u ne u nw + O( x 2 ) x n = 1 x [ 1 4 (u NW + u N + u W + u P ) + O(( x) 2,(( y) 2 ) 1 4 (u NE + u N + u E + u P ) + O(( x) 2,(( y) 2 ) ] + O( x 2 ) = 1 4 x (u NE u NW + u E u W ) + O(( x) 2,(( y) 2 ) + O( x 2 ) Die Approximation ist von Ordnung 2 TU Darmstadt FNB 27.11.2008 10/26
Aufg. 1 - Interpolation Möglichkeit 2 NW N NE nw n ne W P E y ( u ) n 1 2 x (u NE u NW ) x Benötigte Punkte: NW, NE, P TU Darmstadt FNB 27.11.2008 11/26
Aufg. 1 - Interpolation Möglichkeit 2 Approximation von u nw u NW = u nw + (x NW x nw ) + O(( x) 2, (( y) 2 ) u P = u nw + (x P x nw ) + O(( x) 2, (( y) 2 ) + (y NW y nw ) nw nw + (y P y nw ) nw nw Durch Kombinieren der beiden Gleichungen erhält man: u nw = 1 2 (u NW + u P ) + O(( x) 2, (( y) 2 ) TU Darmstadt FNB 27.11.2008 12/26
Aufg. 1 - Interpolation Möglichkeit 2 Approximation von u ne u P = u ne + (x P x ne ) + O(( x) 2, (( y) 2 ) u NE = u ne + (x NE x ne ) + O(( x) 2, (( y) 2 ) + (y P y ne ) ne ne + (y NE y ne ) ne ne Durch Kombinieren der beiden Gleichungen erhält man: u ne = 1 2 (u NE + u P ) + O(( x) 2, (( y) 2 ) TU Darmstadt FNB 27.11.2008 13/26
Aufg. 1 - Interpolation Möglichkeit 2 Approximation der Ableitung in n u ne u nw + O( x 2 ) x n = 1 x [ 1 2 (u NW + u P ) + O(( x) 2,(( y) 2 ) 1 2 (u NE + u P ) + O(( x) 2,(( y) 2 ) ] + O( x 2 ) = 1 2 x (u NE u NW ) + O(( x) 2,(( y) 2 ) + O( x 2 ) Die Approximation ist von Ordnung 2 TU Darmstadt FNB 27.11.2008 14/26
Aufgabe 2 - Beschreibung des Problems Geometrie DGL, Gitter Randbedingungen y Wand Einstrom x x H Ausstrom KV1 y KV2 x L TU Darmstadt FNB 27.11.2008 15/26 Wand
Aufg. 2 - Newtonsche Fluide Impulsbilanz (ρu i ) t + (ρu iu j ) j Massenbilanz Annahmen: inkompressibel Dρ Dt Impulsbilanz ρ u i t + ρ u iu j j Massenbilanz [ ( ui µ + u )] j = p + ρf i, i = 1... 3 j j i i ρ t + (ρu i) i = 0 = 0, µ,ρ = const µ ( ui + u ) j = p + ρf i, i = 1... 3 j j i i u i i = 0 TU Darmstadt FNB 27.11.2008 16/26
Aufg. 2 - Zeitdiskretisierung t = k t = t k, k = 1, 2, 3,... ϕ ( t k) = ϕ k Rückwärtsdifferenz ϕ t t=t k ϕk ϕ k 1 t Impulsbilanz ρ t uk i + ρ (uk i uj k ) µ k i = pk j j j i + ρ ( fi k + uk 1 i t ) Massenbilanz u k i i = 0 TU Darmstadt FNB 27.11.2008 17/26
Aufg. 2 - Integration über allgemeines KV Impulsbilanz mit Fi k modifizierte Quellen, für k gilt: ρ ui k dv + ρ (uk i uj k ) µ k i p k dv = dv + ρ Fi k dv t V V j j j V i V Massenbilanz Satz von Gauß ρ ui k dv + t V S V ui k dv = 0 dv = 0 i V ρn j ui k uj k k ds µn i j ds = n i p k ds + ρ Fi k dv j S V n i ui k ds = 0 S TU Darmstadt FNB 27.11.2008 18/26
Aufg. 2 - Druckkorrekturverfahren - Ablauf Initialisierung Anfangsbedingung Linearisierte Impulsgleichung Gleichungslöser äußere Iteration Gleichung für Druckkorrektur Korrektur von Druck Geschwindigkeit und Massenfluss Gleichungslöser innere Iteration Zeitschritte Linearisierte Skalargleichungen Gleichungslöser nein nein Konvergenz ja t k+1 = t k + t t k+1 > t max ja Ende TU Darmstadt FNB 27.11.2008 19/26
Aufg. 2 - DGLn für 2D Kanalproblem 2D: u 1 = u, u 2 = v, x 1 = x, x 2 = y, stationär, f i = 0 ( (uu) i = 1 : ρ + (vu) ) [ ( ) u µ + ( )] u ( (uv) i = 2 : ρ + (vv) ) [ ( ) v µ + ( )] v u + v = 0 Kanalproblem: alle Terme, die v enthalten, sind gleich Null! ( ) [ Impulsbilanz: ρ (uu) µ ( u ) ( )] + u = p, = p = p p = 0 Massenbilanz: u = 0 TU Darmstadt FNB 27.11.2008 20/26
Aufg. 2 - Analytische Lösung p = 0 = p(x, y) = f(x) p = g(x) = f (x) u = 0 = µ = p = µh (y) = g(x) µh (y) = g(x) = h (y) = const = A und g(x) = const = µa u(x, y) = u(0, y) = 4u max H 2 (Hy y 2 ) Einstrom Parabel p = µh (y)x + C = 8µu max H 2 x + C, C Frei TU Darmstadt FNB 27.11.2008 21/26
Aufg. 2 - Intergration über allgemeines KV Kanalproblem V Satz von Gauß: c S c ( ρ (uu) ( 2 )) u µ 2 + 2 u p 2 dv = V dv ( ρuun x µ Auswerten der Normalen ( ) 1 n e = ; n w = 0 S e ( u n x + u )) n y ds c = c ( ) 1 ; n n = 0 Allgemein für das Kanalproblem ( ( )) u ρuu µ ds e + S n µ ds n + TU Darmstadt FNB 27.11.2008 22/26 S s µ ( u S w S c pn x ds c ( ) ( ) 0 0 ; n s = 1 1 ( ρuu + µ ) ds s = ( )) u ds w S e pds e + S w pds w
Aufg. 2 - Auswerten der Integrale MP-Regel: S e S n µ ( ρuu µ ( u ds + ρ(uu) e y µ µ )) ds + S s µ x + µ n e ( u S w ( ρuu + µ ) ds = S e pds + y ρ(uu) w y + µ ( u Diskrete Massenflüsse: ṁ c = ρ u c δs c n c ṁ e u e + ṁ w u w µ y µ x [ n TU Darmstadt FNB 27.11.2008 23/26 ( ) ] u s ) s ( )) u ds S w pds y w x = p e y + p w y [ e = (p e p w ) y ( ) ] u w
Aufg. 2 - Kontinuitätsgleichung Kanalproblem Gaußscher Satz: V V u dv = 0dV = 0 V u dv = un x ds = S c S c un x ds c für das Kanalproblem MP Regel uds uds = 0 S e S w (u e u w ) y = 0 TU Darmstadt FNB 27.11.2008 24/26
Aufg. 2-2D Druckkorrekturverfahren Diskret Gegeben: u l, v l und p l aus der letzten Iteration 1. Lösen der Impulserhaltungsgleichungen u l, v l mit Druckfeld p l der letzten Iteration mit Massenflüssen ṁ l der letzten Iteration 2. Berechnen der virtuellen Massenquellen/-senken b l mit den Geschwindigkeiten u l, v l 3. Aufstellen und Lösen der Druckkorrekturgleichung p l 4. Korrektur der entsprechenden Größen u l, v l, p l, p l p l+1 und u l+1, v l+1 ṁ l+1 5. Konvergenz Nein: gehe zu 1 Ja: Ende TU Darmstadt FNB 27.11.2008 25/26
Aufg. 2 - Unterrelaxation für P im Gitter Unterrelaxation AΦ = b FVM a P φ P + nb von P a nb φ nb = b P a P α φl+1 P + nb a nb φ l+1 nb = b P + (1 α) a P α φl P Gewichtung φ l+1 P und φ l P bei einem SIMPLE Schritt a P α φl+1 P (1 α) a ( P 1 α φl P a P α φl+1 P + 1 (α 1) + = 1 α α ) (1 α) φ l P α TU Darmstadt FNB 27.11.2008 26/26