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.
Hi David!
On 08/29/2012 10:04 AM, 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 ?
The Dirichlet boundary conditions are associated with the nodal values, but the Von Neumann conditions are specified by boundary integrals (in the week form), so the "zero integrals" corresponding to the "0 Von Neumann" conditions vanish.
Regards Vladimir
>
David.
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To view this discussion on the web visit https://groups.google.com/d/msg/sfepy-devel/-/enYmL_uBQ-8J.... To post to this group, send email to sfepy...@googlegroups.com. To unsubscribe from this group, send email to sfepy-devel...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en....
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:
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.
On 08/29/2012 11:35 AM, Alec Kalinin wrote:
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:
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.
Thank you, Alec, for the nice explanation (we could add this to the docs?). I will just add, that the term needed for non-zero Neumann conditions (or fluxes) is dw_surface_ndot - see the example posted in the discussion [1].
>
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 !
Thanks, I am glad to hear that!
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.
Cheers, r. [1] https://groups.google.com/forum/?fromgroups=#!topic/sfepy-devel/R9SIMoNiRfc...
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:
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.
Hi David,
a modified version of the Poisson example that shows what you want is attached to the thread I linked in my previous e-mail. To sum it up: modify the equations as follows:
equations = { 'Temperature' : """dw_laplace.i1.Omega( coef.val, s, t ) = dw_surface_ndot.2.Gamma(coef.c, s)""" }
and add the "c" coefficient to the materials:
material_2 = { 'name' : 'coef', 'values' : {'val' : 1.0, 'c' : nm.array([[0.0], [0.0], [40.0]])}, }
Does it help?
r.
On 08/29/2012 12:13 PM, David Libault wrote:
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:
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.
Hi Robert,
Yes it does. Thank you. Although as a user with little FEA background, as the poisson.py example is now, I would tend to use it with c=0 for the "null Von Neumann boundary conditions" which (if it works at all) is probably overkill... IMHO, it would help to explain in the tutorial that the second term can (or should) be omited for surfaces where "null Von Neumann boundary conditions" are set.
David.
Le mercredi 29 août 2012 13:30:45 UTC+2, Robert Cimrman a écrit : >
Hi David,
a modified version of the Poisson example that shows what you want is attached to the thread I linked in my previous e-mail. To sum it up: modify the equations as follows:
equations = { 'Temperature' : """dw_laplace.i1.Omega( coef.val, s, t ) = dw_surface_ndot.2.Gamma(coef.c, s)""" }
and add the "c" coefficient to the materials:
material_2 = { 'name' : 'coef', 'values' : {'val' : 1.0, 'c' : nm.array([[0.0], [0.0], [40.0]])}, }
Does it help?
r.
On 08/29/2012 12:13 PM, David Libault wrote:
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:
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.
Hi David,
Yes, it's a good idea to have an example with the general situation, together with description of this in the tutorial. I have added a new issue [1], so that it is not forgotten, as I will be spending the first two weeks of September by traveling to various conferences. I labeled it as "EasyToFix", hinting that contributions by anyone are welcome. :)
Best regards, r.
[1] https://github.com/sfepy/sfepy/issues/195...
On 08/29/2012 01:51 PM, David Libault wrote:
Hi Robert,
Yes it does. Thank you. Although as a user with little FEA background, as the poisson.py example is now, I would tend to use it with c=0 for the "null Von Neumann boundary conditions" which (if it works at all) is probably overkill... IMHO, it would help to explain in the tutorial that the second term can (or should) be omited for surfaces where "null Von Neumann boundary conditions" are set.
David.
Le mercredi 29 août 2012 13:30:45 UTC+2, Robert Cimrman a écrit : >
Hi David,
a modified version of the Poisson example that shows what you want is attached to the thread I linked in my previous e-mail. To sum it up: modify the equations as follows:
equations = { 'Temperature' : """dw_laplace.i1.Omega( coef.val, s, t ) = dw_surface_ndot.2.Gamma(coef.c, s)""" }
and add the "c" coefficient to the materials:
material_2 = { 'name' : 'coef', 'values' : {'val' : 1.0, 'c' : nm.array([[0.0], [0.0], [40.0]])}, }
Does it help?
r.
On 08/29/2012 12:13 PM, David Libault wrote:
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:
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.
David,
Today evening I will try to write little tutorial about these terms.
Alexander.
On Wednesday, August 29, 2012 3:51:07 PM UTC+4, David Libault wrote: >
Hi Robert,
Yes it does. Thank you. Although as a user with little FEA background, as the poisson.py example is now, I would tend to use it with c=0 for the "null Von Neumann boundary conditions" which (if it works at all) is probably overkill... IMHO, it would help to explain in the tutorial that the second term can (or should) be omited for surfaces where "null Von Neumann boundary conditions" are set.
David.
Le mercredi 29 août 2012 13:30:45 UTC+2, Robert Cimrman a écrit : >
Hi David,
a modified version of the Poisson example that shows what you want is attached to the thread I linked in my previous e-mail. To sum it up: modify the equations as follows:
equations = { 'Temperature' : """dw_laplace.i1.Omega( coef.val, s, t ) = dw_surface_ndot.2.Gamma(coef.c, s)""" }
and add the "c" coefficient to the materials:
material_2 = { 'name' : 'coef', 'values' : {'val' : 1.0, 'c' : nm.array([[0.0], [0.0], [40.0]])}, }
Does it help?
r.
On 08/29/2012 12:13 PM, David Libault wrote:
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:
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.