# Re: [deal.II] Re: Set up boundary id in gmsh

```Dear Bruno,
Thank you very much!!! This solved my problem. This is very helpful!
Best regards,
Yuesu```
```
On Wed, Aug 5, 2020 at 9:33 PM Bruno Blais <blais.br...@gmail.com> wrote:

> The best way to proceed is to set the boundary conditions using Physical
> Entities in GMSH.
> An example is always better. For example, the following GMSH code :
>
>  lc = 2.0e-1;
>  lf = 2.0e-1;
>  RO=1;
>  RI=0.25;
>
>  Point(0) = {0, 0, 0, lc};
>  Point(1) = {RO, 0, 0, lc};
>  Point(2) = {0, -RO , 0, lc};
>  Point(3) = {-RO, 0, 0, lc};
>  Point(4) = {0, RO, 0, lc};
>
>  Point(5) = {RI, 0, 0, lf};
>  Point(6) = {0, -RI , 0, lf};
>  Point(7) = {-RI, 0, 0, lf};
>  Point(8) = {0, RI, 0, lf};
>
>  Circle(1)={1,0,2};
>  Circle(2)={2,0,3};
>  Circle(3)={3,0,4};
>  Circle(4)={4,0,1};
>
>  Circle(5)={5,0,6};
>  Circle(6)={6,0,7};
>  Circle(7)={7,0,8};
>  Circle(8)={8,0,5};
>
>  Line Loop(1) = {1,2,3,4};
>  Line Loop(2) = {5,6,7,8};
>
>  Plane Surface(1) = {1,2} ;
>  //Transfinite Surface{1}={1,2,3,4};
>  Recombine Surface{1,2};
>
>  // Creates a physical entity 1 (i.e. for a BC)
>  //Physical Point(1) = {1,2} ;
>  Physical Line(0)={1,2,3,4};
>  Physical Line(1)={5,6,7,8};
>
>  Physical Surface(0) = {1};
>
>
> Produces a 2D mesh of a single surface with id 0. It has two boundary
> conditions (0) and (1). One on the outer circle and the other on the inner
> circle. We use it to simulate a Taylor-Couette flow.
> If you wanted to use a 3D mesh, then you would make a Physical Volume(0)
> and you would use the Physical Surface for the boundary conditions
>
> Best
> Bruno
>
>
>
> On Wednesday, 5 August 2020 20:36:09 UTC-4, yuesu jin wrote:
>>
>> Dear all,
>>   I want to set up one Dirchlet boundary condition and one Neumann
>> boundary condition on a 2d  mesh, which is generated by gmsh. How can I set
>> up the mesh file in order to tell dealii with the boundary id when I input
>> the .msh file into dealii? Thanks!
>> Best regards,
>> --
>> Yuesu Jin,
>> Ph.D student,
>> University of Houston,
>> College of Natural Sciences and Mathematics,
>> Department of Earth and Atmospheric Sciences,
>> Houston, Texas 77204-5008
>> 346-404-2062
>>
>> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> ---
> 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
> To view this discussion on the web visit
> .
>

--
Yuesu Jin,
Ph.D student,
University of Houston,
College of Natural Sciences and Mathematics,
Department of Earth and Atmospheric Sciences,
Houston, Texas 77204-5008
346-404-2062

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see