Escolar Documentos
Profissional Documentos
Cultura Documentos
𝑀2 𝑠𝑖𝑛2 (𝐵) − 1
𝑓(𝐵) = 2 cot(𝐵) − tan(𝜃)
𝑀2 (𝛾 + cos(2𝐵)) + 2
When 𝛾 = 1.4, f(B) = 0 and 𝜃 = 0, tan(𝜃) = 0 and hence the equation become:
𝑀2 𝑠𝑖𝑛2 (𝐵) − 1
2 cot(𝐵) =0
𝑀2 (1.4 + cos(2𝐵)) + 2
cos(𝐵) 𝑀2 𝑠𝑖𝑛2 (𝐵) − 1
2( ) 2 =0
sin(𝐵) 𝑀 (1.4 + cos(2𝐵)) + 2
cos(𝐵)
To make sin(𝐵) valid, sin(𝐵) must not equal to zero, hence B ≠ 0.
𝑀 2 𝑠𝑖𝑛2 (𝐵)−1
To make 𝑀2 (1.4+cos(2𝐵))+2 valid,𝑀2 (1.4 + cos(2𝐵)) + 2 must not equal to zero.
𝑀2 (1.4 + cos(2𝐵)) + 2 ≠ 0
2
(1.4 + cos(2𝐵)) ≠ −
𝑀2
1 2
𝐵 ≠ 𝑐𝑜𝑠 −1 (− 2 − 1.4)
2 𝑀
Hence, we can deduce that either cos(𝐵) = 0, in which 𝐵1 = 90.
1
Or, 𝑀2 𝑠𝑖𝑛2 (𝐵) − 1 = 0, in which 𝐵2 = arcsin(𝑀).
1
Logically, 𝐵1 = 𝐵𝐿 while 𝐵2 = 𝐵𝑈 since arcsin(𝑀) < 90.
Question 2.2
From graph above, we can deduce that the amplitude of f(𝐵𝑈 ) and f(𝐵𝐿 ) increases as M
increases while overall values of f(𝐵𝑈 ) and f(𝐵𝐿 ) decreases as 𝜃 increases. The approximate value of
𝜃𝑚𝑎𝑥 is 10 degree when M = 1.5 and 30 degree when M = 5.0.
Question 2.3
(a) The appropriate initial guess for 𝐵𝐿 = 35 and 𝐵𝑈 = 90. The outcome of C program
implementation is shown as below:
(b) According to output shown on appendix section, the output points are being plotted using
excel as shown below:
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
(c)
Theta Versus Beta Diagram For M=1.5
beta_lower beta_ upper
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
Theta Versus Beta Diagram For M=4.0
beta_lower beta_ upper
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
Theta Versus Beta Diagram For M=8.0
beta_lower beta_ upper
100
90
80
70
60
Beta(Ѳ)
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40 45
Theta(Ѳ)
Question 3
a1 b1 0 0 0 x1 Q1
c2 a2 b2 0 0 x Q
2 2
0 c3 a3 b3 x3 Q3
=
0 0 c N 1 a N 1 bN 1
0 0 0 cN a N x N QN
𝑐
To eliminate 𝑐2 at 2nd row, first we multiply first row by 𝑎2 so that 𝑎1 can become 𝑐2 as shown below:
1
𝑏1 𝑐2 𝑐2
(𝑐2 𝑥1 + 𝑥2 + 0 + 0 + ⋯) = 𝑄1
𝑎1 𝑎1
Next, we can eliminate 𝑐2 at 2nd row by minus with modified first row equation as shown below:
𝑏1 𝑐2 𝑐2
((𝑐2 − 𝑐2 )𝑥1 + (𝑎2 − ) 𝑥2 + 0 + 0 + ⋯) = (𝑄2 − 𝑄1 )
𝑎1 𝑎1
Similarly, we can eliminate 𝑐3 at 3rd row by minus with modified second row equation as shown
below:
𝑏2 𝑐3 𝑐3
(0 + (𝑐3 − 𝑐3 )𝑥2 + (𝑎3 − ) 𝑥3 + 0 + 0 + ⋯) = (𝑄3 − 𝑄2̇ )
𝑎̇ 2 𝑎̇ 2
𝑏1 𝑐2
In which 𝑎̇ 2 refers to modified 𝑎2 value (𝑎2 − 𝑎1
) as shown on modified first row equation above
𝑐
while 𝑄2̇ refers to modified 𝑄2 value (𝑄2 − 𝑄1 𝑎2 ) as shown on modified first row equation above.
1
Hence, since first row 𝑎1 and 𝑄1 are unaltered, we can conclude that
Question 4
1
a x
2
x xy
b N y
x
a 1 N x xy
b
x 2 N x x x x 2 y
a 1 N xy x y
b
x N x x x xy x 2 y
2
N xy x y
a
x 2
N x x
x 2
N (x N )2 x ( x) N 2 2
_ _ _ _ _ _ _ _ _ _
a
xy x y N x y N x y N xy y( x) x( y) x y N (*)
_ _ _ _
x 2( x) N ( x) N
2
x 2 x ( x ) ( x ) N
2 2 2 2
Since ∑xy + 𝑥̅ 𝑦̅𝑁 can be rewritten as ∑(xy + 𝑥̅ 𝑦̅) while ∑𝑥 2 + 𝑥̅ 2 𝑁 can be rewritten as ∑(𝑥 2 + 𝑥̅ 2 ) ,
_ _ _ _ _ _
a
( xy x y) y( x) x( y)
( x x)( y y)
_ _ _
(x 2
( x ) ) 2 x ( x )
2
( x x) 2
_ _ _
Introduce summation and subtraction of ( x) 2 y N 2 in numerator and elaborate ( x) 2 N 2 in
denominator:
_ _ _ _ _ _ _ _ _ _ _ _ _ _
b
x 2 y N x N xy
x 2 y N 2( x) 2 y N 2 ( x) 2 y N 2 x N xy ( x) 2 y N 2 ( x) 2 y N 2 ( x) 2 y N 2
_ _ _
x 2
N ( x) N 2 2
N ( x 2 2( x) 2 N ( x) 2 N )
∑𝑥 ∑𝑦
Selectively substitute 𝑥̅ = 𝑁
and 𝑦̅ = 𝑁
into numerator:
x y 2 x y x ( x) N y x xy x
_ _ _ _ _ _
y x y x x y N x
2 2 2
b _ _
N ( x 2( x) N ( x) N ) 2 2 2
x y 2 x y x ( x) N y x xy x
_ _ _ _ _ _
y x y x x y N x
2 2 2
b _ _
N ( x 2( x)( x) ( x) N ) 2 2
_ _ _ _
b
y xy x y y x x y N x
_ _
N x 2 x x ( x) N N 2 2
_ _ _ _
xy x y y x x y N _
_
b y _ _ x
x 2 2 x x ( x) 2 N
_ _
b y a x
in which a is derived from equation (*) on previous page in steps of proving expression ‘a’.
Question 5
Substitute points, x1, x2, x3, y1, y2, y3 into equation above:
3 33 47
𝑓(5) = − (5)2 + (5) +
7 7 7
𝑓(5) = 19.5714
Cubic spline line is apparently smoother than Lagrange interpolation line so it is considered less error
in terms of interpolating datapoints, meanwhile Lagrange interpolation line emphasise more on
interpolating tighter intervals which results in better accuracy.
Question 6
The constraints for investigating the influence of variables such as spatial resolution (Nx), temporal
resolution (Nt) and time integration type are being listed as below:
𝑥𝑡𝑜𝑡𝑎𝑙 𝑡𝑡𝑜𝑡𝑎𝑙
Since ∆𝑥 = 𝑁𝑥
and ∆𝑡 = 𝑁𝑡
, we can substitute ∆𝑥 and ∆𝑡 into equation statement below:
𝜇×∆𝑡
≤ 𝐷𝑖𝑓𝑓𝑢𝑠𝑖𝑜𝑛𝑛𝑢𝑚𝑏𝑒𝑟
(∆𝑥)2
𝜇×𝑡𝑡𝑜𝑡𝑎𝑙 𝑥 2 ×𝐷𝑖𝑓𝑓𝑢𝑠𝑖𝑜𝑛𝑛𝑢𝑚𝑏𝑒𝑟
≤ 𝑡𝑜𝑡𝑎𝑙
𝑁𝑡 𝑁𝑥 2
0.01 × 𝑁𝑥 2
≤ 𝑁𝑡
𝐷𝑖𝑓𝑓𝑢𝑠𝑖𝑜𝑛𝑛𝑢𝑚𝑏𝑒𝑟
Setting 𝑁𝑥𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 and 𝑁𝑡𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 as grid-independent reference solution:
0.01×10002
Since 𝑁𝑥𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 is set to be 1000, 𝑁𝑡𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = = 10000
0.1
Explicit fixed end interpolation at various Nx values (Nt is constant at 100) and time step = 100th :
0
0 0.2 0.4 0.6 0.8 1 1.2
-2E+252
-4E+252
-6E+252
-8E+252
-1E+253
-1.2E+253
-1.4E+253
Explicit variable end interpolation at various Nx values (Nt is constant at 100) and time step = 100th :
Nx=100 Nx=200 Nx=400 Nx=800 reference line
0
0 0.2 0.4 0.6 0.8 1 1.2
-2E+252
-4E+252
-6E+252
-8E+252
-1E+253
-1.2E+253
-1.4E+253
Implicit fixed end interpolation at various Nx values (Nt is constant at 100) and time step = 100th:
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0 0.2 0.4 0.6 0.8 1 1.2
To summarise, implicit fixed end interpolation owns greater accuracy in predicting the solution of heat
equation in comparison with explicit fixed end interpolation and explicit variable end interpolation.
There is no significant difference shown in increasing ∆𝑥 resolution for all interpolation methods.
Appendix
References: