Now that you explain it, this is exactly what I need. I'm not fluent in
programming so not sure how to implement these suggestions within FiPy. Can
you point me to an example that I can use to get started? Any help will be
greatly appreciated!!
< Do you also want the concentration at the interface to decrease due to
"forward" diffusion?
Yes, I also want the concentration at the interface to decrease due to
"forward" diffusion.
< To make a finite reservoir, you should be able to have one or more cells at
the left side that start with some amount of stuff in them and then
have a (default) no-flux boundary condition at the left.
How do I code this in FiPy? My starting concentration is 250 in the reservoir
cell and 0 everywhere else.
< With an explicit, finite reservoir, I would be inclined to model the
decay with an implicit source term that's only active in the reservoir
cells.
Can you provide guidance on how to implement this in FiPy? The decay is first
order where the rate constant k is constant within each period (k = 0.05 for
period 1, k = -1 for period 2, and k = -0.05 for period 3) .
________________________________
From: Jonathan Guyer <[email protected]>
To: FIPY list <[email protected]>
Sent: Tuesday, May 14, 2013 2:18 PM
Subject: Re: Transient Diffusion with Time Varying BC
On May 13, 2013, at 4:40 PM, Chuck Holbert <[email protected]> wrote:
> Yes, now I see this. So, maybe mathematically I have setup the problem
> incorrectly. I would like to allow the concentrations at the interface to
> increase if the rate of back diffusion becomes greater than the rate of decay.
Do you also want the concentration at the interface to decrease due to
"forward" diffusion? If so, then it seems your left boundary represents a
finite reservoir and I think it needs to be modeled explicitly (If not, I'm not
clear what physical process you are modeling).
A Dirichlet condition represents an infinite reservoir, so diffusion out of the
boundary doesn't deplete the reservoir and diffusion into the boundary doesn't
add to it.
To make a finite reservoir, you should be able to have one or more cells at the
left side that start with some amount of stuff in them and then have a
(default) no-flux boundary condition at the left.
> The rate of decay at the interface is dc/dt = -kt.
> My mistake. The decay rate is first order and given by dc/dt = -kC.
With an explicit, finite reservoir, I would be inclined to model the decay with
an implicit source term that's only active in the reservoir cells.
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]