gmsh imported into dealii

174 views
Skip to first unread message

王艺康

unread,
Jun 4, 2024, 3:28:05 AMJun 4
to deal.II User Group
I drew the model in gmsh but importing to dealii is giving me an error.This step error occurs when importing a model.

The violated condition was:
    boundary_id != numbers::internal_face_boundary_id
Additional information:
    The input arguments for creating a triangulation specified a boundary
    id for an internal face. This is not allowed.



Here only a part of the mesh is shown (the outer contour also generates the mesh),the error should occur at the interface of the two bodies, but I don't know how to fix it. This model will be used for fluid-solid coupling, where the interior is the fluid domain and the contours are the solid domain.
捕获.PNG



Bruno Turcksin

unread,
Jun 4, 2024, 8:28:07 AMJun 4
to deal.II User Group
Hello,

Deal.II associates the physical group of a face with a boundary id. You need to remove the physical group that are associated with interior faces.

Best,

Bruno

王艺康

unread,
Jun 4, 2024, 10:05:44 AMJun 4
to deal.II User Group
Hello,
Thank you very much for your reply. That's what I thought at first, but I was wrong, when I removed the corresponding physical group it was still the same error. I think gmsh automatically sets the coupling interface to solid when drawing the model body mesh, but I don't know how to change it. I didn't learn gmsh deep enough.

Wang

Bruno Turcksin

unread,
Jun 4, 2024, 10:28:21 AMJun 4
to dea...@googlegroups.com
Wang,

Do you have a geo file that describes the geometry? Can you remove the "Physical Surface" lines in the geo file and regenerate the mesh.

Best,

Bruno

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/WD4qeXgUf0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/6658e3cb-5f21-46a4-ab4f-08bbed3fa975n%40googlegroups.com.

王艺康

unread,
Jun 4, 2024, 8:51:08 PMJun 4
to deal.II User Group
Bruno,
In fact that's what I did. The error is the same for regenerated meshes entered into dealii. I redrew a simple geometry again without defining any physical information still the same error. I don't understand why this is wrong, if I generate only the fluid-solid coupling interface to the external contour (solid domain) mesh there is no problem, but the same error occurs when I generate only the internal (fluid domain).

Wang


捕获1.PNG捕获2.PNG
捕获3.PNG
捕获4.PNG

Bruno Turcksin

unread,
Jun 5, 2024, 8:28:20 AMJun 5
to dea...@googlegroups.com
Wang,

Are you loading a hex mesh or a tet mesh? I don't know if loading a tet mesh works.

Best,

Bruno

blais...@gmail.com

unread,
Jun 7, 2024, 11:32:16 AMJun 7
to deal.II User Group
Loading a tet mesh works if you set-up your Mapping/FE accordingly, this is a feature we use extensively.

王艺康

unread,
Jun 12, 2024, 3:08:19 AMJun 12
to deal.II User Group
Hollo,
I tried your suggestion but dealii still reports an error. I don't think it has anything to do with the grid type, it also errors when I only use Gridin.

Wang

blais...@gmail.com

unread,
Jun 12, 2024, 10:46:04 AMJun 12
to deal.II User Group
Can you provide the GMSH code and a small executable that tries to achieve what you are doing? I can take a look and figure out what is the issue :)

王艺康

unread,
Jun 13, 2024, 2:27:05 AMJun 13
to deal.II User Group
Hello,
Sure. I just use GridIN to read the grid.

using namespace dealii;
void run()
{

    Triangulation<3> triangulation;
    GridIn<3> grid_in;
    grid_in.attach_triangulation(triangulation);

    {
        std::string   filename = "heart_have_thickness(1).msh";
        std::ifstream file(filename);
        Assert(file, ExcFileNotOpen(filename.c_str()));
        grid_in.read_msh(file);
    }

}

 int main()
 {

     run();

 }

heart_have_thickness.geo
heart_have_thickness(1).msh

陈敏

unread,
Jun 13, 2024, 10:28:41 PMJun 13
to dea...@googlegroups.com
You should not add Physical Surface("inner wall surface", 776) of interface in gmsh,

This interface can be determined by the step-46, this is the drawback of dealii as I know.



王艺康 <yikangw...@gmail.com> 于2024年6月13日周四 14:27写道:
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/16856316-a225-4d92-9049-e48ffc6c81b4n%40googlegroups.com.

王艺康

unread,
Jun 13, 2024, 11:01:12 PMJun 13
to deal.II User Group
I tried to do this, but it was still wrong. I draw the interface of the fluid-solid coupling without imposing any physical labels. It still doesn't pass the Gridin

Luca Heltai

unread,
Jun 14, 2024, 2:34:33 AMJun 14
to dea...@googlegroups.com
Do you have gmsh api installed? If you do, there is another function with the same name, where you can specify labels to assign interior manifold ids explicitly, and set the interior boundary id to “-1”. There is an example in the documentation on how to do this. 

Luca

Il giorno 14 giu 2024, alle ore 05:01, 王艺康 <yikangw...@gmail.com> ha scritto:

I tried to do this, but it was still wrong. I draw the interface of the fluid-solid coupling without imposing any physical labels. It still doesn't pass the Gridin
Reply all
Reply to author
Forward
0 new messages