pyvista / tetgen

A Python interface to the C++ TetGen library to generate tetrahedral meshes of any 3D polyhedral domains
http://tetgen.pyvista.org
Other
228 stars 33 forks source link

fixedvolume #16

Closed steersteer closed 4 years ago

steersteer commented 4 years ago

Hi, I'm trying to keep the volume the same thoughout the tetrahedrals so I set fixedvolume=0.00795 and also set verbose=1. The mesh quality statistics comes up with:

Mesh quality statistics:

  Smallest volume:       0.00064322   |  Largest volume:          0.16736
  Shortest edge:             0.1542   |  Longest edge:             1.4917
  Smallest asp.ratio:        1.2247   |  Largest asp.ratio:         14.09
  Smallest facangle:         12.731   |  Largest facangle:       145.3568
  Smallest dihedral:         7.5006   |  Largest dihedral:       164.9784

So I have much larger volumes than I set, is there a way to remedy this?

steersteer commented 4 years ago

Also as a side note, I set mindihedral=10 and it is reporting the smallest dihedral is 7.5006

akaszynski commented 4 years ago

It's possible that you've reached the maximum number of steiner points. Try:

tetgen.tetrahedralize(steinerleft=-1)

This will let tetgen add as many points as necessary to get the desired mesh quality.

steersteer commented 4 years ago

Unfortunately this time with a fixed volume 0.0082 i get:

  Smallest volume:       0.00054853   |  Largest volume:          0.39847
  Shortest edge:            0.12277   |  Longest edge:             1.8973
  Smallest asp.ratio:        1.2986   |  Largest asp.ratio:        39.916
  Smallest facangle:         8.9866   |  Largest facangle:       143.6904
  Smallest dihedral:         1.8049   |  Largest dihedral:       175.5020
akaszynski commented 4 years ago

Strange. I'm not actually a tetgen expert, so you might consider asking the question to the creator of tetgent tetgen@wias-berlin.de.

There are many settings you can play around with, and I bet one of them can help generate the desired mesh quality. See tetgen manual

If you find a solution, please post it here so other users can reference it as well.