Oops... you're right about the Neumann condition... I forgot that I  
get a boundary term out of the integration by parts that I can just  
use for this purpose...

I still don't quite know about the Dirichlet condition though.  Yes, I  
am enforcing it essentially as a penalty... but that penalty just goes  
into the residual and is finite differenced like the rest of it.  If  
the residual goes to zero... then it shouldn't matter if there is a  
multiplier on the penalty or not.  The only question is of  
convergence.  Or do you think it's the rest of the normal stuff in the  
residual for a boundary DOF that's screwing it up... and that's why I  
need the multiplier?

Hmmmm.... I guess that makes sense.  So, any guidance on choosing a  
multiplier?  The problem is obviously sensitive to it... because if I  
make it too large I get the wrong answer just as easily as making it  
too small (and I do get good answers when I get the multiplier in the  
right range BTW).

Thanks,
Derek

On Jun 1, 2008, at 10:39 PM, John Peterson wrote:

> On Sun, Jun 1, 2008 at 10:51 PM, Derek Gaston <[EMAIL PROTECTED]>  
> wrote:
>> So... I've been working with the NonlinearImplicit system... solving
>> jacobian free problems using Petsc SNES.  Everything is going pretty
>> well (Ben's interface is great!)... but I've hit a bit of a snag on
>> the boundary conditions.  I would really like to impose both  
>> Dirichlet
>> and Neumann conditions similarly... by integrating their residual
>> contributions over the boundary.  So for instance for a Dirichlet
>> condition I have something like this:
>>
>> Intg_boundary( u - BC )
>
> Hey Derek,
>
> Are you doing a penalty formulation for the Dirichlet BC?  You'll need
> to multiply by a large penalty for this condition to be enforced.
>
>> and similarly for Neumann:
>>
>> Intg_boundary( grad_u - BC )
>
> Here I don't think you subtract...  you just replace du/dn with
> whatever the BC is (it may depend on u, it may be nonlinear) and then
> add that term to your weighted residual statement.
>
> -J
>
>> The trouble that I'm running into is that these residual  
>> contributions
>> seem to be too small... and are only very loosely satisfied by SNES.
>> For instance, solving u''=0 on [0,1]x[0,1] with u=0 at x=0 and u=1 at
>> x=1... I end up with u actually being .3333 at x=0 and .6666 at x=1.
>> Of course I can dial down the residual tolerances for snes... but  
>> this
>> only gets me so much closer.  The other thing I've tried is to put a
>> multiplier in front of the boundary integral (like 1e7 or so)... this
>> ends up working well for satisfying the boundary conditions... but
>> then the interior residuals are swamped out... meaning they aren't
>> well resolved.
>>
>> So, I'm wondering if anyone has any better ideas?  Is there a good  
>> way
>> to choose the correct multiplier?  Am I going about the whole thing
>> incorrectly?
>>
>> Thanks for any help...
>>
>> Derek
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Libmesh-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to