Hi
I have a mesh created in Gmsh for a half ring as shown. I don't see an option in Gmsh to output the .msh file to cylindrical coordinates so the model coordinates are coming into Elmer as cartesian. I want to assign material properties that are aligned along the r-theta axes ( example: composite cylinder) and think I need cylindrical coordinates to properly specify the material properties.
I see there are in-line options in Elmergrid (-cylinder) that maps a cylindrical coordinate model into cartesian coordinates. Is there another option in the Elmer family to go there other way: cartesian -> cylindrical? Or is there another way to do this?
thanks
gsw
Converting Gmsh file to Cylindrical Coordinates
-
- Posts: 24
- Joined: 04 Apr 2012, 23:17
- Antispam: Yes
Converting Gmsh file to Cylindrical Coordinates
- Attachments
-
- GmshRing_012614.png (33.9 KiB) Viewed 4138 times
-
- Posts: 56
- Joined: 15 Dec 2010, 13:50
Re: Converting Gmsh file to Cylindrical Coordinates
Hello,
Related topic, I would also like to know if inside ElmerSolver there is a way to convert a 3D r/theta/z (cylindrical) mesh to a 3D x/y/z mesh.
I assume that the Navier Stokes solver and all it's functionality (e.g., periodic bc) does not work in r/theta/z coordinate system.
Thank you
Denis
Related topic, I would also like to know if inside ElmerSolver there is a way to convert a 3D r/theta/z (cylindrical) mesh to a 3D x/y/z mesh.
I assume that the Navier Stokes solver and all it's functionality (e.g., periodic bc) does not work in r/theta/z coordinate system.
Thank you
Denis
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Converting Gmsh file to Cylindrical Coordinates
Hi
Now the cartesian coordinate system is the only true 3D coordinate system in Elmer that is actively supported by the solvers. Now there are the "axi symmetric" and "cylindric symmetric" coordinate systems but these are both 2D (r,z). The difference between them is that for cylindric symmetric the vector fields (Navier-Stokes) is assumed to have an azimuthal component.
Now there are several historic solvers that were written by generalized coordinate system where the user could give the Christoffel symbolds. Unfortunately these are not widely used anymore. The main challenge related to them was that it severely limited the group of people that could contribute as the mathematics is rather steep. I think that these could be used also in 3D to solve problems in (r,theta,z) coordinates.
If you do not need to solve the equations in the different coordinate systems but want to visit them for visualization purposes, for example. Then you may use a Solver specific coordinate system with the keyword, e.g.
or you could have an initial mesh that is transformed into a cartesian mesh at the time of reading setting in Simulation section
Currently not many coordinate systems are supported by it is relatively easy to add new coordinate transformation to subroutine CoordinateTransformation of MeshUtils.src
Now it should be noted that if you transform the coordinate system then the vector fields should often be transformed correspondingly. For that you would need some additional routines. We might have some solvers for that purpose that are not in the distro.
-Peter
Now the cartesian coordinate system is the only true 3D coordinate system in Elmer that is actively supported by the solvers. Now there are the "axi symmetric" and "cylindric symmetric" coordinate systems but these are both 2D (r,z). The difference between them is that for cylindric symmetric the vector fields (Navier-Stokes) is assumed to have an azimuthal component.
Now there are several historic solvers that were written by generalized coordinate system where the user could give the Christoffel symbolds. Unfortunately these are not widely used anymore. The main challenge related to them was that it severely limited the group of people that could contribute as the mathematics is rather steep. I think that these could be used also in 3D to solve problems in (r,theta,z) coordinates.
If you do not need to solve the equations in the different coordinate systems but want to visit them for visualization purposes, for example. Then you may use a Solver specific coordinate system with the keyword, e.g.
Code: Select all
Coordinate Transformation = String "cartesian to cylindrical"
Code: Select all
Coordinate Transformation = String "cylindrical to cartesian"
Now it should be noted that if you transform the coordinate system then the vector fields should often be transformed correspondingly. For that you would need some additional routines. We might have some solvers for that purpose that are not in the distro.
-Peter
-
- Posts: 56
- Joined: 15 Dec 2010, 13:50
Re: Converting Gmsh file to Cylindrical Coordinates
Thanks Peter,
The transformation is working beautifully.
Denis
The transformation is working beautifully.
Denis