Finding the right surface term for a diffusion problem
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have the term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal vector. Has an SfePy term been written corresponding to this?
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
Thanks, Ben
Hello Ben,
On 03/29/2013 03:35 PM, Ben Derrett wrote:
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have the term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal vector. Has an SfePy term been written corresponding to this?
I do not think so. However it should not be difficult to add it - could you provide an example file using a term like that, so that I could test the possible implementation. It should run without the non-existing term. Also, what name would you propose? dw_surface_s_grad_s_n??
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
As above, but I assume that having the above term would suffice, right?
r.
Hello Vladimir and Robert,
Vladimir: Thanks. In the problem I'm considering, the NBC is of the form \nabla V\cdot n = V^N (i.e. without the M). This complicates things a little -- see attached pdf.
Robert: Yes, that sounds like a good name. I've attached a pdf describing a demo problem which -- I think -- requires a term of this type. If I've got my calculations correct, you'll be able to test the new term against the analytical solution.
Thanks once again, Ben
On Friday, March 29, 2013 3:16:15 PM UTC, Robert Cimrman wrote:
Hello Ben,
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have
On 03/29/2013 03:35 PM, Ben Derrett wrote: the
term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal vector. Has an SfePy term been written corresponding to this?
I do not think so. However it should not be difficult to add it - could you provide an example file using a term like that, so that I could test the possible implementation. It should run without the non-existing term. Also, what name would you propose? dw_surface_s_grad_s_n??
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
As above, but I assume that having the above term would suffice, right?
r.
Hi Ben,
On 04/01/2013 01:17 PM, Ben Derrett wrote:
Hello Vladimir and Robert,
Vladimir: Thanks. In the problem I'm considering, the NBC is of the form \nabla V\cdot n = V^N (i.e. without the M). This complicates things a little -- see attached pdf.
Looking at the pdf, I second Vladimir's question/objection :) Usually, one deals with the boundary integral \int_\Gamma p (M \cdot \nabla V) \cdot n in one of the three ways:
- it is zero on the Dirichlet boundary part, as p is zero there (the test function)
- it is zero, because the flux (M \cdot \nabla V) \cdot n is zero
- if the flux is non-zero, then "(M \cdot \nabla V) \cdot n" is replaced in the integral by the given value.
So the question is, why "M" disappeared from you condition \nabla V \cdot n = -1, and how to reintroduce it :)
Robert: Yes, that sounds like a good name. I've attached a pdf describing a demo problem which -- I think -- requires a term of this type. If I've got my calculations correct, you'll be able to test the new term against the analytical solution.
If the above does not apply to your case (which I doubt), we can try adding this term, but caution is required - the FE solution V lives in a function space, that does not have IMHO a well defined gradient on the boundary. We have used terms like that in the past in some numerical tests, and their accuracy was atrocious.
r.
Thanks once again, Ben
On Friday, March 29, 2013 3:16:15 PM UTC, Robert Cimrman wrote:
Hello Ben,
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have
On 03/29/2013 03:35 PM, Ben Derrett wrote: the
term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal vector. Has an SfePy term been written corresponding to this?
I do not think so. However it should not be difficult to add it - could you provide an example file using a term like that, so that I could test the possible implementation. It should run without the non-existing term. Also, what name would you propose? dw_surface_s_grad_s_n??
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
As above, but I assume that having the above term would suffice, right?
Hi Robert,
I see. Thanks for pointing this out. I'll see whether I can make my problem more suitable for the FEM. :)
Ben
On Monday, April 1, 2013 10:23:33 PM UTC+1, Robert Cimrman wrote:
Hi Ben,
On 04/01/2013 01:17 PM, Ben Derrett wrote:
Hello Vladimir and Robert,
Vladimir: Thanks. In the problem I'm considering, the NBC is of the form \nabla V\cdot n = V^N (i.e. without the M). This complicates things a little -- see attached pdf.
Looking at the pdf, I second Vladimir's question/objection :) Usually, one deals with the boundary integral \int_\Gamma p (M \cdot \nabla V) \cdot n in one of the three ways:
- it is zero on the Dirichlet boundary part, as p is zero there (the test function)
- it is zero, because the flux (M \cdot \nabla V) \cdot n is zero
- if the flux is non-zero, then "(M \cdot \nabla V) \cdot n" is replaced in the integral by the given value.
So the question is, why "M" disappeared from you condition \nabla V \cdot n = -1, and how to reintroduce it :)
Robert: Yes, that sounds like a good name. I've attached a pdf describing a demo problem which -- I think -- requires a term of this type. If I've got my calculations correct, you'll be able to test the new term against the analytical solution.
If the above does not apply to your case (which I doubt), we can try adding this term, but caution is required - the FE solution V lives in a function space, that does not have IMHO a well defined gradient on the boundary. We have used terms like that in the past in some numerical tests, and their accuracy was atrocious.
r.
Thanks once again, Ben
On Friday, March 29, 2013 3:16:15 PM UTC, Robert Cimrman wrote:
Hello Ben,
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have
On 03/29/2013 03:35 PM, Ben Derrett wrote: the
term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal
Has an SfePy term been written corresponding to this?
I do not think so. However it should not be difficult to add it - could you provide an example file using a term like that, so that I could test
vector. the
possible implementation. It should run without the non-existing term. Also, what name would you propose? dw_surface_s_grad_s_n??
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
As above, but I assume that having the above term would suffice, right?
Hi Ben,
the diffusion problem with Neumann BC is in the strong formulation:
\nabla (M \cdot \nabla V) = 0 in \Omega n \cdot M \cdot \nabla V = v^N on \Gamma^N (Neumann),
but the weak form is:
\int\Omega (M \cdot \nabla V) \cdot \nabla p = \int{\Gamma^N} v^N
Do you really need that term? It is not implemented in Sfepy, there is only the evaluation term d_surface_flux:
\int_{\Gamma^N} n M \cdot \nabla V
but I'm not sure it is correct, the problem is probably with accuracy of the boundary derivative. I'm currently working on some tests.
Regards Vladimir
On 03/29/2013 03:35 PM, Ben Derrett wrote:
Hello,
In the weak formulation of my problem (a 2D diffusion problem), I have the term
\int_{\Gamma^N} p\nabla V\cdot M n
where \Gamma^N is region where Neumann BC is applied, p is a test function, V is the unknown function, M is a 2x2 matrix and n is the normal vector. Has an SfePy term been written corresponding to this?
Alternatively, is there a SfePy term corresponding to the integral
\int_{\Gamma^N} p\nabla V\cdot q,
where q is a vector? I saw the term dw_surface_lcouple, but it doesn't seem to support the weak evaluation mode.
Thanks, Ben
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sfepy-devel...@googlegroups.com. To post to this group, send email to sfepy...@googlegroups.com. Visit this group at http://groups.google.com/group/sfepy-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
participants (3)
-
Ben Derrett -
Robert Cimrman -
Vladimír Lukeš