... | ... | @@ -2,40 +2,49 @@ There are two ways to output the mpio format from Ansa, with or without GUI. |
|
|
|
|
|
## Using the GUI
|
|
|
|
|
|
**Ansa2mpio.py** is set to create a button in the Ansa User Script Button. Addtionally, it can be modified to use it with the options explained in [Running-Python-scripts-in-Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa).
|
|
|
**Ansa2mpio.py** is set to create a button in the Ansa User Script Button. Addtionally, it can be modified to use it with the options explained in [Running Python scripts in Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa).
|
|
|
|
|
|
#### USF button
|
|
|
|
|
|
In this case, a symbolik link has to be added to your Ansa installation folder.
|
|
|
```
|
|
|
```bash
|
|
|
cd /path/ansa/intalation/folder/scripts/CFD/
|
|
|
ln -fs /path/to/stranger-tools/Ansa/Ansa2mpio/Ansa2mpio.py Ansa2mpio.py
|
|
|
```
|
|
|
Then edit the file which reads these functions.
|
|
|
```
|
|
|
```bash
|
|
|
cd /path/ansa/intalation/folder/config/
|
|
|
vi CFD_TRANSL.py
|
|
|
```
|
|
|
Finally add the following lines.
|
|
|
```
|
|
|
```python
|
|
|
##Alya
|
|
|
import Ansa2mpio
|
|
|
```
|
|
|
After this the buttom is added to USF:
|
|
|
|
|
|

|
|
|
|
|
|
1. USF buttom
|
|
|
1. Ansa2mpio
|
|
|
|
|
|

|
|
|
|
|
|
#### As python script
|
|
|
This option is much more tedious because every time you start a session in Ansa you have to reload it. That is why I discourage it. In any case, it is explained what to do if you want to use this route.
|
|
|
|
|
|
Edit **Ansa2mpio.py** and comment the following lines:
|
|
|
```
|
|
|
```python
|
|
|
linked_folder = os.path.dirname(__file__)
|
|
|
path = os.readlink(str(linked_folder) + '/Ansa2mpio.py')
|
|
|
ansa2mpio_folder = os.path.dirname(path)
|
|
|
|
|
|
@session.defbutton('ALYA', 'Ansa2mpio', 'Output the MPIIO Alya format')
|
|
|
```
|
|
|
Then follow [Running-Python-scripts-in-Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa) guidelines.
|
|
|
Then follow [Running Python scripts in Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa) guidelines.
|
|
|
## From the terminal
|
|
|
|
|
|
The tool for this purpose is **nogui_Ansa2mpio.py** and is located in the **Ansa/Ansa2mpio** folder. An explanation to how to run python tools can be found in [Running-Python-scripts-in-Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa).
|
|
|
The tool for this purpose is **nogui_Ansa2mpio.py** and is located in the **Ansa/Ansa2mpio** folder. An explanation to how to run python tools can be found in [Running Python scripts in Ansa](Ansa-tools-documentation/Running-Python-scripts-in-Ansa).
|
|
|
|
|
|
Before running the case, we have to edit the input data file **nogui_input.dat**. Located in **Ansa/Ansa2mpio/Auxiliaries** is an example. This must content the setting of your case. All options are listed and explained below.
|
|
|
|
... | ... | @@ -89,7 +98,7 @@ scaleFactor = 1 |
|
|
checkInt4
|
|
|
checkInt8
|
|
|
```
|
|
|
**ansafile**: The path to the Ansa file which we mesh we want to output.
|
|
|
**ansafile**: The path to the Ansa file which mesh we want to output.
|
|
|
|
|
|
**folder**: Path to the folder where the mesh is going to be output.
|
|
|
|
... | ... | |