Thanks. Yes, this Is indeed only first order accurate. I verified this by successively cutting my dx by half, running your code, and comparing against the Mathematica generated result. Each time dx is cut by half, the error is also proportionately halved.
This code requires me to take unreasonably small dx values. Since, neither the solution, nor the gradients are available at each implicit time-steps, I think that higher order schemes are probably ruled out. I am thinking of using a variable mesh-sizing, let's say a log-spacing in 1D, keeping a very fine spacing (ultra-small dx) for the last cell near the boundary, and gradually taking bigger steps. This is also physically consistent with my problem, wherein all the action takes place close to the boundary, and nothing much is happening at the middle or left edges. This brings me to another issue. I don't see a way to import a 1D .msh file generated by gmsh into FiPy. Secondly, I notice that there is an optimistic sounding grid1DBuilder method. I couldn't find any help on how to use this method. Is this method capable of creating the log-spaced mesh that I am considering ? Krishna -----Original Message----- From: fipy-boun...@nist.gov [mailto:fipy-boun...@nist.gov] On Behalf Of Daniel Wheeler Sent: 15 June 2016 17:50 To: Multiple recipients of list <fipy@nist.gov> Subject: Re: casting implicit Boundary Conditions in FiPy On Wed, Jun 15, 2016 at 7:27 AM, Gopalakrishnan, Krishnakumar <k.gopalakrishna...@imperial.ac.uk> wrote: > > Dan. I was able validate that your code correctly implements the Implicit > Neumann Boundary Condition (in 1-D). > > Here is a link to the plot of the solution after a transient simulation for > 0.2 seconds. The plot on the left is generated in Mathematica, and that to > the right is that generated by the FiPy’s matplotlib viewer class. The two > are identical. > > https://imperialcollegelondon.box.com/s/lb8v1iqxb3rqhxsphn9cmhwcmh5jzp > iz Awesome that it worked. I think that you're right though regarding first versus second order boundary condition. I think it is first order in space. -- 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 ]