Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • Stranger Tools Stranger Tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 338
    • Issues 338
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • alyaalya
  • Stranger ToolsStranger Tools
  • Wiki
  • Ansa tools documentation
  • Ansa2mpio

Ansa2mpio · Changes

Page history
Ansa2mpio reorganization and NEW command to run Ansa2mpio without GUI authored Feb 11, 2021 by Samuel Gomez's avatar Samuel Gomez
Hide whitespace changes
Inline Side-by-side
Ansa-tools-documentation/Ansa2mpio.md
View page @ c4185c01
There are two ways to output the mpio format from Ansa, with or without GUI.
Ansa2mpio is a python script which allows to write meshes from Ansa to the binary mpiio Alya format. There are two ways to output the grids: with or without GUI.
## Using the GUI
......@@ -30,6 +30,8 @@ After this the buttom is added to USF:
![Ansa2mpio](../figures/Ansa2mpio.png)
3. Set the case with proper inputs for your output ([Ansa2mpio inputs](Ansa-tools-documentation/Ansa2mpio-inputs))
#### 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.
......@@ -42,143 +44,12 @@ 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.
## 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).
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.
```
ansafile = /path/to/ansa/file.ansa
folder = /path/where/the/mesh/will/be/written/
name = casename
check2nd
check2nd2lineal
checkSurface
check2D
check3D
planeXY
planeYZ
planeZX
checkDat
checkInfo
checkCOORD
checkLNODB
checkLTYPB
checkLELBO
checkCODBO
checkLBSET
checkLNODS
checkLTYPE
checkLESUB
checkLMATE
checkCharacteristics
characteristicSET = 0
checkCsys
checkLMAST
checkperPID
checkperSET
MasterSET = 0
ChildSET = 0
checkXY
checkYZ
checkZX
checkWitness
checkZeroThincknessWall
interfaces = 0
checkRenumber
checkExtrapolate
checkGeometrical
checkCodesNodes
checkSizeBox
checkSave
checkQuit
checkSCale
scaleFactor = 1
checkInt4
checkInt8
```
**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.
**name**: Name of the case.
**check2nd**: Option to write 2nd order elements.
**check2nd2lineal**: Option to convert 2nd order element to lineal elements during the output.
**checkSurface**: Option to write surface meshes.
* **check2D**: Option to specify that the surface is 2 dimensional. In case this option is enabled the plane which contains the mesh should by specified by the keywords **planeXY**, **planeYZ** or **planeZX**.
* **check3D**: Option to specify that the surface is 3 dimensional.
**checkDat**: Write the .dom.dat Alya file.
**checkInfo**: Write the info.dat file which contains information related to the mesh as: scaling factor, boundary condition, material and subdomains.
**checkCOORD**: Write the coordinates in mpio format.
**checkLNODB**: Write the boundaries connectivities in mpio format.
**checkLTYPB**: Write the boundaries types in mpio format.
**checkLELBO**: Write the element attached at each boundary in mpio format.
**checkCODBO**: Write the boundaries codes in mpio format.
**checkLBSET**: Write the boundaries sets in mpio format.
**checkLNODS**: Write the elements connectivities in mpio format.
**checkLTYPE**: Write the elements types in mpio format.
## Without GUI
**checkLESUB**: Write the elements subdomain codes in mpio format.
The tool for this purpose is **nogui_Ansa2mpio.py** and is located in the **Ansa/Ansa2mpio** folder. 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 in [Ansa2mpio inputs](Ansa-tools-documentation/Ansa2mpio-inputs).
**checkLMATE**: Write the elements material codes in mpio format.
In order to run this conversor use the following command:
**checkCharacteristics**: Write the elements characteristics in mpio format.
* **characteristicSET**: Set ID for the elements characteristics.
**checkCsys**: Write the elements local coordinate system in mpio format.
**checkLMAST**: Write the periodic nodes in mpio format.
* **checkperPID**: Option that specify that the periodic nodes have to be collected from PID's.
* **checkperSET**: Option that specify that the periodic nodes have to be collected from SET's
* **MasterSET**: List of master PID's or SET's number, space separated.
* **ChildSET**: List of child PID's or SET's number, space separated. In case this option is enabled the plane which contains the nodes should by specified by the keywords **checkXY**, **checkYZ** or **checkZX**.
**checkWitness**: Option to write withnes points.
**checkZeroThincknessWall**. Option to duplicate nodes at zero thickness walls.
* **interfaces**: List of PID's number which nodes will duplicate.
**checkRenumber**: Option to renumber nodes and elements in proper Alya numbering.
**checkExtrapolate**: EXTRAPOLATE_BOUNDARY_CONDITIONS: ON in the .dom.dat id enable.
**checkGeometrical**: Write the geometrical boundary conditions.
**checkCodesNodes**: Option to write the codes and their intersection in Alya format in the .info.dat.
**checkSizeBox**: Option to write the refinements information in the .info.dat file.
**checkSave**: If enable saves the Ansa file twice, after renumbering the nodes and the elements.
**checkQuit**: Exit Ansa after finishing the writing precess.
**checkSCale**: Enables mesh scaling.
* **scaleFactor**: Factor for mesh scaling if scaling is enable.
**checkInt4**: Write the mesh using int4.
**checkInt8**: Write the mesh using int8.
\ No newline at end of file
```bash
/path/to/Ansa/ansa64.sh -nogui -exec 'load_script:/path/to/Ansa2mpio/Nogui_Ansa2mpio.py' -exec "_importInputFile('/path/to/input_file.dat')"
```
\ No newline at end of file
Clone repository

Ansa tools documentation

  • Running Python scripts in Ansa
  • Ansa2mpio
    • Inputs

pyAlya documentation

  • Alya Python module