Confusion about how to use Gridap.jl Dirichlet boundary specification

I am trying to numerically solve the diffusion equation using the Gridap.jl finite element method package. Specifically the problem is radially symmetric diffusion in 3D of a substance with initial concentration C(a < r < a+L, t=0) = C_0 and C(r, t=0)=0 elsewhere in a large medium (theoretically infinite, but large+finite in code). r=a should be a reflecting boundary and r=R, where R is the radial extent of the domain should be a Dirichlet boundary where C=0. I am confused about how to specify the Dirichlet boundary in Gridap. Based on this tutorial, which has a unit square domain, the Dirichlet boundaries are specified by numbers, but it is not clear to me how the numbers map onto boundaries: 8 Incompressible Navier-Stokes · Gridap tutorials. In particular, in that problem, there are 4 boundaries, but 8 numbers. Does anyone who is familiar with this package know what this correspondence is, and/or how to set up my problem? Thanks!

Hi. I have used the package a bit, and though I find powerful and convenient, it certainly lacks a bit of documentation. Nevertheless, I found out that for the simple cartesian grid that you are using, the boundaries are numbered:

  • 1, 2, 3, 4: the four points around your domain (I think that it begins lower left, then lower right, upper left, upper right)
  • 5: lower segment
  • 6 upper segment
  • 7: left segment
  • 8: right segment
  • and 9 is for the domain itself as far as I remember.

That does not apply in 3D obviously.

You can see an application of that in example 8 Incompressible Navier-Stokes · Gridap tutorials where the upper part of the domain has a different boundary condition (so number 6). Or on 7 Darcy equation (with RT) · Gridap tutorials where a Neumann BC is applied on segment 8 (right hand side of the domain)

We usually generate our meshes with Gmsh and import them. In Gmsh, you can associate tags with boundaries, which Gridap can read and use to associate with boundary conditions, sources, etcetera (as e.g. in this tutorial).

2 Likes