Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
summer_2019:ideal_gas_law [2019/08/06 15:27] wellerd |
summer_2019:ideal_gas_law [2019/08/06 15:27] (current) wellerd |
||
---|---|---|---|
Line 10: | Line 10: | ||
If you click on the "Instructions" tab in the upper right, a set of instructions for the activity should pop up. Click between "Instructions" and "Result" to alternately view the instructions and the animation. If you prefer, the same instructions are also listed below. | If you click on the "Instructions" tab in the upper right, a set of instructions for the activity should pop up. Click between "Instructions" and "Result" to alternately view the instructions and the animation. If you prefer, the same instructions are also listed below. | ||
- | * Try runnning your code. You'll notice that our gas particle is currently escaping the box. | + | * Try runnning your code. You'll notice that our gas particle is currently escaping the box. |
- | * **Line 34:** Add an if statement to check for when the gas particle collides with a wall. | + | * Add an 'if' statement to check for when the gas particle collides with a wall, and make the particle move in th opposite direction after contacting the wall. |
+ | * Enter the equation for v_rms of a gas particle and correct that value in your particle's velocity. | ||
+ | * The pressure of an ideal gas comes from collisions between particles and the walls of the container. The pressure is equal to the force (mass times delta_velocity) divided by the area. Add a line to the code that calculates the pressure from our gas atom colliding with the wall. | ||
+ | * Hint: Everytime that a particle-wall collision occurs, you should increase your pcount, and then average the total pressure by dividing by pcount. | ||
+ | |||
+ | * Try to create a pressure vs. time graph that adds another data point for every particle-wall collision. In this simplified model, the pressure versus time graph should be horizontal. | ||
+ | | ||
+ | * For an extra challenge, try making the particle collisions work in three dimensions. This will build into a more complicated model to be used later. | ||
For more information on glowscript tools, check out: [[https://www.glowscript.org/docs/GlowScriptDocs/index.html]] | For more information on glowscript tools, check out: [[https://www.glowscript.org/docs/GlowScriptDocs/index.html]] | ||
- | |||
- | |||
<code> | <code> |