-
Notifications
You must be signed in to change notification settings - Fork 2
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
block at min density will bounce indefinitely on Mercury #404
Comments
Subject: [PATCH] Node from the vbox needs to be set to invisible, https://github.com/phetsims/density-buoyancy-common/issues/415
---
Index: js/common/model/Material.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/model/Material.ts b/js/common/model/Material.ts
--- a/js/common/model/Material.ts (revision 3bc283c608f96c20bada618bf0c1ceeb07646d9f)
+++ b/js/common/model/Material.ts (date 1727982771091)
@@ -404,7 +404,7 @@
nameProperty: DensityBuoyancyCommonStrings.material.materialTStringProperty,
hidden: true,
colorProperty: DensityBuoyancyCommonColors.materialTColorProperty,
- density: 950 // Same as the Human's average density
+ density: Material.HUMAN.density
} );
public static readonly MATERIAL_U = new Material( packageJSON.name === 'buoyancy' ? SOLIDS_TANDEM.createTandem( 'materialU' ) : Tandem.OPT_OUT, {
Index: js/buoyancy/view/BuoyancyLabScreenView.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/buoyancy/view/BuoyancyLabScreenView.ts b/js/buoyancy/view/BuoyancyLabScreenView.ts
--- a/js/buoyancy/view/BuoyancyLabScreenView.ts (revision 3bc283c608f96c20bada618bf0c1ceeb07646d9f)
+++ b/js/buoyancy/view/BuoyancyLabScreenView.ts (date 1727982535089)
@@ -116,7 +116,7 @@
visiblePropertyOptions: {
phetioFeatured: true
},
- minCustomMass: 0.1,
+ minCustomMass: 0.5,
maxVolumeLiters: maxBlockVolume
}
) ] );
Index: js/buoyancy/view/BuoyancyExploreScreenView.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/buoyancy/view/BuoyancyExploreScreenView.ts b/js/buoyancy/view/BuoyancyExploreScreenView.ts
--- a/js/buoyancy/view/BuoyancyExploreScreenView.ts (revision 3bc283c608f96c20bada618bf0c1ceeb07646d9f)
+++ b/js/buoyancy/view/BuoyancyExploreScreenView.ts (date 1727982535098)
@@ -51,7 +51,7 @@
model.blockB,
this.popupLayer, {
tandem: tandem,
- minCustomMass: 0.1
+ minCustomMass: 0.5
}
);
Index: js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts b/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts
--- a/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts (revision 3bc283c608f96c20bada618bf0c1ceeb07646d9f)
+++ b/js/buoyancy-basics/view/BuoyancyBasicsExploreScreenView.ts (date 1727982535080)
@@ -55,7 +55,7 @@
ownsCustomDensityRange: false,
customKeepsConstantDensity: true,
tandem: tandem,
- minCustomMass: 0.1,
+ minCustomMass: 0.5,
maxCustomMass: 15
}
); |
working on this now since I hope it is simple and easy. |
Alright, we increased the min custom density in B:B:Explore, and increased the min custom mass in B:Lab and B:Explore. QA, please do some testing around the changes, for example in studio, to make sure we didn't cause any issues in certain cases where the mass or density is derived to be a (now) unsupported value). |
I no longer get the endless bouncing in rc.2. |
I was able to get this again in phetsims/qa#1149. If you fill the bottle in the last screen of the Density sim fully with air it has a density of .01 kg/L and will bounce infinitely on a max density fluid. |
I agree with MK that this is a corner case, and we should close as won't fix. |
This is caused by error accumulation in the physics engine. We can address this problem by reducing the p2 timestep from the current value of @zepumph and I found that we can change the bottle mass from 0.1kg to 0.3kg and that is enough to prevent the bouncing. This is much more well-isolated and less risky solution, if we want to do anything. Furthermore, when we faced similar bouncing problems, we solved it by adjusting the min/max densities to reduce the occurrence of bouncing. So adjusting the bottle mass would be in line with our prior decisions. @DianaTavares do you see any problems with changing the bottle mass from 0.1kg (current value) to 0.3kg (proposed value that fixes the bouncing)? |
Also in studio, if I customize the density material of the mystery block I can get it to bounce indefinitely. (eg. a density of 0.8 will cause the block to keep bouncing on mercury). I think designers will realize not to use this value, but wanted to note that this can happen. |
@DianaTavares @samreid and I like increasing the mass of the empty bottle to .5kg. As for studio, we are not worried about that since all PhET-iO studio customizations involve a certain level of design and testing. |
Looks good! |
From slack:
So let's proceed with reverting the bottle mass change, and doing a Maintenance release. |
I agree, the smaller the better - so 0.1kg sounds ok to me. |
Fixing now |
Ready for rc + local spot check + production deploy for MR. |
Mass increase has been reverted, and can be seen in these RCs (creating them as we speak): https://phet-dev.colorado.edu/html/buoyancy/1.2.1-rc.1/phet/buoyancy_all_phet.html |
@zepumph - We did not advertise anything about PhET-iO, so hoping even if this changed the API, you can just proceed and overwrite it, without worrying about migration anything. |
Production MR complete: https://phet-origin.colorado.edu/sims/html/buoyancy/latest/buoyancy_all.html Closing |
Test device
MacBook Air M1 chip
Operating System
14.6.1
Browser
Chrome
Problem description
For phetsims/qa#1141 in Buoyancy Basics on the Explore Screen, a block with a density of .01 kg/L will continually bounce on Mercury.
Steps to reproduce
Visuals
Bouncing.mp4
The text was updated successfully, but these errors were encountered: