Computer Simulation of Quantum Mechanics - Porthouse

The name of this file is BASICPRO.HTM



logo

BASIC programs

Two-slit interference experiment demonstration - Dirac equation - superluminal communication - relativity of simultaneity - gravitational many-body problem - Van Allen Belt - relativistic flight simulator - Kelvin-Helmholtz Instability - Von Karman vortex street

All the programs given here will run with Microsoft QBasic, and this is recommended. Click here for advice on installing QBasic as a viewer.


Advice on running QBasic programs

If you do not have QBasic available, but you do have PKware's PKZIP available, then you can download, unzip and run the ZIP versions of each program. It is possible to streamline the operation of PKZIP, as described here.


Advice on running ZIP programs in unzip-and-go mode

If you have Microsoft QuickBasic 4.5 or Visual Basic for DOS, then you can install it as an interpreter like QBasic. Look at the instructions for QBasic above to see how to do this.

Alternatively, you can install the batch compiler (BC.EXE) so that the BAS program is compiled and then run. You might want to do this if you are short on memory, or if you want a better version of the relativistic flight simulator.


Advice on running BAS programs in compile-and-go mode

So you can run the software listed here with any one of four software products. If you have none of these, it is suggested that you acquire PKZIP, which is often available as shareware, from PKWare. Then keep a watch for a cheap copy of MS-DOS 5.0.

With each computer program listed we include a picture of a typical frame taken from the program, in case your computer is non-IBM. You can click on any picture to see a larger version of it (none of the GIF files are all that big so don't worry). Try Ctrl-K to put your web browser in kiosk mode (this is in Mosaic: other browsers may have other ways to do it).

One little irony to note is that if you want to see the large version of a picture, the GIF file you download may be almost as long as the QBasic program which generated that picture. Just look how economical it is to pass around QBasic programs rather than masses of GIF files! Those QBasic programs can also be transferred to computers without modems.

There are no viruses in the software, but you should be aware that in general, your computer can pick up a virus by running a program with an EXE extension. You could also get a virus from a BAS program, though this is a little less likely since it cannot be hidden so easily, or even from a BAT file. You cannot get a virus from an HTM or GIF file. If you are really paranoid about viruses, just look at the pictures and don't run the programs. In the relativistic flight simulation section there is a short 10-frame animation sequence you can look at, which is based only on HTM and GIF files and cannot give you a virus. Otherwise you will see that the programs match the pictures, which ought to be sufficient guarantee.




WPD picture <- Click here to expand.

The QBasic program WPD.BAS shows what you would see in the quantum mechanical two-slit interference experiment.


WPD.BAS --- 14 K --- 525


WPD.ZIP --- 38 K (unzips to WPD.EXE compiled from WPD.BAS)


WPD1 picture ... WPD2 picture

Click on either picture to expand.

The next two programs, WPD1.BAS and WPD2.BAS, introduce the author's ideas on the computer simulation of quantum mechanical wave-particle duality. The first program is intended to chain the second. This may not work properly within the browser, but you can run them sequentially anyway.


WPD1.BAS --- 21 K --- 506
WPD2.BAS --- 26 K --- 217


WPD1.ZIP --- 45 K (unzips to WPD1.EXE compiled from WPD1.BAS)
WPD2.ZIP --- 47 K (unzips to WPD2.EXE compiled from WPD2.BAS)



WPD3 picture <- Click here to expand.

WPD3.BAS gives some mathematics for the author's ideas. We need to write a program just to put equations on the screen.


WPD3.BAS --- 29 K --- 171


WPD3.ZIP --- 55 K (unzips to WPD3.EXE compiled from WPD3.BAS)



DIRAC picture <- Click here to expand.

DIRAC.BAS is now obsolete. It represents the beginning of the author's direct attack on quantum mechanics. Run this program to see what is meant by 'virtual-time simulation'. You will see how the Dirac wave packet has a superluminal wave speed, but a subluminal group speed. This program is CGA only, as if to underline its obsolete character.


DIRAC.BAS --- 22 K --- 264


DIRAC.ZIP --- 45 K (unzips to DIRAC.EXE compiled from DIRAC.BAS)

There is now a successor to DIRAC.BAS, available in the Special Area which you can click on. This successor is the current attempt to model wave-particle duality. It is a series of modules which run with Microsoft QuickBasic 4.5 or Visual Basic for DOS. You will not be able to do much with QBasic, which is why this software is in a Special Area.


Special Area



RELAY picture <- Click here to expand.

RELAY.BAS explains why superluminal communication is considered to be impossible. There are some comments on Charles Bennett's work, making this an up-to-date presentation.


RELAY.BAS --- 23 K --- 423


RELAY.ZIP --- 45 K (unzips to RELAY.EXE compiled from RELAY.BAS)


Click here to expand -> RODS picture

RODS.BAS is nothing to do with quantum mechanics. It just shows the Lorentz-Fitzgerald contraction and the relativity of simultaneity. This is a short program. Since the author is willing to talk about nonlocal phenomena, it is just as well that he produce this to show that he understands conventional theory.


RODS.BAS --- 14 K --- 294


RODS.ZIP --- 41 K (unzips to RODS.EXE compiled from RODS.BAS)


Click here to expand -> GRAV picture

GRAV.BAS is also nothing to do with quantum mechanics. It does a numerical integration of the gravitational many-body problem as a showpiece for the technology of object-oriented programming.

A frame buffer, available in EGA and VGA, is recommended for this program. With CGA you will get an unpleasant flicker.


GRAV.BAS --- 23 K --- 175


GRAV.ZIP --- 46 K (unzips to GRAV.EXE compiled from GRAV.BAS)

If you are interested in gravitational many-body programs, then take a look at Henley Quadling's gravitational many-body website.


Click here to expand -> VA picture

Having written GRAV.BAS, it is quite easy to re-edit it into a program which simulates the motion of an electron in a dipole magnetic field. This program can show the Van Allen Belt. The program given here works in stereo, so you may wish to get hold of some of those red/cyan 3D spectacles.


VALLEN.BAS --- 19 K --- n/a


VALLEN.ZIP --- 41 K (unzips to VALLEN.EXE compiled from VALLEN.BAS)

... and VALLEN.BAS is easily re-edited to give a modest relativistic flight simulator. We emphasise the word 'modest'.


Click here to expand -> RFS picture
 

*NEW* Click here for a short (10 frame) sequence from this program. This is animation done with HTM and GIF files. You can view this at once!

Like GRAV.BAS, this program could do with the frame buffer available in EGA. With CGA you will get 'direct refresh' graphics which should persuade you to save up for a better graphics system. At least you don't just get kicked out the door.


RFS.BAS --- 22 K --- n/a

You will find with this program that the faster the computer, the smoother the action. Try running RFS.EXE for improved performance. You should get both better spatial resolution, and better temporal resolution.

It should also help to have a maths co-processor in action. Even if you have one fitted, QBasic does not take advantage of it (that's why it's given away), but RFS.EXE does.


RFS.ZIP --- 49 K (unzips to RFS.EXE compiled from RFS.BAS)

If you try this program on an 8088, you may be disappointed by the results. You could fit an 8087 maths co-processor, but the money would be better spent on a share in a new computer unless the 8087 is really cheap.

This program finishes by giving you the means to access the author's GATEWAY TO PHYSICS so that if it ever becomes detached from this website, the user can find his or her way back. On the Gateway you will find hotlinks to this website, to services like TIPTOP, to other useful sources of information for physicists, and to other websites on relativity. A physicist in Tannu Tuva who only had this program could still recover the entire world of physics on the Internet, including better relativistic flight simulators as they become available. Subject to the author's intellectual property rights, you are permitted to give free copies of this program (both BAS and EXE) to visiting students and lecturers.

We are happy to point you in the direction of other people's work. You may find a website on relativistic ray-tracing at


and on relativistic flights through both random starfields and cubical grids of stars at


Wade Lutgen has produced a computer program to show you relativistic flight through the stars which should appeal to 'Star Trek' fans. You can watch moving stars much as you can watch moving boxes in the author's program, but the Doppler effect gets much better treatmemnt. In one ZIP file you will find both C++ source code and compiled object code:



Other programs may be found on the author's page of links. We are always 'in the market' for hotlink exchanges with other relativity websites, because we know the benefits, and we recommend also that you register with TIPTOP and include a reciprocal hotlink to TIPTOP on your website. Here is a reciprocal hotlink to a plain flight simulation page of links:



A Second Front?

Is there a second front on which we can attack the problem of quantum mechanics? Click here to read about the possibilities of vortex dynamics.


Second Front (Kelvin-Helmholtz Instability and Von Karman vortex street programs in here)

It won't be long before we have computer simulations of lots of things all available as QBasic or C++ or JAVA programs to pass round the Internet, both as source code and PKZIPped object code. One thing which will stick out like a sore thumb is our current inability to tackle quantum mechanical wave-particle duality, and that is where we might concentrate our curiosity.



Return to previous page

Advertisement: Click here to read about the author's recommended best practice on search engines.



























- - - - - - - - - - - -