Re: FiPy sweep convergence bottoms out
Hi Krishna, According to this, fixed point iteration only gets you linear convergence in general, http://www.math-cs.gordon.edu/courses/ma342/handouts/rate.pdf I think you need Newton for quadratic convergence. Another issue to be aware of is that the error and residual are two separate things. Determining the convergence rate seems to be done with the error as opposed to the residual. They may well be interchangeable for these purposes, but you may want to check that. A further issue is talking about linear versus quadratic convergence and first, second etc convergence. It seems that one refers to linear or quadratic in reference to non-linear or linear iterative solutions, but first, second order convergence when referring to improvements in accuracy by refining the grid. This is a little confusing. Cheers, Daniel On Tue, Sep 27, 2016 at 7:53 PM, Gopalakrishnan, Krishnakumar wrote: > Hi Ray, > > > > This looks like linear convergence to me. Anyway, the bottom-line is that, > this is too slow. We need something better – is there any acceleration > routine available? I tried Jonathan’s gist notebook showing Newton > implementation using the ResidualTerm, but couldn’t get past a bunch of > errors from the Python interpreter. > > > > Or could there be a more fundamental problem in our code > formulation/structure itself ? The solutions loo correct, when compared to a > commercial PDE package. > > > > Krishna > > > > From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of > Raymond Smith > Sent: Wednesday, September 28, 2016 12:40 AM > > > To: fipy@nist.gov > Subject: Re: FiPy sweep convergence bottoms out > > > > I am confused as well now. Comparing with the plots on this Wiki page which > are also semi-log, it looks to me like Krishna is seeing linear convergence. > > > > On Tue, Sep 27, 2016 at 3:57 PM, Guyer, Jonathan E. Dr. (Fed) > wrote: > > I don't understand what you mean by "supra-linear trend in the semiology > plot". You show clear 2nd order convergence, which is what I would expect. > >> On Sep 27, 2016, at 4:37 PM, Krishna wrote: >> >> As you can see, we need supra-linear trend in the semiology plot, such as >> to continue with the linear drops achieved in the first few sweeps. >> >> I.e. the solver is effectively bottoming out. Under-relaxation factors, or >> solver-changes don't seem to work. >> >> In fact, for certain under-relaxation factors (including 1.0 for 2 of the >> variables), it breaks the simulation, and produces NaNs right from the first >> sweep. >> >> Krishna >> >> >> >> Original Message >> From: "Gopalakrishnan, Krishnakumar" >> Sent: Tuesday, September 27, 2016 09:02 PM >> To: fipy@nist.gov >> Subject: RE: FiPy sweep convergence bottoms out >> >> Thank you Ray, Thanks for pointing that out. >> >> >> >> Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a >> tolerance of 10^-4 for \phi_e and \phi_s_neg. >> >> >> >> Furthermore, the time spent in sweeping (within each time-step) increases >> as time progresses. >> >> >> >> https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy >> >> >> >> Krishna >> >> >> >> From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of >> Raymond Smith >> Sent: Tuesday, September 27, 2016 8:51 PM >> To: fipy@nist.gov >> Subject: Re: FiPy sweep convergence bottoms out >> >> >> >> Hi, Krishna. >> >> It would be more clear to plot the residuals on a semi-log plot (or >> equivalently plot the log of residual vs sweep number) to more clearly show >> the value of the small residuals, as the plots in that link make it look to >> me like the residuals all go to zero. >> >> Ray >> >> >> >> On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar >> wrote: >> >> >> > >> Hi, >> >> >> >> We are solving a system of 5 coupled non-linear PDEs. >> >> >> >> As shown in this plot of residuals vs. sweep count >> https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , >> our residuals die down very slowly, i.e. the solver bottoms out. The drop in >> all the residuals is linear at first, and then asymptotically bottoms out to >> a value. >> >> >> >> How do we get our residuals to drop faster, i.e. with lesser sweeps and >> faster convergence ? I tried changing solvers
Re: FiPy sweep convergence bottoms out
Your convergence is great, looks like what one should expect (it looks 2nd order to me). What do you think is wrong with it? If you want something better/faster, it will probably have to be problem-specific solver/algorithm, in which case you have to search for solver/algorithm for your specific problem. Tomasz On Tue, Sep 27, 2016 at 6:53 PM, Gopalakrishnan, Krishnakumar < krishnaku...@imperial.ac.uk> wrote: > Hi Ray, > > > > This looks like linear convergence to me. Anyway, the bottom-line is > that, this is too slow. We need something better – is there any > acceleration routine available? I tried Jonathan’s gist notebook showing > Newton implementation using the ResidualTerm, but couldn’t get past a bunch > of errors from the Python interpreter. > > > > Or could there be a more fundamental problem in our code > formulation/structure itself ? The solutions loo correct, when compared to > a commercial PDE package. > > > > Krishna > > > > *From:* fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] *On Behalf > Of *Raymond Smith > *Sent:* Wednesday, September 28, 2016 12:40 AM > *To:* fipy@nist.gov > *Subject:* Re: FiPy sweep convergence bottoms out > > > > I am confused as well now. Comparing with the plots on this Wiki > <https://en.wikipedia.org/wiki/Rate_of_convergence> page which are also > semi-log, it looks to me like Krishna is seeing linear convergence. > > > > On Tue, Sep 27, 2016 at 3:57 PM, Guyer, Jonathan E. Dr. (Fed) < > jonathan.gu...@nist.gov> wrote: > > I don't understand what you mean by "supra-linear trend in the semiology > plot". You show clear 2nd order convergence, which is what I would expect. > > > On Sep 27, 2016, at 4:37 PM, Krishna > wrote: > > > > As you can see, we need supra-linear trend in the semiology plot, such > as to continue with the linear drops achieved in the first few sweeps. > > > > I.e. the solver is effectively bottoming out. Under-relaxation factors, > or solver-changes don't seem to work. > > > > In fact, for certain under-relaxation factors (including 1.0 for 2 of > the variables), it breaks the simulation, and produces NaNs right from the > first sweep. > > > > Krishna > > > > > > > > Original Message > > From: "Gopalakrishnan, Krishnakumar" > > Sent: Tuesday, September 27, 2016 09:02 PM > > To: fipy@nist.gov > > Subject: RE: FiPy sweep convergence bottoms out > > > > Thank you Ray, Thanks for pointing that out. > > > > > > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > > > > > Furthermore, the time spent in sweeping (within each time-step) > increases as time progresses. > > > > > > > > https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > > > > > > > > Krishna > > > > > > > > From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of > Raymond Smith > > Sent: Tuesday, September 27, 2016 8:51 PM > > To: fipy@nist.gov > > Subject: Re: FiPy sweep convergence bottoms out > > > > > > > > Hi, Krishna. > > > > It would be more clear to plot the residuals on a semi-log plot (or > equivalently plot the log of residual vs sweep number) to more clearly show > the value of the small residuals, as the plots in that link make it look to > me like the residuals all go to zero. > > > > Ray > > > > > > > > On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar < > krishnaku...@imperial.ac.uk> wrote: > > > > > > > > > Hi, > > > > > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > > > > > As shown in this plot of residuals vs. sweep count > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 > , our residuals die down very slowly, i.e. the solver bottoms out. The > drop in all the residuals is linear at first, and then asymptotically > bottoms out to a value. > > > > > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > faster convergence ? I tried changing solvers and tolerances, but curiously > enough the results remain identical. > > > > > > > > Any pointers on this will be much appreciated. > > > > > > > > > > > > Krishna > > > > > > > > > > > > > > > > > > ___
Re: FiPy sweep convergence bottoms out
Dropping 60 orders of magnitude over 2 orders of magnitude strikes me as a very peculiar definition of linear. It's wikipedia, though, so it must be true. The sweep convergence of Krisha's plots is second order. The wiki page discusses iterative solvers, which is another layer down from plotting the residual as a function of sweeps. > On Sep 27, 2016, at 7:39 PM, Raymond Smith wrote: > > I am confused as well now. Comparing with the plots on this Wiki page which > are also semi-log, it looks to me like Krishna is seeing linear convergence. > > On Tue, Sep 27, 2016 at 3:57 PM, Guyer, Jonathan E. Dr. (Fed) > wrote: > I don't understand what you mean by "supra-linear trend in the semiology > plot". You show clear 2nd order convergence, which is what I would expect. > > > On Sep 27, 2016, at 4:37 PM, Krishna wrote: > > > > As you can see, we need supra-linear trend in the semiology plot, such as > > to continue with the linear drops achieved in the first few sweeps. > > > > I.e. the solver is effectively bottoming out. Under-relaxation factors, or > > solver-changes don't seem to work. > > > > In fact, for certain under-relaxation factors (including 1.0 for 2 of the > > variables), it breaks the simulation, and produces NaNs right from the > > first sweep. > > > > Krishna > > > > > > > > ---- Original Message ---- > > From: "Gopalakrishnan, Krishnakumar" > > Sent: Tuesday, September 27, 2016 09:02 PM > > To: fipy@nist.gov > > Subject: RE: FiPy sweep convergence bottoms out > > > > Thank you Ray, Thanks for pointing that out. > > > > > > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > > > > > Furthermore, the time spent in sweeping (within each time-step) increases > > as time progresses. > > > > > > > > https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > > > > > > > > Krishna > > > > > > > > From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of > > Raymond Smith > > Sent: Tuesday, September 27, 2016 8:51 PM > > To: fipy@nist.gov > > Subject: Re: FiPy sweep convergence bottoms out > > > > > > > > Hi, Krishna. > > > > It would be more clear to plot the residuals on a semi-log plot (or > > equivalently plot the log of residual vs sweep number) to more clearly show > > the value of the small residuals, as the plots in that link make it look to > > me like the residuals all go to zero. > > > > Ray > > > > > > > > On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar > > wrote: > > > > > > > > Hi, > > > > > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > > > > > As shown in this plot of residuals vs. sweep count > > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , > > our residuals die down very slowly, i.e. the solver bottoms out. The drop > > in all the residuals is linear at first, and then asymptotically bottoms > > out to a value. > > > > > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > > faster convergence ? I tried changing solvers and tolerances, but curiously > > enough the results remain identical. > > > > > > > > Any pointers on this will be much appreciated. > > > > > > > > > > > > Krishna > > > > > > > > > > > > > > > > > > ___ > > 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 ] > > > ___ > 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 ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
RE: FiPy sweep convergence bottoms out
Hi Ray, This looks like linear convergence to me. Anyway, the bottom-line is that, this is too slow. We need something better – is there any acceleration routine available? I tried Jonathan’s gist notebook showing Newton implementation using the ResidualTerm, but couldn’t get past a bunch of errors from the Python interpreter. Or could there be a more fundamental problem in our code formulation/structure itself ? The solutions loo correct, when compared to a commercial PDE package. Krishna From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of Raymond Smith Sent: Wednesday, September 28, 2016 12:40 AM To: fipy@nist.gov Subject: Re: FiPy sweep convergence bottoms out I am confused as well now. Comparing with the plots on this Wiki<https://en.wikipedia.org/wiki/Rate_of_convergence> page which are also semi-log, it looks to me like Krishna is seeing linear convergence. On Tue, Sep 27, 2016 at 3:57 PM, Guyer, Jonathan E. Dr. (Fed) mailto:jonathan.gu...@nist.gov>> wrote: I don't understand what you mean by "supra-linear trend in the semiology plot". You show clear 2nd order convergence, which is what I would expect. > On Sep 27, 2016, at 4:37 PM, Krishna > mailto:krishnaku...@imperial.ac.uk>> wrote: > > As you can see, we need supra-linear trend in the semiology plot, such as to > continue with the linear drops achieved in the first few sweeps. > > I.e. the solver is effectively bottoming out. Under-relaxation factors, or > solver-changes don't seem to work. > > In fact, for certain under-relaxation factors (including 1.0 for 2 of the > variables), it breaks the simulation, and produces NaNs right from the first > sweep. > > Krishna > > > > Original Message > From: "Gopalakrishnan, Krishnakumar" > mailto:krishnaku...@imperial.ac.uk>> > Sent: Tuesday, September 27, 2016 09:02 PM > To: fipy@nist.gov<mailto:fipy@nist.gov> > Subject: RE: FiPy sweep convergence bottoms out > > Thank you Ray, Thanks for pointing that out. > > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > Furthermore, the time spent in sweeping (within each time-step) increases as > time progresses. > > > > https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > > > > Krishna > > > > From: fipy-boun...@nist.gov<mailto:fipy-boun...@nist.gov> > [mailto:fipy-boun...@nist.gov<mailto:fipy-boun...@nist.gov>] On Behalf Of > Raymond Smith > Sent: Tuesday, September 27, 2016 8:51 PM > To: fipy@nist.gov<mailto:fipy@nist.gov> > Subject: Re: FiPy sweep convergence bottoms out > > > > Hi, Krishna. > > It would be more clear to plot the residuals on a semi-log plot (or > equivalently plot the log of residual vs sweep number) to more clearly show > the value of the small residuals, as the plots in that link make it look to > me like the residuals all go to zero. > > Ray > > > > On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar > mailto:krishnaku...@imperial.ac.uk>> wrote: > > > > Hi, > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > As shown in this plot of residuals vs. sweep count > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , > our residuals die down very slowly, i.e. the solver bottoms out. The drop in > all the residuals is linear at first, and then asymptotically bottoms out to > a value. > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > faster convergence ? I tried changing solvers and tolerances, but curiously > enough the results remain identical. > > > > Any pointers on this will be much appreciated. > > > > > > Krishna > > > > > > > > > ___ > fipy mailing list > fipy@nist.gov<mailto: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<mailto: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<mailto: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: FiPy sweep convergence bottoms out
I am confused as well now. Comparing with the plots on this Wiki <https://en.wikipedia.org/wiki/Rate_of_convergence> page which are also semi-log, it looks to me like Krishna is seeing linear convergence. On Tue, Sep 27, 2016 at 3:57 PM, Guyer, Jonathan E. Dr. (Fed) < jonathan.gu...@nist.gov> wrote: > I don't understand what you mean by "supra-linear trend in the semiology > plot". You show clear 2nd order convergence, which is what I would expect. > > > On Sep 27, 2016, at 4:37 PM, Krishna > wrote: > > > > As you can see, we need supra-linear trend in the semiology plot, such > as to continue with the linear drops achieved in the first few sweeps. > > > > I.e. the solver is effectively bottoming out. Under-relaxation factors, > or solver-changes don't seem to work. > > > > In fact, for certain under-relaxation factors (including 1.0 for 2 of > the variables), it breaks the simulation, and produces NaNs right from the > first sweep. > > > > Krishna > > > > > > > > Original Message ---- > > From: "Gopalakrishnan, Krishnakumar" > > Sent: Tuesday, September 27, 2016 09:02 PM > > To: fipy@nist.gov > > Subject: RE: FiPy sweep convergence bottoms out > > > > Thank you Ray, Thanks for pointing that out. > > > > > > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > > > > > Furthermore, the time spent in sweeping (within each time-step) > increases as time progresses. > > > > > > > > https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > > > > > > > > Krishna > > > > > > > > From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of > Raymond Smith > > Sent: Tuesday, September 27, 2016 8:51 PM > > To: fipy@nist.gov > > Subject: Re: FiPy sweep convergence bottoms out > > > > > > > > Hi, Krishna. > > > > It would be more clear to plot the residuals on a semi-log plot (or > equivalently plot the log of residual vs sweep number) to more clearly show > the value of the small residuals, as the plots in that link make it look to > me like the residuals all go to zero. > > > > Ray > > > > > > > > On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar < > krishnaku...@imperial.ac.uk> wrote: > > > > > > > > Hi, > > > > > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > > > > > As shown in this plot of residuals vs. sweep count > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 > , our residuals die down very slowly, i.e. the solver bottoms out. The > drop in all the residuals is linear at first, and then asymptotically > bottoms out to a value. > > > > > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > faster convergence ? I tried changing solvers and tolerances, but curiously > enough the results remain identical. > > > > > > > > Any pointers on this will be much appreciated. > > > > > > > > > > > > Krishna > > > > > > > > > > > > > > > > > > ___ > > 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 ] > > > ___ > 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: FiPy sweep convergence bottoms out
I don't understand what you mean by "supra-linear trend in the semiology plot". You show clear 2nd order convergence, which is what I would expect. > On Sep 27, 2016, at 4:37 PM, Krishna wrote: > > As you can see, we need supra-linear trend in the semiology plot, such as to > continue with the linear drops achieved in the first few sweeps. > > I.e. the solver is effectively bottoming out. Under-relaxation factors, or > solver-changes don't seem to work. > > In fact, for certain under-relaxation factors (including 1.0 for 2 of the > variables), it breaks the simulation, and produces NaNs right from the first > sweep. > > Krishna > > > > Original Message > From: "Gopalakrishnan, Krishnakumar" > Sent: Tuesday, September 27, 2016 09:02 PM > To: fipy@nist.gov > Subject: RE: FiPy sweep convergence bottoms out > > Thank you Ray, Thanks for pointing that out. > > > > Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a > tolerance of 10^-4 for \phi_e and \phi_s_neg. > > > > Furthermore, the time spent in sweeping (within each time-step) increases as > time progresses. > > > > https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > > > > Krishna > > > > From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of > Raymond Smith > Sent: Tuesday, September 27, 2016 8:51 PM > To: fipy@nist.gov > Subject: Re: FiPy sweep convergence bottoms out > > > > Hi, Krishna. > > It would be more clear to plot the residuals on a semi-log plot (or > equivalently plot the log of residual vs sweep number) to more clearly show > the value of the small residuals, as the plots in that link make it look to > me like the residuals all go to zero. > > Ray > > > > On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar > wrote: > > > > Hi, > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > As shown in this plot of residuals vs. sweep count > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , > our residuals die down very slowly, i.e. the solver bottoms out. The drop in > all the residuals is linear at first, and then asymptotically bottoms out to > a value. > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > faster convergence ? I tried changing solvers and tolerances, but curiously > enough the results remain identical. > > > > Any pointers on this will be much appreciated. > > > > > > Krishna > > > > > > > > > ___ > 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 ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
RE: FiPy sweep convergence bottoms out
As you can see, we need supra-linear trend in the semiology plot, such as to continue with the linear drops achieved in the first few sweeps. I.e. the solver is effectively bottoming out. Under-relaxation factors, or solver-changes don't seem to work. In fact, for certain under-relaxation factors (including 1.0 for 2 of the variables), it breaks the simulation, and produces NaNs right from the first sweep. Krishna Original Message From: "Gopalakrishnan, Krishnakumar" Sent: Tuesday, September 27, 2016 09:02 PM To: fipy@nist.gov Subject: RE: FiPy sweep convergence bottoms out >Thank you Ray, Thanks for pointing that out. > >Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a >tolerance of 10^-4 for \phi_e and \phi_s_neg. > >Furthermore, the time spent in sweeping (within each time-step) increases as >time progresses. > >https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy > >Krishna > >From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of >Raymond Smith >Sent: Tuesday, September 27, 2016 8:51 PM >To: fipy@nist.gov >Subject: Re: FiPy sweep convergence bottoms out > >Hi, Krishna. >It would be more clear to plot the residuals on a semi-log plot (or >equivalently plot the log of residual vs sweep number) to more clearly show >the value of the small residuals, as the plots in that link make it look to me >like the residuals all go to zero. >Ray > >On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar >mailto:krishnaku...@imperial.ac.uk>> wrote: >[cid:image001.gif@01D21902.622D2340] >Hi, > >We are solving a system of 5 coupled non-linear PDEs. > >As shown in this plot of residuals vs. sweep count >https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , >our residuals die down very slowly, i.e. the solver bottoms out. The drop in >all the residuals is linear at first, and then asymptotically bottoms out to a >value. > >How do we get our residuals to drop faster, i.e. with lesser sweeps and faster >convergence ? I tried changing solvers and tolerances, but curiously enough >the results remain identical. > >Any pointers on this will be much appreciated. > > >Krishna > > > > >___ >fipy mailing list >fipy@nist.gov<mailto: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 ] ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
RE: FiPy sweep convergence bottoms out
Thank you Ray, Thanks for pointing that out. Here’s the link to Semilog plot. It takes nearly 22 sweeps to achieve a tolerance of 10^-4 for \phi_e and \phi_s_neg. Furthermore, the time spent in sweeping (within each time-step) increases as time progresses. https://imperialcollegelondon.box.com/s/4ix6pozs1h9syt1r3fbkw2pi05ooicmy Krishna From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of Raymond Smith Sent: Tuesday, September 27, 2016 8:51 PM To: fipy@nist.gov Subject: Re: FiPy sweep convergence bottoms out Hi, Krishna. It would be more clear to plot the residuals on a semi-log plot (or equivalently plot the log of residual vs sweep number) to more clearly show the value of the small residuals, as the plots in that link make it look to me like the residuals all go to zero. Ray On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar mailto:krishnaku...@imperial.ac.uk>> wrote: [cid:image001.gif@01D21902.622D2340] Hi, We are solving a system of 5 coupled non-linear PDEs. As shown in this plot of residuals vs. sweep count https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , our residuals die down very slowly, i.e. the solver bottoms out. The drop in all the residuals is linear at first, and then asymptotically bottoms out to a value. How do we get our residuals to drop faster, i.e. with lesser sweeps and faster convergence ? I tried changing solvers and tolerances, but curiously enough the results remain identical. Any pointers on this will be much appreciated. Krishna ___ fipy mailing list fipy@nist.gov<mailto: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: FiPy sweep convergence bottoms out
Hi, Krishna. It would be more clear to plot the residuals on a semi-log plot (or equivalently plot the log of residual vs sweep number) to more clearly show the value of the small residuals, as the plots in that link make it look to me like the residuals all go to zero. Ray On Tue, Sep 27, 2016 at 12:42 PM, Gopalakrishnan, Krishnakumar < krishnaku...@imperial.ac.uk> wrote: > Hi, > > > > We are solving a system of 5 coupled non-linear PDEs. > > > > As shown in this plot of residuals vs. sweep count > https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 > , our residuals die down very slowly, i.e. the solver bottoms out. The > drop in all the residuals is linear at first, and then asymptotically > bottoms out to a value. > > > > How do we get our residuals to drop faster, i.e. with lesser sweeps and > faster convergence ? I tried changing solvers and tolerances, but curiously > enough the results remain identical. > > > > Any pointers on this will be much appreciated. > > > > > > Krishna > > > > > > > > ___ > 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 ]
FiPy sweep convergence bottoms out
Hi, We are solving a system of 5 coupled non-linear PDEs. As shown in this plot of residuals vs. sweep count https://imperialcollegelondon.box.com/s/9davbq2gq5eani98xuuj2cw9tmz4mbu3 , our residuals die down very slowly, i.e. the solver bottoms out. The drop in all the residuals is linear at first, and then asymptotically bottoms out to a value. How do we get our residuals to drop faster, i.e. with lesser sweeps and faster convergence ? I tried changing solvers and tolerances, but curiously enough the results remain identical. Any pointers on this will be much appreciated. Krishna ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]