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 Answer 1

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$
1
  • 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$ Commented Nov 24, 2016 at 18:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.