From openEMS

Jump to: navigation, search

Note: This page is under construction. If you have experience with openEMS, please consider to create an account and help improve this page.


Setup the simulation

In openEMS the simulation parameters are defined in two objects.

All parameters that define the type of simulation, boundary conditions, number of simulated timesteps etc. are saved in the FDTD object. This FDTD structure is created with

>> FDTD = InitFDTD();

The information about the scattering structure and the shape of the sources is stored in the CSXCAD object. The simulated structure can be constructed from a variety of predefined shapes such as spheres, cubes, cylinders, wires etc. The structure to simulate is saved in the same structure as the simulation mesh, light sources and field dumps. The CSXCAD struct is created with

>> CSX = InitCSX();

which initialises all required fields and standard parameters.


In openEMS the structure to be simulated can be composed of various different physical properties (e.g. material or metal) and non-physical properties (e.g. probes or dump boxes) which can easily be defined using the openEMS Matlab/octave interface.


Primitives are the building blocks to create the scattering objects, field sources and field dumps. Each primitive has a shape (Curve, Polygon, Box, Sphere, ...) and a physical property defining its function. The physical property can be the material type (dielectric, metal, dispersive,...), a field source or a field dump to save the simulated field for post processing. All primitives for one simulation are stored in one CSXCAD struct.

For more information have a look at the Primitives page.

The FDTD mesh grid

openEMS supports a fully graded mesh in Cartesian or cylindrical coordinates. There are a couple of convenient functions to create an efficient and smooth mesh.

For more detailed information have a look at the FDTD Mesh page.

Field excitation and Ports

openEMS supports a variety of field sources. There are functions to easily define time signals such as a continuous wave sinusoidal signal as well as Gaussian pulses and completely user defined signals. The shape of the source is defined in the CSX excitation primitive. Both standard sources and total-field/scattered-field type sources are available.

Furthermore there are ports (e.g. the lumped port or wave-guide ports) which are macro function that combine e.g. current and voltage probes, field excitations and other necessary properties and primitives.

Field dumps

Field dumps are used to define the coordinates where the field is saved during the simulations. The fields are saved as an hdf5 file and can later be used for post processing such as the near field to far field transformation or to visualize the field propagation with Paraview.

For more detailed information have a look at the dump-boxes page.

Visualization of the Model

Prior to running the openEMS FDTD simulation it is important to visualize the model to ensure that it is correct. There are two ways to view the model. The first is to look at the solid model before it has been gridded, and the second is to look at the gridded PEC structure.

For more detailed information have a look at the Model Visualization page.

Near-field to far-field transformation

openEMS includes a near-field to far-field transformation (NF2FF) method. The NF2FF transformation is performed separately after the FDTD calculations.

For more detailed information have a look at the NF2FF page.

Visualization of Results

After the openEMS simulation is complete the results can be viewed using Matlab/Octave plotting functions.

Matlab/Octave Interface

All parameters that are required for the FDTD simulations can be set with the extensive Matlab/Octave interface. There are also functions available for the post processing of the data.

Have a look at the complete List of Functions

Retrieved from "index.php/Introduction"