Subject: [FEniCS-dev] neumann conditions

From: Gideon Simpson <[email-masked]>
Date: Mon, 17 Mar 2008 20:04:29 -0400

Does anyone have any examples with inhomogeneous neumann boundary  
conditions?

-gideon

---

From: Gideon Simpson <[email-masked]>
Date: Mon, 17 Mar 2008 22:21:35 -0400

Let me qualify this.  I am interested in problems where I have a  
stress, \sigma, and on the boundary of the domain

\sigma N = \tau N

\tau is another tensor.  Rather than hard code into my dolfin stuff  
what the local normal is, I would like to have a way of getting having  
dolfin compute it for me.  I would also like to be able to do this on  
a (marked) subset of the domain.

-gideon

On Mar 17, 2008, at 8:04 PM, Gideon Simpson wrote:

> _______________________________________________
> FEniCS-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/fenics-dev

---

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 18 Mar 2008 08:06:46 +0000

> Does anyone have any examples with inhomogeneous neumann boundary  

Take a look at the DOLFIN demos poisson and lift-drag.

Garth

---

From: Gideon Simpson <[email-masked]>
Date: Tue, 18 Mar 2008 16:15:06 -0400

That helps.  Suppose I want to apply such a condition on one part of  
the boundary and specify dirichlet conditions on another part.  I have  
the different boundary regions identified with cell markers.  But how  
I would apply such a cell filter in this context?

-gideon

---

From: "Murtazo Nazarov" <[email-masked]>
Date: Tue, 18 Mar 2008 21:23:25 +0100 (CET)

> I would apply such a cell filter in this context?

If you have a look to the solvers in Unicorn, you can find answer to your
questions.

/murtazo

---

From: Anders Logg <[email-masked]>
Date: Tue, 18 Mar 2008 21:52:36 +0100

> > I would apply such a cell filter in this context?

For Neumann, send the MeshFunction defining the part of the boundary
you want to integrate over to the assembler (see Assembler.h). For
Dirichlet, send the MeshFunction defining the part of the boundary you
want to set the condition on to the constructor of DirichletBC.

-- 
Anders

---

From: Gideon Simpson <[email-masked]>
Date: Tue, 18 Mar 2008 17:59:19 -0400

I'm familiar with handling the Diritchlet conditions, and I see in the  
Assembler header file that there is a procedure for handling  
construction over subdomains.  I'm a little unclear about exterior vs.  
interior facet domains, which I understand to be the faces of the tets  
on the exterior of the domain vs. the faces of tets in the interior,  
and how to relate that to my dirichlet/neumann problem.

I think I've been able to work around it by using the mesh labels  
within the ffc by declaring

ds0 = Integral("exterior facet", 0)

and integrating against ds0, but I'd like to understand how to handle  
this inside of dolfin.

-gideon

---

From: Anders Logg <[email-masked]>
Date: Tue, 18 Mar 2008 23:25:53 +0100

On Tue, Mar 18, 2008 at 05:59:19PM -0400, Gideon Simpson wrote:
> Assembler header file that there is a procedure for handling construction 
> over subdomains.  I'm a little unclear about exterior vs. interior facet 
> domains, which I understand to be the faces of the tets on the exterior of 
> the domain vs. the faces of tets in the interior, and how to relate that to 
> my dirichlet/neumann problem.
>
> I think I've been able to work around it by using the mesh labels within 
> the ffc by declaring
>
> and integrating against ds0, but I'd like to understand how to handle this 
> inside of dolfin.

It's enough to use ds (for exterior facets, i.e., the boundary or
parts thereof) and dS (for interior facets, i.e., faces of tets that
are not on the boundary).

Create a mesh function over the mesh and set its value 0 on the facets
(on the boundary) that you want to include and 1 on the others.

Similarly, if you have two different parts you want to define
different integrals on, create ds0, ds1 and set 0 on one and 1 on the
other, then 2 on the rest, etc.

-- 
Anders