Hi,
I plotted the difference between analytical and numerical solutions (see attached). It doesn't converge to the right solution with mesh refinement. Is it possible that the Neumann BC is not applied at the interface during the computation, although the extended Dirichlet BCs enforce resulting zero solution beyond the fluid subdomain?
Cheers,
Tomasz
________________________________________
From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk>
Sent: 15 April 2016 16:00
To: firedrake@imperial.ac.uk
Subject: Re: [firedrake] Laplace equation on subdomain
> On 15 Apr 2016, at 15:54, Tomasz Salwa [RPG] <mmtjs@leeds.ac.uk> wrote:
>
> Hi David,
>
> It works partially, i.e. the nodes beyond the fluid subdomain are "turned off" now, but it looks like the interface is "smeared". I suspect that the assembled matrix's entries involve also integration over elements one layer beyond the subdomain boundary. Is it possible to exclude them?
If you have neumann conditions on your subdomain boundary you've only constrained the gradient of the solution. Therefore on the boundary nodes you may have non-zero solution values.
Because the domain you visualise in paraview extends outside the subdomain you'll have (in 1D) something like:
........
\............
^ boundary node
Note how the cell at the boundary has a non-zero coefficient value are one end, but a zero value at the other (assuming piecewise liners). Paraview will linearly interpolate this basis function when visualising, which may be the artefact you're seeing.
Can you construct an analytic solution and determine that you converge at the correct rate as you refine the mesh? This is a safer test than eyeballing the solution.
Lawrence