First, thanks for the reply.

I should've been more explicit. I'm actually solving 3 PDEs, in which all variables influence one another. I have three variables to solve, A (which was the PHI in the last email), B, and C.

\frac{\partial A}{\partial t} = (D_1 / (r^2)) \frac{\partial}{\partial r} (r^2 \frac{\partial A}{\partial r}) - D_2 * A * C + D_3 * B

\frac{\partial B}{\partial t} = A * C - B

\frac{\partial C}{\partial t} = A * C + B - C

For the last two equations, I omitted the coefficients since they're constant.


The boundary constraint is on A, which is dependent on time t. I think from the fipy manual I can figure out how to do that.

So since A is actually one diffusion term and two external source terms, how do I make this happen? If I multiply the first equation, as you suggested, on both sides by r**2, then I get:

\frac{\partial r2 PHI}{\partial t} = \frac{\partial}{\partial r} (D_1 r2 \frac{\partial PHI}{\partial r}) + D_2 * r^2 * A * C + D_3 * r^2 * B

How would I be able to represent the r^2 in term A*C and B then?

Also, how do I solve three variables at each time step?

Thanks,
Elizabeth

Jonathan Guyer wrote:


On Apr 10, 2007, at 1:33 PM, Elizabeth Tseng wrote:

    I'm new to both fipy and PDEs.

Welcome to both.


I'm trying to construct a transient term that looks like this:

\frac{\partial PHI}{\partial t} = (D / (r^2)) \frac{r^2 \frac{\partial PHI}{\partial r}}{\partial r}

One minor correction:

\frac{\partial PHI}{\partial t} = (D / (r^2)) \frac{\partial r^2 \frac{\partial PHI}{\partial r}}{\partial r}
                                                    ^^^^^^^^

or

\frac{\partial PHI}{\partial t} = (D / (r^2)) \frac{\partial}{\partial r} (r^2 \frac{\partial PHI}{\partial r})



Reply via email to