dolfin-convert not returning xyz_facet_region.xml


248
views
0
4 months ago by
Ovais  
File attached: mesh_b (1.91 MB)

hi there ,

I am trying to convert xyz.msh to xyz.xml after marking physical groups of the mesh. Before using dolfin convert i use add ---> surface to add physical groups one by one. (Screen shot of stats after addition of surfaces attached below).

When i try dolfin-convert xyz.msh xyz.xml , the conversion works superfine but i just get two files instead of three. The files that i am getting are xyz.xml and xyz_physical_region.xml  but i am not getting xyz.facet_region.xml.

i want the facet region file because i want to use this mesh in FEniCS and apply boundary conditions using facet_region.xml file

What possible mistake am i making here ? why i am not getting facet regions ?
Have also attached the mesh

Any sort of help / advise would really help.
Best,
Ovais
Community: FEniCS Project

2 Answers


1
4 months ago by
Hi, Ovais,

I am new to FEniCS, but it turns out I am investigating exactly the same question as you.
What I am sure now is that if my gms file contains a block enclosed by $PhysicalNames and $EndPhysicalNames, then I can get three files (xxx.xml, xxx_physical_region.xml and xxx_physical_facet_region.xml). and if that block does not exist, then I can only get one file, which is xxx.xml.

Do you have that block in you gmsh file?
By the way, I cannot see the attached mesh file.

Best
Jianan
Thanks for responce Zhang. I have attached the file (mesh) now. How to add the block that you have mentioned in this case ? should i just open .msh file in notepad and add that manually or that is done by gmsh once i perform certain steps ?..
written 4 months ago by Ovais  
1
It seems that your mesh file does not contain that block, even though it is created by and can be viewed in Gmsh. Maybe that is the reason.
written 4 months ago by Jianan Zhang  
is that block supposed to be part of .geo file or .msh file ? because after some search posts such as http://onelab.info/pipermail/gmsh/2007/002680.html suggest that block should be added to .geo file.  I am sort of confused. Can you kindly clarify.

Thanks
written 4 months ago by Ovais  
Maybe it should be part of .geo file first, then will be automatically generated to the .msh file. To be honest, I am also studying how to add that block. You can refer to this link:

http://gmsh.info/doc/texinfo/gmsh.html#Elementary-vs-physical-entities

I will offer you more help if I get it more clear. If you figure this out, please also let me know.

Best
Jianan
written 4 months ago by Jianan Zhang  
Thanks, i am also on it

Grateful for ur support.
written 4 months ago by Ovais  
0
4 months ago by
Ben  
Do you have the geo file available? That may help to see why the facet region is not being generated when you use the dolfin-convert.
when i try to add physical groups through add--> surface the following .geo file is made

Merge "xyz.msh";
Physical Surface(7) = {3};
Physical Surface(8) = {6};
Physical Surface(9) = {1};
Physical Surface(10) = {5};
Physical Surface(11) = {2};

let me also share ... how i got this msh file. This mesh was actually in .xml format and i had to convert it to .msh to that i can get the boundaries. For that i converted the .xml file to .inp and pre processed the mesh in Ansys FE modeller by using skin tool. After identification of boundaries i exported the mesh as .msh format so that i can use dolfin convert to get back .xml format with boundaries in form of facets. Now after this entire cycle , dolfin convert is doing its job but i am still not getting the boundaries :(.... there must be something that i am completely missing here. I am new to gmsh and to fenics. but on a relative scale i can handle fenics however for gmsh i am almost a novice. Can you please guide me .. as how can i get .geo file. I just have one .msh file.
Thanks.
written 4 months ago by Ovais  
1
Try to also mark your volume as a physical region. If I remember correctly I ran into a similar problem quite some time ago and this solved it.
written 4 months ago by klunkean  
i am trying that. Thanks.
written 4 months ago by Ovais  
Can you kindly suggest what syntax must i use to add volumes to the above .geo file ?....I have already tried the following:-
Merge "doubledouble.msh";

Physical Surface(7) = {6};
Physical Surface(8) = {1};
Physical Surface(9) = {3};
Physical Surface(10) = {5};
Physical Surface(11) = {2};

Surface Loop(1) = {1};
Volume(1) = {1};
Surface Loop(2) = {6};
Volume(2) = {6};
Surface Loop(3) = {3};
Volume(3) = {3};
Surface Loop(4) = {5};
Volume(4) = {5};
Surface Loop(5) = {2};
Volume(5) = {2};
But the results is the same i.e. i am able to convert the file. But i am not getting facets.xml
written 4 months ago by Ovais  
1
Hi, Ovais,

The way to mark your volume as a physical region is adding these lines at the bottom of your file:

Physical Volume(1) = {1};
Physical Volume(2) = {2};
Physical Volume(3) = {3};
Physical Volume(4) = {4};
Physical Volume(5) = {5};

I've created my own .geo file after I read the t1.geo and t2.geo and Chapter 5 of the reference maunal. The .msh file has been converted to three files successfully by calling dolfin-convert xxx.msh xxx.xml.

Jianan


written 4 months ago by Jianan Zhang  
Thanks Jianan , i am trying the suggested solution. Was away couldnt try it earlier.
written 4 months ago by Ovais  
Hmm, I guess you are dealing with a more complex situation than me. I just need to create a mesh in Gmsh, then convert it to three .xml files. So my problem is only how to define those physical entities. That's all.

Maybe you need to dig out how to generate that mesh by Gmsh (not sure if it is feasible)?
written 4 months ago by Jianan Zhang  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »