flux line

3 vues (au cours des 30 derniers jours)
Hager
Hager le 20 Mar 2011
hi , I have this program for calculate the V(x,y) and I want to sketch of flux lines and equipotential lines using matlab. By given : For b = a=0.25m , (V0)=50 V we have V(x,y)=(-4(V0)/pi) sum(sin((n*pi*x)/b)*sinh((n*pi*(a-y))/b))/(n*sinh(n*pi*a)/b))
"% SOLUTION OF LAPLACE'S EQUATION
%======================
% THIS PROGRAM SOLVES THE TWO-DIMENSIONAL
% BOUNDARY-VALUE PROBLEM
% a AND b ARE THE DIMENSIONS OF THE TROUGH
% x AND y ARE THE COORDINATES OF THE POINT % OF INTEREST
P = [ ] ;
Vo = 100.0;
a = 1.0;
b = a;
x = b/4;
y= 3.*a/4.;
c = - 4.*Vo/pi
sum = 0.0;
for k=l:10
n = 2*k - 1
al = sin(n*pi*x/b);
a2 = sinh(n*pi*(a-y)/b);
a3 = n*sinh(n*pi*a/b);
sum =sum + c*al*a2/a3;
P = [n, sum]
end
diary test.out
P
diary off "
Can you help me????

Réponses (0)

Catégories

En savoir plus sur Sparse Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by