New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ElmerGrid "forgets" some names converting from gmsh #437
Comments
|
Hello, the attached geo file (rename to remove the txt extension) also 'forgets' one of the boundary conditions, because physical curve bc4 is a duplicate of bc3. |
Hi @richb2k, thanks for your help on this and your suggestions.
Unfortunately it's not actually generated from a .geo file. It's all done through the gmsh/python api for OpenCascade
I'm not sure what you mean here. If I remove the name, it removes the tag/numbering so I won't know?
This example actually runs fine for me! gmsh -2 -format msh2 mytest.geo -o mytest.msh
ElmerGrid 14 2 mytest.msh -names -out mytest then Thanks again. |
Regarding running gmsh with mytest.go, when I run this: mesh.names includes: Then when I run this: mesh.names includes: and bc4 has been removed. So it appears that ElmerGrid will remove the duplicate bc from the gmsh format 4.1 msh file, but will not remove the duplicate from the gmsh format 2 msh file. Feel free to post the python/gmsh script to create the buggy_mesh.msh file, that should be straightforward to run in python. |
Interesting, if I also try with kevinarden on the forum tells me that this behaviour is not a bug, just not an implemented feature Unfortunately I can't use version 2.2 all the time because it doesn't implement periodic boundaries. |
It would be better to use the latest default format in gmsh, such as format 4.1. The next question is, how does elmersolver react to duplicate boundaries? Maybe set up a test case and try elmersolver. |
I've made some progress on this today so should hopefully be able to share a couple of test cases soon. My feeling is that the behaviour for version 2 is "hope for the best" and for version 4 it's "assume the worst". Some of ElmerSolver's features are not supported for these duplicate/overlapping boundaries, but sometimes that doesn't matter. I'll try to upload those test cases by the end of this week. |
Ok, so this folder contains three very minimal Again, I think version 4 will always give the right answer if all names are converted (but there are no error messages when an ID is not mapped). Version 2 trusts that the user has thought through the duplication, so the simulation may be correct or not. I'm happy to have further discussion about this, especially if anything is unclear in the files, otherwise feel free to close this issue whenever you want. |
The test cases look promising, but haven't had a chance to run them just yet. Maybe you could add the elmersolver case.sif files as well? with unique file names of course. Then post the test archive on the forum. As the originator, you should be able to close the issue yourself. |
Oops, so sorry I forgot the sif. Here is the version with sif: Thanks again for your help. I'll close the issue then and just feel free to contact me again if I've made further mistakes! |
My gmsh file specifies 28 "PhysicalNames" but unfortunately the resulting "mesh.names" file only contains 14 of them.
Minimum working example
For example, this occurs if I run
ElmerGrid 14 2 buggy_mesh.msh -names -out ElmerMesh
on the file attached (the.txt
extension just so github would attach it).In the gmsh file:
And in "mesh.names":
The interesting thing is that I can see all the body names read in ("BC name for physical group X is: Y"), but they don't come out in the final result. I can't see any errors in the command line log.
The only other feature which catches my eye is:
What I've tried
autoclean
enabled, the only difference is renumbering inmesh.names
mesh.names
, but it's always a subsetThe only thing I can think that is causing a problem is that named entities are not completely disjoint. For example:
Rotor-0_HoleMag_R0-T0-S0_Boundary = Rotor_Hole_Left_0 + Rotor_Hole_Right_0 + Rotor_Hole_Top_0 + Rotor_Hole_Bottom_0 + ...
Should that be a problem?
Let me know if there's anything else you would like me to test locally. Any help would be great.
Some system info
sudo apt install elmerfem-csc
The text was updated successfully, but these errors were encountered: