Different Element Types
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
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
-- Best regards, Sergey
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 <mailto: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 <mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- Best regards, Sergey
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
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
Dear Kamil, Nektar++ is capable of using a mesh comprising of multiple types of elements (e.g. tets, prisms and hexes simultaneously). In many situations this is actually beneficial to the simulation, for example, in resolving boundary layers using prisms, but filling the remainder of the domain using tets. There is no generic way in gmsh to convert all elements of an existing mesh to be of a specific type. If you want a single type of element you must design your geometry accordingly (e.g. use Recombine/transfinite lines where you want quad faces to enforce prismatic/hex elements). Cheers, Chris On 28/07/14 21:03, Kamil ÖZDEN wrote:
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
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- Chris Cantwell Department of Aeronautics Roderic Hill Building Imperial College London South Kensington Campus London SW7 2AZ Email: c.cantwell@imperial.ac.uk www.imperial.ac.uk/people/c.cantwell
Dear All, I've solved this problem by dividing my problem domain into several volumes (each have one element type on its own mesh) and define each as a different composite. After that I wrote all these composites in my DOMAIN definition as below: <DOMAIN> C[0,1] </DOMAIN> It may be beneficial (especially for inexperienced Nektar users) to add an example problem to Nektar's web site about how to deal with such a situation. Regards, Kamil 29.07.2014 11:13 tarihinde, Chris Cantwell yazdı:
Dear Kamil,
Nektar++ is capable of using a mesh comprising of multiple types of elements (e.g. tets, prisms and hexes simultaneously). In many situations this is actually beneficial to the simulation, for example, in resolving boundary layers using prisms, but filling the remainder of the domain using tets.
There is no generic way in gmsh to convert all elements of an existing mesh to be of a specific type. If you want a single type of element you must design your geometry accordingly (e.g. use Recombine/transfinite lines where you want quad faces to enforce prismatic/hex elements).
Cheers, Chris
On 28/07/14 21:03, Kamil ÖZDEN wrote:
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
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hi Kamil, Glad to hear that you have succeeded! We are in the middle of trying to overhaul our documentation so I will put this on the list. Thanks, Dave On 30 Jul 2014, at 21:41, Kamil ÖZDEN <kamil.ozden.me@gmail.com> wrote:
Dear All,
I've solved this problem by dividing my problem domain into several volumes (each have one element type on its own mesh) and define each as a different composite. After that I wrote all these composites in my DOMAIN definition as below:
<DOMAIN> C[0,1] </DOMAIN>
It may be beneficial (especially for inexperienced Nektar users) to add an example problem to Nektar's web site about how to deal with such a situation.
Regards, Kamil
29.07.2014 11:13 tarihinde, Chris Cantwell yazdı:
Dear Kamil,
Nektar++ is capable of using a mesh comprising of multiple types of elements (e.g. tets, prisms and hexes simultaneously). In many situations this is actually beneficial to the simulation, for example, in resolving boundary layers using prisms, but filling the remainder of the domain using tets.
There is no generic way in gmsh to convert all elements of an existing mesh to be of a specific type. If you want a single type of element you must design your geometry accordingly (e.g. use Recombine/transfinite lines where you want quad faces to enforce prismatic/hex elements).
Cheers, Chris
On 28/07/14 21:03, Kamil ÖZDEN wrote:
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
_______________________________________________ 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
participants (4)
- 
                
                Chris Cantwell
- 
                
                David Moxey
- 
                
                Kamil ÖZDEN
- 
                
                Sergey Yakovlev