Thanks Daniel. I think I understand now. What would I do to multiply
through by r in writing a FiPy equation?
Should I some how create a spatial variable for r? Such as r= Variable?
Do I have to somehow give it a range of possible values? (I didn't see an
example for this online)

Then I could use a standard mesh, correct?
mesh = Grid1D(nx=nx,dx=dx)

and then the equation becomes?
eqT = TransientTerm(r * rho_b * Cp_b*1000/MW_b, var=T) ==
DiffusionTerm(coeff = L_eff, var=T) + r*S

Sorry to have so many questions.

On Thu, Aug 30, 2018 at 10:20 AM Daniel Wheeler <daniel.wheel...@gmail.com>
wrote:

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


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