← Back to team overview

dolfin team mailing list archive

Re: How to deal with two subdomains with different PDE parameters

 

On Feb 11, 2008 5:05 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> On Mon, Feb 11, 2008 at 11:54:14AM +0100, Kristen Kaasbjerg wrote:
> > Hi dolfin users
> >
> > I am trying to use dolfin for the following simple
> > electrostatic problem:
> > - finding the electrostatic potential in a domain composed
> >   of two subdomains with different dielectric constants.
> >   This amounts to solving Laplace equation with appropriate
> >    BC's.
> >
> > One thing that I cannot figure out how to do is to tell dolfin
> > that I have 2 subdomains and on the internal boundary between
> > these two domains, the normal derivative of the potential has
> > a discontinuity given by the difference between the dielectric
> > constants.
> > Could anyone give me a hint of how to approach this problem
> > with dolfin ? I am relatively unexperienced to FEM so a nice
> > reference would also be welcome.
> >
> > Regards
> > Kristen
>
> The easiest thing to do (if there is just a coefficient in your
> problem that is discontinuous) is to just define a Function for the
> dielectric constant and make it discontinuous. Then just plug it in to
> your equation.
>
> Look in the demos (under src/demo/pde) for how to define a function.
>
> For example, if some parameter is 0 or 1 depending on whether x is
> below or above 0.5, then just do something like this in eval():
>
>   if (x[0] > 0.5)
>     return 1.0;
>   else
>     return 0.0;

This is not going to give the correct answer unless you do the boundary integral
that comes from the integration by parts. Or am I missing something?

   Matt

> --
> Anders
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener


Follow ups

References