# Convert 3d mesh to 2d?

I have a 3d mesh using bricks with the tetmesher. If I want to mesh the same structure as a 2d triangular mesh, what is the best approach? Do I just use 0 thickness bricks on the z=0 plane? Or am I required to use 2D entities when calling the triangular mesher? Will the exodus mesh sizing function work for 2d meshing?

Given the 3D mesh, you can extract the surface mesh into one or more blocks.

For example,

``````brick x 10
mesh vol 1 # by default this will create hexahedral elements
block 1 surface all
block 1 element type shell
export mesh 'shell.exo' block 1
``````

All of the surface elements will be exported to Exodus. You will get a warning about some nodes and elements not being exported because you did not export any hexes. Note that face elements (quadrilaterals or triangles are ONLY created on the surfaces.)

The exodus sizing function does with 2D meshing. I have noticed some slow down with a large sizing meshes. If that is a problem, let us know.

Thank you. I will look into this further.

Also, if you just want a surface mesh and donâ€™t need the tetmesh, you can simply mesh the surfaces and add them to a block (the default elements will be 3D shell elements).

``````brick x 10
move volume 2 x 10

surface in volume 1 scheme map
mesh surface in volume 1
block 1 surface in volume 1

surface in volume 2 scheme trimesh
mesh surface in volume 2
block 2 surface in volume 2
``````

@karl, @gvernon
I am trying an approach working with bodies and curves. Unfortunately, the â€śFree Curvesâ€ť for my boundary conditions will not merge into the boundaries of my surfaces. Is there a way to fix this?

I would expect curve 48 would be merged into body `bulk`, and curves 47 and 48 to be merged into bodies `oxide` and `bulk`.

incomplete journal file removed. Please see attached python script in the next comment.

``````
``````

Please ignore the script above. Cubit fails to journal direct calls to the python API, so there are move commands missing. Please see this python script instead. Please note that I have left out the command I was trying:
imprint surface all
merge surface all
build3.py (3.0 KB)

I have found the issue with my script, it turns out I needed to imprint the free curves onto volumes.

1 Like