Defining subdomains of 3D mesh

I would like to define the inflow and outflow of a 3D mesh (lt us say it has the shape of a potatoe). A possible way could be to give different cell IDs/subdomain indicators in Paraview. I think that they did something like that in the aneurysm example (https://fenicsproject.org/olddocs/dolfin/1.3.0/python/demo/documented/bcs/python/documentation.html).

How to set the cell ID/subdomains indicators?

I’m not sure how to do this with paraview, but it seems that most people (including myself) use gmsh in order to do this for more complicated meshes. This tutorial is a bit outdated, but it should get you started: http://mypages.iit.edu/~asriva13/?page_id=586

If you want to know further details (for example since the .xml format is deprecated) take a look here: Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio

Thanks for the answer! I used Gmsh for the meshing and it seems to provide a solution for my problem, somehow.

However, when defining physical boundaries (Geometry->Physical Groups->Add Surface) in Gmsh, I can only choose the surface of my whole model. I cannot subdivide the surface into groups and define one of these surfaces as inlflow. Is there a way to split up the surface into multiple physical surfaces in Gmsh?

As far as i know you cannot do that, but usually you have multiple surfaces anyway, and you can mark any of these as physical.

If that isn’t the case for you, you could still split the surface artificially into multiple smaller ones, right?

That is the point where I am struggling. I cannot split it up artificially.

You can find my mesh here: https://github.com/xi2pi/fenics-simulation

You should be able to open them in Gmsh.

I think you can do this by following tutorial:

Creating the following geo-file:

Merge "test_mesh_surface_only.stl";
CreateGeometry;

then manually mark surfaces with the gmsh-gui should work.

1 Like