I should probably mention also that I'm trying to simulate a Langevin
dynamics, so I'm adding a Gaussian noise to the field at each time
step.
This is the method I use to update the field on each time step:
def step(self):
self.t += self.dt
self.phi.updateOld()
residual=1
while residual>1.0e-1:
residual=self.equation.sweep(var=self.phi, dt=self.dt,
solver=self.solver)
self.phi.setValue(self.phi +
self.xsi*GaussianNoiseVariable(mesh=self.mesh, mean=0.0, variance=1))
Is this the right way to use sweep? I've tried different solvers and
get different results, and some are much slower than others. I've just
randomly tried different solvers, so I don't have any systematic
observations now. But I definitely get different behaviors depending
on the solver, the number of iterations specified, etc. It's too big a
parameter space to explore randomly.
Thanks,
-Ranjit
On Wed, Oct 28, 2009 at 2:48 AM, Ajay Rawat <[email protected]> wrote:
> Your equation in nonlinear..........try solving it with sweep.
>
> On Wed, Oct 28, 2009 at 10:05 AM, Ranjit Chacko <[email protected]> wrote:
>>
>> Hi,
>> I've got an equation of the following form:
>> localTerm = -6.0*self.phi**5 + 8.0*self.phi**3 - 2.0*self.phi*self.tau
>> (TransientTerm() == DiffusionTerm(coeff=0.5 * self.a) +
>> DiffusionTerm(coeff=(0.25 * self.b, 1.0)) + localTerm)
>> I get very different behavior depending on which solver and how many
>> iterationsĀ I choose. Are there any rules of thumb about how to choose a
>> solver and are there any good references about these methods I should look
>> up?
>> Thanks,
>> -Ranjit
>
>
>
> --
> Ajay Rawat
> Kalpakkam, IGCAR
>
> -------------------------------------------------------------------------
> Save Himalayas....
> -------------------------------------------------------------------------
>