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

Detailed documentation for the uiPyExperiment class can be found here: Object of experiment (uiPyExperiment)

An object of the ‘uiPyExperiment’ class, usually referred to in the code as "task", is the cornerstone of conducting a computational experiment. Setting up and conducting an experiment is carried out by calling methods of an object of the 'uiPyExperiment' class.

The EMTL library conducts a computational experiment in several stages:

  • 1) building a geometry;
  • 2) calculation of the signal propagation in the simulation domain;
  • 3) analysis of the results (integration of detector outputs, conversion of the near field to the far field, etc.).

Stages of setting up a computational experiment (how to write a script correctly)

Abstractly, writing a script can be divided into the following stages:

  • 1) Initialization of the uiExperiment object.
  • 2) Setting the computational volume, spatial resolution and boundary conditions (periodic, absorbing or reflecting). Read more here: Boundary conditions, Mesh, Simulation domain.
  • 3) Specifying the source signal. Read more here: ref source-sec.
  • 4) Specifying material objects inside the simulation domain (setting up their geometry and assigning material properties to each object) Read more here: Geometry.
  • 5) Setting detectors. Read more here: Detectors.
  • 6) Setting the number of iterations in time and starting calculations. Read more here: Simulation time.

Initialization

All the code below will be provided for the Python interface of the library.

The object of the experiment is initialized as follows:

    task = emtl.uiPyExperiment()

After initialization, select the grid type:

    task.SetMainBlockTypeId(0)

Possible arguments of the SetMainBlockTypeId method:

  • 0 - ChessFold proprietary block
  • 1 - ‘ConeTur’
  • 2 - Chessfold3D

Below are the links to the pages, where you can find further description of the simulation setup.