Tutorial: First Steps

From openEMS

Jump to: navigation, search

In this tutorial we will check if openEMS is correctly installed.

After completion of this tutorial, there is confidence in the correct installation of openEMS.

Contents

Prerequisites

openEMS executable

First lets check, if the openEMS executable is correctly installed (there may be missing dependencies or an incompatible architecture):

Linux

  • open a terminal window
  • change the current folder to the openEMS installation directory
  • invoke the openEMS solver
    ./openEMS
    

The output should be similar to:

 ---------------------------------------------------------------------- 
 | openEMS 64bit -- version v0.0.33
 | (C) 2010-2015 Thorsten Liebig <thorsten.liebig@gmx.de>  GPL license
 ---------------------------------------------------------------------- 
[...]

Windows

  • open a command window ("Start"-Button, type "cmd")
  • change the current folder to the openEMS installation directory
  • invoke the openEMS solver
openEMS

The output should be similar to:

 -------------------------------------------------------------------- 
 | openEMS 32bit -- version v0.0.23
 | (C) 2010 Thorsten Liebig <thorsten.liebig@gmx.de>  GPL license
 --------------------------------------------------------------------
[...]

Matlab/Octave Interface

OpenEMS needs a xml-file to start the simulation. This file is normally generated by Matlab (or Octave).

  • start Matlab (or Octave)

Now let's check if the CSXCAD interface functions are available, type the following into the command window and compare the output:

>> InitCSX

ans = 

    Properties: []

If the error message states 'InitCSX' is undefined, you need to have another look at the install instructions:

Now let's check if the openEMS interface functions are available:

>> InitFDTD('NrTS', 0, 'EndCriteria', 0)

ans = 

    ATTRIBUTE: [1x1 struct]

If the error message states 'InitFDTD' is undefined, you need to have another look at the install instructions:

Let's try to start the simulator from our Matlab environment:

>> RunOpenEMS( '.', 'nonexistant.xml', '' )
[...]
Read openEMS xml file: nonexistant.xml ...
openEMS: Error File-Loading failed!!! File: nonexistant.xml

Although it presents an error message, the call itself was successful. Matlab is able to find the simulator executable and start it with the name of the xml-file.

AppCSXCAD executable

The AppCSXCAD program graphically displays the structure built within the Matlab environment. It is very useful to visualize the computational area and helps to find errors in the geometrical definition of the structure.

Start AppCSXCAD from Matlab:

>> CSXGeomPlot('nonexistant.xml')

A dialog box should appear, telling you that the file nonexistant.xml cannot be opened. That proves, that Matlab is able to run AppCSXCAD.

Main window of AppCSXCAD

The main window should be displayed (refer to the screenshot at the right hand side).








Return To Tutorials Index