Re: PROBLEM IMPLEMENTING BLACK SCHOLES IN FIPY

2011-02-15 Thread Jonathan Guyer
On Feb 15, 2011, at 3:58 PM, Jorge Espinosa wrote: >> Thanks a lot the equation i´m solving is (Tex): > > rs\frac{\partial V}{\partial s} + \frac{1}{2}\sigma^2 s^2\frac{\partial^2 V} > {\partial s^2}+\frac{\partial V}{\partial t}-rV=0 > > with final condition V(s,T)=(s_T-K)_+ > > boundary con

Re: PROBLEM IMPLEMENTING BLACK SCHOLES IN FIPY

2011-02-15 Thread Jorge Espinosa
Jonathan Guyer writes: > > > On Feb 9, 2011, at 6:54 PM, Jorge Espinosa wrote: > > > Hi, im writting my thesis about options and i need to solve numerically a couple > > of non linear black scholes equations, im trying to do it with Fipy, first > > i > > tried with the simplest black scho

Re: simpletrenchsystem.py

2011-02-15 Thread Jonathan Guyer
On Feb 15, 2011, at 2:40 PM, Yeung (Billy) Au wrote: > Thank you Jonathan for your quick response. > > My matplotlib version is 1.0.0 > > After editing line 124 of > C:\Python25\lib\site-packages\fipy\viewers\matplotlibViewer\matplotlib2DGridViewer.py > from "self.image.clim(vmax=datamax, vm

Re: negative values in diffusion ?

2011-02-15 Thread Jonathan Guyer
On Feb 15, 2011, at 11:22 AM, Julien Derr wrote: > yes D is fixed, and the value on the polygon is always positive; Indeed, here > is what I do; > > I have an old concentration field at one time step "OLDC" (all concentration > is between 0 and 1). then I update the geometry of the polygon (i

Re: simpletrenchsystem.py

2011-02-15 Thread Jonathan Guyer
On Feb 15, 2011, at 12:33 PM, Billy Au wrote: > I have been trying to use FiPy to model a bottom-up filling process in narrow > trenches. > > I have installed python (pythonxy) on a Windows Vista system, together with > NumPy and PySparse. I had no problem running the diffusion examples (mesh

Re: boundary condition general question

2011-02-15 Thread Jonathan Guyer
On Feb 15, 2011, at 1:05 PM, Julien Derr wrote: > so if I understand well it is not possible for now, to impose that the > gradient of the concentration field would be normal to the face? If you are using trunk/ then you can do it with .constrain(), but if you are using a released version the

Re: boundary condition general question

2011-02-15 Thread Julien Derr
Thanks a lot Daniel, so if I understand well it is not possible for now, to impose that the gradient of the concentration field would be normal to the face? On Tue, Feb 15, 2011 at 6:33 PM, Daniel Wheeler wrote: > > On Mon, Feb 14, 2011 at 9:36 AM, Jonathan Guyer wrote: > > >> I don't really u

Re: boundary condition general question

2011-02-15 Thread Daniel Wheeler
On Mon, Feb 14, 2011 at 9:36 AM, Jonathan Guyer wrote: >> I don't really understand, the gradient of the concentration field is not >> necessarly normal to the side ? or is it ? It isn't necessarily normal. However, for a regular isotropic diffusion coefficient, only the normal component of th

Re: negative values in diffusion ?

2011-02-15 Thread Julien Derr
Hi Joshua, yes D is fixed, and the value on the polygon is always positive; Indeed, here is what I do; I have an old concentration field at one time step "OLDC" (all concentration is between 0 and 1). then I update the geometry of the polygon (it increases its size a little bit) I create a new m

Re: negative values in diffusion ?

2011-02-15 Thread Joshua Bush
Julien, Would you mind giving us more information? Is D a fixed value? What is the center polygon's initial concentration value? On Feb 15, 2011 6:29 AM, "Julien Derr" wrote: > Hi all, > > I am still bothering you with my simple diffusion problem between an outer > circle (Boundary condition

negative values in diffusion ?

2011-02-15 Thread Julien Derr
Hi all, I am still bothering you with my simple diffusion problem between an outer circle (Boundary condition value=1) and an inner polygon (Boundary flux=0) I am getting negative values on the concentration field !! a simple diffusion process (eq = TransientTerm() == DiffusionTerm(coeff=D))