Hi Dr. Moxey, I also run the script and see the same result. May be it is possible to write a script for Gmsh to convert the different element types into one type. However, I want to learn the relation of this issue with Nektar++ before making trials on Gmsh. So I want to learn the answer of this question: "Is it possible to generate a problem in Nektar++ with a mesh including different element types (quads+hexas+prisms etc.) or should I always generate a mesh with single element type for my problem to convert into .xml and use in Nektar++?" Regards, Kamil 28.07.2014 20:37 tarihinde, David Moxey yazdı:
Hi Kamil,
I have run Sergey's script and get a mesh of various element types -- if you look in the Gmsh statistics it should show 48 tets, 8 hexes and 32 prisms.
Thanks,
Dave
On 2014-07-28 18:51, Kamil ÖZDEN wrote:
Hi Sergey,
As far as I understood this is an example script to show how hexahedras are converted to tetrahedras and I have to write like this kind of a script for each different mesh. Am I right?
Isn't there any way to directly solve this issue (generate a problem with a mesh including different element types (quads+hexas+prisms etc.)) in Nektar++ without doing modifications in Gmsh?
Regards, Kamil
28.07.2014 07:09 tarihinde, Sergey Yakovlev yazdı:
Hi Kamil,
You can generate a mesh using gmsh that would contain hexes, prisms and tetrahedrals. You can do transition from hexahedral layer to tetrahedral layer through the layer of prisms. Here is an example of gmsh script:
======================================================================
N=2; Point(1)={-1,-1,0}; bline[]=Extrude{1,0,0}{Point{1};Layers{N};};//prism region boundary prism_surf[]=Extrude{0,2,0}{Line{bline[1]};Layers{N};};//prism region base (meshed with triangles)
prism_vol1[]=Extrude{0,0,1}{Surface{prism_surf[1]};Layers{N};Recombine;};//prism
volume tet_vol[]=Extrude{0,0,1}{Surface{prism_vol1[0]};Layers{N};};//no recombine, hence getting tet part h_side[]={prism_vol1[3],tet_vol[3]};
hex_vol[]=Extrude{1,0,0}{Surface{h_side[0]};Layers{N};Recombine;};//recombine
gives us hexes
prism_vol2[]=Extrude{1,0,0}{Surface{h_side[1]};Layers{N};Recombine;};//recombine
gives us prisms side1[]={prism_vol1[5],tet_vol[5]};//x=1 side2[]={hex_vol[0],prism_vol2[0]};//x=1 side3[]={hex_vol[3],prism_vol2[3],prism_vol1[4],tet_vol[4]};//y=1 side4[]={hex_vol[5],prism_vol2[5],prism_vol1[2],tet_vol[2]};//y=-1 side5[]={prism_vol2[4],tet_vol[0]};//z=1 side6[]={hex_vol[2],prism_surf[1]};//z=-1 Physical Surface(1)={side1[]}; Physical Surface(2)={side2[]}; Physical Surface(3)={side3[]}; Physical Surface(4)={side4[]}; Physical Surface(5)={side5[]}; Physical Surface(6)={side6[]}; //domain[]={hex_vol[1],prism_vol1[1],tet_vol[1],prism_vol2[1]}; Physical Volume(1111)={hex_vol[1]}; Physical Volume(1112)={prism_vol1[1],prism_vol2[1]}; Physical Volume(1113)={tet_vol[1]};
======================================================================
Save the above to the some_name.geo file and run "gmsh -3 some_name.geo". This should give you the mesh file that you can later convert to Nektar++ xml format. After that you just need to insert initial/boundary conditions, exact solution, etc. I've used it for testing with discontinuous Galerkin Helmholtz solver and it didn't work, but it maybe that the prisms are better supported in case of continuous Galerkin.
On Sun, Jul 27, 2014 at 6:26 AM, Kamil ÖZDEN <kamil.ozden.me@gmail.com> wrote:
Dear All,
Is there any way to generate a problem in Nektar++ with a mesh including different element types (quads+hexas+prisms etc.)?
Regards, Kamil
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users [1]
-- Best regards, Sergey
Links: ------ [1] https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users