gfrd / egfrd

enhanced Green's Function Reaction Dynamics
egfrd.org
GNU General Public License v2.0
9 stars 10 forks source link

Bad convergence of 1D Greens functions #23

Open TheJoris opened 12 years ago

TheJoris commented 12 years ago

Issue partly solved, see below.

1D Greens Functions converge badly when drawing a new center of mass (drawR) after a SINGLE_REACTION or a IV_REACTION with a large domain size L. Where L is large as in L^2/(D t) >> 1. Both these events can return very small dt's (for a small IV domain or large dissociation constant).

Because for D t << L^2, the particle "doesn't see" the absorbing boundary and we can use the free 1D greens function. So, just as with the 3D functions, we could use different greens functions for particles far away from the boundary(s).

nilsbecker commented 12 years ago

On 07/25/2011 10:28 AM, TheJoris wrote:

1D Greens Functions converge badly when drawing a new center of mass (drawR) after a SINGLE_REACTION or a IV_REACTION with a large domain size L. Where L is large as in L^2/(D t) << 1. Both these events can return very small dt's (for a small IV domain or large dissociation constant).

Because for D t << L^2, the particle 'doesnt see' the absorbing boundary and we can use the free 1D greens function. So the same solution as with the 3D function could be used.

sounds good! N.

thomie commented 12 years ago

Yes, see pdf document with all the green's functions.

Op 25 jul. 2011 01:28 schreef "TheJoris" < reply@reply.github.com> het volgende: 1D Greens Functions converge badly when drawing a new center of mass (drawR) after a SINGLE_REACTION or a IV_REACTION with a large domain size L. Where L is large as in L^2/(D t) << 1. Both these events can return very small dt's (for a small IV domain or large dissociation constant).

Because for D t << L^2, the particle 'doesnt see' the absorbing boundary and we can use the free 1D greens function. So the same solution as with the 3D function could be used.

Reply to this email directly or view it on GitHub: https://github.com/gfrd/egfrd/issues/23

TheJoris commented 12 years ago

Issue Solved: The 1DAbsAbs::drawR function now checks if H*sqrt(2Dt) < (L - r0 - vt); or is it likely for the particle positioned at r0 with a drift v, to reach the right boundary at L in a time t. We use a cutoff H.

If the particle is many (now set at H = 6) standard deviations away from both of the boundaries, it draws a new position from the free greens function.

Things to do is: