Personal tools
You are here: Home Forum How to use Salome? Finding the smallest element size in a mesh

Finding the smallest element size in a mesh

Up to How to use Salome?

Finding the smallest element size in a mesh

Posted by Jorge Nunez at May 17. 2016

Bonjour/Hello,

I'm currently using Salome 7 to mesh in order to carry out explicit transient analysis. However I can't modify my meshes as they are provided to me by other colleagues (which means that I can't control the element size before meshing my geometry).

I therefore need to find out what is the smallest element size in my mesh in order to have an idea of what the time-step will be in my calculation. My question is probably quite dumb but I would like to know how to obtain the size of the smallest element in my mesh either by using the menus ot through a Python script.

Thanks in advance for any info and good day to everoyone.

jorge

Re: Finding the smallest element size in a mesh

Posted by William Tougeron at May 17. 2016

Hello,

Not a stupid question at all :)

From Python, if you put your mesh into a variable called mesh_1, you can get its min and max cell volume like this:

mesh_1.GetMinMax(SMESH.FT_Volume3D)

If your mesh is in 2D, this should work as well:

mesh_1.GetMinMax(SMESH.FT_Area)

(Note that if you got your mesh from the GUI using some

mesh_1 = salome.FindObject...

method, you will have to execute then

mesh_1 = smesh.Mesh(mesh_1)

so as to make it work.)

Best regards,

William

Re: Finding the smallest element size in a mesh

Posted by William Tougeron at May 17. 2016

Hello again,

I forgot that you can directly display it in the GUI going to Controls > Volume Controls > Volume.

This should display an histogram with min/max values...

Best regards,

William

Re: Finding the smallest element size in a mesh

Posted by Jorge Nunez at May 17. 2016
Thanks a lot for the help William! It works just fine :).

 

Powered by Ploneboard
Document Actions