In this video, we will go over some tips about simulation performance and how various simulation
settings can affect the timing of the simulation.
All of these settings are available in property editor window of the DGTD solver.
The first setting is the simulation time in General tab which can be adjusted in the unit
This defines the maximum duration of the simulation to be performed and should be long enough
so that the time-domain light pulse has passed through the system before this time to ensure
accurate simulation results.
This ensures that the energy in the system has been almost completely decayed before
the end of simulation.
Ending the simulation too early will reduce the accuracy of your results, while running
it too long simply means you have to wait longer to get results.
Setting an appropriate simulation time is made much easier by the auto shutoff feature.
The auto shutoff feature, which can be found in the Advanced tab in DGTD solver settings,
allows the solver to automatically stop as the total energy level in the system has reached
a certain level compared to its peak value.
This ensures that if an unnecessarily long simulation time is chosen, the simulation
will not continue after the energy in the system has decayed enough.
Having the autoshutoff feature enabled is always recommended in order to optimize the
actual simulation time.
During the simulation, the actual time required to perform the simulation is estimated and
shown in job manager window based on the chosen simulation time in solver settings.
However, the simulation might end sooner if the autoshutoff level is reached.
The current energy level of the system relative to its peak value during the simulation is
also shown in the job manager window as the auto shutoff level.
The total energy level of the system during the simulation can also be visualized from
the energy dataset after the end of the simulation.
This dataset can be used to ensure that the energy level of the system has decayed to
a reasonable level before the end of the simulation.
Another setting that can affect the performance of the simulation is edges per wavelength
in the Mesh tab of the DGTD solver settings.
This determines the number of edges per wavelength of a triangle (in 2D) or tetrahedron (in 3D)
used in the mesh.
Higher number of edges per wavelength results in a more refined mesh grid and more accurately
models the simulated structure but at the same time increases the amount of time required
to perform the simulation.
In addition, the chosen polynomial order which sets the order of the basis function in the
finite-element solver can influence the simulation performance.
A higher order basis function allows to resolve nonlinear variations in the electric field
better even with a coarser mesh but also will result in a smaller time step for the time-domain
simulation and therefore longer simulation time.
The time step used for time-domain simulation is automatically adjusted by the solver however
it is always heavily affected by the smallest mesh element present in the simulation.
This means that simulations with highly refined mesh elements will have smaller time step
and therefore longer simulation run time.