Applications of Computer Programming in Physics

3173 Words7 Pages

Includes large program code and mathematic equations There are many times that computers can help humans do things that could not be done by hand. Many of these things can be expressed mathematically as a sum but can not be calculated on paper because of the extremely large number of simple calculations. The example that I've been working with is the sum of electric fields and the field lines they can produce. It is easy to acquire the electric field vector due to a set of charged particles at a given point, but to create a smooth line that follows those vectors requires more computing power than just a paper and pencil. While there are specific rules for drawing field lines, they don't draw the pictures for you. It may be easy to follow these rules and in a simple system (only two or three charges), but a computer is needed to keep the rules in check for more complicated systems. Some of the rules that we know are: A) Field lines add up vectorially and can be split into components that act separately. B) Field lines, if drawn correctly, do not cross. C) The component of the electric field from one charged particle has no effect on the components of the other charged particles' electric field. D) The electric field is proportional to 1/r^2 where r is the distance between the charge and the test point. These rules allow us to imagine what a set of field lines might look like but more importantly they allow us to set up a system for drawing them as close to what they would actually look like as the human eye can tell. So, I wrote a program to do just that. An explanation of HOW IT WORKS: At root, the program is really pretty simple, it was only a few things that take to work and creativity to get aro... ... middle of paper ... ...w that the disturbance is sinusoidal and falls off with 1/R we can start to build the proper father equations to graph the situation: Z = sin(R)/R Y = Rsin(ø) X = Rcos(ø) This is what the parent functions for the water drop situation would look like based on what we know. Some constants have to be added to make the situation appear on a human scale. Also the picture has to reflect a fraction of the changing z value in the vertical components of the graph or else the z values of each circle would be undetectable. If some if the z vector shows up in our vertical then some of the y vector disappears into the undetectable z direction. (In affect the three dimensional picture is being rotated.) What we end up with is something that obeys many more of the laws of physics than a rough sketch would. We can easily alter the angle and add some artistic liberties.

Open Document