Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
Mesh

The size of the simulation domain in the FDTD length units is set with the SetInternalSpace() method. In this case, the grid size of the FDTD simulation is calculated as the size of the area divided by the grid step. The grid step is set by the SetResolution() method, which sets the value(s) of the step(s) along each axis, or by the SetResolutionN() function, which sets the number of steps along each axis.

    task.SetInternalSpace(emtl.Vector_3(0), emtl.Vector_3(10))
    task.SetResolution(1, 0.5)

In this way, you can set the grid size 10*10*10 cells and the Courant factor of 0.5. Hereafter, task is an object of the uiPyExperiment class. The maximum memory size required for the calculation will be 10^3 *64 = 32,768,000 bytes. The time step is calculated as a factor_curant * grid step and will be equal to 1 * 0.5 or 0.5.

Some data for calculation is packed in EMTL, the maximum possible memory size in bytes that may be needed for calculation can be calculated as the full grid size multiplied by 64 (for the double precision version of EMTL).

When setting the dimensions of the simulation domain, the following is recommended:

  • At least 10-20 time steps should fit into the characteristic wavelength.
  • The size of the object must be at least 2-5 spatial steps.
  • The Courant factor should be approximately 0.5.
  • The size of the memory required for the calculation does not exceed the available RAM.