SlideShare a Scribd company logo
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 E y         dV       and E z       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
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 Vgrav 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
(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

More Related Content

What's hot

3.1 betti's law and maxwell's receprocal theorem
3.1 betti's law and maxwell's receprocal theorem3.1 betti's law and maxwell's receprocal theorem
3.1 betti's law and maxwell's receprocal theorem
Nilesh Baglekar
 
6161103 10.9 mass moment of inertia
6161103 10.9 mass moment of inertia6161103 10.9 mass moment of inertia
6161103 10.9 mass moment of inertiaetcenterrbru
 
Castigliano’s Method
Castigliano’s MethodCastigliano’s Method
Castigliano’s Method
aapx
 
Phys101 lo1 shm
Phys101 lo1 shmPhys101 lo1 shm
Phys101 lo1 shm
Devin Gamble
 
Aquib kapil vasim
Aquib kapil vasimAquib kapil vasim
Aquib kapil vasim
jabi khan
 
Proofs nearest rank
Proofs nearest rankProofs nearest rank
Proofs nearest rank
fithisux
 
Elastic beams
Elastic beams Elastic beams
Elastic beams
Bhavik A Shah
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Complimentary Energy Method in structural analysis
Complimentary Energy Method in structural analysisComplimentary Energy Method in structural analysis
Complimentary Energy Method in structural analysis
Mahdi Damghani
 
Ce 255 handout
Ce 255 handoutCe 255 handout
Ce 255 handout
DanielAkorful
 
Final m3 march 2019
Final m3 march 2019Final m3 march 2019
Final m3 march 2019
drdivakaras
 
Deriving the algebraic model of an ideal gas
Deriving the algebraic model of an ideal gasDeriving the algebraic model of an ideal gas
Deriving the algebraic model of an ideal gas
dukies_2000
 
JAMB Physics, Question 20, 2006
JAMB Physics, Question  20, 2006JAMB Physics, Question  20, 2006
JAMB Physics, Question 20, 2006
quoracles
 

What's hot (18)

blasius
blasiusblasius
blasius
 
3.1 betti's law and maxwell's receprocal theorem
3.1 betti's law and maxwell's receprocal theorem3.1 betti's law and maxwell's receprocal theorem
3.1 betti's law and maxwell's receprocal theorem
 
6161103 10.9 mass moment of inertia
6161103 10.9 mass moment of inertia6161103 10.9 mass moment of inertia
6161103 10.9 mass moment of inertia
 
Castigliano’s Method
Castigliano’s MethodCastigliano’s Method
Castigliano’s Method
 
Phys101 lo1 shm
Phys101 lo1 shmPhys101 lo1 shm
Phys101 lo1 shm
 
Aquib kapil vasim
Aquib kapil vasimAquib kapil vasim
Aquib kapil vasim
 
Proofs nearest rank
Proofs nearest rankProofs nearest rank
Proofs nearest rank
 
Elastic beams
Elastic beams Elastic beams
Elastic beams
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Complimentary Energy Method in structural analysis
Complimentary Energy Method in structural analysisComplimentary Energy Method in structural analysis
Complimentary Energy Method in structural analysis
 
Sol23
Sol23Sol23
Sol23
 
Ce 255 handout
Ce 255 handoutCe 255 handout
Ce 255 handout
 
2006_Tomasz_PRL
2006_Tomasz_PRL2006_Tomasz_PRL
2006_Tomasz_PRL
 
Final m3 march 2019
Final m3 march 2019Final m3 march 2019
Final m3 march 2019
 
Deriving the algebraic model of an ideal gas
Deriving the algebraic model of an ideal gasDeriving the algebraic model of an ideal gas
Deriving the algebraic model of an ideal gas
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
JAMB Physics, Question 20, 2006
JAMB Physics, Question  20, 2006JAMB Physics, Question  20, 2006
JAMB Physics, Question 20, 2006
 
Problem 2 a ph o 2
Problem 2 a ph o 2Problem 2 a ph o 2
Problem 2 a ph o 2
 

Viewers also liked

C4 discontinuities
C4 discontinuitiesC4 discontinuities
C4 discontinuitiesTarun Gehlot
 
How to draw a good graph
How to draw a good graphHow to draw a good graph
How to draw a good graphTarun Gehlot
 
Solving trignometric equations
Solving trignometric equationsSolving trignometric equations
Solving trignometric equationsTarun Gehlot
 
A quick review of trignometery
A quick review of trignometeryA quick review of trignometery
A quick review of trignometeryTarun Gehlot
 
Vector differentiation, the ∇ operator,
Vector differentiation, the ∇ operator,Vector differentiation, the ∇ operator,
Vector differentiation, the ∇ operator,Tarun Gehlot
 
Circles and tangents with geometry expressions
Circles and tangents with geometry expressionsCircles and tangents with geometry expressions
Circles and tangents with geometry expressionsTarun Gehlot
 
Why we requires improper integrals
Why we requires improper integralsWhy we requires improper integrals
Why we requires improper integralsTarun Gehlot
 
Numerical conformal mapping of an irregular area
Numerical conformal mapping of an irregular areaNumerical conformal mapping of an irregular area
Numerical conformal mapping of an irregular areaTarun Gehlot
 
Mapping the sphere
Mapping the sphereMapping the sphere
Mapping the sphereTarun Gehlot
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinatesTarun Gehlot
 
Nonparametric statistics
Nonparametric statisticsNonparametric statistics
Nonparametric statisticsTarun Gehlot
 
Goal setting theory
Goal setting theoryGoal setting theory
Goal setting theoryTarun Gehlot
 
DM and role of genomics July 2015 2 (1)
DM and role of genomics July 2015 2 (1)DM and role of genomics July 2015 2 (1)
DM and role of genomics July 2015 2 (1)Armie Pacheco
 
USFS-FSCL
USFS-FSCLUSFS-FSCL
USFS-FSCL
Apnatvzone
 
Allybugs marketing pitch_v1.1 16-9
Allybugs marketing pitch_v1.1 16-9Allybugs marketing pitch_v1.1 16-9
Allybugs marketing pitch_v1.1 16-9allybugs
 
Instituto de banca y comercio
Instituto de banca y comercioInstituto de banca y comercio
Instituto de banca y comercioWandalyz Robles
 

Viewers also liked (20)

Hand shakings
Hand  shakingsHand  shakings
Hand shakings
 
Logicgates
LogicgatesLogicgates
Logicgates
 
C4 discontinuities
C4 discontinuitiesC4 discontinuities
C4 discontinuities
 
How to draw a good graph
How to draw a good graphHow to draw a good graph
How to draw a good graph
 
Wave functions
Wave functionsWave functions
Wave functions
 
Solving trignometric equations
Solving trignometric equationsSolving trignometric equations
Solving trignometric equations
 
A quick review of trignometery
A quick review of trignometeryA quick review of trignometery
A quick review of trignometery
 
Vector differentiation, the ∇ operator,
Vector differentiation, the ∇ operator,Vector differentiation, the ∇ operator,
Vector differentiation, the ∇ operator,
 
Circles and tangents with geometry expressions
Circles and tangents with geometry expressionsCircles and tangents with geometry expressions
Circles and tangents with geometry expressions
 
Why we requires improper integrals
Why we requires improper integralsWhy we requires improper integrals
Why we requires improper integrals
 
Numerical conformal mapping of an irregular area
Numerical conformal mapping of an irregular areaNumerical conformal mapping of an irregular area
Numerical conformal mapping of an irregular area
 
Mapping the sphere
Mapping the sphereMapping the sphere
Mapping the sphere
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
 
Nonparametric statistics
Nonparametric statisticsNonparametric statistics
Nonparametric statistics
 
Goal setting theory
Goal setting theoryGoal setting theory
Goal setting theory
 
DM and role of genomics July 2015 2 (1)
DM and role of genomics July 2015 2 (1)DM and role of genomics July 2015 2 (1)
DM and role of genomics July 2015 2 (1)
 
Cartel inmaculada
Cartel inmaculadaCartel inmaculada
Cartel inmaculada
 
USFS-FSCL
USFS-FSCLUSFS-FSCL
USFS-FSCL
 
Allybugs marketing pitch_v1.1 16-9
Allybugs marketing pitch_v1.1 16-9Allybugs marketing pitch_v1.1 16-9
Allybugs marketing pitch_v1.1 16-9
 
Instituto de banca y comercio
Instituto de banca y comercioInstituto de banca y comercio
Instituto de banca y comercio
 

Similar to Vector fields and equipotentials

Numerical Analysis Assignment Help
Numerical Analysis Assignment HelpNumerical Analysis Assignment Help
Numerical Analysis Assignment Help
Math Homework Solver
 
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
cfisicaster
 
Physics Assignment Help
Physics Assignment HelpPhysics Assignment Help
Physics Assignment Help
Statistics Homework Helper
 
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdfLECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
anuj298979
 
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
IOSR Journals
 
Wigner Quasi-probability Distribution of the Cosecant-squared Potential Well
Wigner Quasi-probability Distribution of the Cosecant-squared Potential WellWigner Quasi-probability Distribution of the Cosecant-squared Potential Well
Wigner Quasi-probability Distribution of the Cosecant-squared Potential Well
John Ray Martinez
 
Ch06 ssm
Ch06 ssmCh06 ssm
Ch06 ssm
Marta Díaz
 
Chern-Simons Theory
Chern-Simons TheoryChern-Simons Theory
Chern-Simons Theory
Juliho Castillo
 
Emfbook
EmfbookEmfbook
Problem for the gravitational field
 Problem for the gravitational field Problem for the gravitational field
Problem for the gravitational field
Alexander Decker
 
div, grad, curl, and all that - a review
div, grad, curl, and all that - a reviewdiv, grad, curl, and all that - a review
div, grad, curl, and all that - a review
Kwanghee Choi
 
ABOUT MODELLING OF THE GRAVITATIONAL FIELDS
ABOUT MODELLING OF THE GRAVITATIONAL FIELDSABOUT MODELLING OF THE GRAVITATIONAL FIELDS
ABOUT MODELLING OF THE GRAVITATIONAL FIELDS
ijrap
 
Maxwell's formulation - differential forms on euclidean space
Maxwell's formulation  - differential forms on euclidean spaceMaxwell's formulation  - differential forms on euclidean space
Maxwell's formulation - differential forms on euclidean space
greentask
 
Outgoing ingoingkleingordon spvmforminit1 - copy - copy
Outgoing ingoingkleingordon spvmforminit1 - copy - copyOutgoing ingoingkleingordon spvmforminit1 - copy - copy
Outgoing ingoingkleingordon spvmforminit1 - copy - copy
foxtrot jp R
 
Relativistic formulation of Maxwell equations.
Relativistic formulation of Maxwell equations.Relativistic formulation of Maxwell equations.
Relativistic formulation of Maxwell equations.
dhrubanka
 
2207.00057.pdf
2207.00057.pdf2207.00057.pdf
2207.00057.pdf
JasonMerik
 
About Modelling of the Gravitational Fields
About Modelling of the Gravitational FieldsAbout Modelling of the Gravitational Fields
About Modelling of the Gravitational Fields
ijrap
 
ch09.pdf
ch09.pdfch09.pdf
ch09.pdf
Amir830050
 
Kleppner solution partial
Kleppner solution   partialKleppner solution   partial
Kleppner solution partial
Kamran Khursheed
 

Similar to Vector fields and equipotentials (20)

Numerical Analysis Assignment Help
Numerical Analysis Assignment HelpNumerical Analysis Assignment Help
Numerical Analysis Assignment Help
 
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
N. Schlager - Study Materials for MIT Course [8.02T] - Electricity and Magnet...
 
Physics Assignment Help
Physics Assignment HelpPhysics Assignment Help
Physics Assignment Help
 
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdfLECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
 
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
Quantization of the Orbital Motion of a Mass In The Presence Of Einstein’s Gr...
 
Wigner Quasi-probability Distribution of the Cosecant-squared Potential Well
Wigner Quasi-probability Distribution of the Cosecant-squared Potential WellWigner Quasi-probability Distribution of the Cosecant-squared Potential Well
Wigner Quasi-probability Distribution of the Cosecant-squared Potential Well
 
Ch06 ssm
Ch06 ssmCh06 ssm
Ch06 ssm
 
Chern-Simons Theory
Chern-Simons TheoryChern-Simons Theory
Chern-Simons Theory
 
Emfbook
EmfbookEmfbook
Emfbook
 
Problem for the gravitational field
 Problem for the gravitational field Problem for the gravitational field
Problem for the gravitational field
 
div, grad, curl, and all that - a review
div, grad, curl, and all that - a reviewdiv, grad, curl, and all that - a review
div, grad, curl, and all that - a review
 
ABOUT MODELLING OF THE GRAVITATIONAL FIELDS
ABOUT MODELLING OF THE GRAVITATIONAL FIELDSABOUT MODELLING OF THE GRAVITATIONAL FIELDS
ABOUT MODELLING OF THE GRAVITATIONAL FIELDS
 
Maxwell's formulation - differential forms on euclidean space
Maxwell's formulation  - differential forms on euclidean spaceMaxwell's formulation  - differential forms on euclidean space
Maxwell's formulation - differential forms on euclidean space
 
Outgoing ingoingkleingordon spvmforminit1 - copy - copy
Outgoing ingoingkleingordon spvmforminit1 - copy - copyOutgoing ingoingkleingordon spvmforminit1 - copy - copy
Outgoing ingoingkleingordon spvmforminit1 - copy - copy
 
Relativistic formulation of Maxwell equations.
Relativistic formulation of Maxwell equations.Relativistic formulation of Maxwell equations.
Relativistic formulation of Maxwell equations.
 
2207.00057.pdf
2207.00057.pdf2207.00057.pdf
2207.00057.pdf
 
project final
project finalproject final
project final
 
About Modelling of the Gravitational Fields
About Modelling of the Gravitational FieldsAbout Modelling of the Gravitational Fields
About Modelling of the Gravitational Fields
 
ch09.pdf
ch09.pdfch09.pdf
ch09.pdf
 
Kleppner solution partial
Kleppner solution   partialKleppner solution   partial
Kleppner solution partial
 

More from Tarun Gehlot

Materials 11-01228
Materials 11-01228Materials 11-01228
Materials 11-01228
Tarun Gehlot
 
Binary relations
Binary relationsBinary relations
Binary relations
Tarun Gehlot
 
Continuity and end_behavior
Continuity and  end_behaviorContinuity and  end_behavior
Continuity and end_behavior
Tarun Gehlot
 
Continuity of functions by graph (exercises with detailed solutions)
Continuity of functions by graph   (exercises with detailed solutions)Continuity of functions by graph   (exercises with detailed solutions)
Continuity of functions by graph (exercises with detailed solutions)
Tarun Gehlot
 
Factoring by the trial and-error method
Factoring by the trial and-error methodFactoring by the trial and-error method
Factoring by the trial and-error method
Tarun Gehlot
 
Introduction to finite element analysis
Introduction to finite element analysisIntroduction to finite element analysis
Introduction to finite element analysis
Tarun Gehlot
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functions
Tarun Gehlot
 
Finite elements for 2‐d problems
Finite elements  for 2‐d problemsFinite elements  for 2‐d problems
Finite elements for 2‐d problems
Tarun Gehlot
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statistics
Tarun Gehlot
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
Tarun Gehlot
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
Tarun Gehlot
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentials
Tarun Gehlot
 
Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximation
Tarun Gehlot
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
Tarun Gehlot
 
Propeties of-triangles
Propeties of-trianglesPropeties of-triangles
Propeties of-triangles
Tarun Gehlot
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadratures
Tarun Gehlot
 
Basics of set theory
Basics of set theoryBasics of set theory
Basics of set theory
Tarun Gehlot
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
Tarun Gehlot
 
Applications of set theory
Applications of  set theoryApplications of  set theory
Applications of set theory
Tarun Gehlot
 
Miscellneous functions
Miscellneous  functionsMiscellneous  functions
Miscellneous functions
Tarun Gehlot
 

More from Tarun Gehlot (20)

Materials 11-01228
Materials 11-01228Materials 11-01228
Materials 11-01228
 
Binary relations
Binary relationsBinary relations
Binary relations
 
Continuity and end_behavior
Continuity and  end_behaviorContinuity and  end_behavior
Continuity and end_behavior
 
Continuity of functions by graph (exercises with detailed solutions)
Continuity of functions by graph   (exercises with detailed solutions)Continuity of functions by graph   (exercises with detailed solutions)
Continuity of functions by graph (exercises with detailed solutions)
 
Factoring by the trial and-error method
Factoring by the trial and-error methodFactoring by the trial and-error method
Factoring by the trial and-error method
 
Introduction to finite element analysis
Introduction to finite element analysisIntroduction to finite element analysis
Introduction to finite element analysis
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functions
 
Finite elements for 2‐d problems
Finite elements  for 2‐d problemsFinite elements  for 2‐d problems
Finite elements for 2‐d problems
 
Error analysis statistics
Error analysis   statisticsError analysis   statistics
Error analysis statistics
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Linear approximations and_differentials
Linear approximations and_differentialsLinear approximations and_differentials
Linear approximations and_differentials
 
Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximation
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
Propeties of-triangles
Propeties of-trianglesPropeties of-triangles
Propeties of-triangles
 
Gaussian quadratures
Gaussian quadraturesGaussian quadratures
Gaussian quadratures
 
Basics of set theory
Basics of set theoryBasics of set theory
Basics of set theory
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Applications of set theory
Applications of  set theoryApplications of  set theory
Applications of set theory
 
Miscellneous functions
Miscellneous  functionsMiscellneous  functions
Miscellneous functions
 

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 E y dV and E z 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 Vgrav 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