Documente Academic
Documente Profesional
Documente Cultură
Abstract
In this paper the solution of the Laplace equation is applied to the potentials that
exist in a surface simply knowing the border values existing in the contour of the
surface that is considered as a mesh to facilitate its solution through the iterative
method .
2V 2V
0
x 2 y 2
𝜕𝑣 𝑉1− 𝑉0
( ) = , 𝐸𝑐1
𝜕𝑥 𝑎 ℎ
𝜕𝑣 𝑉0− 𝑉3
( ) = , 𝐸𝑐2
𝜕𝑥 𝑐 ℎ
𝜕𝑦 𝜕𝑦
( ) −( )
𝜕𝑣 2 𝜕𝑥 𝑎 𝜕𝑥 𝑐
=
𝜕𝑥 2 ℎ
𝜕𝑣 2 (𝑉1− 𝑉0 ) − (𝑉0− 𝑉3 )
2
=
𝜕𝑥 ℎ2
𝜕𝑣 2 (𝑉1 − 2𝑉0 + 𝑉3 )
=
𝜕𝑥 2 ℎ2
𝜕𝑣 2 (𝑉2 − 2𝑉0 + 𝑉4 )
2
=
𝜕𝑦 ℎ2
𝜕𝑣 2 𝜕𝑣 2
+ =0
𝜕𝑥 2 𝜕𝑦 2
tenemos:
(𝑉1 + 𝑉3 + 𝑉2 + 𝑉4 − 4𝑉0 )
=0
ℎ2
𝑉1 + 𝑉3 + 𝑉2 + 𝑉4 = 4𝑉0
La ecuación iterativa que usaremos en el paquete informático Matlab
1
𝑉0 = (𝑉 + 𝑉3 + 𝑉2 + 𝑉4 )
4 1
Condiciones de frontera
Desarrollo
Pseudocódigo
function U=dirich(f1,f2,f3,f4,a,b,h,tol,max1)
%Datos
% - f1,f2,f3,f4 son las funciones en el contorno almacenadas como
cadenas decaracteres
% - a y b son los extremos superiores de los intervalos [0,a] y [0,b]
% - h es el incremento
% - tol es la tolerancia
% resultado
% - U es la matriz, análoga a la de la tabla 10.6, en la que se
almacea lasolucion numerica
% Inicializacion de los parametros y de U
n=fix(a/h) +1;
m=fix(b/h) +1;
ave=(a*(feval(f1,0)+feval(f2,0))+b*(feval(f3,0)+feval(f4,0)))/(2*a+2*b
);
U=ave*ones(n,m);
%COndiciones de contorno
U(1,1:m)=feval(f3,0:h:(m-1)*h)';
U(n,1:m)=feval(f4,0:h:(m-1)*h)';
U(1:n,1)=feval(f1,0:h:(n-1)*h);
U(1:n,m)=feval(f2,0:h:(n-1)*h);
U(1,1)=(U(1,2)+U(2,1))/2;
U(1,m)=(U(1,m-1)+U(n,2))/2;
U(n,1)=(U(n-1,1)+U(n,2))/2;
U(n,m)=(U(n-1,m)+U(n,m-1))/2;
% Parametro de sobrerrelajacion
w=4/(2+sqrt(4-(cos(pi/(n-1))+cos(pi/(m-1)))^2));
err=1;
cnt=0;
while((err>tol)&&(cnt<=max1))
err=0;
for j=2:m-1
for i=2:n-1
relx=w*(U(i,j+1)+U(i,j-1)+U(i+1,j)+U(i-1,j)...
-4*U(i,j))/4;
U(i,j)=U(i,j)+relx;
if(err<=abs(relx))
err=abs(relx);
end
end
end
cnt=cnt+1;
end
U=flipud(U');
ANEXOS
https://estliveupsedu-
my.sharepoint.com/personal/lcaleroa1_est_ups_edu_ec/_layouts/15/guestacce
ss.aspx?docid=12e2fe6256b1e4ed2a6cc615d737d2663&authkey=AZKlUF342d
VzaUhYvL4CiLY
BIBIOGRAFÍA