Bug #797
bd giving incorrect results, such as a temperature 2x as high as it should be in release-4-5-patches
Description
Crashes with bd -- when I reduce the time step, I can get it to run, but the temperature is generally about 2x what it should be. This appears to have been the case since at least January.
Associated revisions
History
#1 Updated by Berk Hess over 9 years ago
It should crash with such a timestep/friction ratio.
The reported temperature always seems to have been a factor 2 too high.
This is because the velocity is set to the displacement divided by the time step
and the mass is set to the friction coefficient times the time step.
As both velocity and mass are meaningless, there are two solutions:
1) set the velocity to 0.5*displacement/dt
2) set the mass to 0.5*fric*dt
The velocity has no meaning, but I think it makes more sense to set that equal to the displacement and therefore use 2). I can do this when we agree.
Note that all this has no effect on the simulations, only on the reported ekin and T.
#2 Updated by Rossen Apostolov over 9 years ago
You mean use 1) ?
#3 Updated by Rossen Apostolov over 9 years ago
- Target version changed from 4.5.5 to 4.5.6
#4 Updated by Rossen Apostolov almost 9 years ago
- Target version changed from 4.5.6 to 4.6
this will go in 4.6, Berk has the fix ready
#5 Updated by Berk Hess almost 9 years ago
- Status changed from New to Closed
I halved the masses with BD. Now the temperature is correct.
And if you observe a too high temperature, this means the time step is too large.
fixed the reported temperature with Brownian dynamics
Reduced the (meaningless) masses with BD by a factor 2.
Since v with BD is defined as dx/dt, the reported Ekin and T are
now correct (and if there are too high, dt is too large).
Fixes #797
Change-Id: Iee8613ff9637deb58600ad03289f7bcce7f32df2