Conversion of an imported tetrahedral or hexahedral Exodus mesh to high order hex elements

Hello all,

I would like to import HEX8 and TETRA4 Exodus meshes and convert them to high order (HEX20 or HEX27) hex meshes. Sometimes node projection becomes an issue for this process. Does Trelis handle this type of import and conversion? I can provide an example mesh file if needed. Thanks.

David H.

Hi @david.holler!

There is some capability for this functionality in Trelis. When you import an Exodus file, there is an advanced option within the Mesh Geometry import option called Geometry Interpolation. Effectively, what happens when you import is that we create a mesh-based geometry – this geometry is not traditional CAD in the ACIS sense, but rather uses Trelis’ facet geometry kernel. Surfaces within this kernel can be approximated by several functions. If you want a higher-order geometry, to project midnodes to, you’ll need to choose one of these higher-order interpolation methods (spline, gradient, or quadratic). But important to note is that the original geometry is forever lost when importing a mesh. So even if you bring in a linear mesh of a sphere, and use one of these higher-order approximations, you’ll never get back to a perfect sphere.

The other thing you’ll want to make sure is active is within the Tools -> Options -> Mesh Defaults panel: Project Midnodes to Geometry. By default this should be set to Smart. When this is active, and if you’ve used a higher order interpolation above, you will then be able to convert your lower order elements to higher order, with geometric projection of surface nodes, by setting the element type for the relevant block(s), e.g.

block <bid> element type hex27
block <bid> element type tetra10

Here’s an example script that you may find enlightening:

## Build cylinder geometry and build coarse mesh
reset
cylinder radius 1 height 4
vol 1 scheme sweep
vol 1 size .75
mesh vol 1

## Export linear mesh
block 1 vol 1
set exodus netcdf4 off
set large exodus file on
export mesh "/path/to/cylinder_linear.e"  overwrite 

## Reset session, import linear exodus mesh with Spline interpolation
reset
import mesh geometry "/path/to/cylinder_linear.e" feature_angle 135.00  Spline merge 

## Convert mesh to quadratric hex, projecting midnodes to surface in the process
block 1 element type hex27
export mesh "/path/to/cylinder_quadratic.e"  overwrite 

Hope this helps!

Greg Vernon | Director of Product Management
Coreform LLC

Hi Greg,

I am using this method to create a hex20 mesh using the following steps.

  1. Generate a tetra4 mesh with the sidesets and setting the project nodes to geometry to yes.
  2. Then export the mesh in .exo format.
  3. Re-import the mesh (to avoid negative jacobian issues) using a higher interpolation method such as spline/gradient.
  4. thex volume all

Using the spline method gives me negative jacobians error which weren’t coming up when I was using linear method while importing. And using gradient method gives the error " Only curves or order 0 or 4 are supported". Could you please help me solve this error?

Thank you

Nilay

Hi @nkulkar2,

The entire reason behind re-importing the exodus file, was that the inversion is occurring when Cubit evaluates the underlying geometry to decide where to place the new nodes of the hexes – which will occur at the middle of each tet-edge, tet-face, and at the tet-center.

Traditional FEM uses interpolatory shape functions (aka basis functions) and this means that as we increase the degree from linear elements to quadratic elements that smaller local distortions can lead to an inverted element. Essentially, when Cubit evaluates the geometry to decide where to place the mid-nodes, it can result in inverted elements:
shapeFunction_1

The above animation is a perfect element being deformed, but recall that with thex you will often have many linear hexes that are already poorly shaped (if not inverted)… the addition of an additional mid-node for a Hex20 that evaluates to a curved surface is that much more likely to invert the element. Even if you did manage to get a valid (no inverted elements) mesh, it would likely be soo close to inverting that it would almost certainly invert in a nonlinear solid-mechanics simulation.

So when you’re importing the Exodus file, using the spline or gradient “geometry reconstruction” you’re now providing a curved surface that can lead to this inversion. The whole reason I suggested importing an Exodus mesh earlier, was to use the default Linear geometry reconstruction so that no additional node projections-to-surface would occur.

The crux of this is that thex is a fairly non-robust method for generating hexahedral meshes.