Field Precision title

Automatic movie generation in thermal and electromagnetic codes

The 2D TriComp codes TDiff (dynamic heat transport), Pulse (magnetic-field diffusion) and EMP (time-domain electromagnetic radiation) feature automatic movie generation. The plots show contour lines of temperature in TDiff, lines of magnetic flux density (B) in Pulse, and electric or magnetic field lines in EMP (depending on the EM mode).

Creating a movie in AVI format is easy and takes just a few minutes. Here's how it works:

1) Add the MOVIE command to a working input script. The command has the format

MOVIE NFrames [NH NV QMin QMax]
MOVIE 100 640 480 0.0 100.0

The integer quantity NFrames is the approximate number of frames. I say approximate because TDiff and Pulse employ a variable time step. In this case, the code does its best to create NFrames plot files at equal time intervals. The integer quantities NH and NV are the number of horizontal and vertical pixels in the output graphics files. The default is 1024 × 768. I picked 640 × 480 for the example included for a good display on the Internet.

2) Run the simulation. The new feature is compatible with solution display, so you can monitor the plots during the run. The program generates approximately NFrames files in BMP format, at an interval oTMax/NFrames starting at t = 0. If the input script has the name FPrefix.TIN, the graphics files have names FPrefix000.BMP, FPrefix001.BMP, ....

3) Run our free movie-generation program CECIL_B, available at https://www.fieldp.com/cecil_b.html. Navigate to the directory that contains the BMP images and point to any file in the set. CECIL_B automatically orders the files and combines them into an AVI movie. The program uses defaults or the frames/second and codec of your choice.


LINKS