On 12/12/12 3:16 PM, Jonathan Guyer wrote: > On Dec 10, 2012, at 3:47 PM, Adrian Jacobo wrote: > >>> 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. >> I send you attached a minimal script that shows one of the problems >> I'm having. Now I'm solving two uncoupled equations. This script >> produces the right solution for C (everything is zero) but B starts at >> B_0=2 and despite having the boundary conditions fixed at B=B_0 the >> solution evolves to B=1 (which violates the boundary conditions). > This turns out to be because you initialized B with an integer value. Try > making this change: > > --- a/BufferDifussion.py > +++ b/BufferDifussion.py > @@ -29,7 +29,7 @@ mesh = fp.Grid3D(dx=dx, dy=dy,dz=dz, nx=nx, ny=ny,nz=nz) > #-----Equation parammeters, variables and definition-----# > D_c = 2e-10 # [m^2 s^-1] > D_b = 2e-11 # [m^2 s^-1] > -B_0 = 2 # [mol/m^3] > +B_0 = 2. # [mol/m^3] > > C = fp.CellVariable(name = "Calcium", > mesh = mesh, value = 0.) > > You should get a warning for this, but don't for some reason with coupled > equations. I've reopened http://matforge.org/fipy/ticket/143#comment:4 to > figure out what's wrong. > Thanks! It seems it was just that. It's working now.
Adrian. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
