[Gmsh] Error : Self intersecting surface mesh, computing intersections

Berta Beltran beltran at ualberta.ca
Tue Jan 9 18:16:05 CET 2018


Sorry, I have sent the previous email before finishing it. 
So summarizing,  I have done as you suggested and I have defined my geometry as a bounding box where I subtract disks where the cylinders will plug. And then I define the cylinders as hollow tubes with no endcaps.

You can find attached my .geo files 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: small_cell.geo
Type: application/octet-stream
Size: 9390 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0005.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gf_x_disk.geo
Type: application/octet-stream
Size: 1786 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0006.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gf_x_wire.geo
Type: application/octet-stream
Size: 2849 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0007.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gf_y_disk.geo
Type: application/octet-stream
Size: 1781 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0008.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gf_y_wire.geo
Type: application/octet-stream
Size: 2838 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0009.geo>
-------------- next part --------------



And this is how the geometry looks in Gmsh 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: small_cell_geo.jpg
Type: image/jpeg
Size: 187349 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0002.jpg>
-------------- next part --------------



I have defined the critical lengths of the elements smaller than their smaller dimension, so meshing my geometry takes around 1h. But if I check the mesh I find that is is coarser around the wires and finer in between, see attached figure, where I am zooming in the area of the middle and bottom cylinders. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: small_cell_mesh.jpg
Type: image/jpeg
Size: 2252466 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20180109/32aaca2e/attachment-0003.jpg>
-------------- next part --------------



The purpose of the mesh is to add a electric potential to the cylinders (wires ) and then use Elmer to calculate the electric field in the bounding box. But for that I really need the mesh to be finer around the wires where the electric filed changes very rapidly and it can be coarser in the space between the wires where the electric filed will be more uniform. How can I achieve this ?


Thanks again

Berta



> On Dec 8, 2017, at 1:08 PM, Christophe Geuzaine <cgeuzaine at uliege.be> wrote:
> 
> 
> Dear Berta,
> 
> Your surface meshes intersect (see attached picture) because your geometry is incorrect : the end of the cylinders overlap with the rectangular faces. Either define the rectangular faces with circular) holes, or use the new OpenCASCADE kernel to intersect the solids.
> 
> Christophe
> 
>> On 7 Dec 2017, at 20:00, Berta Beltran <beltran at ualberta.ca> wrote:
>> 
>> Hi  all, 
>> 
>> I am trying to emulate this results (see attached figure)  from some previous simulations done with COSMOL Multiphysics for the electric potential of our device. I am creating the geometry and meshing it with Gmsh and then I will use Elmer to calculate the potential and electric fields. 
>> 
>> 
>> 
>> <Untitled.pdf>
>> 
>> 
>> I have programed a file called small_cell.geo (attached) with a bounding box and 3 perpendicular wires inside. I want to have mirror conditions along the 4 long sides of the box as I will be periodically repeating this cell to make a bigger detector and therefore I need the wires to touch the walls. 
>> 
>> The geometry file seems to be ok if I look at it with Gmsh (see attached file) 
>> 
>> <small_cell_geo.pdf>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> But when I try to mesh this geometry by doing in the command line 
>> 
>> #gmsh small_cell.geo -3 -order 2 
>> 
>> I get the following error 
>> 
>> Error   : Self intersecting surface mesh, computing intersections (this could take a while)
>> 
>> 
>> 
>> Error   : ------------------------------
>> Error   : Mesh generation error summary
>> Error   :     0 warnings
>> Error   :     1 error
>> Error   : Check the full log for details
>> Error   : ------------------------------
>> 
>> 
>> 
>> 
>> If I have a look at the  intersect.pos  file with Gmsh I see that the points where the wires touch the bounding box walls are the problems (see attached figure) 
>> 
>> <intersect.pdf>
>> 
>> 
>> 
>> But as I have mentioned I want the wires to touch the walls so that I can have mirror conditions when I calculate the electric field with Elmer. 
>> 
>> Any suggestion of how can I get right of this error ? 
>> All my geometry files are attached to this email. 
>> 
>> Thanks in advance 
>> 
>> Berta 
>> 
>> 
>> 
>> <gf_cylinder.geo>
>> <gf_rectangle.geo>
>> <gf_x_cylinder.geo>
>> <intersect.pos>
>> <small_cell.geo>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
> 
> 
> -- 
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science 
> http://www.montefiore.ulg.ac.be/~geuzaine
> 
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
> 



More information about the gmsh mailing list