1
$\begingroup$

I am trying to plot the electric field of a charged particle in (2,4). The diagram is the next:

Vectors

We know:

$ \overrightarrow{E} = \frac{1}{4 \pi \epsilon_0} \frac{q'}{|\overrightarrow{R}|^2} \widehat{R} $

so we have:

$ \overrightarrow{R} = \overrightarrow{r} -\overrightarrow{r'} $

$ \overrightarrow{R} = (x,y)-(2,4) $

$ \overrightarrow{R} = (x-2 , y-4) $

$ \widehat{R} = \frac{(x-2,y-4)}{\sqrt{(x-2)^2 +(y-4)^2}} $

$ \overrightarrow{E} = \frac{1.6E-19 C}{4 \pi 8.85E-12} \frac{(x-2,y-4)}{[(x-2)^2+(y-4)^2]^{3/2}} $

I try to plot the vector field with

VectorPlot[{((1.6*10^(-19))/(4*\[Pi]*8.85*10^(-12)))*(x - 
  2)/((x - 2)^2 + (y - 4)^2)^(
3/2), ((1.6*10^(-19))/(4*\[Pi]*8.85*10^(-12)))*(y - 
  4)/((x - 2)^2 + (y - 4)^2)^(3/2)}, {x, 0, 6}, {y, -0, 7}]

But what I get is:

Vector Field

I tried to make the vectors longer by using VectorScale, but it didn't work. I think the vector field is incorrect. I would like to see the vectors longer. Thanks

$\endgroup$
1
$\begingroup$

Example Attached

You could define vector scale as

VectorScale -> {Automatic, Automatic, None}

Edit

That is to say :

q = QuantityMagnitude[UnitConvert["ElectronCharge"]];
e0 = QuantityMagnitude[UnitConvert["VacuumPermitivity"]];
EField[x_, y_] = q/(4 Pi e0) {x - 2, y - 4}/((x - 2)^2 + (y - 4)^2)^(3/2)  

VectorPlot[EField[x, y], {x, 0, 6}, {y, 0, 7}, 
 VectorStyle -> {Black, Arrowheads[0.03]}, 
 VectorScale -> {Automatic, Automatic, None}
 ]  

enter image description here

$\endgroup$
  • 3
    $\begingroup$ I have formatted your answer according to the Mathematica Stack-Exchange rules. The main point is that your code must be directly selectable and copiable from stack-exchange to mathematica. Greek letters are possible but it is not simple. $\endgroup$ – andre314 Nov 24 '16 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.