- #1
Radinax
- 12
- 0
Hello everybody, I am trying to simulate electric and magnetic fields of high voltage transmission lines (im using DC for NOW!), when i put the equations for two cables, one at a distance "a" and another at "-a" at a height of "h", the equations are as follow:
Exx=Ke*((((X+a)./((X+a).^2+(Y-h).^2))-((X+a)./((X+a).^2+(Y+h).^2))) + (((X-a)./((X-a).^2+(Y-h).^2))-((X-a)./((X-a).^2+(Y+h).^2))));
Eyy=Ke*((((Y-h)./((X+a).^2+(Y-h).^2))-((Y+h)./((X+a).^2+(Y+h).^2))) + (((Y-h)./((X+a).^2+(Y-h).^2))-((Y+h)./((X+a).^2+(Y+h).^2))));
im having issues at the electric field (im good with the magnetic field one), of course I am not considering "Q" right now. These are the components of the elctric field for two lines. Well the problem is that i ordered MATLAB to tell me when there are division by zero or log of zeros, well it appears on the two componentes, and i don't know HOW to evade it or eliminate the indetermination, because i had a similar problem with th magnetic fields but i solved it with "eps" but here i simply don't know how to manage the equations in MATLAB so it won't divide by zero, or log zero. I am really having issues here, can anyone help me??
PS: I am learning english, so i may have put some words wrong.
On the equations there are four tearms, two belong to one cable, and the other two to the other one, both positives.
Exx=Ke*((((X+a)./((X+a).^2+(Y-h).^2))-((X+a)./((X+a).^2+(Y+h).^2))) + (((X-a)./((X-a).^2+(Y-h).^2))-((X-a)./((X-a).^2+(Y+h).^2))));
Eyy=Ke*((((Y-h)./((X+a).^2+(Y-h).^2))-((Y+h)./((X+a).^2+(Y+h).^2))) + (((Y-h)./((X+a).^2+(Y-h).^2))-((Y+h)./((X+a).^2+(Y+h).^2))));
im having issues at the electric field (im good with the magnetic field one), of course I am not considering "Q" right now. These are the components of the elctric field for two lines. Well the problem is that i ordered MATLAB to tell me when there are division by zero or log of zeros, well it appears on the two componentes, and i don't know HOW to evade it or eliminate the indetermination, because i had a similar problem with th magnetic fields but i solved it with "eps" but here i simply don't know how to manage the equations in MATLAB so it won't divide by zero, or log zero. I am really having issues here, can anyone help me??
PS: I am learning english, so i may have put some words wrong.
On the equations there are four tearms, two belong to one cable, and the other two to the other one, both positives.