# Gmsh - Flow in a Channel with Obstacle

I need some help with this mesh. I want to make sure that the internal part of the circle is not filled by the triangles of the mesh. How can I modify the code below to achieve this?

Mesh.MshFileVersion = 2.2;

// Definir o tamanho da malha lc = 0.25;

// Definir os pontos do retângulo Point(1) = {0, 0, 0, lc}; Point(2) = {8, 0, 0, lc}; Point(3) = {8, 2, 0, lc}; Point(4) = {0, 2, 0, lc};

// Definir os pontos do círculo (obstáculo) xc = 4; // Coordenada x do centro do círculo yc = 1; // Coordenada y do centro do círculo r = 0.2; // Raio do círculo

// Definir pontos ao redor do círculo Point(5) = {xc, yc + r, 0, lc}; // Ponto superior Point(6) = {xc, yc, 0, lc}; // Ponto central Point(7) = {xc, yc -r, 0, lc}; // Ponto inferior

// Definir as linhas do retângulo Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 1};

// Definir o círculo (completo) Circle(5) = {7, 6, 5}; // Primeiro metade do círculo Circle(6) = {5, 6, 7}; // Segundo metade do círculo

// Criar a superfície do retângulo Curve Loop(1) = {1, 2, 3, 4}; Plane Surface(1) = {1};

// Criar a superfície do círculo Curve Loop(2) = {5, 6, 7}; Plane Surface(2) = {2};

// Subtrair o círculo do retângulo BooleanDifference { Surface{1}; Delete; } { Surface{2}; Delete; };

// Configurar a malha Transfinite Surface {1};

• This is a question better asked on the gmsh forums. Commented Jul 30 at 23:04
• Hey Wolfgang, do you know how I can solve this issue? It seems simple, but the subtraction isn’t working. I just need to exclude the internal surface of the circle from the generated mesh. Commented Aug 8 at 20:11
• I have essentially no experience with gmsh. As I say above, ask this question on the gmsh forum. That's where all the people who know this code hang out. Commented Aug 9 at 3:03