Readme.md 6.17 KB
Newer Older
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
1
2
# Ellipsys Paraview Plugins

3
4
Plugins for Paraview (version >= 5.6, [Download Paraview](https://www.paraview.org/download/) - it is recommended to use 
the latest version) to read files directly outputted from Ellipsys and dedicated filters. 
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
5
6
7
8
9
10

## Installation

1. Download or clone the repo
2. Open Paraview and go to the Plugin Manager (*Tools/Manage Plugins*)
3. Load the new plugin (*Load New* and navigate to this repo and select *EllipsysParaviewPlugin.py*)
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
11
12
4. If the plugin should be loaded after Paraview restart, be sure to tick the box *Auto Load* when expanding the plugin
 in the Plugin Manager
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
13
14

## Supported files
15
- .X3D and .X2D *(Mesh vertices as a multi-block-dataset)*
16
- adinput.dat *(Reads all ADs with: AD-location, AD-orientation, AD-discgrid - as well as reading ad-out data)*
17
- RST.01 *(Reads mesh file (X3D or X2D) and data in RST. All data with size matching cell data can be loaded from the data 
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
18
picker. Only grid level 1 is supported currently)*
19

kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
20
21
Help to add support for more files is much appreciated.

kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
22
23
24
25
26
27
28
29
30
## How to use
The above mentioned file extensions will now be recognized when opening a file. As an example it is assumed we have a 
*grid.RST.01* file that we want to read (Notices that the *grid.X3D*, needs to be present in the same folder).
1. Open the file manager either from the shortcut in the upper left corner or *File/Open..*
2. Navigate to the *grid.RST.01* file select it and click *OK*
3. On the left the *Data-Picker* is now be visible. Select the data that that you want to load by clicking the check boxes.
4. Click *Apply* to load the data into Paraview. You can select between the different field from the dropdown-menu which 
by default is set to *vtkBlockColors*. The representation can be changed from the dropdow-menu which by default is set to *Outline*

kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
31
32
33
## Dedicated filters
Non - yet. 

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
## Running Paraview remotely on Jess
It is possible to have Paraview on Jess where all the data and rendering is done at Jess and the client is only 
displaying the rendering. (This avoids the need to transfer the data from Jess to your own computer). <br>
We need to set it up at both *Jess* and your *Desktop*. Starting with Jess. (It should be noted that Paraview version 
on Jess and the Desktop should be the same)
#### Set up on Jess 
To set it up you will need to clone this repo to Jess and set the following two variables in the .bashrc (on Jess):
1. PARAVIEW_ELLIPSYS_EXT
2. PARAVIEW_PATH

Where PARAVIEW_ELLIPSYS_EXT is the path to this repo on Jess, and PARAVIEW_PATH is the path to the Paraview installation.
<br>
As an example 
```bash
# at the end of .bashrc
PARAVIEW_ELLIPSYS_EXT="/path/to/ellipsys_paraview_plugin"
PARAVIEW_PATH="/path/to/Paraview"
```
#### Set up on Desktop
Assuming you already had cloned this repo to your desktop you should open Paraview and add the *servers.pvsc* file. 
To do that open the *Connect...* from `File->Connect...` this will open the *Chosse Server Configuration* window. From 
here you should press *Load Servers* and navigate to the *servers.pvsc* file in this repo. In the *Chosse Server C
onfiguration* window you should now have two configurations, namely: *Jess Login Node* and *Jess Node j*. 

#### Starting a remote connection
##### Testing the set up
To test if the set up works select the *Jess Login Node* in the *Chosse Server Configuration* window and press Connect.
A dialog should now pop up asking for your Username (the name you use for ssh to Jess). When clicking OK a 
terminal should popup asking for password to ssh into Jess. The terminal should then display the Paraview version and 
then write something like:
 ```shell
paraview version 5.8.0
Waiting for client...
Connection URL: cs://jess.dtu.dk:11112; 
Accepting connection(s): jess.dtu.dk:11112
```
It will then take a couple of secounds and you should see that in the *Pipeline Browser* the following should change
*builtin->Jess Login Node(cs://jess.dtu.dk:11112)*. <br>
No data should be loaded on the *Login Node* and it should only be used for testing if the set up work,
since all work will be done on the *Login Node*. Use a interactive qsub session instead. See below.
 
##### Connecting to an interactive qsub session
Before you can connect to an interactive qsub session you need to start one, by ssh to Jess and start an interactive qsub 
session with a command like:
```bash
qsub -I -q workq -l nodes=1:ppn=1 -l walltime=08:00:00
```
Now you should be logged into a computing node. You need the name of the node for later which can be seen from your 
terminal as `[username@j-XXX ~]$` where `j-XXX` is the name of the node. <br>
Back in Paraview (on your desktop) you open the *Chosse Server Configuration* window and choose the *Jess Node j* configuration and press 
connect. A popup asks for *Username* and the *Node* (the node name should be with j-). When clicking OK a 
terminal should popup asking for password to ssh into Jess. The terminal should then display something like:
 ```shell
paraview version 5.8.0
Waiting for client...
Connection URL: cs://j-XXX:11113
Accepting connection(s): j-XXX:11113
```
It will then take a couple of secounds and you should see that in the *Pipeline Browser* the following should change
*builtin->Jess Node j(cs://jess.dtu.dk:11113)*. Now you are logged into Jess and you should see that the file browser
is browsing the files on there. You need to load the plugin on the server as well (it should only be necessary to load 
it the first time you log on to it).
kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
96
97
98
99
100
101
102
103
## Uninstalling the plugin
To uninstall the plugin you will have to navigate to the Plugin Manager (*Tools/Manage Plugins*) and select the 
*EllipsysParaviewPlugin* and click the *Remove* button.

## Updating the plugin
When updating the plugin to a newer version you need to uninstall the old one, as described above then <b> Restart Paraview</b> (<- important) <br>
Opening Paraview again you can install the plugin as described at the top.

kenneth.loenbaek@suzlon.com's avatar
kenneth.loenbaek@suzlon.com committed
104
105
106
107
108
## Sources
Some inspiration for developing this plugin was found at:<br>
[Blog post: *Generic mesh readers under ParaView via the new Python interface*](https://www.litianyi.me/2019/10/27/paraview-python-plugin/)<br>
[Github repo: Plugin from above blog post](https://github.com/tianyikillua/paraview-meshio)<br>
[Paraview Guide (chapter 12)](https://www.paraview.org/paraview-guide/)