Re: solvers for elliptic equations with dominant lower order terms

2017-06-01 Thread Guyer, Jonathan E. Dr. (Fed)
Unfortunately, James notified me offline of a breakage in PyTrilinos on Macs. I 
need to find time to debug.

- Jon

> On Jun 1, 2017, at 11:37 AM, Daniel Wheeler  wrote:
> 
> Hi James,
> 
> I don't have any hints for preconditioners, but using Trilinos's GMRES
> and then systematically changing the GMRES parameters and
> preconditioners might help you find one that works. I have done this
> in the past, for example,
> 
> 
> https://gist.github.com/wd15/c28ab796cb3d9781482b01fb67a7ec2d#file-unsegregatedequation-py-L187
> 
> You can also get information about how well the solver is converging.
> 
> Cheers,
> 
> Daniel
> 
> On Wed, May 31, 2017 at 3:31 PM, James Pringle  wrote:
>> 
>> Dear all --
>> 
>> I need to solve a second order PDE in 2D of the form
>> 
>> A(x,y)*(eta_xx+eta_yy)+B(x,y)*eta_x+C(x,y)*eta_y = 0
>> 
>> This is an advective diffusive balance, with B and C representing the
>> advective velocities.
>> 
>> 
>> Over much of the domain the low order terms dominate. For some geometries,
>> the default solver I am using (SciPy LinearLUSolver) is having trouble find
>> an answer (especially when the characteristics defined by B and C form
>> loops.
>> 
>> Does anyone have recommendations for how to choose a better solver? (I have
>> blindly tried all the ones in SciPy, the ones besides LinearLUSolver do
>> worse).
>> 
>> And are there any hints on how to use preconditioners? There is discussion
>> of preconditioners and Trilinnos, but I can't find hints on how one would
>> choose to use them and when they might help.
>> 
>> Pointers to the broader literature are welcome!
>> 
>> Thank you,
>> Jamie Pringle
>> 
>> ___
>> fipy mailing list
>> fipy@nist.gov
>> http://www.ctcms.nist.gov/fipy
>>  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>> 
> 
> 
> 
> -- 
> Daniel Wheeler
> ___
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nist.gov/fipy
>  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


Re: solvers for elliptic equations with dominant lower order terms

2017-06-01 Thread Sergio Manzetti
James, can you perhaps send the FipY code for one of these equations, or a 
similar variant of it? 

Thanks! 
Sergio 


Sergio Manzetti 

[ http://www.fjordforsk.no/logo_hr2.jpg ] 

[ http://www.fjordforsk.no/ | Fjordforsk AS ] [ http://www.fjordforsk.no/ |   ] 
Midtun 
6894 Vangsnes 
Norge 
Org.nr. 911 659 654 
Tlf: +47 57695621 
[ http://www.oekolab.com/ | Økolab  ] | [ http://www.nanofact.no/ | Nanofactory 
 ] | [ http://www.aq-lab.no/ | AQ-Lab  ] | [ http://www.phap.no/ | FAP ] 



From: "James Pringle"  
To: "fipy"  
Sent: Wednesday, May 31, 2017 10:50:11 PM 
Subject: Re: solvers for elliptic equations with dominant lower order terms 

I may have been unclear. This is a single PDE in the variable eta. A(x,y), 
B(x,y) and C(x,y) are coefficients of the PDE. They are indeed separate, and 
fipy does a nice job of solving this sort of equation in many limits. I am 
having problems when the lower order parts of the equation ( B(x,y)* 
eta_x+C(x,y)*eta_y) dominate the solution and the characteristics defined by B 
and C form closed loops. 

To understand this better, imagine the equation as a steady state fluid flow 
problem, with the A(x,y)*(eta_xx+eta_yy) representing diffusion (and to be 
correct, it should be written "Del . (A(x,y) Grad eta)"), and the low order 
terms representing advection, with B and C being the velocities doing the 
advection. When the diffusion is negligible, eta should be constant along the 
flow lines (characteristics) defined by B and C. But if those flow line form a 
closed loop, the diffusive term must determine the overall solution inside the 
loop... 

Thanks, 
Jamie 

On Wed, May 31, 2017 at 3:32 PM, Sergio Manzetti < [ 
mailto:sergio.manze...@fjordforsk.no | sergio.manze...@fjordforsk.no ] > wrote: 



James, are A(x,y), B(x,y) and C(x,y) three different variable functions for the 
PDE? 

FIPY can solve at least when these three are equal. If it solves when they 
differ, I am not sure. 

Sergio 


Sergio Manzetti 

[ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fjordforsk.no_logo-5Fhr2.jpg=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=U0xwV0Da6Bipu3Yzfcw9cPhJIwPF4QPA_zdG-Gms5uc=
 ] 

[ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fjordforsk.no=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=U6qdDuDFx7m_FBcXq8wrKgktDC12I3ar-kaEGfdQ4kA=
 | Fjordforsk
 AS ] [ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.fjordforsk.no=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=U6qdDuDFx7m_FBcXq8wrKgktDC12I3ar-kaEGfdQ4kA=
 | 
 ] 
Midtun 
6894 Vangsnes 
Norge 
Org.nr. 911 659 654 
Tlf: [ tel:+47%2057%2069%2056%2021 | +47 57695621 ] 
[ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.oekolab.com=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=K6jUoxb_DR3t0-8jNTHjwDpAu7N5bdMUKatMC-pun-U=
 | Økolab  ] | [ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nanofact.no=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=i8VNBHNUWx6dxM6qgwo0hBV4EVmqK-NBY5bRDJBmfAM=
 | 
Nanofactory  ] | [ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.aq-2Dlab.no=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=i8G56fQKIsGv9dk8ev8ozkaCLIsd-LOEHrqpX9cY5yI=
 | 
AQ-Lab  ] | [ 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.phap.no=DwMFaQ=c6MrceVCY5m5A_KAUkrdoA=7HJI3EH6RqKWf16fbYIYKw=INzNz0EhAfOz2J4uGWxrKjo-qBQYnUHjXOF9rSxEXTQ=m0sz0QVLjdTnHTiVYdJ0GZj1VHf1oMsqyQyjdWiq-_o=
 | FAP ] 



From: "James Pringle" < [ mailto:jprin...@unh.edu | jprin...@unh.edu ] > 
To: "fipy" < [ mailto:fipy@nist.gov | fipy@nist.gov ] > 
Sent: Wednesday, May 31, 2017 9:31:51 PM 
Subject: solvers for elliptic equations with dominant lower order terms 


Dear all -- 

I need to solve a second order PDE in 2D of the form 


BQ_BEGIN

A(x,y)*(eta_xx+eta_yy)+B(x,y)*eta_x+C(x,y)*eta_y = 0 



This is an advective diffusive balance, with B and C representing the advective 
velocities. 

BQ_BEGIN


BQ_END
Over much of the domain the low order terms dominate. For some geometries, the 
default solver I am using (SciPy LinearLUSolver) is having trouble find an 
answer (especially when the characteristics defined by B and C form loops . 

Does anyone have recommendations for how to choose a better solver? (I have 
blindly tried all the ones in SciPy, the ones besides LinearLUSolver do worse). 

And are there any hints on how to use preconditioners? There is discussion of 
preconditioners and Trilinnos, but I can't find hints on how one would choose 
to use them and when they might help. 

Pointers to the broader literature are welcome! 

Thank you, 
Jamie Pringle 

___ 
fipy mailing list 
[ mailto:fipy@nist.gov | 

Re: solvers for elliptic equations with dominant lower order terms

2017-06-01 Thread Daniel Wheeler
Hi James,

I don't have any hints for preconditioners, but using Trilinos's GMRES
and then systematically changing the GMRES parameters and
preconditioners might help you find one that works. I have done this
in the past, for example,

 
https://gist.github.com/wd15/c28ab796cb3d9781482b01fb67a7ec2d#file-unsegregatedequation-py-L187

You can also get information about how well the solver is converging.

Cheers,

Daniel

On Wed, May 31, 2017 at 3:31 PM, James Pringle  wrote:
>
> Dear all --
>
> I need to solve a second order PDE in 2D of the form
>
> A(x,y)*(eta_xx+eta_yy)+B(x,y)*eta_x+C(x,y)*eta_y = 0
>
> This is an advective diffusive balance, with B and C representing the
> advective velocities.
>
>
> Over much of the domain the low order terms dominate. For some geometries,
> the default solver I am using (SciPy LinearLUSolver) is having trouble find
> an answer (especially when the characteristics defined by B and C form
> loops.
>
> Does anyone have recommendations for how to choose a better solver? (I have
> blindly tried all the ones in SciPy, the ones besides LinearLUSolver do
> worse).
>
> And are there any hints on how to use preconditioners? There is discussion
> of preconditioners and Trilinnos, but I can't find hints on how one would
> choose to use them and when they might help.
>
> Pointers to the broader literature are welcome!
>
> Thank you,
> Jamie Pringle
>
> ___
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>



-- 
Daniel Wheeler
___
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]