[Gmsh] Volume within a volume

Christophe Geuzaine cgeuzaine at uliege.be
Thu Jan 31 09:42:29 CET 2019


Your 2 volumes overlap. Either explicitly construct the 2 volumes so that they don't overlap, i.e. one on top of the other. Or use the OpenCASCADE factory and fragment the volumes at the end (e.g. using "Coherence" - see attached example) - although this is really overkill in this case.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aa.geo
Type: application/octet-stream
Size: 814 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20190131/75b30b19/attachment.geo>
-------------- next part --------------



> On 29 Jan 2019, at 15:00, Dominic North <dj.north at bristol.ac.uk> wrote:
> 
> Dear Gmsh community,
>  
> Please could you help? I?m trying to define a volume within a volume in gmsh, but get an ?overlapping facets? error message (because I?m trying to extrude a surface directly into an existing volume, I think). The aim is to model heat travelling through a main volume: small regions defined within this volume will generate heat. The ?heat-generating sub-volumes? are otherwise unimportant to the system ? they just need to define where the heat is generated and be easily moveable around the main volume.
>  
> Please see below for a representative model and the error message. 1D and 2D meshing is fine; the overlapping facets message occurs on 3D meshing.
>  
> Is there any way you can think of to achieve this? Many thanks for any help you can offer.
>  
> Best regards,
> Dominic North
>  
> ------------------------
> //Make the  main volume:
> p1 = newp;
> Point(p1) = {0,0,0};
> p2 = newp;
> Point(p2) = {2,0,0};
> p3 = newp;
> Point(p3) = {2,2,0};
> p4 = newp;
> Point(p4) = {0,2,0};
>  
> l1 = newl;
> Line(l1) = {p1,p2};
> l2 = newl;
> Line(l2) = {p2,p3};
> l3 = newl;
> Line(l3) = {p3,p4};
> l4 = newl;
> Line(l4) = {p4,p1};
>  
> ll1 = newll;
> Line Loop(ll1) = {l1,l2,l3,l4};
>  
> s1 = news;
> Plane Surface(s1) = {ll1};
>  
> mainExt[] = Extrude{0,0,2}{Surface{s1};};
>  
> //Make a sub volume
> p5 = newp;
> Point(p5) = {2,0,0};
> p6 = newp;
> Point(p6) = {2,1,0};
> p7 = newp;
> Point(p7) = {0,1,0};
>  
> l5 = newl;
> Line(l5) = {p1,p5};
> l6 = newl;
> Line(l6) = {p5,p6};
> l7 = newl;
> Line(l7) = {p6,p7};
> l8 = newl;
> Line(l8) = {p7,p1};
>  
> ll2 = newll;
> Line Loop(ll2) = {l5,l6,l7,l8};
>  
> s2 = news;
> Plane Surface(s2) = {ll2};
>  
> subExt[] = Extrude{0,0,2}{Surface{s2};};
>  
>  
> --------
> Info    : Done meshing 2D (0.046875 s)
> Info    : Meshing 3D...
> Info    : 3D Meshing 2 volumes with 1 connected components
> Info    : Tetrahedrization of 447 points in 0 seconds
> Info    : Reconstructing mesh ...
> Info    : Creating surface mesh...
> Info    : Found two exactly self-intersecting facets.
> Info    :   1st: [15, 16, 124] #6
> Info    :   2nd: [15, 16, 338] #34
> .Error   : Invalid boundary mesh (overlapping facets) on surface 6 surface 34
> .Error   : No tetrahedra in region 1 2 
> Info    : Done meshing 3D (0.03125 s)
> Info    : 439 vertices 1016 elements
> .Error   : ------------------------------
> .Error   : Mesh generation error summary
> .Error   :     0 warnings
> .Error   :     2 errors
> .Error   : Check the full log for details
> .Error   : ------------------------------
> _______________________________________________
> 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





More information about the gmsh mailing list