Re: Thermal Diffusion with Source
Daniel, No problem - later this week I’ll make a clean notebook with a less application specific example. Cheers, John Leeman > On Apr 25, 2016, at 12:34 PM, Daniel Wheeler > wrote: > > On Tue, Apr 19, 2016 at 11:10 PM, John Leeman wrote: >> >> I was just worried I didn’t grasp the way I needed to interact with FiPy. An >> example along this vein could be a useful addition in the docs possibly? > > John, an example would be very welcome. If you would like to just make > it an IPython notebook (rather than doctest/restructured text script) > then please do that and we'll try and link to it from the > documentation. > > -- > 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: understanding convection terms
Daniel, Thank you. I am a bit surprised that the CentralDifference basically matches the hybrid method, and is more accurate than upwind. Kris On Tue, Apr 26, 2016 at 8:22 AM, Daniel Wheeler wrote: > Hi Kris, > > Good to hear from you again and a very nicely coded example. > > I think it's a solver issue. I tried the LU solver and it gives > perfect results. See > https://gist.github.com/wd15/affe4d82cc2a189d894a7d774e4bc00b. > > This might suggest that we need to change the default solver when > using the central difference scheme. > > Cheers, > > Daniel > > On Mon, Apr 25, 2016 at 11:54 AM, Kris Kuhlman > wrote: > > I am trying to understand the convection terms available in fipy through > a > > simple steady-state problem. I am surprised at the divergence of the > > CentralDifferenceConvectionTerm, is this to be expected? As the > > discretization in the mesh is made finer, the solution gets worse!? > > > > The problem is: \frac{\partial^2 u}{\partial x^2} - v \frac{\partial > > u}{\partial x} = 0 > > > > The script at the link below compares the solution using different > > ConvectionTerms, and plots the figures attached for different values of > nx. > > For larger values of v, the solution diverges even more and becomes > > oscillatory. > > > > https://gist.github.com/klkuhlm/07f9eaf52b24e103f60ae213c0944c21 > > > > Is this expected behavior? > > > > Kris > > > > > > ___ > > 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: understanding convection terms
Hi Kris, Good to hear from you again and a very nicely coded example. I think it's a solver issue. I tried the LU solver and it gives perfect results. See https://gist.github.com/wd15/affe4d82cc2a189d894a7d774e4bc00b. This might suggest that we need to change the default solver when using the central difference scheme. Cheers, Daniel On Mon, Apr 25, 2016 at 11:54 AM, Kris Kuhlman wrote: > I am trying to understand the convection terms available in fipy through a > simple steady-state problem. I am surprised at the divergence of the > CentralDifferenceConvectionTerm, is this to be expected? As the > discretization in the mesh is made finer, the solution gets worse!? > > The problem is: \frac{\partial^2 u}{\partial x^2} - v \frac{\partial > u}{\partial x} = 0 > > The script at the link below compares the solution using different > ConvectionTerms, and plots the figures attached for different values of nx. > For larger values of v, the solution diverges even more and becomes > oscillatory. > > https://gist.github.com/klkuhlm/07f9eaf52b24e103f60ae213c0944c21 > > Is this expected behavior? > > Kris > > > ___ > 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 ]