"gmsh" returns 2D result for 3D model

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"gmsh" returns 2D result for 3D model

randress
This post was updated on .
[Oct 17, 2020: I have discovered that this issue and the one posted as '"Missing "Rotate 3D" icon' are indistinguishable (at least by me). Here is what I think I have found: gmsh returns a 2D result for this geometry and it is displayed in a 3D context - can be rotated and zoomed as if it were a very thin 3D model.  However, if the model is saved as a model file (.fea) and the re-opened, it is displayed as a 2D figure, thus with no "Rotate 3D" control.

So from my perspective there are two issues:  First, what is it about the geometry that causes gmsh to return this seeming 2D model with a "grid cell mean quality" of "NaN" or "Inf"? The second issue is the way FEATool handles/displays this case both when it happens and after it is saved and reloaded.

I have added another post to this issue with an example that is captured from the ground up that will re-produce both issues from scratch. See below.]


This issue may well be caused by my ill formed model.  But I submit it in hopes of at least learning where the problem lies.

It is similar to one provided in the second entry of the "Missing "Rotate 3D" icon" post:
http://forum.featool.com/Missing-Rotate-3D-icon-tp831p832.html

The geometry is an elliptical disk that has been chamfered twice and then is is enclosed in a block.



Here are the model, gui, and MATLAB script files.

gmshPlanarResult.fea

gmshPlanarResult.fes

gmshPlanarResult.m

Here is what the disk looks like inside the block:



When submitted to gmsh, here is the result:



Some time after I had moved on from the occurrence of this issue, I noticed the following error indications in the MATLAB Command Window, so I cannot be sure that they were associated with the creation and processing of the model, but I am including them in case they provide useful information:

gmshPlanarResult.txt

Kinid regards,
Randal

Reply | Threaded
Open this post in threaded view
|

Re: "gmsh" returns 2D result for 3D model

randress
This post was updated on .
The case in this post will reproduce this issue ' "gmsh" returns 2D result for 3D model' and 'Missing "Rotate 3D" icon' found at: http://forum.featool.com/Missing-Rotate-3D-icon-tp831.html .

Use these steps:
1. Create a new 3D model, Conductive Media.
2. Create 2D Workspace at (0,0,0)
3. Create an Ellipse x=.05, y=.1
4. Extrude 0.02 along 'z' axis
5. Chamfer 0.005
6. Chamfer 0.002
7. Create a block -2:2 -1:1 -1:1

... to produce this model geometry:



8. Generate grid using 0.21 (default)
... to produce a normal 3D grid:



Changing to the Geometry mode and zooming in on the 20mm thick disk:



9. Reduce 'z' dimenson of elliptical disc by transforming scale [1  1 .05].



...shrinks the disk in thickness ('z') by a factor of 20:



[So far everything seems normal. Problems begin to appear with the next step.]
10. Generate grid using grid size of 0.21 (default)
... to produces a 3D displayed grid that seems to be only 2D (in x, y):


Note FEATool Command log showing "grid cell mean quality: Inf".

11. At this point save Model, GUI Script, and MATLAB script files:

bladeInTankThinGrid.fea
bladeInTankThinGrid.fes
bladeInTankThinGrid.m

12. Finally open the Model file just saved (bladeInTankThinGrid.fea) and observe a 2D figure grid with no "3D Rotate" icon:



Kind regards,
-Randal
Reply | Threaded
Open this post in threaded view
|

Re: "gmsh" returns 2D result for 3D model

randress
The latest 1.13b4 fixed the grid:



But what about "grid cell mean quality: Inf". I had assumed this was the result of a numeric error (I have also seen "NaN").  Is this an acceptable result?

Kind regards,
Randal
Reply | Threaded
Open this post in threaded view
|

Re: "gmsh" returns 2D result for 3D model

Precise Simulation
Administrator
Most likely Gmsh has produced a mesh with poor quality cells, if you look back at the Gmsh log ouput you will probably see lines like this

Warning: ill-shaped tets are still in the mesh                                                                                                                                                                                                                                                                                                                                 
Info: 0.00 < quality < 0.10 :       228 elements                                                                                                                                                                                                                                                                                                                                 

The mesh might still be ok to compute with depending on the purpose. The best way to tell is to actually try to use it.