Question: I need this project done in Python, I run my code in Anaconda a ) Calculate the electric field vec ( E ) ( x

I need this project done in Python, I run my code in Anaconda
a) Calculate the electric field vec(E)(x,y) of a dipole with charge q and distance d at any point in
the plane that contains the charges. Remember that the electric field due to a point charge
is
vec(E)(vec(r))=kqr2hat(r)=kqr2(vec(r))r=kqr3vec(r),
with k=9109Nm2C2. In this project we will calculate the electric field in the xy-plane only.
In your calculations, set the positive charge at the position (0,d2) and the negative charge
at (0,-d2). Therefore, the electric field in cartesian coordinates at any point (x,y) due to the
positive point charge q is
vec(E)(x,y)=kqr3xhat()+kqr3(y-d2)hat()
with r=x2+(y-d2)22.
The electric field at any point (x,y) due to the negative point charge q is
vec(E)(x,y)=k(-q)r3xhat()+k(-q)r3(y+d2)hat()
with r=x2+(y+d2)22.
b) Use the pylab function streamplot() to display the electric field lines on the plane that
contains the charges. Use q=3nC and d=10cm. Display the field lines with x and y ranging
from -30cm to 30cm.
c) Calculate the electric potential V(x,y) of a dipole with charge q and distance d at any point in
the plane that contains the charges. Remember that the electric potential due to a point
charge q is
V(r)=kqr
For the positive charge
V(x,y)=kqx2+(y-d2)22
For the negative charge
V(x,y)=k(-q)x2+(y+d2)22
I need this project done in Python, I run my code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!