Alexander,

Thank you for your detailed answer.

I think I understand how we get from the Laplace equation to its "weak form" as explained in the wikipedia article (http://en.wikipedia.org/wiki/Finite_element_method - integration by parts), but what I don't get is how the Von Neumann condition appears as a new term in the "weak form" as it is not in the Laplace equation...

Regards,

David.

Le mercredi 29 août 2012 11:35:45 UTC+2, Alec Kalinin a écrit :
Hello,

My understanding is following. The general Poission problem is (I will use LaTeX notations for the math):
$$
  \Delta t = f(x), x \in \Omega.
$$
$$
  t(x) = u(x), x \in \Gamma_D,
$$
$$
  \frac{\parial t(x)}{\partial n} = g(x), x \in Gamma_N,
$$
where $t$ is the unknown function to be found, $f(x)$, $u(x)$, $g(x) is the known functions, $\Gamma_D$ is the part of the surface with Dirichlet boundary conditions, $Gamma_N$ is the part of the surface with the Neumann boundary conditions.

The weak form of this problem is:
$$
  \iint_limits{\Omega} \nabla t \nabla v \, dV -
  \iint_limits{\Gamma_n} g v \, dS +
  \iint_limits{\Omega} f v \, dV = 0, v \in V_0,
$$
where $v$ is the test function that is equal to zero on the domain boundary.

There are two key moments in this formulation:
1. There are no integral on the Dirichlet  part of the surface, because the test function in equals to zero on this part. To apply the Dirichlet conditions  there are two known methods: penalty and substitution (the direct row/column modification with known data). I think SfePy uses the substitution method.
2. To apply the Neumann boundary conditions we need to add new integral term on Neumann part of the surface.


And now go back to the "examples/diffusion/poisson.py". In this problem the $\Gamma_Left$ and $\Gama_Right" is the Dirichlet part of the boundary, other part is the Neumann part of the boundary.

In the equation there are only one term:
$$
 \iint_limits{\Omega} \nabla t \nabla v \, dV
$$

It means that the $f(x) = 0$ and the $g(x) = 0$ -- Neumann boundary conditions also equals to zero.

If we need to apply non zero Neumann boundary condition we need to add new term -- the integral on the Neumann part of the surface.

Alexander.


On Wednesday, August 29, 2012 12:04:03 PM UTC+4, David Libault wrote:
Hi !

I could install sfepy and run the examples wihout any issue so far. Congratulations !

In the "examples/diffusion/poisson.py" example, the Dirichlet conditions are explicitly specified on the "Gamma_Left" and "Gamma_Right" regions, but the Von Neumann boundary conditions (grad(T).n = 0) on "all other" surfaces are not specified although the solution does complies with them...

How is this working ? Are the "0 Von Neumann conditions" implicit in that case ? What am I missing ?

David.