Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single molecule at 0K drifts left and right, can't be heated #192

Closed
phet-steele opened this issue Dec 12, 2016 · 8 comments
Closed

Single molecule at 0K drifts left and right, can't be heated #192

phet-steele opened this issue Dec 12, 2016 · 8 comments

Comments

@phet-steele
Copy link

phet-steele commented Dec 12, 2016

I took a gander and the current state of this sim and I want to point out to @jbphet that, at 0K, with only one molecule in the container, a molecule will tend to drift left and right. The setup for this bug would simply involve reaching a state with only one molecule in the container, then cooling to 0K:

som07

Heating at this point does nothing to the molecule. This is not specific to water. Seen on iPad Air 2 iOS 9.3.5. EDIT: phetsims/tasks/issues/753

@jbphet
Copy link
Contributor

jbphet commented Dec 13, 2016

I've investigated this, and the issue is that there is some code in the isokinetic thermostat that doesn't scale down the particle velocity for falling particles. This is done so that the particles will fall to the bottom of the container as the system approaches absolute zero. In this particular case, the way that the forces and motion are updated just happens to make it such that the particle is always bouncing a tiny bit due to gravitational acceleration, and just happens to have a very small negative Y velocity when the thermostat is run. This means that its velocity never gets scaled, neither up nor down.

I tried having a threshold of height in the isokinetic thermostat below which the velocity is always scaled regardless of whether the particle is falling, and this solved the problem described here, but introduced other odd looking behaviors.

I also tried adding a clause that only skips the scaling if the velocity is being scaled down. This solved the problem of not being able to heat the particle back up, but I am very reluctant to add something like this just before doing a release candidate.

I propose that I move forward with the RC and leave this issue open, and will investigate it in parallel with the testing. If a simple fix is found, it can be propagated to the RC branch.

@jbphet
Copy link
Contributor

jbphet commented Dec 16, 2016

The easiest - and perhaps the most practical - thing to do would be to eliminate the ability to get the particles to absolute zero. This feature creates a number of problems, and there is already a lot of special case code to support it, and handling the case described in this issue would likely involve even more special-case code. If I can't come up with anything elegant, and we decide that this issue should be addressed, I would advocate for the elimination of support for absolute zero.

@ariel-phet
Copy link

@jbphet I think eliminating absolute zero would be fine (since it is unphysical). You could go to 1K or perhaps let it go to 0.1K and then things will be very slow, but it gets no colder, I would be completely fine with that.

@ariel-phet
Copy link

Deferring to see if we get any emails to phethelp after publication

@jbphet
Copy link
Contributor

jbphet commented Aug 2, 2018

We've decided that this is an edge case. Closing.

@jbphet jbphet closed this as completed Aug 2, 2018
@KatieWoe
Copy link
Contributor

For phetsims/qa/issues/164
The movement at 0 K can happen with large numbers of particles as well, though heating can occur just fine.

@ghost
Copy link

ghost commented Oct 26, 2018

Still an issue for phetsims/qa#212. @jbphet will consider adding some edge case code if someone complains about it.

@KatieWoe
Copy link
Contributor

To be clear, they can be heated. The movement is the issue that is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants