Micro-Scholarship, What it is, How can it help me.pdf
Vector fields and equipotentials
1. TARUNGEHLOTS
Vector Fields and Equipotentials
In many areas of physics it is common to describe physical quantities in terms of vectors
defined in a region of space, a vector field, e.g., gravitational field, electric field, velocity
field in a fluid.
Plotting vector fields gives a good visual sense of the nature of the field. Also, looking at
the equipotentials (level curves or level surfaces) can be helpful, especially in E&M
where the equipotentials can be directly related to the voltage.
Gradient of a potential:
The gradient is what relates the electric field to the electric potential. E V . This
notation means E x dV and Ey dV and Ez dV . Although we
dx dy dz
have learned to differentiate, Matlab has packaged these three derivatives into one
function, the gradient. Lets try it on our 2D dipolePotential.
dx = 0.075; dy = 0.075;
[x,y] = meshgrid(-2:dx:2,-2:dy:2);
V = dipolePotential(x,y,1e-9,1);
[Ex,Ey] = gradient(-V,dx,dy); % need the negative
quiver(x,y,Ex,Ey)
The quiver plot looks about like it has in the past, but let's compare it to the exact result
using the dipoleField function.
[Ex_true,Ey_true] = dipoleField(x,y,1e-9,1);
surf(x,y,(Ex_true-Ex)./Ex_true)
axis([-2 2 -2 2 -0.1 0.1])
This shows that the gradient, even with just 54 X 54 points, is accurate to about 2%
except near the charges themselves where it is as much as 100% (or a factor of 2) off. I
think this suggests the idea that if your problem doesn’t require you to come really close
to either charge and you use small enough intervals, you can use the gradient function.
Try zooming in on the surface plot to see where you would trust the gradient to calculate
your derivative.
Many vector fields don’t have the sharp features of the dipole charge and the gradient
function will be more accurate. The gravitational field near the surface of the earth is one
such case. It will also show you how to relate a potential energy to its vector field.
Gravitational Example:
Page 1 of 3
2. Vector field of constant gravitational field near the surface of the earth.
Here we look at the vector field due to the gravitational attraction near the surface of the
earth. There is just a y component and it is constant. The gravitational force is F=mg.
Note that m depends on the particular object and g depends on the environment. Let's
divide out the mass and just talk about the gravitational field, g = - g j, with up chosen to
be positive.
First we will specify the x and y components of the field, then we’ll plot it with a call to
the quiver() function.
[x,y] = meshgrid(0:.5:5, 0:.2:2);
gx = zeros(size(x));
gy = -9.8*ones(size(x));
quiver(x,y,gx,gy)
xlabel('horizontal distance')
ylabel('vertical distance')
Note that near the earth the gravitational field is everywhere down and has the same
strength.
Equipotential plot of constant gravitational field near the earth.
Looking at the same physical situation let's plot the contours for the constant gravitational
field near the surface of the earth. As above we want to look at the properties of the
environment and not the particulars related to a specific object. The "gravitational
potential energy" is U grav mgy . We will instead look at the "gravitational potential"
given by V grav gy . We define the potential function and then add contour lines to the
previous plot.
Vgrav = 9.8.*y;
hold on
contour(x,y,Vgrav);
hold off
The equipotentials are parallel to the surface of the earth and equally spaced. Notice that
the equipotentials are also perpendicular to the field vectors.
1. Create a new plot corresponding to the trajectory of a particle rolling across a level
table. The particle leaves the table edge at (0, 1.8 m) traveling at 8 m/s and flies through
the air without air resistance. Make a single plot including the gravitational field, the
equipotentials, and the trajectory. What do you notice about the relationship between the
particle trajectory and the gravitational field vectors?
2. Vector field and equipotentials far from the earth
To look at the field and equipotentials far from the earth let's modify the previous
example as follows:
1. Do not assume we are near the surface of the earth. Write an expression for the
gravitational field and the gravitational potential for the earth valid outside the earth.
Page 2 of 3
3. (Start with the potential energy of a test mass in orbit and then divide by the test
mass.) Convert any equations in polar coordinates to cartesian coordinates. (Keep
the problem 2D because plotting 3D is not possible.) Why is the gravitational
potential negative?
2. Write a reusable function for the "gravitational potential". Set the potential inside the
earth to its value on the surface. (G=6.673e-11 m3/(Kg s2))
Vgrav=gravPotential(x,y,M,R)
3. Make a contour plot of the potential out to 3 times the earth radius,( Mearth =
5.9742e24 Kg, Rearth = 6373 Km.) And, use 50 to 70 sample points in x and y so that
you can see the results well.
[x,y] = meshgrid(-3*Re:Re/10:3*Re, -3*Re:Re/10:3*Re);
4. Add the gravitational field to the plot using
[Gx, Gy] = gradient(gravPotential);
Gx = -Gx;
Gy = -Gy;
Quiver(x,y,Gx,Gy);
Do the field vectors point where you expect? Do the contours look reasonable?
3. Binary stars
Determine the gravitational potential for a binary star system. The two stars are located
at r1=(0,0) and r2 = (d,0) with d=Rsun. They both have R=Rsun/2, but different masses,
M1 = Msun and M2 = Msun/2. (Rsun = 1.988e30 kg, and Msun = 1.392e9 m).
Make a plot of the equipotentials and vector field in the region -2Rsun< x < 3Rsun,
-2Rsun< y < 2Rsun. Remember that potentials are scalars so you can just add:
Vbinary = V1 + V2. Be careful with the second star so that its center is located to the
right of the first.
Add the Field lines to the plot. Do they look like you expect? In another figure, take a
look at surf(Vbinary). Pretty cool, eh?
Hopefully this convinces you that potentials are easier to work with than vector fields and
that getting the vector field is easy once you have the right potential.
Page 3 of 3