Daniel,

Thanks again for getting back to me. Sorry to keep coming back to the same
problem. It does seem like there's a problem with the CylindricalGrid1D
mesh. I noticed that running the most basic 1D diffusion example with a
cylindrical grid doesn't seem to work correctly. With that said, I hope I
can impose on you one more time and ask how I should convert a cylindrical
coordinate PDE into a rectangular coordinate PDE for FiPy, essentially
turning this
[image: image.png]
into this:
[image: image.png].
Previously you said to multiply through by r. Assuming R is the maximum of
the variable r, am I looking at this equation
[image: image.png] or should I be using this?
[image: image.png]If r should still be in the variable format, how would I
make that work in FiPy?

Thanks,
Dan DeSantis


On Thu, Aug 16, 2018 at 6:04 PM Daniel Wheeler <daniel.wheel...@gmail.com>
wrote:

> Apologies for the slow reply. I hadn't noticed your response until
> now. See below.
>
> On Wed, Aug 8, 2018 at 1:09 PM Daniel DeSantis <desan...@gmail.com> wrote:
> >
> > Daniel,
> >
> > Thank you very much for your help.The code does run much better.
> >
> > I was curious about these lines of code. I'm hoping to understand what
> this means so that I can use it if needed, next time.
> >
> > Thank you again,
> > Dan DeSantis
> >
> > constraint_value = FaceVariable(mesh=mesh)
> > T.faceGrad.constrain(constraint_value,mesh.facesLeft)
> >
> > for sweep in range(sweeps):
> > constraint_value[:] = h * ((60. + 273.15) - T.faceValue)
>
> I only used the above code as it happened to work. It should work
> without having to do the update in the loop, but something isn't right
> with the way FiPy is updating constraints in the case when the
> constraint is not a bare FaceVariable. In other words, we make a face
> variable and then say that the constraint depends on that face
> variable. We have to explicitly update the face variable in the loop.
>
> The expression "h * ((60. + 273.15) - T.faceValue" should also be a
> face variable and so we should be able to use "T.faceGrad.constrain(h
> * ((60. + 273.15) - T.faceValue, mesh.facesLeft)" and not update in
> the loop. That doesn't work, however.
>
> --
> Daniel Wheeler
> _______________________________________________
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>


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

Reply via email to