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
Address the confusion about whether the wall does work. #220
Comments
4/11/24 design meeting with @arouinfar @kathy-phet @Nancy-Salpepi @ariel-phet @pixelzoom
@arouinfar Assign back to me when you have designed the control. Let me know if you want any feedback. |
We generally talk about work done "by" something "on" something else. The wording is a bit tricky here because the direction the wall moves matters. When compressed, the wall does work on the gas. When expanded, the gas does work on the wall. Collectively, we call this "Work Done by a System", see https://openstax.org/books/university-physics-volume-2/pages/3-2-work-heat-and-internal-energy
We should also change the color of the wall handle. On the Ideal Screen the handle is a bit brassy looking, and on the Explore Screen the color matches the lid handle.
I'm leaning towards a RadioButtonGroup called "System Work" with options "on" and "off". We often use checkboxes to toggle representations or model behaviors on/off, such as Air Resistance in Projectile Motion: However, I think it would be more easily interpreted if we had an explicit on/off control. We do this in Gravity and Orbits, which seems like an analogous case: Here's a mockup. It feels a bit heavy-handed, but I also think the control deserves to have a bit more visual weight/prominence given the amount of feedback we've received about this issue. @pixelzoom your feedback is definitely welcome! |
@arouinfar and I discussed #220 (comment), and We're feeling like adding this on/off control may be the wrong direction, because:
Brainstorming other ideas...
|
In the above commits, I replaced BaseContainer |
@arouinfar please test-drive in main, then let's discuss next steps. Notes... This version keeps a running average of the left wall's velocity. The average is over 50 samples (configurable). If there are 2 consecutive samples where vx === 0, then the average is immediately set to zero. This causes the vector arrow to immediate disappear, instead of gradually (and noticeably) shrinking and then disappearing. The function for computing the arrow length is:
So for speed range (0,800] pm/ps, the arrow length varies from [35,100] in view coordinates. When speed is 0, the arrow is hidden. The arrow configuration is: headWidth: 30,
headHeight: 20,
tailWidth: 10,
fill: GasPropertiesColors.workVectorColorProperty |
Design meeting 5/20/24: @arouinfar @kathy-phet @Nancy-Salpepi @matthew-blackman @pixelzoom
|
@arouinfar Let's meet to finish off this item:
See WallVelocityVectorNode and IdealGasLawContainer.leftWallAverageVelocityXProperty. |
In b434c17, the velocity vector is hidden if the wall has not moved for 0.5 ps. This value can be changed in IdealGasLawContainer.ts: // Tuned so that the vector behaves smoothly while dragging the resize handle, but disappears quickly after dragging ends.
if ( this.dtSinceWallMoved >= 0.5 ) {
// The wall has not moved, so immediately set the running average to zero.
this.dxSamples.length = 0;
this.dtSamples.length = 0;
this._leftWallAverageVelocityXProperty.value = 0;
}
else { |
@arouinfar @Nancy-Salpepi and I tweaked this together, see 1b0ace1. Closing. |
@arouinfar mentioned that she gets lots of questions about the Explore screen, and that perhaps it should be renamed Work.
If we are going to rename any screens, it should be done before first PhET-iO publication.
The text was updated successfully, but these errors were encountered: