[Gmsh] meshing multiple objects

wing yongjin.liu at gmail.com
Sat Jan 10 06:44:34 CET 2009


Christophe Geuzaine wrote:
> Felix Wolfheimer wrote:
>> Dear Wing,
>>
>> thanks for pointing out again the problem. I think that the problem of a
>> computational domain filled with regions/shapes of different material
>> properties is quite common in the field of computational electrodynamics
>> (this is exactly the field I'm working on). I know, that the commercial
>> computational electromagnetic codes based on a frequency domain approach
>> with tetrahedral grids can handle such problems and generate a mesh 
>> which is
>> conformal to all material boundaries in the model. I've tried to find
>> information on how to generate such a mesh with open source
>> programs/libraries and tried some of the open source meshing tools as 
>> well
>> but the result always was that they are very good at meshing a single 
>> object
>> (even of very complex geometrical shape) but are unable to handle 
>> material
>> boundaries. I wonder if there is anything I've missed...
>>
>
> I'm not sure I understand. Gmsh has always supported meshes which are 
> conformal to all material boundaries in the model. The geometry must 
> simply contain one volume per material... Look e.g. at the first 3D 
> tutorial "tutorial/t2.geo": the model contains 2 volumes, to which you 
> can assign separate material properties.
>
>
>
>> I also wish you a happy and successful year 2009.
>>
>> Best regards
>>
>> Felix    
>> -----Ursprüngliche Nachricht-----
>> Von: wing [mailto:yongjin.liu at gmail.com] Gesendet: Montag, 29. 
>> Dezember 2008 16:27
>> An: Christophe Geuzaine
>> Cc: Felix Wolfheimer; gmsh at geuz.org
>> Betreff: Re: [Gmsh] meshing multiple objects
>>
>> Christophe Geuzaine wrote:
>>> Felix Wolfheimer wrote:
>>>  
>>>> Dear Christophe,
>>>>
>>>> thank you for the quick reply. The two (or more) solids model objects
>> with
>>>> different material properties. Thus, I want to create a mesh that is
>>>> conformal to the material interface, such that a tetrahedron of the
>>>> generated mesh is located entirely in solid 1 or in solid 2 and,
>>>> additionally, the tetrahedrons at the interface region (the face where
>> the
>>>> two solids touch) should share a common face. That is, the material
>>>> interface should be handled somehow as a single face shared by both
>> solids.
>>>> However, in the file generated by the solid modeler the two solids are
>> two
>>>> independent objects and, thus, the mesh is created independently 
>>>> for each
>> of
>>>> the objects. It would be nice to know, if there is any easy way to 
>>>> modify
>>>> the step or iges file, such that a mesh with the properties described
>> above
>>>> is created. Is there any option in gmsh which would allow the 
>>>> creation of
>>>> such a mesh directly from the step or iges file?
>>>>
>>>> Please find the file test.stp, which contains a very simple model 
>>>> of two
>>>> bricks where the one brick has been trimmed by the other.
>>>>
>>>>     
>>> The boundary of the first cube has not been correctly subdivided, 
>>> which results in partially overlapping surfaces... which causes the 
>>> 3D mesh to fail.
>>>
>>>
>>>
>>>  
>>>> Thanks and best regards
>>>>
>>>> Felix
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Christophe Geuzaine [mailto:cgeuzaine at ulg.ac.be] Gesendet: 
>>>> Mittwoch, 12. November 2008 20:00
>>>> An: Felix Wolfheimer
>>>> Cc: gmsh at geuz.org
>>>> Betreff: Re: [Gmsh] meshing multiple objects
>>>>
>>>> Felix Wolfheimer wrote:
>>>>    
>>>>> Hi Gmsh Experts,
>>>>>
>>>>>  
>>>>>
>>>>> I would like to create a tetrahedral mesh from iges or step 
>>>>> models. The models contain parts which touch each other (result of 
>>>>> Boolean operations). However, when I read the model with gmsh the 
>>>>> interface region where the solids touch is meshed twice (once for 
>>>>> the first object
>>
>>>>> and once for the second). Additionally, the tetrahedrons at the 
>>>>> interface overlap arbitrarily. Is there any way to read a CAD 
>>>>> model and mesh it with gmsh such that the surface of the interface 
>>>>> region of the two solids is meshed only once?
>>>>>
>>>>>       
>>>> You have to make sure that the solid modeler creates the correct 
>>>> geometry for the intersecting objects (intersection curves, etc.)
>>>>
>>>> Can you send the step file?
>>>>
>>>>
>>>>
>>>>    
>>>>>  
>>>>>
>>>>> Best regards
>>>>>
>>>>>  
>>>>>
>>>>> Felix
>>>>>
>>>>>  
>>>>>
>>>>> PS: The screenshot enclosed to this mail may show you the result I 
>>>>> get when I try to mesh two cylinders, where the first cylinder was 
>>>>> trimmed by the second one.
>>>>>
>>>>>  
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------ 
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gmsh mailing list
>>>>> gmsh at geuz.org
>>>>> http://www.geuz.org/mailman/listinfo/gmsh
>>>>>       
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> _______________________________________________
>>>> gmsh mailing list
>>>> gmsh at geuz.org
>>>> http://www.geuz.org/mailman/listinfo/gmsh
>>>>     
>>>
>>>   
>> Hi all,
>> the problem of overlapping surfaces is just one point of Felix's 
>> question. The other point is that he want multiple solids (volumes?) 
>> so that he can apply material properties to different bodies.
>> I have the same question on this part. Say, I have a PCB (Printed 
>> Circuit Board) with several components mounted on it. I want to 
>> conduct a heat transfer simulation for this unit (PCB+components). I 
>> found that because of the Christophe Geuzaine wrote:
>>> Felix Wolfheimer wrote:
>>>  
>>>> Dear Christophe,
>>>>
>>>> thank you for the quick reply. The two (or more) solids model objects
>> with
>>>> different material properties. Thus, I want to create a mesh that is
>>>> conformal to the material interface, such that a tetrahedron of the
>>>> generated mesh is located entirely in solid 1 or in solid 2 and,
>>>> additionally, the tetrahedrons at the interface region (the face where
>> the
>>>> two solids touch) should share a common face. That is, the material
>>>> interface should be handled somehow as a single face shared by both
>> solids.
>>>> However, in the file generated by the solid modeler the two solids are
>> two
>>>> independent objects and, thus, the mesh is created independently 
>>>> for each
>> of
>>>> the objects. It would be nice to know, if there is any easy way to 
>>>> modify
>>>> the step or iges file, such that a mesh with the properties described
>> above
>>>> is created. Is there any option in gmsh which would allow the 
>>>> creation of
>>>> such a mesh directly from the step or iges file?
>>>>
>>>> Please find the file test.stp, which contains a very simple model 
>>>> of two
>>>> bricks where the one brick has been trimmed by the other.
>>>>
>>>>     
>>> The boundary of the first cube has not been correctly subdivided, 
>>> which results in partially overlapping surfaces... which causes the 
>>> 3D mesh to fail.
>>>
>>>
>>>
>>>  
>>>> Thanks and best regards
>>>>
>>>> Felix
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Christophe Geuzaine [mailto:cgeuzaine at ulg.ac.be] Gesendet: 
>>>> Mittwoch, 12. November 2008 20:00
>>>> An: Felix Wolfheimer
>>>> Cc: gmsh at geuz.org
>>>> Betreff: Re: [Gmsh] meshing multiple objects
>>>>
>>>> Felix Wolfheimer wrote:
>>>>    
>>>>> Hi Gmsh Experts,
>>>>>
>>>>>  
>>>>>
>>>>> I would like to create a tetrahedral mesh from iges or step 
>>>>> models. The models contain parts which touch each other (result of 
>>>>> Boolean operations). However, when I read the model with gmsh the 
>>>>> interface region where the solids touch is meshed twice (once for 
>>>>> the first object
>>
>>>>> and once for the second). Additionally, the tetrahedrons at the 
>>>>> interface overlap arbitrarily. Is there any way to read a CAD 
>>>>> model and mesh it with gmsh such that the surface of the interface 
>>>>> region of the two solids is meshed only once?
>>>>>
>>>>>       
>>>> You have to make sure that the solid modeler creates the correct 
>>>> geometry for the intersecting objects (intersection curves, etc.)
>>>>
>>>> Can you send the step file?
>>>>
>>>>
>>>>
>>>>    
>>>>>  
>>>>>
>>>>> Best regards
>>>>>
>>>>>  
>>>>>
>>>>> Felix
>>>>>
>>>>>  
>>>>>
>>>>> PS: The screenshot enclosed to this mail may show you the result I 
>>>>> get when I try to mesh two cylinders, where the first cylinder was 
>>>>> trimmed by the second one.
>>>>>
>>>>>  
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------ 
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gmsh mailing list
>>>>> gmsh at geuz.org
>>>>> http://www.geuz.org/mailman/listinfo/gmsh
>>>>>       
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> _______________________________________________
>>>> gmsh mailing list
>>>> gmsh at geuz.org
>>>> http://www.geuz.org/mailman/listinfo/gmsh
>>>>     
>>>
>>>   
>> Hi all,
>> the problem of overlapping surfaces is just one point of Felix's 
>> question. The other point is that he want multiple solids (volumes?) 
>> so that he can apply material properties to different bodies.
>> I have the same question on this part. Say, I have a PCB (Printed 
>> Circuit Board) with several components mounted on it. I want to 
>> conduct a heat transfer simulation for this unit (PCB+components). I 
>> found that because of the overlapping surfaces I cannot mesh the PCB 
>> and the components as separate solids. And when I model the PCB and 
>> components as a single solid (just by boolean operation), the meshing 
>> is OK but I cannot apply material properties (heat conductivity, 
>> surface emissivity, etc.) to different components now because they 
>> are now a single solid.
>> Maybe this is a silly question, but, actually I was stuck here for a 
>> while.
>>
>> Thanks in advance and happy new year.
>> wing
>>
>>
>> _______________________________________________
>> gmsh mailing list
>> gmsh at geuz.org
>> http://www.geuz.org/mailman/listinfo/gmsh
>>
>>
>
>
Hi Christophe,
That is exactly what I want. But how about the attached 
geometry(2boxes.geo)? It consists of 2 boxes, one big and the other 
small, the small one is just on the top of the big one. I notice that 
there are 12 surfaces and that's different from t2.geo where there are 
11 surfaces. That's my problem.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2boxes.geo
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090110/9e19453b/attachment.geo>