No lab during Thanksgiving week
Your lab exam is during your normally scheduled lab time during the last week of class
You have now been through the basics of Fortran programming. The laboratory
exam will cover the Fortran commands you have learned so far. It will also
expect that you know how to do a series expansion for Exp(x), Sin(x) and Cos(x);
How to do numerical integration using the Trapezoid rule and; How to
solve a differential equation using the Euler method. You will also need
to know how to solve electrostatics problems.
This course has covered basic fortran. What you have learned will
serve you well in most physics, math or engineering applications.
However if you plan to be involved in a large development project,
you would need to learn several more advanced features. Three
important features we did not cover are:
MODULES - These enhance portability of fortran codes
INTERFACES - These also enhance portability
ALLOCATABLE ARRAYS - These enable more efficient use of RAM
The last worksheet involves applications of numerical integration to an electrostatic problem
PROBLEM
1. Consider a thin uniform ring of charge of radius 1 cm. Assume that the charge density is and that the ring is a perfect circle, very thin, that is lies in the xy plane and that it is centered at the origin.
- Find an integral expression for the electric potential at an arbitrary point (x,y,z) due to this ring of charge. Find and Plot the dependence of the potential along the z-axis, at . Use the Trapezoid rule to carry out the integral. Check your numerical result against an analytic solution to this problem at .
- Find integral expressions for the three components
of the electric field at an arbitrary point (x,y,z).
Plot the three components of the electric field
on the z-axis at
.
Use the Trapezoid rule to carry out the
integrals. Check your result against the
analytic result at .