There are two ways to solve on a cylindrical domain in FiPy. You can either
use the standard diffusion equation in Cartesian coordinates (2nd equation
below) and with a mesh that is actually cylindrical in shape or you can use
the diffusion equation formulated on a cylindrical coordinate system (1st
equation below) and use a standard 2D / 1D grid mesh. I think you're
confused about "multiplying through by R". The problem with the first
equation in FiPy (cylindrical) is that FiPy can't have a coefficient
outside the first derivative, which occurs in the diffusion term of the
first equation. Of course that isn't an issue for constant coefficient like
density etc., but r, however, is not constant. We can get around that
problem by multiplying the first equation by r (small r) because the r can
come inside the time derivative in the transient term and just be a
multiplier on the source term, which is fine. Your equation then looks like
this.


Hope that helps.

Cheers,

Daniel

On Wed, Aug 29, 2018 at 9:13 AM Daniel DeSantis <desan...@gmail.com> wrote:

> 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
>


-- 
Daniel Wheeler
_______________________________________________
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