HW6 - MAE 290b Numerical Methods HW6 Qiyun Zhao March 7,...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MAE 290b Numerical Methods HW6 Qiyun Zhao March 7, 2011 MAE290b HW6 Qiyun Zhao Problem 1 (a) Solve the problem using an explicit method (1) Use EE and finite difference du i,j dt + u n i,j u n i +1 ,j- u n i- 1 ,j 2 x + v n i,j u n i,j +1- u n i,j- 1 2 y = ( u n i +1 ,j- 2 u n i,j + u n i- 1 ,j x 2 + u n i,j +1- 2 u n i,j + u n i,j- 1 y 2 ) dv i,j dt + u n i,j v n i +1 ,j- v n i- 1 ,j 2 x + v n i,j v n i,j +1- v n i,j- 1 2 y = ( v n i +1 ,j- 2 v n i,j + v n i- 1 ,j x 2 + v n i,j +1- 2 v n i,j + v n i,j- 1 y 2 ) Then we can obtain: du i,j dt =- u n i,j u n i +1 ,j- u n i- 1 ,j 2 x- v n i,j u n i,j +1- u n i,j- 1 2 y + ( u n i +1 ,j- 2 u n i,j + u n i- 1 ,j x 2 + u n i,j +1- 2 u n i,j + u n i,j- 1 y 2 ) dv i,j dt =- u n i,j v n i +1 ,j- v n i- 1 ,j 2 x- v n i,j v n i,j +1- v n i,j- 1 2 y + ( v n i +1 ,j- 2 v n i,j + v n i- 1 ,j x 2 + v n i,j +1- 2 v n i,j + v n i,j- 1 y 2 ) where i = 1 , 2 ,...,M- 1 j = 1 , 2 ,...,N- 1 , n = 1 , 2 ,.... Use the explicit method to calculate u n +1 i,j and v n +1 i,j , say EE. u n +1 i,j = u n i,j + t [- u n i,j u n i +1 ,j- u n i- 1 ,j 2 x- v n i,j u n i,j +1- u n i,j- 1 2 y + ( u n i +1 ,j- 2 u n i,j + u n i- 1 ,j x 2 + u n i,j +1- 2 u n i,j + u n i,j- 1 y 2 )] v n +1 i,j = v n i,j + t [- u n i,j v n i +1 ,j- v n i- 1 ,j 2 x- v n i,j v n i,j +1- v n i,j- 1 2 y + ( v n i +1 ,j- 2 v n i,j + v n i- 1 ,j x 2 + v n i,j +1- 2 v n i,j + v n i,j- 1 y 2 )] where i = 1 , 2 ,...,M- 1 j = 1 , 2 ,...,N- 1 , n = 0 , 1 , 2 ,.... As Let x = y = h , from the linear case, we can get t h 2 4 U i,j +1 U i- 1 ,j U i,j U i +1 ,j U i,j- 1 (2)Use EE to get started for Adamas-Bashforth AB method: y n +1 = y n + h 2 [3 f ( y n ,t n )- f ( y n- 1 ,t n- 1 )] u n +1 i,j = u n i,j + t 2 { 3[- u n i,j u n i +1 ,j- u n i- 1 ,j 2 x- v n i,j u n i,j +1- u n i,j- 1 2 y + ( u n i +1 ,j- 2 u n i,j + u n i- 1 ,j x 2 + u n i,j +1- 2 u n i,j + u n i,j- 1 y 2 )]- [- u n- 1 i,j u n- 1 i +1 ,j- u n- 1 i- 1 ,j 2 x- v n- 1 i,j u n- 1 i,j +1- u n- 1 i,j- 1 2 y + ( u n- 1 i +1 ,j- 2 u n- 1 i,j + u n- 1 i- 1 ,j x 2 + u n- 1 i,j +1- 2 u n- 1 i,j + u n- 1 i,j- 1 y 2 )] } 1 MAE290b HW6 Qiyun Zhao 0.2 0.4 0.6 0.8 1 0.5 1-1-0.5 0.5 1 x u using explicit method y z 0.2 0.4 0.6 0.8 1 0.5 1 0.5 1 1.5 x v using explicit method y z Figure 1: Solution use AB (b) Solve the problem using ADI combined with EE u n + 1 2- u n =- t 2 ( u n u n x + v n u n y ) + t 2 ( 2 u n + 1 2 x 2 + 2 u n y 2 ) u n +1- u n + 1 2 =- t 2 ( u n u n x + v n u n y ) + t 2 ( 2 u n + 1 2 x 2 + 2 u n +1 y 2 ) Use finite difference in space, we obtain: u n + 1 2 i,j- u n i,j =- t 2 [ u n i,j u n i +1 ,j- u n i- 1 ,j 2 x + v n i,j u n i,j +1- u n i,j- 1 2 y ] + t 2 ( u n +1 / 2 i +1 ,j- 2 u n +1 / 2 i,j + u n +1 / 2 i- 1 ,j x 2 + u n i,j +1- 2 u n i,j + u n i,j- 1 y 2 ) u n +1 i,j- u n + 1 2...
View Full Document

Page1 / 13

HW6 - MAE 290b Numerical Methods HW6 Qiyun Zhao March 7,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online