Last Update: 08/23/06

Computer Simulations in Physics

Gathered here are links that provide some simulation programs in physics at all levels of and in almost every branch. These have been collected over some years and have been used in a variety of classes and in many differing computing environments. Provided are the code and the exe files ( for Intel Machines running Windows).


Scientific Programming & Cafe Dubois: 36 articles that deal with Computational Physics
by Paul Dubois from Computing Science and Engineering

Physics Areas

Astrophysics & Astronomy
Atomic & Molecular
Circuits
Chaos and Non-Linear Dynamics
Condensed Matter
Electricity & Magnetism
Environmental Physics
Mechanics
Modern Physics
Optics
Nuclear Physics
Quantum Mechanics
Utilities

Astrophysics & Astronomy Programs
NameLanguageCodeStand alone .exe file
RYDBERG:
Calculates the line spectra of a series
1e emission spectra - graphical output
QB45RYDBERG.BASRYDBERG.EXE
PLANETS1:
The collision of a star with the solar system.
The 11 body problem.
QB45 PLANETS1.BAS PLANETS1.EXE
BINARY79:
generates radial velocity values vs. time for a binary system
QB45 BINARY79.BASBINARY79.EXE
HALLEY:
Calculates details concerning the Comet Halley.
Input date, time and location.
QB45HALLEY.BASHALLEY.EXE
FUSION:
The P-P chain is investigated.
Classical turning point is found
for penetration to the Coulombic Barrier by the Boltzmann Speed distribution.
f(v) is plotted & tunneling is investigated.
QB45 FUSION.BASFUSION.EXE
FFT-SPOT:
This program uses monthly sun spot
numbers for almost 300 years and generate statistics and prepares a file
for WPLOT which does
the FFT of the data.
QB45 FFT-SPOT.BASFFT-SPOT.EXE
SUNSPOT.DAT
Data file for use by FFT-SPOT
ASCIISUNSPOT.DAT
ONE-ZONE:
The One zone model of Cepheid
variable star pulsation.
QB45ONE-ZONE.BASONE-ZONE.EXE
FORM-IT: Form your own solar system - up to 40 or so planets. Generates data file XXDOT.DAT QB 4.5FORM-IT.BAS FORM-IT.EXE
MANYBOD:
uses XXDOT to evolve your solar system
QB 4.5MANYBOD.BAS MANYBOD.EXE
INTRUDER:
uses XXDOT to evolve our solar system while it collides with another star - need a data file ELEMENTS.DAT
QB 4.5INTRUDER.BAS INTERUDER.EXE
ELEMENTS.DAT
Elements of 9 planets about Sol
ASCIIELEMENTS.DAT
ORBIT:
from Phys 313 text book - creates an orbit of a planet
FORTRANORBIT.FOR ORBIT.EXE
ORBIT2PL:
reads data file from ORBIT and prepares plotting file for use by WPLOT
QB 4.5ORBIT2PL.BAS ORBIT2PL.EXE
H-ION:
Calculates the bound-free cross section for photo-ionization of hydrogen for several bound states
QB 4.5H-ION.BAS H-ION.EXE

Atomic and Molecular Physics
NameLanguageCodeStand alone .exe file
MAXWELL:
The speed distribution function is generated
for mass and speed of your choice.
QB45 MAXWELL.BASMAXWELL.EXE

Circuits
NameLanguageCodeStand alone .exe file
PHASOR1:
The complete RLC circuit problem is examined.
Two possible graphs are generated.
QB45 PHASOR1.BASPHASOR1.EXE
UNDER:
A study of the under-damped RLC oscillator.
QB45 UNDER.BASUNDER.EXE

Chaos and Non-Linear Dynamics
NameLanguageCodeStand alone .exe file
MAY:
A study of the period doubling phenomena
as discovered by May in his pioneering
examination of population dynamics. Mentioned by James
Gleick in his text, Chaos, The Making of a New Science.
QB45 MAY.BASMAY.EXE
ECOLOGY:
A simulation of population dynamics in
the animal kingdom like nuclear decay.
QB45 ECOLOGY.BASECOLOGY.EXE

Condensed Matter Programs
NameLanguageCodeStand alone .exe file
BANDFREE:
A 1D crystal is examined where
Energy > V0 the barrier height of the periodic structure. Energy eigen bands are found
and graphically displayed.
QB45BANDFREE.BAS BANDFREE.EXE

Electricity and Magnetism
NameLanguageCodeStand alone .exe file
POISSON:
A numerical solution of the 2D potential problem
with a constant charge density.
Output are V = F(x,y) surfaces for WPLOT
QB45POISSON.BASPOISSON.EXE
LAPLACE:
A numerical solution to the
2D potential problem - of Laplace's Equation
No charge density. Output are numerical and three
surface graphs for use by WPLOT.
QB45LAPLACE.BASLAPLACE.EXE

Environmental Applications Programs
NameLanguageCodeStand alone .exe file
RAIN-PH:
The ph of rain is calculated - given the CO2
and NO2 concentrations, ph is generated vs. [SO2].
QB45 RAIN-PH.BASRAIN-PH.EXE

Mechanics
NameLanguageCodeStand alone .exe file
V2:
A one-stage rocket in a real steady atmosphere
trajectory is plotted via WPLOT.
QB45V2.BASV2.EXE
2DFTBALL:
Motion of foot ball in an atmosphere with wind and air resistance
QB45 2DFTBALL.BAS2DFTBALL.EXE
GEO-ROCK:
One stage rocket as seen from center of earth.
Lot's of details - air resistance, etc.
Output is plot of trajectory and the earth's limb
QB45GEO-ROCK.BASGEO-ROCK.EXE
FORCED:
A study of the frequency behavior of the
mechanical analogy of an LRC circuit: A mass,
with damping, attached to spring with a
forcing function. See also PHASOR1 for the electrical analog.
QB45 FORCED.BASFORCED.EXE

Modern Physics Programs
NameLanguageCodeStand alone .exe file
BLACK-T:
Generates the spectrum of a black body
QB45 BLACK-T.BASBLACK-T.EXE
COMPTON.BAS
Treats the Compton Effect and calculates two cross sections
QB45COMPTON.BASCOMPTON.EXE
SUMMER:
The Bohr-Summerfeld orbits for one-electron
systems are plotted.
QB45 SUMMER.BASSUMMER.EXE
TUNNEL:
The quantum-mechanical 1D tunneling problem. 

Transmission function is plotted

QB45 TUNNEL.BASTUNNEL.EXE

Optics
NameLanguageCodeStand alone .exe file
CIRAPT.BAS
Fraunhofer diffraction pattern of a circular aperture.
QB45 CIRAPT.BASCIRAPT.EXE
FRESNEL:
Fresnel coefficients are generated for s and p
polarization for given indices.
QB45FRESNEL.BASFRESNEL.EXE
FRES-SP1:
Graphs of the reflectance and transmission functions
for both s and p polarization are generated.
The user inputs the indices of the two media..
QB45FRES-SP1.BASFRES-SP1.EXE
FABRY:
The transmission function of a Fabry-Perot etalon is
calculated for 3 reflectivities. User can select the index of the etalon. Graphical output.
QB45FABRY.BASFABRY.EXE
ST-EDGE:
The Fresnel Diffraction pattern seen at a straight edge are plotted.
QB45 ST-EDGE.BASST-EDGE.EXE
CORNU:
The Diffraction integrals S and C are evaluated
using 6th order Romberg integration
and the Cornu Spiral is generated.
QB45CORNU.BASCORNU.EXE
NSLIT:
The Fraunhofer Diffraction pattern
of multiple slits is generated.
QB45 NSLIT.BASNSLIT.EXE

Nuclear Physics Programs
NameLanguageCodeStand alone .exe file
U234:
Mother daughter decay scheme is examined for U234
and graphical display of populations vs. time are displayed.
QB45U234.BASU234.EXE

Quantum Mechanics Programs
NameLanguageCodeStand alone .exe file
HERMITE:
Calculates and graphs Hermite Polynomicals
QB45HERMITE.BASHERMITE.EXE
DRAIN:
A finite 1d well, finds eigenvalues,
wavefunctions and Probability distribution
functions for any of the Odd or Even eigenvalues
QB45DRAIN.BASDRAIN.EXE
HARMON:
The 1D harmonic Oscillator: Energies, state functions and
probability distributions are calculated. A plot file generated.
QB45HARMON.BASHARMON.EXE
ORBITALS:
The hydrogenic Orbital functions Theta(l,m) are plotted
uses the Pauling and Wilson normalization.
QB45ORBITALS.BASORBITALS.EXE
BANDFREE:
A 1D crystal is examined where
Energy > V0 the barrier height of the periodic structure. Energy eigen-bands are found
and graphically displayed.
QB45BANDFREE.BAS BANDFREE.EXE

Utility Programs
NameLanguageCodeStand alone .exe file
TEK2WPLT
Coverts plotting data files to format needed by WPLOT
QB45 TEK2WPLT.BASTEK2WPLT.EXE
WPLOT:
a shareware program that provides great scientific
graphics on Intel machines.
A Zip file of it all. Wplot32.zip

Remember shareware.

 
QB4.5
Microsoft's QuickBasic 4.5 development system can be found here.
QB 4.5

Return to the Physics Home Page