Re: Solution to the sine-gordon equation

2019-03-21 Thread Daniel Wheeler
On Thu, Mar 21, 2019 at 1:14 PM Meier Quintin wrote: > > Dear Daniel, > Thanks a lot for the help. I got it to work by adding a transientterm(). > > If I try to use your second trick though: > > eq = (DiffusionTerm(coeff=(1.0), var=phi) - numerix.sin(phi) + phi * >

Re: Solution to the sine-gordon equation

2019-03-21 Thread Meier Quintin
munity, I’m new to FiPy, so forgive me if this is a trivial question. I’m trying to find the kink solution to the (static) sine-gordon equation using this simply piece of code. import numpy as np from fipy import * nx = 1 dx = 0.01 mesh = Grid1D(nx=nx,dx=dx) phi = CellVariable(mesh=mesh, na

Re: Solution to the sine-gordon equation

2019-03-21 Thread Daniel Wheeler
On Thu, Mar 21, 2019 at 11:48 AM Daniel Wheeler wrote: > > with a transient term in the equation. For small phi, this should > never be negative, since phi should only grow, but for delta_t > 1 That's wrong, phi should shrink, but not go negative. -- Daniel Wheeler

Re: Solution to the sine-gordon equation

2019-03-21 Thread Daniel Wheeler
tion. > I’m trying to find the kink solution to the (static) sine-gordon equation > using this simply piece of code. > > import numpy as np > from fipy import * > nx = 1 > dx = 0.01 > mesh = Grid1D(nx=nx,dx=dx) > phi = CellVariable(mesh=mesh, name=“Phi") >

Solution to the sine-gordon equation

2019-03-21 Thread Meier Quintin
Dear fipy community, I’m new to FiPy, so forgive me if this is a trivial question. I’m trying to find the kink solution to the (static) sine-gordon equation using this simply piece of code. import numpy as np from fipy import * nx = 1 dx = 0.01 mesh = Grid1D(nx=nx,dx=dx) phi = CellVariable