Lesson 23 Linear partial differential equations 1
• We have seen that ODEs can be reduced to almost banded infinite-dimensional equations using Chebyshev and ultraspherical polynomials • These infinite-dimensional equations can be solved adaptively using Givens rota- tions. � The exact error in residual is calculated, which can be used to decide con- vergence • This lecture we see how these ideas can be used for linear PDEs • The resulting method works for arbitrary linear PDEs on a rectangle • The first step is to do function approximation on a square 2
2D Function Approximation 3
• In 1D, we approximated functions using Chebyshev series: � � f 0 n − 1 . � . f ( x ) ≈ f k T k ( x ) = ( T 0 ( x ) , . . . , T n − 1 ( x )) � � . � � k =0 f n − 1 � Functions are identified with vectors • In 2D, we use a tensor product of Chebyshev series: � Functions are identified with matrices 4
• In 1D, we approximated functions using Chebyshev series: � � f 0 n − 1 . � . f ( x ) ≈ f k T k ( x ) = ( T 0 ( x ) , . . . , T n − 1 ( x )) � � . � � k =0 f n − 1 � Functions are identified with vectors • In 2D, we use a tensor product of Chebyshev series: n − 1 m − 1 � � f ( x, y ) ≈ f kj T k ( x ) T j ( y ) j =0 k =0 � � � � T 0 ( y ) f 00 f 0( m − 1) · · · . . . ... . . . = ( T 0 ( x ) , . . . , T n − 1 ( x )) � � � � . . . � � � � T m − 1 ( y ) f ( n − 1)0 f ( n − 1)( m − 1) · · · � Functions are identified with matrices 5
• In 1D, we calculated the Chebyshev series by evaluating f ( x ) at the Chebyshev points x n : –1 1 • In 2D, we evaluate f ( x, y ) at a product of Chebyshev points x n,m := x n × x � m : 1.0 0.5 x - 1.0 - 0.5 0.5 1.0 - 0.5 - 1.0 y 6
• In 1D, we have ˇ f 0 . . C n f ( x n ) ≈ . ˇ f n � 1 where C n can is viewed as an n × n matrix • We will show that in 2D we have 7
• In 1D, we have ˇ f 0 . . C n f ( x n ) ≈ . ˇ f n � 1 where C n can is viewed as an n × n matrix • We will show that in 2D we have ˇ ˇ f 00 · · · f 0( m � 1) . . ... C n f ( x n,m ) C � . . m ≈ . . ˇ ˇ f ( n � 1)0 · · · f ( n � 1)( m � 1) 8
• For any fixed y , we can expand ∞ ˇ � f ( x, y ) = f k ( y ) T k ( x ) k =0 where � 1 � 2 f ( x, y ) T k ( x ) ˇ f k ( y ) = � x √ 1 − x 2 π − 1 • It follows that the smoothness of is inherited from • We can thus expand 9
• For any fixed y , we can expand ∞ ˇ � f ( x, y ) = f k ( y ) T k ( x ) k =0 where � 1 � 2 f ( x, y ) T k ( x ) ˇ f k ( y ) = � x √ 1 − x 2 π − 1 • It follows that the smoothness of ˇ f k ( y ) is inherited from f • We can thus expand ∞ ˇ ˇ � f k ( y ) = f kj T j ( y ) j =0 10
• For any fixed y , we expand numerically ˇ f n � � 0 ( y ) . C n f ( x n , y ) =: . � � . � � ˇ f n n � 1 ( y ) • We can thus expand • This gives us 11
• For any fixed y , we expand numerically ˇ f n � � 0 ( y ) . C n f ( x n , y ) =: . � � . � � ˇ f n n � 1 ( y ) • We can thus expand ˇ f nm � � k 0 . C m ˇ f n . k ( x m ) =: � � . � � ˇ f nm k ( m � 1) • This gives us 12
• For any fixed y , we expand numerically ˇ f n � � 0 ( y ) . C n f ( x n , y ) =: . � � . � � ˇ f n n � 1 ( y ) • We can thus expand ˇ f nm � � k 0 . C m ˇ f n . k ( x m ) =: � � . � � ˇ f nm k ( m � 1) • This gives us ˇ f n 0 ( x � � � m ) . C n f ( x n , x m ) � C � � C � . m = � � . m � ˇ f n n � 1 ( x � m ) � 13
• For any fixed y , we expand numerically ˇ f n � � 0 ( y ) . C n f ( x n , y ) =: . � � . � � ˇ f n n � 1 ( y ) • We can thus expand ˇ f nm � � k 0 . C m ˇ f n . k ( x m ) =: � � . � � ˇ f nm k ( m � 1) • This gives us ˇ f n 0 ( x � � � m ) . C n f ( x n , x m ) � C � � C � . m = � � . m � ˇ f n n � 1 ( x � m ) � ˇ 0 ( x m ) , . . . , ˇ f n f n � = C m n � 1 ( x m ) ˇ ˇ f nm f nm � · · · � 00 0( m � 1) . . ... . . = � � . . � � ˇ ˇ f nm f nm · · · ( n � 1)0 ( n � 1)( m � 1) 14
Partial derivatives 15
16
17
18
19
20
21
22
∂ λ + µ f ∂ x λ ∂ y µ with a change of basis to C ( λ ) k ( x ) × C ( µ ) • The mixed partial derivative ( y ) j series takes the form D λ F D � µ • By the same arguments, the conversion operator from to takes the form where is the 1D conversion operator, defined in terms of that convert a series to a series 23
∂ λ + µ f ∂ x λ ∂ y µ with a change of basis to C ( λ ) k ( x ) × C ( µ ) • The mixed partial derivative ( y ) j series takes the form D λ F D � µ • By the same arguments, the conversion operator from T k ( x ) × T j ( y ) to C ( λ ) k ( x ) × C ( µ ) ( y ) takes the form j S 0 � λ F S � 0 � µ where S 0 � λ := S λ � 1 · · · S 0 is the 1D conversion operator, defined in terms of S λ that convert a C ( λ ) series to a C ( λ +1) series 24
25
26
1 0 0 0 … 1 0 0 0 … 0 0 0 0 - 2 1 1 0 0 0 0 0 … Å 4 3 6 0 0 4 0 0 0 … 0 0 0 0 Å - 2 1 0 0 … 1 - 3 1 0 0 0 0 0 … 0 0 0 6 0 0 … 4 0 0 0 3 6 Å 4 8 8 - 3 1 .F. 0 0 … .F. 0 0 0 0 8 0 … 1 - 4 1 0 6 0 0 = + 0 0 0 0 0 … Å 8 8 15 6 10 0 0 0 0 0 10 … 0 0 8 0 Å 1 - 4 0 0 … 1 - 5 1 0 0 0 0 0 … 15 0 0 0 10 Å 6 Å Å Å Å Å Å Å 24 8 12 1 - 5 0 0 … … … … … Å Å Å Å Å Å Å Å Å Å 24 8 Å Å Å Å Å 27
Boundary conditions 28
� ���������������������������������������������� � ������������ ���������������������� �������������� u ( − 1 , y ) = g 1 ( y ) , u (1 , y ) = g 2 ( y ) u ( x, − 1) = h 1 ( x ) , u ( x, 1) = h 2 ( x ) ∆ u ( x, y ) = f ( x, y ) � ��������������������������������������������������� u 29
� ������ � � T 0 ( y ) T 1 ( y ) u ( x, y ) = ( T 0 ( x ) , T 1 ( x ) , . . . ) U � � � . � . . � ������������ � � T 0 ( y ) � � � � u ( − 1 , y ) T 0 ( − 1) T 1 ( − 1) . . . T 1 ( y ) = U � � u (1 , y ) T 0 (1) T 1 (1) . . . � . � . . � T ( y ) � 30
� ������ � � T 0 ( y ) T 1 ( y ) u ( x, y ) = ( T 0 ( x ) , T 1 ( x ) , . . . ) U � � � . � . . � ������������ � � T 0 ( y ) � � � � u ( − 1 , y ) T 0 ( − 1) T 1 ( − 1) . . . T 1 ( y ) = U � � u (1 , y ) T 0 (1) T 1 (1) . . . � . � . . � � T 0 ( y ) � � 1 − 1 . . . T 1 ( y ) = U � � 1 1 . . . � . � . . � � T 0 ( y ) T 1 ( y ) =: B U � � � . � . . 31
� ������������������ � u ( − 1 , y ) � � g 1 ( y ) � = u (1 , y ) g 2 ( y ) ������� B U = G � ����� G = (ˇ g 1 , ˇ g 2 ) � � ˇ ˇ g 10 g 20 ˇ ˇ g 11 g 21 = � � . . � � . . . . 32
� ���������� ������������� � u ( x, − 1) � � h 1 ( x ) � = u ( x, 1) h 2 ( x ) ������� U B � = H ����� � ˇ h 1 , ˇ � H = h 2 ˇ ˇ � � h 10 h 20 ˇ ˇ h 11 h 21 = � � � � . . . . . . 33
� ��������������� ���������������������� u ( − 1 , y ) = g 1 ( y ) , u (1 , y ) = g 2 ( y ) u ( x, − 1) = h 1 ( x ) , u ( x, 1) = h 2 ( x ) ∂ 2 u ∂ x 2 + ∂ 2 u ∂ y 2 = f ( x, y ) ������� B U = G � , U B � = H, D 2 U S � 0 � 2 + S 0 � 2 U D � = F 2 34
� ���������������� ������������������������ u ( − 1 , y ) = g 1 ( y ) , u (1 , y ) = g 2 ( y ) u ( x, − 1) = h 1 ( x ) , u ( x, 1) = h 2 ( x ) ∂ 2 u ∂ x 2 + ∂ 2 u ∂ y 2 + k 2 u = f ( x, y ) ������� B U = G � , U B � = H, D 2 + k 2 S � U S � 0 � 2 + S 0 � 2 U D � � � = F 0 � 2 2 35
Sylvester matrix equations 36
Recommend
More recommend