All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
In this exercise, we will derive the following 4th order approximation of the second-order derivative Central difference Skewed right-sided difference Skewed left-sided difference Derivation of the 4th order approximation of the second-order derivative: 1. Using the Central Difference Scheme: Total number of Nodes, N =…
Ravi Shankar Yadav
updated on 26 Dec 2021
In this exercise, we will derive the following 4th order approximation of the second-order derivative
Derivation of the 4th order approximation of the second-order derivative:
1. Using the Central Difference Scheme:
Total number of Nodes, N = 5
Order of derivative, Q = 2
Order of accuracy, P = N-Q+1 = 5-2+1
P = 4 ........(i)
For central difference scheme, numerical stencil looks like:
In this case, to compute the 4th order approximation at point (i), we will take information from the points (i-2), (i-1), (i+1), and (i+2).
From the above points, we start with this equation:
∂2u∂x2=af(i-2)+bf(i-1)+cf(i)+df(i+1)+ef(i+2)∂2u∂x2=af(i−2)+bf(i−1)+cf(i)+df(i+1)+ef(i+2) .........(1)
Now, to find the values (a, b, c, d, e), we will use the Taylor Table method. Also, we write each term of equation (1) as:
af(i-2)=a[f(i)-(2Δx)f′(i)1!+(2Δx)2f′′(i)2!-(2Δx)3f′′′(i)3!+(2Δx)4f′′′′(i)4!-(2Δx)5f′′′′′(i)5!+......]
bf(i-1)=b[f(i)-(Δx)f′(i)1!+(Δx)2f′′(i)2!-(Δx)3f′′′(i)3!+(Δx)4f′′′′(i)4!-(Δx)5f′′′′′(i)5!+......]
cf(i)=cf(i)
df(i+1)=d[f(i)+(Δx)f′(i)1!+(Δx)2f′′(i)2!+(Δx)3f′′′(i)3!+(Δx)4f′′′′(i)4!+(Δx)5f′′′′′(i)5!+......]
ef(i+2)=e[f(i)+(2Δx)f′(i)1!+(2Δx)2f′′(i)2!+(2Δx)3f′′′(i)3!+(2Δx)4f′′′′(i)4!+(2Δx)5f′′′′′(i)5!+......]
Arranging the above Taylor series expansion in Table, we get
Note: To get this table, we take one row, then take its coefficient term for the first column, from the second column onwards we multiple previous column term by:
(the numerical value from terms ((i-2), (i-1), etc.) at which we are writing Taylor series)/(power of Δx).
f(i) | Δxf′(i) | (Δx)2f′′(i) | (Δx)3f′′′(i) | (Δx)4f′′′′(i) | (Δx)5f′′′′′(i) | (Δx)6f′′′′′′(i) | |
af(i-2) | a | -2a | 4a2 | -8a6 | 16a24 | -32a120 | 64a720 |
bf(i-1) | b | -b | b2 | -b6 | b24 | -b120 | b720 |
cf(i) | c | 0 | 0 | 0 | 0 | 0 | 0 |
df(i+1) | d | d | d2 | d6 | d24 | d120 | d720 |
ef(i+2) | e | 2e | 4e2 | 8e6 | 16e24 | 32e120 | 64e720 |
∑(af(i-2)+bf(i-1)+cf(i)+df(i+1)+ef(i+2)) | 0 | 0 | 1 | 0 | 0 | ? | ? |
Note: As the above expansion is till 5 terms, so up to 5 terms we get sum. After that sum will be unknown.
Now, we have 5 unknowns and we get 5 equations.
a+b+c+d+e=0 ....(2)
-2a-b+0+d+2e=0 ....(3)
2a+b2+0+d2+2e=1 ....(4)
-8a6+-b6+0+d6+8e6=0 ....(5)
16a24+b24+0+d24+16e24=0 ....(6)
We will solve above equations using Matrix Inversion Method.
AX = B
X = inv(A)*B
[11111-2-10122120122-86-1601686162412401241624][abcde]=[00100]
We get coefficient as,
a = -0.0833, b = 1.333, c = -2.500, d = 1.333, e = -0.0833
Now, dividing the right side of equation (1) by (Deltax)^2) for putting the obtained values of (a, b, c, d, e), we get
∂2u∂x2=af(i-2)+bf(i-1)+cf(i)+ef(i+1)+df(i+2)(Δx)2 .......(A)
Now, putting these values in equation (A), we get
∂2u∂x2=(-0.0833)f(i-2)+(1.333)f(i-1)+(-2.500)f(i)+(1.333)f(i+1)+(-0.0833)f(i+2)(Δx)2
From our Taylor Table:
∂2u∂x2=(a+b+c+d+e)f(i)+(-2a-b+0+d+2e)(Δx)f′(i)+(2a+b2+0+d2+2e)(Δx)2f′′(i)+(-8a6+-b6+0+d6+8e6)(Δx)3f′′′(i)+(16a24+b24+0+d24+16e24)(Δx)4f′′′′(i)+(-32a120+-b120+0+d120+32e120)(Δx)5f′′′′′(i)+(64a720+b720+0+d720+64e720)(Δx)6f′′′′′′(i) ....(B)
Putting values from equations (2), (3), (4), (5), (6) into equation (B),
Note: First, second, fourth, and fifth terms are zero; we get the third term is 1; also on rearrangement we get the sixth term equal to zero.
∂2u∂x2=(2a+b2+0+d2+2e)(Δx)2f′′(i)+(64a720+b720+0+d720+64e720)(Δx)6f′′′′′′(i)
On dividing above equation by (Δx)2, we get
∂2u∂x2=(2a+b2+0+d2+2e)f′′(i)+(64a720+b720+0+d720+64e720)(Δx)4f′′′′(i)
The term with (Δx)4 denotes truncation error.
So, the order of the truncation error O(Δx4) is 4.
Also, from equation (i), we can verify this.
Finally, the equation is:
∂2u∂x2=(2(-0.0833)+1.3332+0+1.3332+2(-0.0833))f′′(i)+(64(-0.0833)720+1.333720+0+1.333720+64(-0.0833)720)(Δx)4f′′′′′′(i)
2. Using the Skewed Right-Sided Difference Scheme:
Total number of Nodes, N = 6
Order of derivative, Q = 2
Order of accuracy, P = N-Q = 6-2
P = 4 ........(i)
For skewed right-sided difference scheme, numerical stencil looks like this:
In this case, to compute the 4th order approximation at point (i), we will take information from the points (i+1), (i+2), (i+3), (i+4), and (i+5).
From the above points, we start with this equation:
∂2u∂x2=af(i)+bf(i+1)+cf(i+2)+df(i+3)+ef(i+4)+gf(i+5) ....(1)
Now, to find the values (a, b, c, d, e, f), we will use the Taylor Table method. Also, we write each term of equation (1) as:
af(i)=af(i)
bf(i+1)=b[f(i)+(Δx)f′(i)1!+(Δx)2f′′(i)2!+(Δx)3f′′′(i)3!+(Δx)4f′′′′(i)4!+(Δx)5f′′′′′(i)5!+(Δx)6f′′′′′′(i)6!+......]
cf(i+2)=c[f(i)+(2Δx)f′(i)1!+(2Δx)2f′′(i)2!+(2Δx)3f′′′(i)3!+(2Δx)4f′′′′(i)4!+(2Δx)5f′′′′′(i)5!+(2Δx)6f′′′′′′(i)6!+......]
df(i+3)=d[f(i)+(3Δx)f′(i)1!+(3Δx)2f′′(i)2!+(3Δx)3f′′′(i)3!+(3Δx)4f′′′′(i)4!+(3Δx)5f′′′′′(i)5!+(3Δx)6f′′′′′′(i)6!+......]
ef(i+4)=e[f(i)+(4Δx)f′(i)1!+(4Δx)2f′′(i)2!+(4Δx)3f′′′(i)3!+(4Δx)4f′′′′(i)4!+(4Δx)5f′′′′′(i)5!+(4Δx)6f′′′′′′(i)6!+......]
gf(i+5)=g[f(i)+(5Δx)f′(i)1!+(5Δx)2f′′(i)2!+(5Δx)3f′′′(i)3!+(5Δx)4f′′′′(i)4!+(5Δx)5f′′′′′(i)5!+(5Δx)6f′′′′′′(i)6!+......]
Arranging the above Taylor series expansion in Table, we get
Note: To get this table, we take one row, then take its coefficient term for the first column, from the second column onwards we multiple previous column term by:
(the numerical value from terms ((i+1), (i+2), etc.) at which we are writing Taylor series)/(power of Δx).
f(i) | Δxf′(i) | (Δx)2f′′(i) | (Δx)3f′′′(i) | (Δx)4f′′′′(i) | (Δx)5f′′′′′(i) | (Δx)6f′′′′′′(i) | |
af(i) | a | 0 | 0 | 0 | 0 | 0 | 0 |
bf(i+1) | b | b | b2 | b6 | b24 | b120 | b720 |
cf(i+2) | c | 2c | 4c2 | 8c6 | 16c24 | 32c120 | 64c720 |
df(i+3) | d | 3d | 9d2 | 27d6 | 81d24 | 243d120 | 729d720 |
ef(i+4) | e | 4e | 16e2 | 64e6 | 256e24 | 1024e120 | 4096e720 |
gf(i+5) | g | 5g | 25g2 | 125g6 | 625g24 | 3125g120 | 15625g720 |
∑(af(i)+bf(i+1)+cf(i+2)+df(i+3)+ef(i+4)+gf(i+5)) | 0 | 0 | 1 | 0 | 0 | 0 | ? |
Note: As the above expansion is till 6 terms, so up to 6 terms we get sum. After that sum will be unknown.
Now, we have 6 unknowns and we get 6 equations.
a+b+c+d+e+g=0 ....(2)
0+b+2c+3d+4e+5g=0 ....(3)
0+b2+2c+9d2+8e+25g2=1 ....(4)
0+b6+8c6+27d6+64e6+125g6=0 ....(5)
0+b24+16c24+81d24+256e24+625g24=0 ....(6)
0+b120+32c120+243d120+1024e120+3125g120=0 ....(7)
We will solve above equations using Matrix Inversion Method.
AX = B
X = inv(A)*B
[111111012345012292825201686276646125601241624812425624102424011203212024312010241203125120][abcdeg]=[001000]
We get coefficient as,
a = 3.7500, b = -12.833, c = 17.833, d = -13.000, e = 5.0833, g = -0.833
Now, dividing the right side of equation (1) (Deltax)^2) to put the obtained values of (a, b, c, d, e, g), we get
∂2u∂x2=af(i)+bf(i+1)+cf(i+2)+df(i+3)+ef(i+4)+gf(i+5)(Δx)2 .......(A)
Now, putting these values in equation (A), we get
∂2u∂x2=(3.7500)f(i)+(-12.833)f(i+1)+(17.833)f(i+2)+(-13.000)f(i+3)+(5.0833)f(i+4)+(-0.833)f(i+5)(Δx)2
From our Taylor Table:
∂2u∂x2=(a+b+c+d+e)f(i)+(0+b+2c+3d+4e+5g)(Δx)f′(i)+(0+b2+2c+9d2+8e+25g2)(Δx)2f′′(i)+(0+b6+8a6+27d6+64e6+125g6)(Δx)3f′′′(i)+(0+b24+16c24+81d24+256e24625g24)(Δx)4f′′′′(i)+(0+b120+32c120+243d120+1024e120+3125g120)(Δx)5f′′′′′(i)+(0+b720+64c720+729d720+4096e720+15625g720)(Δx)6f′′′′′′(i) ....(B)
Putting values from equations (2), (3), (4), (5), (6), (7) into equation (B),
Note: First, second, fourth, fifth, and sixth terms are zero; we get the third term is 1.
∂2u∂x2=(0+b2+2c+9d2+8e+25g2)(Δx)2f′′(i)+((0+b720+64c720+729d720+4096e720+15625g720)(Δx)6f′′′′′′(i)
On dividing above equation by (Δx)2, we get
∂2u∂x2=(0+b2+2c+9d2+8e+25g2)f′′(i)+(0+b720+64c720+729d720+4096e720+15625g720)(Δx)4f′′′′(i)
The term with (Δx)4 denotes truncation error.
So, the order of the truncation error O(Δx4) is 4.
Also, from equation (i), we can verify this.
Finally, the equation is:
∂2u∂x2=(0+-12.8332+2(17.833)+9(-13.000)2+8(5.0833)+25(-0.833)2)f′′(i)+(0+-12.833720+64(17.833)720+729(-13.00)720+4096(5.0833)720+15625(-0.833)720)(Δx)4f′′′′
3. Using the Skewed Left-Sided Difference Scheme:
Total number of Nodes, N = 6
Order of derivative, Q = 2
Order of accuracy, P = N-Q = 6-2
P = 4 ........(i)
For skewed left-sided difference scheme, numerical stencil looks like this:
In this case, to compute the 4th order approximation at point (i), we will take information from the points (i-5), (i-4), (i-3), (i-2), and (i-1).
From the above points, we start with this equation:
∂2u∂x2=af(i-5)+bf(i-4)+cf(i-3)+df(i-2)+ef(i-1)+gf(i) ....(1)
Now, to find the values (a, b, c, d, e, f), we will use the Taylor Table method. Also, we write each term of equation (1) as:
af(i-5)=a[f(i)-(5Δx)f′(i)1!+(5Δx)2f′′(i)2!-(5Δx)3f′′′(i)3!+(5Δx)4f′′′′(i)4!-(5Δx)5f′′′′′(i)5!+(5Δx)6f′′′′′′(i)6!-......]
bf(i-4)=b[f(i)-(4Δx)f′(i)1!+(4Δx)2f′′(i)2!-(4Δx)3f′′′(i)3!+(4Δx)4f′′′′(i)4!-(4Δx)5f′′′′′(i)5!+(4Δx)6f′′′′′′(i)6!-......]
cf(i-3)=c[f(i)-(3Δx)f′(i)1!+(3Δx)2f′′(i)2!-(3Δx)3f′′′(i)3!+(3Δx)4f′′′′(i)4!-(3Δx)5f′′′′′(i)5!+(3Δx)6f′′′′′′(i)6!-......]
df(i-2)=d[f(i)-(2Δx)f′(i)1!+(2Δx)2f′′(i)2!-(2Δx)3f′′′(i)3!+(2Δx)4f′′′′(i)4!-(2Δx)5f′′′′′(i)5!+(2Δx)6f′′′′′′(i)6!-......]
ef(i-1)=e[f(i)-(Δx)f′(i)1!+(Δx)2f′′(i)2!-(Δx)3f′′′(i)3!+(Δx)4f′′′′(i)4!-(Δx)5f′′′′′(i)5!+(Δx)6f′′′′′′(i)6!-......]
gf(i)=gf(i)
Arranging the above Taylor series expansion in Table, we get
Note: To get this table, we take one row, then take its coefficient term for the first column, from the second column onwards we multiple previous column term by:
(the numerical value from terms ((i-1), (i-2), etc.) at which we are writing Taylor series)/(power of Δx).
f(i) | Δxf′(i) | (Δx)2f′′(i) | (Δx)3f′′′(i) | (Δx)4f′′′′(i) | (Δx)5f′′′′′(i) | (Δx)6f′′′′′′(i) | |
af(i-5) | a | -5a | 25a2 | -125a6 | 625a24 | -3125a120 | 15625a720 |
bf(i-4) | b | -4b | 8b | -64b6 | 256b24 | -1024b120 | 4096b720 |
cf(i-3) | c | -3c | 9c2 | -27c6 | 81c24 | -243c120 | 729c720 |
df(i-2) | d | -2d | 2d | -8d6 | 16d24 | -32d120 | 64d720 |
ef(i-1) | e | -e | e2 | -e6 | e24 | -e120 | -e720 |
gf(i) | g | 0 | 0 | 0 | 0 | 0 | 0 |
∑(af(i-5)+bf(i-4)+cf(i-3)+df(i-2)+ef(i-1)+gf(i)) | 0 | 0 | 1 | 0 | 0 | 0 | ? |
Note: As the above expansion is till 6 terms, so up to 6 terms we get sum. After that sum will be unknown.
Now, we have 6 unknowns and we get 6 equations.
a+b+c+d+e+g=0 ....(2)
-5a-4b-3c-2d-e+0=0 ....(3)
25a2+8b+9c2+2d+e2+0=1 ....(4)
-125a6+-64b6+-27c6+-8d6+-e6+0=0 ....(5)
625a24+256b24+81c24+16d24+e24+0=0 ....(6)
-3125120+-1024b120+-243c120+-32d120+-e120+0=0 ....(7)
We will solve above equations using Matrix Inversion Method.
AX = B
X = inv(A)*B
[111111-5-4-3-2-1025282922120-1256-646-276-86-1606252425624812416241240-3125120-1024120-243120-32120-11200][abcdeg]=[001000]
We get coefficient as,
a = -0.833, b = 5.0833, c = 13.000, d = 17.833, e = -12.833, g = 3.7500
Now, dividing the right side of equation (1) (Deltax)^2) to put the obtained values of (a, b, c, d, e, g), we get
∂2u∂x2=af(i-5)+bf(i-4)+cf(i-3)+df(i-2)+ef(i-1)+gf(i)(Δx)2 .......(A)
Now, putting these values in equation (A), we get
∂2u∂x2=(-0.833)f(i-5)+(5.0833)f(i-4)+(-13.000)f(i-3)+(17.8333)f(i-2)+(-12.833)f(i-1)+(3.750)f(i)(Δx)2
From our Taylor Table:
∂2u∂x2=(a+b+c+d+e)f(i)+(-5a-4b-3c-2d-e+0)(Δx)f′(i)+(25a2+8b+9c2+2d+e2+0)(Δx)2f′′(i)+(-125a6+-64b6+-27c6+-8d6+-e6+0)(Δx)3f′′′(i)+(625a24+256b24+81c24+16d24+e24+0)(Δx)4f′′′′(i)+(-3125120+-1024b120+-243c120+-32d120+-e120+0)(Δx)5f′′′′′(i)+(15625a720+4096b720+729c720+64d720+e720+0)(Δx)6f′′′′′′(i) ....(B)
Putting values from equations (2), (3), (4), (5), (6), (7) into equation (B),
Note: First, second, fourth, fifth, and sixth terms are zero; we get the third term is 1.
∂2u∂x2=(25a2+8b+9c2+2d+e2+0)(Δx)2f′′(i)+(15625a720+4096b720+729c720+64d720+e720+0)(Δx)6f′′′′′′(i)
On dividing above equation by (Δx)2, we get
∂2u∂x2=(25a2+8b+9c2+2d+e2+0)(Δx)2f′′(i)+(15625a720+4096b720+729c720+64d720+e720+0)(Δx)4f′′′′(i)
The term with (Δx)4 denotes truncation error.
So, the order of the truncation error O(Δx4) is 4.
Also, from equation (i), we can verify this.
Finally, the equation is:
∂2u∂x2=(25(-0.833)2+8(5.0833)+9(-13.000)2+2(17.833)+(-12.833)+0)f′′(i)+(15625(-0.0833)720+4096(5.0833)720+729(-13.000)720+64(17.833)720+-12.833720+0)(Δx)4f′′′′
MATLAB:
Program in MATLAB to evaluate the second-order derivative of the analytical function excos(x) and compare it with the 3 numerical approximations that we have derived above.
Function calling for Central Differencing:
% Function for 4th order approximation of the second derivative
% Using central difference scheme
function error_central_differencing = central_differencing_fourth_order_approximation(x, dx)
% Analytical function f(x) = exp(x)*cos(x);
% second derivative f''(x) = -2*exp(x)*sin(x);
analytical_derivative = -2*exp(x)*sin(x);
% Values of all coefficients oobatained using Taylor Method
a = -0.0833;
b = 1.333;
c = -2.500;
d = 1.333;
e = -0.0833;
% Numerical Derivative using central differencing
% ((a*f(x-(2*dx)))+(b*f(x-(1*dx)))+(c*f(x))+(d*f(x+(1*dx)))+(e*f(x+(2*dx))));
central_differencing = ((a*exp(x-(2*dx))*cos(x-(2*dx)))+(b*exp(x-(1*dx))*cos(x-(1*dx)))+(c*exp(x)*cos(x))+(d*exp(x+(1*dx))*cos(x+(1*dx)))+(e*exp(x+(2*dx))*cos(x+(2*dx))));
% Error
error_central_differencing = abs(central_differencing-analytical_derivative);
end
Function calling for Skewed Right-Sided Differencing:
% Function for 4th order approximation of the second derivative
% Using skewed right-sided difference scheme
function error_skewed_right_sided_differencing = right_sided_differencing_fourth_order_approximation(x, dx)
% Analytical function f(x) = exp(x)*cos(x);
% second derivative f''(x) = -2*exp(x)*sin(x);
analytical_derivative = -2*exp(x)*sin(x);
% Values of all coefficients oobatained using Taylor Method
a = 3.7500;
b = -12.833;
c = 17.833;
d = -13.000;
e = 5.0833;
g = -0.833;
% Numerical Derivative using skewed right sided differencing
% ((a*f(x))+(b*f(x+(1*dx)))+(c*f(x+(2*dx)))+(d*f(x+(3*dx)))+(e*f(x+(4*dx)))+(g*f(x+(5*dx))));
skewed_right_sided_differencing = ((a*exp(x)*cos(x))+(b*exp(x+(1*dx))*cos(x+(1*dx)))+(c*exp(x+(2*dx))*cos(x+(2*dx)))+(d*exp(x+(3*dx))*cos(x+(3*dx)))+(e*exp(x+(4*dx))*cos(x+(4*dx)))+(g*exp(x+(5*dx))*cos(x+(5*dx))));
% Error
error_skewed_right_sided_differencing = abs(skewed_right_sided_differencing-analytical_derivative);
end
Function calling for Skewed Left-Sided Differencing:
% Function for 4th order approximation of the second derivative
% Using skewed left-sided difference scheme
function error_skewed_left_sided_differencing = left_sided_differencing_fourth_order_approximation(x, dx)
% Analytical function f(x) = exp(x)*cos(x);
% second derivative f''(x) = -2*exp(x)*sin(x);
analytical_derivative = -2*exp(x)*sin(x);
% Values of all coefficients oobatained using Taylor Method
a = -0.833;
b = 5.0833;
c = -13.000;
d = 17.833;
e = -12.833;
g = 3.750;
% Numerical Derivative using skewed left sided differencing
% ((a*f(x-(5*dx)))+(b*f(x-(4*dx)))+(c*f(x-(3*dx)))+(d*f(x-(2*dx)))+(e*f(x-(1*dx)))+(g*f(x)));
skewed_left_sided_differencing = ((a*exp(x-(5*dx))*cos(x-(5*dx)))+(b*exp(x-(4*dx))*cos(x-(4*dx)))+(c*exp(x-(3*dx))*cos(x-(3*dx)))+(d*exp(x-(2*dx))*cos(x-(2*dx)))+(e*exp(x-(1*dx))*cos(x-(1*dx)))+(g*exp(x)*cos(x)));
% Error
error_skewed_left_sided_differencing = abs(skewed_left_sided_differencing-analytical_derivative);
end
Main Code:
% Calculating 4th order error of the second derivative using
% central differencing, skewed right-sided, skewed left-sided
clear all
close all
clc
% Function used here
% f(x) = exp(x)*cos(x);
% We will compute second derivative at x = pi/3 for dx in
% range [pi/4, pi/4000, 20]
x = pi/3;
dx = linspace(pi/4000, pi/4, 20);
% Analytical function: f(x) = exp(x)*cos(x)
% Analytical derivative: (df/dx) = -2*exp(x)*sin(x);
% we are declaaring variable i for for loop
for i = 1:length(dx)
% we will call central_differencing_fourth_order_approximation
central_differencing_error(i) = central_differencing_fourth_order_approximation(x, dx(i))
% we will call right_sided_differencing_fourth_order_approximation
skewed_right_side_error(i) = right_sided_differencing_fourth_order_approximation(x, dx(i))
% we will call left_sided_differencing_fourth_order_approximation
skewed_left_side_error(i) = left_sided_differencing_fourth_order_approximation(x, dx(i))
end
% plots
figure(1)
plot(dx, central_differencing_error, 'b', 'linewidth', 2)
hold on
plot(dx, skewed_right_side_error, 'r', 'linewidth', 2)
hold on
plot(dx, skewed_left_side_error, 'g', 'linewidth', 2)
grid on
xlabel('dx')
ylabel('Errors')
title('Range of dx vs error')
legend('central differencing error', 'skewed right side error', 'skewed left side error')
figure(2)
loglog(dx, central_differencing_error, 'b', 'linewidth', 2)
hold on
loglog(dx, skewed_right_side_error, 'r', 'linewidth', 2)
hold on
loglog(dx, skewed_left_side_error, 'g', 'linewidth', 2)
grid on
xlabel('dx')
ylabel('Errors')
legend('central differencing error', 'skewed right side error', 'skewed left side error')
Outputs:
Plots:
Conclusion:
On analysing the graph, we find that central difference approximation gives more accurate solution. Hence, giving less error than skewed right and skewed left difference schemes.
Why a skewed scheme is useful:
For systems having insufficient information on both side of the point of interest, we cannot use central difference approximation in solving. So for such problems Skewed scheme are more useful.
What can a skewed scheme do that a CD scheme cannot:
Central difference schemes cannot be used at the boundary nodes due to unavailability of right or left nodes at that time. So for such problems Skewed scheme are more useful.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week-11 : Discretization of 3D intake manifold using GEM-3D
Aim: Discretization of 3D intake manifold using GEM-3D Objective: 1. Tutorial- single cyl DI add case 2 with discretization length 0.1 mm for intake runner and compare with default case 1 Parameters-Torque, BSFC, max cylinder pressure simulation time 2. Explore tutorial no 2 (GEM3D) - “Building intake…
31 Aug 2022 05:57 AM IST
Week-7 : Converting a detailed engine model to a FRM model
Aim: Converting a detailed engine model to an FRM model. Objective: Explore tutorial number 9 and write a detailed report. Build FRM Model for the following configuration using the FRM builder approach. Bore 102 mm stroke 115 mm CR 17 No of cylinder 6 CI engine Twin Scroll Turbine GT Controller Run all cases…
30 Aug 2022 02:54 AM IST
Week-6 : Turbocharger Modelling
Aim: Turbocharger Modelling using GT POWER Objective: List down different TC and locate examples from GT Power Explore tutorial number 6 and 7 Plot operating points on compressor and turbine maps In which application Variable Geometry Turbine is beneficial? Explore example- Diesel VGT EGR and understand the modeling…
22 Aug 2022 10:30 AM IST
Week-4 : Basic Calibration of Single cylinder CI-Engine
Aim: Basic Calibration of Single cylinder CI-Engine Objective: 1. Compare SI vs CI and list down differences (assignment no 2-SI) 2. Comments on the following parameters BSFC Exhaust Temperature A/F ratios 3. Change MFB 50 and observe the impact on performance Comparison: SI vs CI S.No./Engine type …
15 Aug 2022 03:48 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.