If you use Ansys® Workbench® to build your mesh, you probably noticed that the .msh file exported is binary, and cannot be converted properly by the OpenFOAM® converter fluentMeshToFoam. However there is a workaround. Simply set the variable

export AWP_WRITE_FLUENT_MESH_ASCII=1

before launching workbench, or add it to your ~/.bashrc file. This will automatically force the mesher to save .msh files in ASCII format, which can be then imported as usual in OpenFOAM.

Source: Simon Pereira @ CFD Online

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM®  and OpenCFD®  trade marks.

 

One Response to Exporting mesh from Ansys Workbench to OpenFOAM

  1. philipp says:

    Hi Simon,

    could you help me with a problem concerning the mesh-import form workbench to openFoam? For my bachelor´s thesis I have to build a mesh using the Ansys Workbench, but the simulation should be computed using openFoam. Now I tried to export the Workbech-mesh using the .msh file-format and tried to import it using the command fluentMeshToFoam. Unfortunately openFoam could not read the .msh-file probarely. What do I have to do to get the mesh from Workbench to openFoam?

    With Regards
    Philipp

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>