

IMPR_RESU(FORMAT="MED",RESU=_F(MAILLAGE=MAIL))

You need to write a very short command file, let’s call it m : DEBUT() If you want, you can also convert this file in the MED format, which is a binary format that you can open using Salome or Gmsh. Now you can use this file in any Code_Aster study, for example by using this line in a command file. The groups will be really helpful when writing the Code_Aster command file, for example “GN_DDLX” are nodes that should be blocked in the DX dof, GN_DDLY for DY, etc. This script should create a valid file for Code_Aster in MAIL format.īy looking at the conversion result, you will see that the script created much more than node coordinates and element connectivity: many node and element groups are present.
#GMSH SCRIPT WINDOWS ARCHIVE#
Since it is definitely too long to be included in a post, here you can download the mail.tpl template (you should decompress the zip archive after downloading: what you really need is the text file inside). For a discussion about this method and documentation you can have a look at the first part of this forum post. Since it is also solver-agnostic, it is possible with a bit of scripting to use it to obtain a mesh readable from Code_Aster, groups included.įirst of all, you will need an “export template”, that is an HyperMesh™ script which will allow us to extract information about nodes, cells and groups and write them in a specific text format.
#GMSH SCRIPT WINDOWS PROFESSIONAL#
HyperMesh™ is a component of a very professional suite allowing to create/prepare geometries for finite element calculation, create complex meshes and writing a complete finite element study in a graphical way. Roberto Lugli for his support, suggestions and contacts

Enrico Bertocchi from “Enzo Ferrari” department at Unimore University for his precious help with the HyperMesh™ interface and testing the script,ĭr. To read this article one will need some knowledge both in HyperMesh™ and in Code_Aster.ĭr.
#GMSH SCRIPT WINDOWS HOW TO#
P.S.: Since I didn't write it anywhere else: I used Gmsh 4.3.This post is about how to export a Code_Aster compatible mesh from a widely used professional pre-processor: Altair HyperMesh™. It seems that the command parser from gmsh parses line-wise only until it encounters the first semicolon. geo-file with explicit linebreaks (\n between the commands). The same happend when I wrote everything manually in one line directly in the. geo-file in one line (so the echo command from above just without the linebreaks). I also tried to write all the commands in the. Gmsh seems to only execute the first of the three commands (the merge command) and ignores the rest. Up until now I have: gmsh input.stl -string "Surface Loop(2)= " -3 -o $cwd/MSH/slice$a.$i.msh -format "msh22" Therefore I created a script which uses command line arguments to do the above and avoids opening the gui. stl-files I can't do it manually with the gui. Since I have to do this process for multiple hundreds of. Modules->Geometry->Elementary entities->Add->Volume->klick on the surface-mesh->pressing 'e'->pressing 'q') I know that I therefore need to add a volume to the surfaces from the STL file. The problem I have is that I need to convert STL files to mesh files. After long hours of searching for an answer I thought it might be better to ask the community.
