StudentA

National Taiwan University
Meshless Methods for Scientific Computing
(Advisor: C.S. Chen, D.L. Young)
Assignment 2
Department: Mechanical Engineering
Student: Kai-Nung Cheng
SID: D99522016
Date: Oct. 16, 2011
1. Problem Description
The partial differential equation (P.D.E) is defined as follows:
โˆ†u โˆ’ ๐‘ฅ 2 y
๐œ•๐‘ข
= ๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ โˆ’ ๐‘ฅ 2 ๐‘ฆ๐‘’ ๐‘ฅ , (๐‘ฅ, ๐‘ฆ) โˆˆ ฮฉ
๐œ•๐‘ฅ
(1)
u = ๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ , (๐‘ฅ, ๐‘ฆ) โˆˆ โˆ‚ฮฉ๐ท
(2)
๐œ•๐‘ข
= (โˆ‡(๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ )) โˆ™ ๐’, (๐‘ฅ, ๐‘ฆ) โˆˆ โˆ‚ฮฉ๐‘
๐œ•๐‘›
(3)
Figure 1 Amoeba shape domain with the mixed boundary conditions
The computation domain is defined as an Amoeba shape shown in Figure 1. This
domain has the mixed bound conditions, i.e. โˆ‚ฮฉ๐ท is Dirichlet boundary above the
x-axis and โˆ‚ฮฉ๐‘ is Neumann boundary below the x-axis, and the exact solution of Eq.
ฬ…
(1) to (3) is u = ๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ for all (๐‘ฅ, ๐‘ฆ) โˆˆ ฮฉ
โˆ‚ฮฉ = *(๐‘Ÿ๐‘๐‘œ๐‘ ๐œƒ, ๐‘Ÿ๐‘ ๐‘–๐‘›๐œƒ)+ : ๐‘Ÿ = ๐‘’ ๐‘ ๐‘–๐‘›๐œƒ (๐‘ ๐‘–๐‘›2 2๐œƒ) + ๐‘’ ๐‘๐‘œ๐‘ ๐œƒ (๐‘๐‘œ๐‘  2 2๐œƒ)
In this assignment, Kansaโ€™s method is used to solve this P.D.E with the following
ways:
(1) Using IMQ-RBF 1/โˆš๐‘Ÿ 2 + ๐‘ 2 .
(2) Using 100 boundary points and 200, 300 and 400 uniformly distributed interior
points respectively and show the best accurate solution with the optimal c.
(3) Using another 120 points inside the domain to test error.
1
2. Numerical Algorithm
Using Kansaโ€™s method to solve Eq. (1) to (3), it can assume the approximate solution
of ๐‘ขฬ‚(๐‘ฅ, ๐‘ฆ) which is the form of IMQ-RBF expressed as follows:
๐‘›
๐‘ขฬ‚(๐‘ฅ, ๐‘ฆ) = โˆ‘ ๐‘Ž๐‘– .1/โˆš๐‘Ÿ 2 + ๐‘ 2 /
(4)
๐‘–=1
where c is the shape parameter of IMQ. Then, Eq. (4) substituting the terms of Eq. (1)
to (3) is easy to construct a linear matrix system expressed as follows: (i.e. Eq. (5))
๐‘Ž๐‘–
๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ โˆ’ ๐‘ฅ 2 ๐‘ฆ๐‘’ ๐‘ฅ
โ‹ฎ
โˆ‘ .๐‘Ÿ โˆ’ 2๐‘
+
โˆ’ ๐‘ฅ ๐‘ฆ (โˆ’
) , 1 โ‰ฆ ๐‘— โ‰ฆ ๐‘›๐‘–
โ‹ฎ
โˆš(๐‘Ÿ 2 + ๐‘ 2 )3
๐‘–=1
๐‘›
โ‹ฎ
โ‹ฎ =
โˆ‘ .1/โˆš๐‘Ÿ 2 + ๐‘ 2 / , 1 โ‰ฆ ๐‘— โ‰ฆ ๐‘›๐‘๐ท
๐‘’ ๐‘ฅ + ๐‘’๐‘ฆ
โ‹ฎ
๐‘–=1
๐‘›
โ‹ฎ
๐œ•๐‘ฅ
๐œ•๐‘ฆ
2
2
3
2
2
3
โˆ‘ .โˆ’(๐‘ฅ๐‘— โˆ’ ๐‘ฅ๐‘– )/โˆš(๐‘Ÿ + ๐‘ ) /
+ .โˆ’(๐‘ฆ๐‘— โˆ’ ๐‘ฆ๐‘– )/โˆš(๐‘Ÿ + ๐‘ ) / , 1 โ‰ฆ ๐‘— โ‰ฆ ๐‘›๐‘๐‘ โ‹ฎ
(โˆ‡(๐‘’ ๐‘ฅ + ๐‘’ ๐‘ฆ )) โˆ™ ๐’
๐œ•๐‘›
๐œ•๐‘›
[ ๐‘–=1
] [๐‘Ž๐‘› ] [
]
๐‘›
2
2
/โˆš(๐‘Ÿ 2
๐‘ 2 )5 /
2
(๐‘ฅ๐‘— โˆ’ ๐‘ฅ๐‘– )
From Eq. (5), n is the number of given collocation points in the domain, and which
contains ๐‘›๐‘– interior points and ๐‘›๐‘ boundary points. As Figure 1, ๐‘›๐‘๐ท and ๐‘›๐‘๐‘ are
the numbers of Dirichlet and Neumann boundary points respectively, and ๐‘›๐‘ = ๐‘›๐‘๐ท +
๐‘›๐‘๐‘ . In this assignment, 100 equidistant points are required for the boundary of
Amoeba shape, and 200, 300 and 400 uniformly distributed interior points are used
within in the domain respectively. All collocation points are generated automatically by
the programs, โ€œrandInteriorNode.exeโ€ and โ€œUniformBoundaryNode V2.exeโ€.
Hence, solving Eq. (5) with giving different parameter c which can obtain the unknown
,๐‘Ž๐‘– -, then, the approximate solution ๐‘ขฬ‚(๐‘ฅ, ๐‘ฆ) can be calculated by Eq. (4) with a known
,๐‘Ž๐‘– -. In this assignment, the optimal c is determined respectively under three cases
mentioned above by calculating the RMS-error between the exact and approximate
solutions of 120 test points within the domain. The RMS-error is defined as follows:
๐‘›๐‘ก
2
1
RMS. error = โˆš โˆ‘ .u๐‘— (๐‘ฅ, ๐‘ฆ) โˆ’ ๐‘ขฬ‚๐‘— (๐‘ฅ, ๐‘ฆ)/
๐‘›๐‘ก
๐‘—=1
2
(6)
3. Numerical Results
Three cases giving the different collocation point conditions for Amoeba shape
domain to solve the P.D.E are shown in Figure 2, i.e. n = 100 boundary points + 200
interior points, 100 boundary points + 300 interior points and 100 boundary points +
400 interior points. All point data of these cases are substituted for Eq. (5) with an
arbitrary shape parameter c (using try-and-error) to find ,๐‘Ž๐‘– -, then the best accurate
solution of uฬ‚(๐‘ฅ, ๐‘ฆ) can be determined by searching the optimal c against the
minimum RMS-error on the curves, i.e. RMS-error vs. variable c. The test results
obtained from 120 test points within the domain in each case are shown in Figure 3.
2
2
1.5
1.5
1
1
0.5
0.5
0
0
-0.5
-0.5
-1
-1
-1.5
-2
-1
0
1
2
-1.5
-2
3
-1
0
2
1.5
1
0.5
0
-0.5
-1
-1
2
3
n = 100 boundary points + 300 interior points
n = 100 boundary points + 200 interior points
-1.5
-2
1
0
1
2
3
n = 100 boundary points + 400 interior points
Figure 2 Given collocation points for Amoeba shape domain
3
-1
-2
10
10
-2
10
-3
10
RMS-error
RMS-error
-3
10
-4
10
-4
10
-5
10
-6
-5
10
0
1
2
3
4
10
5
1
2
3
4
5
c
c
n = 100 boundary points + 300 interior points
n = 100 boundary points + 200 interior points
-2
10
-3
RMS-error
10
-4
10
-5
10
0
1
2
3
4
5
c
n = 100 boundary points + 400 interior points
Figure 3 Preliminary results of RMS-error vs. c (IMQ-RBF)
As Figure 3, it is clear to know that the maximum RMS-error keeps decreasing while c
is increasing and below a critical value, i.e. 1 < c < 3, which depends on the different
cases, whereas the maximum RMS-error rises rapidly and is unstable when c is over
this critical value. Therefore, the optimal c and related minimum RMS-error in each
case can be roughly found by checking this curve, and they are summarized in Table
1.
4
Table 1 Preliminary results of c vs. RMS-error
collocation points n
Boundary points ๐‘›๐‘
100
IMQ-RBF
Interior points ๐‘›๐‘–
c
RMS-error
200
2.4
2.4629e-05
300
1.8
5.3671e-06
400
1.6
1.8062e-05
Checking the results from Figure 3, the shape parameter c is found only using a few
points in the x-axis, so it may be not the best solution in each case. For obtaining the
more accurate results of c, it is necessary to re-solve Eq. (5) by substituting a set of
high accurate c value which is close to the previous results of Table 1. Then, the new c
result is found in each case which is shown in Figure 4 and summarized in Table 2. As
a result, the optimal c depends on how many interior points are used for the IMQ-RBF
because c is unstable when it is over a critical value which is verified in Figure 4.
Hence, it is very hard to choose the unique optimal c for each case. The optimal c
must be determined after the number of interior and boundary points are given for the
IMQ-RBF. For example, the optimal c is around 1.975 leading to the best accurate
solution of uฬ‚(๐‘ฅ, ๐‘ฆ) which only have the maximum RMS-error (2.2134e-06) compared
with the exact solution, u(๐‘ฅ, ๐‘ฆ), but this c is not the best for other cases.
5
0
0
10
-1
10
-2
10
10
-1
10
-2
RMS-error
-3
10
-3
10
-4
-4
10
-5
10
10
-5
10
-6
-6
10
1
1.5
2
c
2.5
10
3
1
1.5
2
c
2.5
0
10
-1
10
-2
10
-3
10
-4
10
-5
10
-6
10
1
1.5
2
c
2.5
3
n = 100 boundary points + 400 interior points
Figure 4 Accurate results of RMS-error vs. c (IMQ-RBF)
Table 2 Accurate results of c vs. RMS-error
collocation points n
Boundary points ๐‘›๐‘
100
3
n = 100 boundary points + 300 interior points
n = 100 boundary points + 200 interior points
RMS-error
RMS-error
10
IMQ-RBF
Interior points ๐‘›๐‘–
c
RMS-error
200
1.732
2.5887e-06
300
1.975
2.2134e-06
400
1.732
5.8874e-06
6
4. Conclusions
In this assignment, the P.D.E with the mixed boundary conditions (Amoeba shape
domain) given in Section 1 is completely solved using Kansaโ€™s method with the
specific ways (i.e. using IMQ-RBF and different collocation point conditions). The
approximate solution uฬ‚(๐‘ฅ, ๐‘ฆ) is defined as Eq. (5), and the optimal c of IMQ-RBF is
determined for it described in Section 3. From the results, some conclusions are
summarized as follows:
(1) Using Kansaโ€™s method is easy to solve the P.D.E as the conditions of domain and
boundary are known.
(2) Using Kansaโ€™s method to solve the P.D.E can obtain the high accurate solution as
only a few collocation points n are used for IMQ-RBF. For example, n = 100
boundary points + 200 interior points, the condition gives the approximate solution
the maximum RMS-error (2.5887e-06) using the optimal c (1.732). it is described
in Table 2.
(3) The optimal c must be determined depending on how many collocation points are
used for the IMQ-RBF. Checking the results of Figure 4, it is known that c is
unstable when it is over a critical value. Hence, it is very hard to choose the unique
optimal c for each case. For example, the optimal c is around 1.975 leading to the
best accurate solution of uฬ‚(๐‘ฅ, ๐‘ฆ) which only have the maximum RMS-error
(2.2134e-06) compared with the exact solution, u(๐‘ฅ, ๐‘ฆ), but this c is not the best
for other cases.
7