Dear Fipy users,

I'm looking to generate a DiffusionTerm that uses an anisotropic
coefficient that also varies in space.

>From the FAQ, I'm setting it up by defining CellVariables that can be set
to vary spatially

n_xx = CellVariable(mesh=mesh, value = x)
n_yx = CellVariable(mesh=mesh,value= x)

then I generate a few diffusion terms.
the first term works fine when isolated

eq_ux = DiffusionTerm(coeff=CellVariable(mesh=mesh, value =
[[2*n_xx,0],[0,0]]), var=ux)

but the second term

+ DiffusionTerm(coeff=CellVariable(mesh=mesh, value = [[0,0],[n_yx,0]]),
var=uy)

fails with error

File
"/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/FiPy-3.0-py2.7.egg/fipy/variables/meshVariable.py",
line 64, in __init__
   value = numerix.array(value)
ValueError: setting an array element with a sequence.

I can't see what the difference would be.  Any help would be appreciated.

Will
_______________________________________________
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