You are on page 1of 6

AÑO: 2021 PERIODO: I Término 2021-2022

MATERIA: Matemática Aplicada a la Ingeniería PROFESORES:


EVALUACIÓN: Quiz 4 Dany De Cecchis

TIEMPO DE DURACIÓN: 80 minutos FECHA: 19 de agosto de 2021

Evaluation Answers

1. Type 1 (5 pts) For the mesh in Figure 1, calculate the potential (Laplace equation) for the four
inner points, using 4 steps of the Gauss-Seidel method (Liebmann), with the initial values
[100, 100, 100, 100] (show details of your work) if the boundary conditions are u(1, 0) = 60,
u(2, 0) = 300 and u = 100 on the other three sides.

Figure 1: The mesh of the problem discretization

Solution: We need to numerically approximate Laplace equation

∇2 u = uxx + uyy = 0.

Using the finite different scheme, we produce the following set of equations

ui,j−1 + ui−1,j − 4ui,j + ui+1,j + ui,j+1 = 0; i, j = 1, 2. (1)

The nodes lying in the boundary, i.e. they are known, pass to the right hand side. From
that, the set of equations are

P1,1 −4u1,1 +u2,1 +u1,2 = −u1,0 −u0,1


P2,1 u1,1 −4u2,1 +u2,2 = −u2,0 −u3,1
(2)
P1,2 u1,1 −4u1,2 +u2,2 = −u0,2 −u1,3
P2,2 u2,1 +u1,2 −4u2,2 = −u3,2 −u2,3

Substituting with their respective values, we obtain the following set of linear equations

−4 −160
    
1 1 0 u1,1
    
 1 −4 0 1 
  u2,1
   −400 
= (3)
   
  
 1
 0 −4 1 
  u1,2
   −200 
  
0 1 1 −4 u2,2 −200
For applying the Gauss-Seidel (Liebmann) method, in each iteration, we calculate the
next using the last calculated available values
160 + uk2,1 + uk1,2
uk+1
1,1 =
4
400 + uk+1 k
1,1 + u2,2
uk+1
2,1 =
4 (4)
200 + uk+1 k
1,1 + u2,2
uk+1
1,2 =
4
200 + uk+1 k+1
2,1 + u1,2
uk+1
2,2 =
4

Performing this algorithm, we obtain the iterates (in vector form)


     
100 90 101.25
     
 100   147.5   153.125 
0 1 2
u = , u =  , u =  ,
     
 100   97.5   103.125 
     
100 111.25 114.0625
   
104.0625 104.765625
   
 154.53125   154.8828125 
u3 =  , u4 =  .
   
 104.53125   104.8828125 
   
114.765625 114.94140625

1. Type 2 (5 pts) For the mesh in Figure 2, calculate the potential (Laplace equation) for the four
inner points, using 4 steps of the Gauss-Seidel method (Liebmann), with the initial values
[100, 100, 100, 100] (show details of your work) if the boundary conditions are u = 0 on
the left (western) boundary, u = x3 on the below (southern) boundary, u = 27 − 9y 2 on
the right (eastern) boundary and u = x3 − 27 on the top (northern) boundary.

Figure 2: The mesh of the problem discretization

Solution: We need to numerically approximate Laplace equation

∇2 u = uxx + uyy = 0.

Using the finite different scheme, we produce the following set of equations

ui,j−1 + ui−1,j − 4ui,j + ui+1,j + ui,j+1 = 0; i, j = 1, 2. (5)


The nodes lying in the boundary, i.e. they are known, pass to the right hand side. From
that, the set of equations are

P1,1 −4u1,1 +u2,1 +u1,2 = −u1,0 −u0,1


P2,1 u1,1 −4u2,1 +u2,2 = −u2,0 −u3,1
(6)
P1,2 u1,1 −4u1,2 +u2,2 = −u0,2 −u1,3
P2,2 u2,1 +u1,2 −4u2,2 = −u3,2 −u2,3

Substituting with their respective values, we obtain the following set of linear equations

−4 1 −1
    
1 0 u1,1
    
 1 −4 0 1    −26 
  u2,1

= (7)
   
  
 1
 0 −4 1    u1,2
   26 
  
0 1 1 −4 u2,2 28

For applying the Gauss-Seidel (Liebmann) method, in each iteration, we calculate the
next using the last calculated available values

1 + uk2,1 + uk1,2
uk+1
1,1 =
4
26 + uk+1 k
1,1 + u2,2
uk+1
2,1 =
4 (8)
−26 + uk+1 k
1,1 + u2,2
uk+1
1,2 =
4
−28 + uk+1 k+1
2,1 + u1,2
uk+1
2,2 =
4

Performing this algorithm, we obtain the iterates (in vector form)


     
100 50.25 19.03125
     
 100   44.0625   14.203125 
u0 =  , u 1
= , u 2
= ,
     
   
 100   31.0625   1.203125 
     
100 11.78125 −3.1484375
   
4.1015625 0.36914062
   
 6.73828125   4.87207031 
u3 =  , u4 =  .
   
 −6.26171875   −8.12792969 
   
−6.88085938 −7.81396484


Qualification criteria.
* The student correctly recall the scheme for solving the equation: up to 1 points.

* The student correctly determine the expression for the system of linear equations:
up to 2 points.

* The student correctly obtain the G-S iterations: up to 2 points.

Cognitive level according to total score.

* Initial: from zero (0) points to one (1) point.

* In development: from two (2) points to three (3) points.

* Developed: four (4) points points.

* Consolidated: up to seven (5) points.

2. Type 1 (5 pts) Solve the mixed boundary problem for the Poisson equation

∇2 u = 2(x2 + y 2 )

in the region given in Figure 3, with the boundary conditions u = 0 on the left (western)
and below (southern) boundaries, u = 9x2 on the northern boundary, and the Neumann
condition ux = 6y 2 on the right (eastern) boundary.

Figure 3: The mesh of the problem discretization

Solution: We need to numerically approximate Laplace equation

∇2 u = uxx + uyy = 2(x2 + y 2 ) = f (x, y).

Using the finite different scheme, we produce the following set of equations

ui,j−1 + ui−1,j − 4ui,j + ui+1,j + ui,j+1 = h2 fi,j ; i = 1, 2, 3; j = 1, 2. (9)

The nodes lying in the boundary, i.e. they are known, pass to the right hand side. For
the nodes that lie on Neumann condition boundary need to be calculated. Extending the
nodes and using the scheme, we need to replace the values outside the domain. From
that, the set of equations are
P1,1 −4u1,1 +u2,1 +u1,2 = f1,1 −u1,0 − u0,1
P2,1 u1,1 −4u2,1 +u3,1 +u2,2 = f2,1 −u2,0
P3,1 2u2,1 −4u3,1 +u3,2 = f3,1 −u3,0 − g3,1
(10)
P1,2 u1,1 −4u1,2 +u2,2 = f1,2 −u0,2 − u1,3
P2,2 u2,1 +u1,2 −4u2,2 +u3,2 = f2,2 −u2,3
P3,2 u3,1 +2u2,2 −4u3,2 = f3,2 −u3,3 − g2,3
where gi,j is the value of Neumann condition on the i, j node.
Substituting with their respective values, we obtain the following set of linear equations
−4 1 0 1 0 0 u1,1 4
    
    
 1
 −4 1 0 1 0   u2,1  
   10 
    
 0 2 −4 0 0 1   u3,1   8 
= (11)
    
  
 1
 0 0 −4 1 0   u1,2  
    1 
    
 0
 1 0 1 −4 1  
 u   −20 
2,2   
0 0 1 0 2 −4 u3,2 −103

Solving the system of linear equations, we obtain u = [1, 4, 9, 4, 16, 36]T .



2. Tipo 2 (5 pts) Solve the mixed boundary problem for the Poisson equation
∇2 u = −π 2 y sin(πx/3)
1

in the region given in Figure 4, with the boundary conditions uy (1, 3) = uy (2, 3) = 2
243
(northern) and u = 0 in the other three boundaries.

Figure 4: The mesh of the problem discretization

Solution:
We need to numerically approximate Laplace equation
∇2 u = uxx + uyy = 2(x2 + y 2 ) = f (x, y).

Using the finite different scheme, we produce the following set of equations
ui,j−1 + ui−1,j − 4ui,j + ui+1,j + ui,j+1 = h2 fi,j ; i = 1, 2, 3; j = 1, 2. (12)
The nodes lying in the boundary, i.e. they are known, pass to the right hand side. For
the nodes that lie on Neumann condition boundary need to be calculated. Extending the
nodes and using the scheme, we need to replace the values outside the domain. From
that, the set of equations are
P1,1 −4u1,1 +u2,1 +u1,2 = f1,1 −u1,0 − u0,1
P2,1 u1,1 −4u2,1 +u2,2 = f2,1 −u2,0 − u3,1
P1,2 u1,1 −4u1,2 +u2,2 +u1,3 = f1,2 −u0,2
(13)
P2,2 u2,1 +u1,2 −4u2,2 +u2,3 = f2,2 −u3,2
P1,3 2u2,1 −4u1,3 +u2,3 = f1,3 −u0,3 − g1,3
P2,3 2u2,2 +u1,3 −4u2,3 = f2,3 −u3,3 − g2,3
where gi,j is the value of Neumann condition on the i, j node.
Substituting with their respective values, we obtain the following set of linear equations
−4 1 1 0 0 0 u1,1 −8.54732814
    
    
 1 −4 0 1 0 0    −8.54732814 
  u2,1

   
    
 1 0 −4 1 1 0   u1,2
   −17.09465627 
= (14)
   
  
 0
 1 1 −4 0 1   u2,2
   −17.09465627 
  
    
 0
 0 2 0 −4 1    u1,3
   −41.23044168 
  
0 0 0 2 1 −4 u2,3 −41.23044168
Solving the system of linear equations, we obtain
u = [8.46365041, 8.46365041, 16.84362311, 16.84362311, 24.97256263, 24.97256263]T .


Qualification criteria.
* The student correctly recall the scheme for solving the equation: up to 1 points.
* The student correctly determine the expression for the Neumann boundary nodes:
up to 2 points.
* The student correctly determine the expression for the system of linear equations:
up to 1 points.
* The student correctly obtain the nodes values: up to 1 points.

Cognitive level according to total score.


* Initial: from zero (0) points to one (1) point.
* In development: from two (2) points to three (3) points.
* Developed: four (4) points points.
* Consolidated: up to seven (5) points.

You might also like