Hi there,

While using the AdsorbingSurfactantEquation class, defined in the
electroChem example, located in:

fipy/examples/levelSet/electroChem/adsorbingSurfactantEquation.py

I noticed two lines that seem erroneous, both related to the timestep used
for the solution. On line 331, the following code:

        self.eq.solve(var,
                      boundaryConditions=boundaryConditions,
                      solver = solver,
                      dt=1.)

should, I think, be:

        self.eq.solve(var,
                      boundaryConditions=boundaryConditions,
                      solver = solver,
                      dt=self.dt)

and likewise, line 358, the following code:

        return self.eq.sweep(var, solver=solver,
boundaryConditions=boundaryConditions, underRelaxation=underRelaxation,
residualFn=residualFn, dt=1.)

should be:

        return self.eq.sweep(var, solver=solver,
boundaryConditions=boundaryConditions, underRelaxation=underRelaxation,
residualFn=residualFn, dt=self.dt)

so that the timestep information set by the user is not ignored. Attached
is a patch (created with git diff --no-prefix) that fixes this. If it
passes the muster, would someone mind checking the change into the git
repository?

Thanks,
Charles

Attachment: adsorbingSurfactantEquation_dt_fix.patch
Description: Binary data

_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to