From: Ted K. <ted...@go...> - 2009-09-12 11:41:13
|
Hi How do I apply a Neumann B.C at an inter-element boundary? Regards Ted |
From: David K. <dknez@MIT.EDU> - 2009-09-12 13:19:12
|
Ted Kord wrote: > Hi > > How do I apply a Neumann B.C at an inter-element boundary? > The same way as a usual Neumann BC... the only trick is that you have to find which internal element to apply it to. One way to do this would be to set the subdomain_id of elements on one side of the inter-element boundary to 1 and on the other side to 2, and then search for elements with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and apply the Neumann BC to the appropriate side of those elements. |
From: Roy S. <roy...@ic...> - 2009-09-12 14:17:49
|
On Sat, 12 Sep 2009, David Knezevic wrote: > Ted Kord wrote: >> How do I apply a Neumann B.C at an inter-element boundary? > > The same way as a usual Neumann BC... the only trick is that you have to > find which internal element to apply it to. One way to do this would be > to set the subdomain_id of elements on one side of the inter-element > boundary to 1 and on the other side to 2, and then search for elements > with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and > apply the Neumann BC to the appropriate side of those elements. The trouble with this is that you'll still have the entries in your matrix from the shape functions which stretch between the element on one side of the boundary and on the other. If you have a slit in your domain on which you want to weakly impose boundary conditions, you need to make it an actual topologically broken slit, and then it's just another set of exterior boundaries. IIRC there used to be a bug with libMesh's find_neighbors() reconstruction that would undesirably "patch up" infinitely thin slits. I don't recall whether I fixed that or whether I just worked around the problem by making the slit 1e-6 wide... --- Roy |
From: David K. <dknez@MIT.EDU> - 2009-09-12 14:26:17
|
Roy Stogner wrote: > > On Sat, 12 Sep 2009, David Knezevic wrote: > >> Ted Kord wrote: > >>> How do I apply a Neumann B.C at an inter-element boundary? >> >> The same way as a usual Neumann BC... the only trick is that you have to >> find which internal element to apply it to. One way to do this would be >> to set the subdomain_id of elements on one side of the inter-element >> boundary to 1 and on the other side to 2, and then search for elements >> with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and >> apply the Neumann BC to the appropriate side of those elements. > > The trouble with this is that you'll still have the entries in your > matrix from the shape functions which stretch between the element on > one side of the boundary and on the other. If you have a slit in your > domain on which you want to weakly impose boundary conditions, you > need to make it an actual topologically broken slit, and then it's > just another set of exterior boundaries. I was thinking of imposing an internal flux between internal elements (e.g. as a type of forcing, but inside the domain rather than on the boundary). In that situation an "internal" Neumann condition does the job --- the variational formulation takes care of everything for you... - Dave |
From: Ted K. <ted...@go...> - 2009-09-12 21:08:25
|
2009/9/12 David Knezevic <dk...@mi...> > Roy Stogner wrote: > >> >> On Sat, 12 Sep 2009, David Knezevic wrote: >> >> Ted Kord wrote: >>> >> >> How do I apply a Neumann B.C at an inter-element boundary? >>>> >>> >>> The same way as a usual Neumann BC... the only trick is that you have to >>> find which internal element to apply it to. One way to do this would be >>> to set the subdomain_id of elements on one side of the inter-element >>> boundary to 1 and on the other side to 2, and then search for elements >>> with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and >>> apply the Neumann BC to the appropriate side of those elements. >>> >> >> The trouble with this is that you'll still have the entries in your >> matrix from the shape functions which stretch between the element on >> one side of the boundary and on the other. If you have a slit in your >> domain on which you want to weakly impose boundary conditions, you >> need to make it an actual topologically broken slit, and then it's >> just another set of exterior boundaries. >> > > I was thinking of imposing an internal flux between internal elements (e.g. > as a type of forcing, but inside the domain rather than on the boundary). In > that situation an "internal" Neumann condition does the job --- the > variational formulation takes care of everything for you... > > - Dave > The problem I actually have is that there's a concentrated load at a single point, say x = 16 (domain: 0 < x < 20) which is represented mathematically as : -0.5 - 30 * dirac-delta(x-16) As far as I know, this, i.e., -30 will have to be applied as a Neumann B.C at that point. So, is find_neighbors() the way to go? ------ Ted |
From: Roy S. <roy...@ic...> - 2009-09-13 02:20:20
|
On Sat, 12 Sep 2009, Ted Kord wrote: > The problem I actually have is that there's a concentrated load at a single > point, say x = 16 (domain: 0 < x < 20) which is represented mathematically > as : > > -0.5 - 30 * dirac-delta(x-16) > > As far as I know, this, i.e., -30 will have to be applied as a Neumann B.C > at that point. Ah, I understand now - you're not trying to enforce a derivative at that point, you're trying to enforce a derivative jump discontinuity at that point. You're doing it right, then. I'm just not used to thinking of that as a Neumann condition, since variational forms make dirac deltas just look like any other forcing function: <f + delta_x, phi> = (f, phi) + phi(x) > So, is find_neighbors() the way to go? No, you're doing something different from my flat plate problem; you shouldn't need to change the mesh topology at all. And find_neighbors() is an internal libMesh function - you shouldn't ever need to worry about it unless it breaks. ;-) --- Roy |
From: John P. <pet...@cf...> - 2009-09-12 23:19:01
|
On Sat, Sep 12, 2009 at 4:08 PM, Ted Kord <ted...@go...> wrote: > 2009/9/12 David Knezevic <dk...@mi...> > >> Roy Stogner wrote: >> >>> >>> On Sat, 12 Sep 2009, David Knezevic wrote: >>> >>> Ted Kord wrote: >>>> >>> >>> How do I apply a Neumann B.C at an inter-element boundary? >>>>> >>>> >>>> The same way as a usual Neumann BC... the only trick is that you have to >>>> find which internal element to apply it to. One way to do this would be >>>> to set the subdomain_id of elements on one side of the inter-element >>>> boundary to 1 and on the other side to 2, and then search for elements >>>> with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and >>>> apply the Neumann BC to the appropriate side of those elements. >>>> >>> >>> The trouble with this is that you'll still have the entries in your >>> matrix from the shape functions which stretch between the element on >>> one side of the boundary and on the other. If you have a slit in your >>> domain on which you want to weakly impose boundary conditions, you >>> need to make it an actual topologically broken slit, and then it's >>> just another set of exterior boundaries. >>> >> >> I was thinking of imposing an internal flux between internal elements (e.g. >> as a type of forcing, but inside the domain rather than on the boundary). In >> that situation an "internal" Neumann condition does the job --- the >> variational formulation takes care of everything for you... >> >> - Dave >> > > The problem I actually have is that there's a concentrated load at a single > point, say x = 16 (domain: 0 < x < 20) which is represented mathematically > as : > > -0.5 - 30 * dirac-delta(x-16) > > As far as I know, this, i.e., -30 will have to be applied as a Neumann B.C > at that point. I wouldn't think of a point-load as a boundary condition ... it's not a boundary condition. Assuming the delta function falls on a node in the mesh, you can just modify the load vector entry for the basis function associated to that row. -- John |
From: David K. <dknez@MIT.EDU> - 2009-09-13 00:32:55
|
Quoting John Peterson <pet...@cf...>: > On Sat, Sep 12, 2009 at 4:08 PM, Ted Kord <ted...@go...> wrote: >> 2009/9/12 David Knezevic <dk...@mi...> >> >>> Roy Stogner wrote: >>> >>>> >>>> On Sat, 12 Sep 2009, David Knezevic wrote: >>>> >>>> Ted Kord wrote: >>>>> >>>> >>>> How do I apply a Neumann B.C at an inter-element boundary? >>>>>> >>>>> >>>>> The same way as a usual Neumann BC... the only trick is that you have to >>>>> find which internal element to apply it to. One way to do this would be >>>>> to set the subdomain_id of elements on one side of the inter-element >>>>> boundary to 1 and on the other side to 2, and then search for elements >>>>> with subdomain_id = 1 that have a neighbor with subdomain_id = 2, and >>>>> apply the Neumann BC to the appropriate side of those elements. >>>>> >>>> >>>> The trouble with this is that you'll still have the entries in your >>>> matrix from the shape functions which stretch between the element on >>>> one side of the boundary and on the other. If you have a slit in your >>>> domain on which you want to weakly impose boundary conditions, you >>>> need to make it an actual topologically broken slit, and then it's >>>> just another set of exterior boundaries. >>>> >>> >>> I was thinking of imposing an internal flux between internal elements (e.g. >>> as a type of forcing, but inside the domain rather than on the >>> boundary). In >>> that situation an "internal" Neumann condition does the job --- the >>> variational formulation takes care of everything for you... >>> >>> - Dave >>> >> >> The problem I actually have is that there's a concentrated load at a single >> point, say x = 16 (domain: 0 < x < 20) which is represented mathematically >> as : >> >> -0.5 - 30 * dirac-delta(x-16) >> >> As far as I know, this, i.e., -30 will have to be applied as a Neumann B.C >> at that point. > > I wouldn't think of a point-load as a boundary condition ... it's not > a boundary condition. > > Assuming the delta function falls on a node in the mesh, you can just > modify the load vector entry for the basis function associated to that > row. > > -- > John > Yeah, this is equivalent to what I described above... multiplying the delta function by a test function and integrating is equivalent to sampling the test function, so it ends up looking like an "internal Neumann condition" which imposes an inter-element flux... |