I’ve cracked the case @skv! The issue that you’ve run into is that the smallest surface elements are quite small. For a number of reasons, Cubit struggles with small (in the absolute sense) entities since it is based on the ACIS geometry kernel.
I opened your geometry and turned on the “Axis Grid” - which is how I saw your geometry was small (again, in the absolute sense). The measured distance in the image below is ~0.084
I then measured one of the small element edges in the middle surface and found its length to be 0.000222 or \mathcal{O}(10^{-4})
So why is this an issue? The geometry kernel (aka geometry engine) that Cubit is based on is the ACIS kernel from Dassault Systemes Spatial Corporation. ACIS, like many geometry kernels, uses an absolute tolerance for determining whether two neighboring surfaces are “connected” geometrically. See the first link below for more detail. Anyways, the tightest absolute tolerance that ACIS provides is 10^{-6} (see documentation). It appears that the MeshGems
tet-meshing routine (which we also license from Dassault Systemes) has a similar tolerance limit, probably because it makes geometry queries, and since you’re so close to the absolute tolerance limit of ACIS that MeshGems
runs into errors.
Here are some external links that discuss this issue in more depth:
This absolute tolerance is why we recommend users to scale your geometry so that the smallest features you care about in the model are \approx \mathcal{O}(1). We then have a function that will scale your mesh on export to recover the actual dimension of your model.
For example:
reset
## Create a "small" geometry
bri x 0.000123 # Miles
## Scale geometry from Miles to Feet,
## which gives us an "easy" conversion to remember
## *and* makes our smallest "important" edges a size ~ 1
volume 1 scale 5280
## Mesh the volume
mesh volume 1
block 1 vol 1
## Setup option to scale mesh on export
transform mesh output scale {1/5280} # Uses APREPRO syntax to evaluate 1/5280
## Export the mesh, which will be scaled
export mesh "./transformed_mesh.e" overwrite
Note that transform mesh
is multiplicative / additive depending on whether you’re doing a scale or translation. So doing transform mesh output scale 10
twice will scale by 100, not 10. Make sure to transform mesh output reset
to reset.
Anyways, so if I scale your geometry even by just a factor of 100 I am able to successfully build a tetmesh (which will include pyramid transition elements from the quadrilateral surface meshes).
reset
open "./tetmesh_fail.cub5"
vol 1 scale 100
mesh vol 1
transform mesh output scale 0.01
export mesh "./tetmesh_success.e" overwrite
And as we can see from loading this file into ParaView, the dimensions are correct and we have a mesh!