Dear Mr Geuzaine,
About my last email, I understood what you were talking about. Using
extrusion with layers to generate the bulk mesh, I finally succeed to
get what I needed. Here enclosed the file ('NewTransfSphere.geo') with
the good definition of the geometry.
I am now trying to generate the same geometry but with hybrid
(Hexahedrons&Pyramids&Tetrahedron) meshes. I found a lot of help about
it, I use the "TransfQuadTri" algorithm and the "QuadTriAddVerts" option
of the extrusion command but I still get errors. The first one is "In
QuadToTriGetRegionDiags(), top surface of region 1 has quads in a
non-toroidal QuadToTri extrusion." and I don't find anything about it.
This error then lead to "flat pyramids" and "Cannot build pyramids on
non manifold faces" error, which I was trying to avoid using Quadtri. If
you have any idea about what I'm doing wrong it would be of great help.
The problematic file ('NewTransfRecSphere.geo') is also enclosed in this
email.
Thanks again for your help and your work,
Best regards,
--
Quentin
Le 31/05/2018 à 15:40, Quentin Goestchel a écrit :
Thank you for your answer. Let me know if I understood well: I have
two option, the first one is to change the order of the corners in the
transfinite volume definition to have the match and the second one is
to create the bulk cube using extrusion?
I'm not sure to understand perfectly how transfinite could be replaced
by extrusion. Is there is a way to have regular elements in the bulk
of the volume with this method?
Best regards,
--
Quentin Goestchel
Le 30/05/2018 à 22:10, Christophe Geuzaine a écrit :
On 25 May 2018, at 16:26, Quentin Goestchel
<[email protected]
<mailto:[email protected]>> wrote:
Dear Sir or Madam,
I would like to thank you for the great work which has been done to
develop the open-source Gmsh software.
I am currently working on a 3D numerical method and I think I have
found a bug in the 3D meshing algorithm. I was trying to generate a
transfinite bulk in a mesh (to have a constant orthogonality of the
elements), and an unstructured layer around it, as shown in the
enclosed "sphereTransfinite.png".
This is "normal" the (non-recombined) 3D transfinite algorithm does
not try to enforce the compatibility between the volume and surface
meshes. It's actually impossible without modifying the 2D mesh a
posteriori in some configuration (since we also generate the 2D mesh
first). You should specify the corners of the transfinite
interpolation in the right order to have the match.
PS: Using Extrusion instead of Transfinite, Gmsh will try to perform
the modifications automatically.
Everything was going fine until I noticed a big error on my
discretized spherical surface, computed with the sum of the areas of
the boundary faces. I found out that my code was unable to find the
neighbours of many tetrahedrons around the bulk mesh because many
faces were not matching but crossing each other edges, as shown in
sphereTransfinite_err.png .
I didn't find any topics about such problem so I assume that you
didn't know about it, but I might be wrong.
Best regards,
--
Quentin Goestchel | /Etudiant - Année ARPE /
Département Génie Civil
+33(0)6 83 75 57 53 <tel:+33683755753> |
[email protected]
<mailto:[email protected]>
ENS Cachan - 61 avenue du Président Wilson 94235 Cachan CEDEX
<geo://?q=61+Avenue+du+Pr%C3%A9sident+Wilson+Cachan+France>
www.ens-paris-saclay.fr <http://www.ens-paris-saclay.fr/>
<imblgnlknopffhfn.png> <http://www.ens-paris-saclay.fr/>
<sphereTransfinite.png><sphereTransfinite_err.png><sphereTransfinite.geo>_______________________________________________
gmsh mailing list
[email protected] <mailto:[email protected]>
http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
<http://www.montefiore.ulg.ac.be/%7Egeuzaine>
Free software: http://gmsh.info | http://getdp.info | http://onelab.info
--
Quentin Goestchel | /Etudiant - Année ARPE /
Département Génie Civil
+33(0)6 83 75 57 53 <tel:+33683755753> |
[email protected]
<mailto:[email protected]>
ENS Cachan - 61 avenue du Président Wilson 94235 Cachan CEDEX
<geo://?q=61+Avenue+du+Pr%C3%A9sident+Wilson+Cachan+France>
www.ens-paris-saclay.fr <http://www.ens-paris-saclay.fr>
<http://www.ens-paris-saclay.fr>
--
Quentin Goestchel | /Etudiant - Année ARPE /
Département Génie Civil
+33(0)6 83 75 57 53 <tel:+33683755753> |
[email protected]
<mailto:[email protected]>
ENS Cachan - 61 avenue du Président Wilson 94235 Cachan CEDEX
<geo://?q=61+Avenue+du+Pr%C3%A9sident+Wilson+Cachan+France>
www.ens-paris-saclay.fr <http://www.ens-paris-saclay.fr>
<http://www.ens-paris-saclay.fr>
lc = 1;
ls = 0.7*lc;
r = 5; // Radius of the sphere
Br = r/1.8; //Cubic bulk dimension
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Structured internal cube
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Point(1) = {Br, Br, Br, ls};
Point(2) = {Br, -Br, Br, ls};
Point(3) = {Br, -Br, -Br, ls};
Point(4) = {Br, Br, -Br, ls};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};
Extrude {-r, 0, 0} {
Surface{1};Layers{2*Br/lc-2};
}
//
Transfinite Line {1, 2, 3, 4, 20, 11, 12, 16, 8, 9, 6, 7} = 2*Br/lc-1 Using
Progression 1;
Transfinite Surface {13};
Transfinite Surface {1};
Transfinite Surface {25};
Transfinite Surface {26};
Transfinite Surface {17};
Transfinite Surface {21};
Surface Loop(29) = {25, 1, 13, 17, 21, 26};
Transfinite Volume{1} = {1, 2, 3, 4, 5, 6, 10, 14};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Spherical boundary layer
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p1 = newp; Point(p1)= {0.0,0.0,0.0,lc};
p2 = newp; Point(p2)= {r,0.0,0.0,ls};
p3 = newp; Point(p3)= {0,r,0.0,ls};
p4 = newp; Point(p4)= {-r,0,0.0,ls};
p5 = newp; Point(p5)= {0,-r,0.0,ls};
p6 = newp; Point(p6)= {0,0,-r,ls};
p7 = newp; Point(p7)= {0,0,r,ls};
c1 = newreg; Circle(c1) = {p2,p1,p3};
c2 = newreg; Circle(c2) = {p3,p1,p4};
c3 = newreg; Circle(c3) = {p4,p1,p5};
c4 = newreg; Circle(c4) = {p5,p1,p2};
c5 = newreg; Circle(c5) = {p3,p1,p6};
c6 = newreg; Circle(c6) = {p6,p1,p5};
c7 = newreg; Circle(c7) = {p5,p1,p7};
c8 = newreg; Circle(c8) = {p7,p1,p3};
c9 = newreg; Circle(c9) = {p2,p1,p7};
c10 = newreg; Circle(c10) = {p7,p1,p4};
c11 = newreg; Circle(c11) = {p4,p1,p6};
c12 = newreg; Circle(c12)= {p6,p1,p2};
Line Loop(13) = {c2,c8,-c10};
Line Loop(15) = {c10,c3,c7};
Line Loop(17) = {-c8,-c9,c1};
Line Loop(19) = {-c11,-c2,c5};
Line Loop(21) = {-c5,-c12,-c1};
Line Loop(23) = {-c3,c11,c6};
Line Loop(25) = {-c7,c4,c9};
Line Loop(27) = {-c4,c12,-c6};
Surface(28) = {13};
Surface(29) = {15};
Surface(30) = {17};
Surface(31) = {19};
Surface(32) = {21};
Surface(33) = {23};
Surface(34) = {25};
Surface(35) = {27};
Surface Loop(30) = {28, 31, 33, 29, 34, 35, 32, 30};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Mesh volumes definition
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Volume(2) = {29,30};
Physical Volume(1) = {2,1};
Coherence Mesh;Mesh.Algorithm=5; // mesh algorithm
Mesh.Algorithm3D = 3; // mesh algorithm
lc = 1;
ls = lc;
r = 5; // Radius of the sphere
Br = r/2; //Cubic bulk dimension
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Structured internal cube
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Point(1) = {Br, Br, Br, ls};
Point(2) = {Br, -Br, Br, ls};
Point(3) = {Br, -Br, -Br, ls};
Point(4) = {Br, Br, -Br, ls};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};
Transfinite Line {1, 2, 3, 4} = 2*Br/lc+1 Using Progression 1;
Transfinite Surface {1};
Recombine Surface{1};
Extrude {-r, 0, 0} {Surface{1};
Layers{2*Br/lc};
QuadTriAddVerts;Recombine;}
//
//
Transfinite Line {1, 2, 3, 4, 20, 11, 12, 16, 8, 9, 6, 7} = 2*Br/lc+1 Using
Progression 1;
Transfinite Surface {13};
Transfinite Surface {25};
Transfinite Surface {26};
Transfinite Surface {17};
Transfinite Surface {21};
Recombine Surface{13,1,25,26,17,21};
Surface Loop(29) = {25, 1, 13, 17, 21, 26};
TransfQuadTri {1};
Transfinite Volume{1} = {1, 2, 3, 4, 5, 6, 10, 14};
//Transfinite Volume{1} = {3, 10, 14, 4, 2, 6, 5, 1};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Spherical boundary layer
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p1 = newp; Point(p1)= {0.0,0.0,0.0,lc};
p2 = newp; Point(p2)= {r,0.0,0.0,ls};
p3 = newp; Point(p3)= {0,r,0.0,ls};
p4 = newp; Point(p4)= {-r,0,0.0,ls};
p5 = newp; Point(p5)= {0,-r,0.0,ls};
p6 = newp; Point(p6)= {0,0,-r,ls};
p7 = newp; Point(p7)= {0,0,r,ls};
c1 = newreg; Circle(c1) = {p2,p1,p3};
c2 = newreg; Circle(c2) = {p3,p1,p4};
c3 = newreg; Circle(c3) = {p4,p1,p5};
c4 = newreg; Circle(c4) = {p5,p1,p2};
c5 = newreg; Circle(c5) = {p3,p1,p6};
c6 = newreg; Circle(c6) = {p6,p1,p5};
c7 = newreg; Circle(c7) = {p5,p1,p7};
c8 = newreg; Circle(c8) = {p7,p1,p3};
c9 = newreg; Circle(c9) = {p2,p1,p7};
c10 = newreg; Circle(c10) = {p7,p1,p4};
c11 = newreg; Circle(c11) = {p4,p1,p6};
c12 = newreg; Circle(c12)= {p6,p1,p2};
Line Loop(13) = {c2,c8,-c10};
Line Loop(15) = {c10,c3,c7};
Line Loop(17) = {-c8,-c9,c1};
Line Loop(19) = {-c11,-c2,c5};
Line Loop(21) = {-c5,-c12,-c1};
Line Loop(23) = {-c3,c11,c6};
Line Loop(25) = {-c7,c4,c9};
Line Loop(27) = {-c4,c12,-c6};
Surface(28) = {13};
Surface(29) = {15};
Surface(30) = {17};
Surface(31) = {19};
Surface(32) = {21};
Surface(33) = {23};
Surface(34) = {25};
Surface(35) = {27};
Surface Loop(30) = {28, 31, 33, 29, 34, 35, 32, 30};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Meshable volumes definition
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Volume(2) = {29,30};
Physical Volume(1) = {2,1};
Coherence Mesh;_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh