Re: 1D diffusion using source term with boundary conditions

2011-05-02 Thread Daniel Wheeler
Are all three methods supposed to be equivalent? I'm not sure what exactly is wrong. Everything seems to be working as far as I can tell. The third method has a gradient of -2.0, which is the initial value of BC_Left and BC_Right as expected. gradExteriorValue is never updated in the loop so it wo

Re: 1D diffusion using source term with boundary conditions

2011-04-27 Thread Gyeong-Geun LEE
Thanks for your help! Three methods are implemented. #1: explicit method #2: source term + setvalue in loop #3: source term (revised) #!/usr/bin/env python2.5 from fipy import * # mesh nx = 10 dx = 1. mesh = Grid1D(nx=nx, dx=dx) # Di

Re: 1D diffusion using source term with boundary conditions

2011-04-27 Thread Daniel Wheeler
On Wed, Apr 27, 2011 at 3:50 AM, Gyeong-Geun LEE wrote: > Thanks for your suggestion. > However, it did not work. > The values at boundary were diverged! Post your script and I'll take a look. -- Daniel Wheeler

Re: 1D diffusion using source term with boundary conditions

2011-04-27 Thread Gyeong-Geun LEE
Thanks for your suggestion. However, it did not work. The values at boundary were diverged! On Tue, Apr 19, 2011 at 2:07 AM, Daniel Wheeler wrote: > > On Sun, Apr 17, 2011 at 9:48 PM, Gyeong-Geun LEE wrote: > > Hi, everyone, > > I am a newbie fipy user. Thanks in advance > > I have a simple

Re: 1D diffusion using source term with boundary conditions

2011-04-18 Thread Daniel Wheeler
On Sun, Apr 17, 2011 at 9:48 PM, Gyeong-Geun LEE wrote: > Hi, everyone, > I am a newbie fipy user. Thanks in advance > I have a simple 1D grid problem for materials diffusion. > Because the flux is determined by various non-linear functions, I > transformed the simple diffusion example to source

1D diffusion using source term with boundary conditions

2011-04-17 Thread Gyeong-Geun LEE
Hi, everyone, I am a newbie fipy user. Thanks in advance. I have a simple 1D grid problem for materials diffusion. Because the flux is determined by various non-linear functions, I transformed the simple diffusion example to source term for the flux. I got the same result between the explicit diff