CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing & Mesh Conversion (
-   -   Output deck from ANSA for OpenFOAM use (

Kattie January 24, 2011 16:07

Output deck from ANSA for OpenFOAM use
Hello All,

I have a simple airfoil meshed in 2D in ANSA, and I am looking for a way to extrude that into 3D, such that I can fill in the PID options for the various patches.

I'm using ANSA v13.1.1 and OpenFOAM 1.7.1. This is a test case I am starting with to begin to learn the functionality of OpenFOAM, and how the GUI of ANSA can help with preprocessing. I'm familiar with FLUENT/Gambit and Star-CCM+, but OpenFOAM and ANSA are new to me.

I've attempted to use the volume - extrude - offset and translate options in the mesh page, but they don't project all elements well. Additionally, when they project, they are all disconnected, and the FEMTOPO command does not work.

I was also hoping to compare the meshing capability of ANSA to that of the built in snappyHexMesh, but when I attempt to output an OpenFOAM deck with no mesh, or only a surface mesh, it comes up with an error, because of no volume mesh.

Any advice on how to create a 3D mesh from this 2D mesh would be very much appreciated.

Thank you in advance,

Luke January 26, 2011 04:52

Hello Katti,

look at the ANSA UserGuide on page 228. Here itīs explained how the extrude function works.
Iīm also new to OpenFoam but ANSA can help you with the preprocessing. Just click in the OpenFoam deck on "Solver Info". I hope this will help you.
nice day.

Kattie January 26, 2011 08:13

Hello Daniel,

Thank you for the reply. I managed to export a 3D mesh from ANSA using the OpenFOAM deck, but it did take some debugging in OpenFOAM after.

I seem to see a lot of people using ANSA for surface meshing. Do they then export the mesh as an STL file? As mentioned previously, I don't see an easy way to export a surface mesh from ANSA (i.e. using the OpenFOAM output deck) for use in OpenFOAM.

Thank you all in advance,

Luke January 26, 2011 08:35

Hello Katti,

i donīt know why you want to export an surface mesh. Create the volume mesh in ANSA, too. Then the export in an openfoam format shouldnīt be a problem.
greets daniel

Kattie January 26, 2011 09:08

Hi Daniel,

It would be mostly to compare the capabilities of ANSA's meshing and snappyHexMesh in OpenFOAM.

ANSA has the benefit of writing out the directories for OpenFOAM to use, such that I don't have to manually define the faces, patches, etc.

Thanks again,

Luke January 26, 2011 09:49

Hello Katti,

ah, now i understand what you want to do. Then i think you have to export your surface mesh as a .stl file, but i havenīt tried it yet.
Maybe this link will help you.

vangelis February 1, 2011 05:21

Hello Kattie,

You have probably resolved the problem by now but just for future reference I will post a reply.

When you want to create a 2D simulation model for OpenFOAM in ANSA you should:
1) create the 2D mesh on one planar geometry and surface mesh it
2) Use VOLUMEs>EXTRUDE for 1 step of solids at a given depth
3) Now the solid mesh does not have surface boundaries all around it apart from the original planar Faces.
Use the MESH>ELEMENTs>VOL-SHELL [SKIN] and select
(using the Feature Angle selection tool for easy selection of complete sides) each side of the domain. The function will create shell elements from the selected free solid facets and will assign them to a specific Property.
4) You should assign type EMPTY to front and back and WALL or PATCH to the other sides

Now if you want to generate a surface only mesh to mesh it in SnappyHexMesh, you should create the complete closed geometry, so starting from the original single planar model, use GEOMETRY>TRANSF>COPY and copy the Faces by the required distance in the depth direction. The use SURFs>COONS to connect the two sides and close the geometry. Surface mesh the model and output it in STL format.

Hope this helps.


Kattie February 1, 2011 14:17

Hello Vangelis,

Thank you very much for the detailed response. This does help greatly. I was able to get a 3D mesh out to represent a 2D simulation. But I was unsure about whether the best way to generate a surface mesh from ANSA was using the STL output.

Many thanks,

vangelis February 2, 2011 02:33

You are welcome Kattie,

Just to clarify something, there are several ways to output just a surface mesh from ANSA.
STL is the preferred one if you output for SnappyHexMesh, otherwise there are other more suitable formats..


Kattie February 2, 2011 07:58

Hi Vangelis,

I was most interested in finding a way to export a surface mesh for use with snappyHexMesh. After looking at different presentations from others using OpenFOAM for automotive purposes, I've seen ANSA used to generate the surface mesh (as I assume that gives the user more control over it), and then snappyHexMesh is used to build the volume mesh.

I'm going to begin some simple trials with snappyHexMesh today to get a feel for what I can generate, and what its boundary layer capacity is. ANSA did have good tools for building boundary layers.


vangelis February 2, 2011 08:46

Hello Kattie,

Indeed you can create hi quality layers in ANSA with several options.
Let me know if you have any issue with ANSA.


All times are GMT -4. The time now is 14:52.