ToyFDTD logo



Image from a ToyFDTD1 simulation

  Return to ToyFDTD Home

red bulletWhat is this?   ToyFDTD5 adds 3 features to ToyFDTD1:

- option for choosing which field component to output
- choice of 2 output formats: bob volumetric files or 2D raw files, with a demonstration of a 2D animation method created by John Schneider, Patrick Flynn, and Kurt Shlager
- modularization of the code into separate files using C/F90 functions for implementing the various tasks - this can be a real sanity saver

red bulletLanguage: F90

red bulletAuthor: Laurie E. Miller

red bulletWhy it's cool:

 blue bulletSpeedier, platform-independent rendering with the 2D rendering method! The 2D rendering method does not require a great deal of memory or special rendering tools, just a compiler. I don't know about you, but I spend a lot of my time looking at 2D slices of my volumetric data anyway since important features are often viewed most easily that way.
 blue bullet2D raw files take up significantly less space than full-volume bob files, which can be an enormous advantage over a long simulation. 
 blue bulletWriting modular and well-organized code will save you hours of trouble looking for hard-to-find bugs once your code starts to get large or complex, such as when you start adding parallelism. And when you write a new function to perform a specific task, such as a better routine for updating of field arrays, you can just replace the function and the main code structure needs no changes.

red bullet Simulations run with ToyFDTD5:

 blue bullet Simulation with bob file output:           The code simulates the same problem as ToyFDTD1. The results are identical; comparison of the floating-point results showed no differences. The first animation below was made from running the ToyFDTD5 code for comparison with ToyFDTD1 results. See the ToyFaq for what the colors mean:

 blue bullet Simulations with raw file output:            First of all, I'll describe raw files and how to use them. You can read an indepth discussion of the methods on the webpage that John Schneider has set up. That page also has the source code for the converter. Briefly, the procedure is as follows: after you obtain a data set, where each file is of the form ez.xxxxxx, for example, you need to convert it using the rw2pnm utility, which can be found on the aforementioned webpage. After you finish the conversion, you'll have a bunch of files with a .ppm or .pnm extension. These are the single frames of the simulation, and can be viewed using utitlities such as GIMP, or converted to any number of other formats using your favorite graphics converting program. 
           Now on to the simulation.  The simulation is the same as ToyFDTD1 except that now you have a bunch of 2D graphic files. To the left, you can see a strip of 30 frames joined together into a single image. The data was output along the z=4 slice. To the left of every frame, you can see a color bar. Colors higher up  the bar (such as pink or white) are more positive, and colors lower on the bar (such as yellow or green) are more negative. You can see the simulation evolving with each frame, and the output apears similar to what you get if you sliced one of the 3D bob images along a constant z plane and looked down on it.


Image of rectangular guide with continuous source  Movies:                                             
blue dot256x256 mpeg, 500 frames [1.4Mb]
blue dot512x512 mpeg, 500 frames [4.0Mb]
red dot256x256 gif [76Kb]
red dot512x512 gif [0.3Mb]
Rectangular waveguide with continuous plane wave source at 10.0 GHz, operating in TE10 mode.
blue dot286x42 mpeg, 500 frames
red dot1338x286 tif [1.2Mb]
red dot1338x286 jpg [165Kb]
red dot133x286 gif [46Kb]
Rectangular waveguide with continuous plane wave source at 10.0 GHz, operating in TE10 mode.

red bulletSo where's the source already?

Download ToyFDTD5 source:
 compressed: ToyFDTD5-v1.0.tar.gz
 uncompressed: ToyFDTD5-v1.0.tar

You'll want to check out the README file that comes with the code for some helpful instructions. For info on un-compressing or un-tarring the tar files, see the ToyFAQ.

red bulletRelease History:

 ToyFDTD5 v1.0 was released on 14 February, 2000 

red bulletReferences:  ToyFDTD1.

 red bulletContact the perpetrators:

red bullet Waves of the future: (click on the pretty logo to get there):

Link to ToyFDTD main page

 Colorbar made from a ToyFDTD simulation