This video is taken from the FDTD Learning Track on Ansys Innovation Courses.
- PC Micro Cavity (example which demonstrates a similar photonic crystal cavity)
- Making a CW movie
We’ll use the photonic crystal cavity resonator structure again for this demonstration.
The photonic crystal cavity is made of a Z-normal dielectric slab with a pattern of holes etched
into the slab forming the cavity.
We will add Z-normal movie monitors in the slab to create movies of the electric field
intensity and a Z-component of the electric fields.
The movies will show the initial source pulse injected by the dipole source and the resonant
fields in the cavity.
Start by adding a movie monitor from the Monitors drop down menu.
Edit the monitor.
Under the field component, Electric field intensity is selected, so this is what will
be recorded in the movie that will be generated.
The TM and TE field component options are used for 2D simulations so these settings
don’t apply for our 3D simulation.
We will use the default resolution and scale.
The draw structure outline setting is selected so I’ll be able to see outlines of the holes
of the photonic crystal in the movie.
Under the geometry tab, make sure that the monitor is centered and set the x and y spans
of the monitor to 2.5 microns to match the span of the simulation region.
Finally, I want to movie file name to indicate that the movie is showing the electric field
intensity so I’ll set the name to E intensity movie.
Next, I’ll duplicate the monitor to create another movie where I’ll just record the
z component of the electric field.
Edit the monitor and set the field component to Ez.
I’ll set the name of the monitor to Ez movie.
Click OK to accept the settings.
Run the simulation.
After the simulation is complete, check your current working directory, which is my desktop
in this case.
I can see the two movies.
First I’ll play the movie of the electric field intensity.
I can see the initial source pulse, followed by the resonant field pulses.
The field intensity at the beginning of the movie is a bit saturated which can be seen
by uniform red areas of the fields so if I wanted to reduce the saturation, I could set
the scale setting of the movie monitor to a larger number and re-run the simulation.
However, keeping this scale has the advantage of allowing me to more clearly see the fainter
radiation of light escaping the cavity later on in the movie.
Next, I’ll play the movie showing the Ez component of the fields.
Here, because the fields have positive and negative values and the color scale goes from
blue to red for lowest and highest field values, green in this movie indicates the center of
the color scale corresponding to the field amplitude of 0.
Since there were only positive values in the field intensity move, blue indicated an amplitude
of 0 in the previous movie.
Because the file name of the movie file that is generated is determined by the simulation
file name and the monitor name, make sure not to have two monitors with the same name
and rename existing movie files before re-running the simulation if you want to keep the previous
file from being overwritten.
The resolution of the movie is one of the monitor settings, but remember that the resolution
of the field data is still limited by the simulation mesh, so if you want to get smoother
fields in the final movie, you may need to use a finer simulation mesh.
If you find that the fields in the generated movie are saturated, or they are too faint
to make out, adjust the scale setting of the movie monitor and re-run the simulation.
The .mpg movie file can be played using almost any video player software, however some video
players will allow you to play the partial movie while the simulation is still running,
so you can preview what is happening in the simulation before it completes, whereas others
only allow you to play the movie once the full movie file has been written.
The movie monitor does cause the simulation execution time to take longer, so it’s best
to disable the movie monitor if you’re running a parameter sweep and you don’t plan on
using the movies generated from each simulation file, and only enable it when needed.
Finally, the movie monitor generates a movie of the fields in the time domain, but it’s
also possible to generate a movie to show the steady-state response at a particular
This can be done by using the CW movie with MATLAB analysis group from the object library.
This uses a frequency domain monitor and exports the monitor data to MATLAB where a movie can
For more details see the Making a CW movie page linked below.