Re: Diffusion coefficient with spline interpolation

2017-08-09 Thread Clara Maurel
Dear Mike, Thank you for your answer! I implemented your suggestions and I don’t have the error anymore. The code starts running, but then goes crazy with absolutely random values of composition (as opposed to an expected periodic variation). I don’t know if this still come from the spline.. I

Re: Diffusion coefficient with spline interpolation

2017-08-09 Thread Michael J. Waters
Hi Clara, Is your spline function returning a numpy array? I think what is happening is that FiPy is seeing it as a tensor diffusion coefficient rather than just a list of the values throughout your simulation. I'm a little rusty with FiPy these days, but I think you could so something like

Diffusion coefficient with spline interpolation

2017-08-09 Thread Clara Maurel
Hello, I would like to model the Cahn Hilliard equation with a diffusion coefficient that depends on the cell variable (concentration X) and time. The diffusion coefficient (Diff) is proportional to the second derivative of the free energy (d2G), for which I have the values in an external file,