I renumbered starting from 1 instead of 0. There is a junk line at the bottom of the poly file I deleted.
ElmerGrid did not throw any errors but did not write a mesh file.
I modified a copy of ElmerGrid and deleted the entire section that reads the poly file.
The modified ElmerGrid did write out an elmer mesh, but with no boundary elements, just triangles.
ElmerGUI crashed (core dump) when trying to load this mesh.
What mesh generation software do you use?
-
- Posts: 2369
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
-
- Posts: 2369
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: What mesh generation software do you use?
I forgot to change the node indices in the element file when I renumber the nodes. The mesh converted and loaded into GUI with no defined boundary elements. GUI made 1 boundary when imported.
Re: What mesh generation software do you use?
There is a slightly newer version of Triangle here:
https://github.com/wo80/Triangle
It doesn't seem to help with the conversion from poly to elmer mesh.
BTW, the Triangle help text says
Rich.
https://github.com/wo80/Triangle
It doesn't seem to help with the conversion from poly to elmer mesh.
BTW, the Triangle help text says
Also, regarding the junk line at the end of the file which is this:Vertices, segments, holes, and regions must be numbered consecutively, starting from one or zero. (The choice to begin the numbering from one or zero must be consistent across all objects.)
The help text says# -pPq33.000000eAazQIj
so the last line is a comment and should be ignored.Blank lines and comments prefixed by `#' may be placed anywhere.
Rich.
Re: What mesh generation software do you use?
I got my to sort of work. But needed to rewrite the indexes.
Still, the body properties were not read properly.
Still going.
Still, the body properties were not read properly.
Still going.
Last edited by gforti on 08 Mar 2023, 20:33, edited 1 time in total.
Re: What mesh generation software do you use?
Hello,
Turns out the newer Triangle from 2018 can't handle zero based numbering.
Using the original Triangle and converting trafo_aniso_lin.poly to trafo_aniso_lin.1 works. The changes to Elmergrid worked, and Elmergrid successfully converted trafo_aniso_lin.1 to an Elmer mesh, with 3 boundaries.
See attached.
Rich.
Turns out the newer Triangle from 2018 can't handle zero based numbering.
Using the original Triangle and converting trafo_aniso_lin.poly to trafo_aniso_lin.1 works. The changes to Elmergrid worked, and Elmergrid successfully converted trafo_aniso_lin.1 to an Elmer mesh, with 3 boundaries.
See attached.
Rich.
- Attachments
-
- trafo_mesh.zip
- (46.87 KiB) Downloaded 67 times
-
- trafo_1.zip
- (49.88 KiB) Downloaded 61 times
Re: What mesh generation software do you use?
Just to clarify, I wanted to use Elmer fem from femm simulations (which has a kind of simple way of creating geometry and mesh).
This is intended to be used for undergrad teaching.
femm does not keep the mesh files but these can be retrieved with xfemm (https://sourceforge.net/p/xfemm/wiki/Home/)
I`ve attached the *.fem file (simpler, for testing purposes).
generating the files:
I`ve refined the mesh with:
triangle -rcD teste
Than, i moved the first element (0 index) to the final position and renumbered it (and where it is used). Also, I used the poly file.
Other thing. FEMM also generates a .edge file.
This is intended to be used for undergrad teaching.
femm does not keep the mesh files but these can be retrieved with xfemm (https://sourceforge.net/p/xfemm/wiki/Home/)
I`ve attached the *.fem file (simpler, for testing purposes).
generating the files:
Code: Select all
fmesher --write-poly teste.fem
triangle -rcD teste
Than, i moved the first element (0 index) to the final position and renumbered it (and where it is used). Also, I used the poly file.
Other thing. FEMM also generates a .edge file.
- Attachments
-
- Capture.PNG
- (205.86 KiB) Not downloaded yet
-
- teste.zip
- (718 Bytes) Downloaded 78 times
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: What mesh generation software do you use?
Hi
So is there still issue with poly file?
The edge files probably just includes all the edges of the mesh. This is not needed in Elmer since it can find the edges by itself.
-Peter
So is there still issue with poly file?
The edge files probably just includes all the edges of the mesh. This is not needed in Elmer since it can find the edges by itself.
-Peter
Re: What mesh generation software do you use?
Thing is that FEMM uses poly as a geometry file only.
*.edge -> has info about boundary conditions
*.ele -> has info about bodies
*.node -> also has boundary conditions.
*.edge -> has info about boundary conditions
*.ele -> has info about bodies
*.node -> also has boundary conditions.
Re: What mesh generation software do you use?
Hello,
Can you post an example poly file that generates the .edge file?
Thanks, Rich.
Can you post an example poly file that generates the .edge file?
Thanks, Rich.
Re: What mesh generation software do you use?
The model here is the simplest.
What I could figure by the files. The attached files are the ones extracted from FEMM directly. If you refine the mesh, it changes everything.
.poly file show the draw nodes, segments and attributes (material)
here:
36 nodes (but there are duplicates, e.g. 0 0.5 4 / 12 0.50175 4. Nodes 0 a 12.
36 lines, also duplicated.
3 materials.
.node show the nodes in the boundary:
0 0.5 4 -2 (-2 here is the boundary)
.ele show the bodies, three in this example. This is indicate by the value in the last column
.edge show the mesh edges and identifies the boundary too
0 3 17 -2 (-2 here is the boundary)
What I could figure by the files. The attached files are the ones extracted from FEMM directly. If you refine the mesh, it changes everything.
.poly file show the draw nodes, segments and attributes (material)
here:
36 nodes (but there are duplicates, e.g. 0 0.5 4 / 12 0.50175 4. Nodes 0 a 12.
36 lines, also duplicated.
3 materials.
.node show the nodes in the boundary:
0 0.5 4 -2 (-2 here is the boundary)
.ele show the bodies, three in this example. This is indicate by the value in the last column
.edge show the mesh edges and identifies the boundary too
0 3 17 -2 (-2 here is the boundary)
- Attachments
-
- Capture.PNG (15.16 KiB) Viewed 1179 times
-
- linux.zip
- (213.47 KiB) Downloaded 72 times