On Dec 10, 2012, at 1:55 PM, Adrian Jacobo wrote:

> And I'm defining the system in this way:
> 
> mesh = fp.Grid3D(dx=dx, dy=dy,dz=dz, nx=nx, ny=ny,nz=nz)
> C = fp.CellVariable(name = "Calcium",mesh = mesh, value = 0.)
> B = fp.CellVariable(name = "Buffer",mesh = mesh, value = B_0)
> eqC = fp.TransientTerm(var=C) == fp.DiffusionTerm(coeff=D_c,var=C) - \
> K*(B*C-K_d*(B_0-B))
> eqB = fp.TransientTerm(var=B) == fp.DiffusionTerm(coeff=D_b,var=B) - \
> K*(B*C-K_d*(B_0-B))
> eq = eqC & eqB
> I know that I'm doing something wrong because I'm getting the wrong solution. 
> Starting from the initial conditions as written there the system should 
> remain unchanged, but instead it evolves in time.

Not for me. If you're seeing something else, then it may come down to either 
boundary conditions or parameter values. We probably need to see a minimal 
script that exhibits what you're seeing.

> Am I doing something wrong there?
> I also think that the nonlinear terms should be defined as ImplicitSource 
> terms, but I don't know which variable should I use in the definition, since 
> one of the terms depends both on B and C.

I would be inclined to make the eqC implicit in B and eqB implicit in C in 
order to couple the equations together.


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

Reply via email to