Dear all,
I am experiencing two major problems with the implementation of a 2d PDE (the
FPE corresponding to a stiff stochastic system):
1. When I follow exactly what's written in the manual, i.e. if I want to have a
non-constant anisotropic diffusion coefficient similar to
>>> x, y = mesh.getCellCenters()
>>> DiffusionTerm([[[x**2, x * y], [-x * y, -y**2]]])
I get the following message
Traceback (most recent call last):
File "C:\Dokumente und Einstellungen\Oliver\Desktop\Programme ETH\ETH
Zürich\CIR-VR\FPE\FPE_Oscillator.py", line 37, in <module>
eq1 = TransientTerm() == DiffusionTerm([[[0, 0], [0, -y**2]]])
File "C:\Python25\lib\site-packages\fipy\terms\diffusionTerm.py", line 89, in
__init__
self.nthCoeff = Variable(value = self.nthCoeff)
File "C:\Python25\Lib\site-packages\fipy\variables\variable.py", line 115, in
__init__
self._setValue(value=value, unit=unit, array=array)
File "C:\Python25\Lib\site-packages\fipy\variables\variable.py", line 502, in
_setValue
self.value = self._makeValue(value=value, unit=unit, array=array)
File "C:\Python25\Lib\site-packages\fipy\variables\variable.py", line 532, in
_makeValue
value = PF(value=value, unit=unit, array=array)
File "C:\Python25\Lib\site-packages\fipy\tools\dimensions\physicalField.py",
line 204, in __init__
value = [PhysicalField(item,unit) for item in value]
File "C:\Python25\Lib\site-packages\fipy\tools\dimensions\physicalField.py",
line 213, in __init__
value = numerix.array(normalized)
ValueError: setting an array element with a sequence.
Does anyone know what's wrong? According to the manual, it should be working
fine...
2. Like I said, the corresponding SDE is stiff which has already turned that
implementation into quite a painful experience. I do not have the time right
now to sift through the literature, so I am wondering whether FiPy can be used
at all to tackle this simulation. Or do I have to use a specially-designed
algorithm to simulate this?
Thanks a lot,
Oliver
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser