Dear all --

    I am just double checking my sanity. If I have a diffusion problem with
an-isotropic and spatially varying diffusion:

          (d/dx)(A(x,y) dPsi/dx)+d/dy(B(x,y) dPsi/dy) = something

The correct way to set up the diffusion term is code of the form

diffCoef=fipy.CellVariable(mesh=mesh,rank=1) #define on center
diffCoef.value[0,:]=A
diffCoef.value[1,:]=B
....
eq=(fipy.DiffusionTerm(var=psiPart,coeff=diffCoef)+sourceTerm)
eq.solve(var=psiPart,solver=TheSolver())


Where A and B are vectors whose length is equal to the number of centers. I
don't have to set up a complete tensor with 0's on the diagonal, do I? And
if I do, How would I do so?

I am just sanity checking some odd results.

Thanks,
Jamie
_______________________________________________
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