Setting Up nextnanomat

For the exercises we will require two different settings in nextnanomat (our user interface).

Direct Exporting

The first setting is the simplest one and it is used to open the selected .vtr file in nextnanomat into ParaView. It will require to follow the next steps:

  1. In the menu bar of nextnanomat, click on Tools :math:`\Rightarrow` Options :math:`\Rightarrow` Data Export

  2. Provide the path of the executable of ParaView in your computer in the field ParaView installation path (e.g. C:Program FilesParaView 5.11.1binparaview.exe ).

  3. Click OK

  • In Options: Data export, write the path to the ParaView executable in your computer, e.g. C:\\Program Files\\ParaView 5.6.0-Windows-msvc2015-64bit\\bin\\paraview.exe

Exporting with Python Scripts

The second setting is used for launching ParaView through Python scripts. As we will see in the next examples, this is very useful for post-processing several input files, including setting up overlayed plots. For this setting it will be require to follow the same steps as before, but not including the path of the executable of a terminal window (cmd.exe for Windows, as example) in the field Python executable file.

Figure 1.5.1 presents the final result provided the required information.

../../../../_images/nnmt_export_ParaView_python_2d_nextnanomat_settings.png

Figure 1.5.1 Required settings for exporting .vtr files from nextnanomat to ParaView in this tutorial. This menu is accessed clicking in Tools :math:`\Rightarrow` Options :math:`\Rightarrow` Data Export, within nextnanomat.

Installing the Python scripts in your Computer

Copy the three python scripts shown above in a folder and create an empty file called __init__.py. This last file is required in order Gui5.py be identified as a package by Python.

A more powerful resource in the integration of nextnano GmbH and ParaView is the possibility to incorporate Python scripts in the post-processing of the simulation data. For performing the next exercises, we will use the second setting described above, where ParaView will be called from a command line in a terminal application (for example, C:Program Filescmd.exe in Windows).

Actually, we will make use of three scripts:

  • Paraview_postprocessing.py, that contains all post-processing tasks to be performed on each file exported

  • dialog_window.py, that will capture information of nextnanomat and to launch a new window for selecting files to be exported, and predefine some global properties of the plots. It is the actually the one that will launch ParaView and the post-processing script.

  • Gui_5.py, is a simple script for generating the window for selecting files, described before. In order to be recognized as a package to be imported by the previous script, it is required to create an empty file called __init__.py in the same folder where this script will be stored.

Copy them in on your computer. All scripts shall be stored in the same directory.