Exporting a Fluent msh with multiple element types per block


When Trelis exports a Fluent mesh containing multiple element types in a single block, this block is split into multiple blocks (or cell zones) corresponding to the different element types. Consider the following simple example of a cylinder represented by both hexs and tets. Importing this mesh in Fluent reveals three cell zones, when there really should only be one. This does not appear to be an issue with Fluent, which can handle such meshes from other mesh generators.

Am I missing something?


undo on

create Cylinder height 30 radius 5
webcut volume 1 with plane zplane offset 0

imprint all
merge all

surface 3 scheme circle fraction 0.5
mesh surface 3
volume 1 scheme Sweep sweep_smooth Auto sweep_transform least_squares autosmooth_target off
mesh volume 1

volume 2 scheme Tetmesh
set tetmesher interior points on
set tetmesher optimize level 3 optimize overconstrained off sliver off
set tetmesher boundary recovery off
mesh volume 2

Note: this command should force all elements into a single block (cell zone):

block 1 volume all

create cfd_bc name ‘inlet’ velocityinlet on surface 3
create cfd_bc name ‘outlet’ pressureoutlet on surface 2
create cfd_bc name ‘wall’ wall on surface 5 7


I don’t think you are missing anything, but I think I see the problem.

Can you modify the output file and change
(0 “Cells:”)
(12 (4 1 1a40 1 4))
(12 (4 1a41 5733 1 2))
(12 (4 5734 58f3 1 5))

(0 “Cells:”)
(12 (4 1 58f3 0 0))

Please let us know if this helps.


Modifying the mesh file using your suggestion yields the following error in Fluent:

[i]Cell ID 22771 out of declared range (1<=id<=22751).
Reading Cells: failed while reading section 12.

   Clearing partially read grid.

Error: Read_Grid_Section: Aborted due to critical error.
Error Object: #f

Error: Error reading “C:\Users\pirom\Documents\deleteme.msh”.
Error Object: #f


It would be helpful if the next version of Trelis was able to handle multiple element types per block.