<![CDATA[Wave in 1D of Particles and Springs (This simulation is adapted from "Wave in 2D of Particles and Springs" by Fu-Kwun Hwang, Loo Kang WEE [CC-BY-NC-SA 4.0] via Open Source Physics)]]> false true true false ]]> ./wave_2DparticleSprings/Screenshot 2020-04-15 at 10.37.31 AM.png ./01authorfu-kwun.hwang.png;./1authorlookangphoto5050.png DESCRIPTION_EDITOR Intro Page true false _default_ Intro Page false ]]> 20 1 false VARIABLE_EDITOR Var Table true false VARIABLE_EDITOR Var Table 2 true false VARIABLE_EDITOR Stiffness Ranges true false VARIABLE_EDITOR Participation Tracking true false VARIABLE_EDITOR lookang true false CODE_EDITOR SVG true false '+ ' '+ ' '+ ' '+ ' '+ ''; container.innerHTML = svggradient; document.body.appendChild(container); //"url(#mygrandient)" ]]> CODE_EDITOR Participation Tracking true false CODE_EDITOR slider true false CODE_EDITOR Init Page true false Math.floor, because more efficient and clearer what it means iy=Math.floor(i/ny); //space in y direction //iy=parseInt(i/ny); //space in y direction //x[i]=xmin+(ix+0.5)*d; //y[i]=ymin+(iy+0.5)*d; x[i]=xmin+(ix)*d; // lay mass in x //alert("d="+d) // alert(x) y[i]=ymin+(iy)*d; // lay mass in y } ids=id; // store ids clr[id]=clrs; // color assign ]]> CODE_EDITOR synccomboBox2 true false 5&&kx<25){ _view.comboBox2.setSelectedOptions(["medium"]); } else if ( kx>25){ _view.comboBox2.setSelectedOptions(["high"]); } */ ]]> ODE_EDITOR Evol Page true false t dt vx[i] vy[i] calx(i,x)/m 0 RungeKutta 10000 0.00001 false false false false CODE_EDITOR FixRel Page true false CODE_EDITOR ParticipationCheck true false minActiveSpeed) { isActive = true; break; } if (i % nx < nx - 1) { // If not the rightmost column if ((x[i + 1] - x[i]) * (x[i + 1] - x[i]) + (y[i + 1] - y[i]) * (y[i + 1] - y[i]) > (d + minActiveDisplacement) * (d + minActiveDisplacement)) { isActive = true; break; } } if (Math.floor(i / nx) < ny - 1) { // If not the bottommost row if ((x[i + nx] - x[i]) * (x[i + nx] - x[i]) + (y[i + nx] - y[i]) * (y[i + nx] - y[i]) > (d + minActiveDisplacement) * (d + minActiveDisplacement)) { isActive = true; break; } } } if (isActive) { for (let i = 0; i < rangeCount; i++) { if (kx < rangeMaximums[i]) { if (!marksAwarded[i]) { // Award marks startQuestion("seeSpringAt" + capitalize(rangeNames[i]) + "Stiffness"); awardQuestionMarks(); endQuestion(); marksAwarded[i] = true; if (_debugMode) { alert("Mark awarded for activity while stiffness is " + rangeNames[i].toLowerCase()); } } break; } } } } ]]> LIBRARY_EDITOR changeOrientation true false LIBRARY_EDITOR questionLib true false 0) { const questionName = questionStack[questionStack.length - 1]; _addQuestionHistory(questionName, history); } } // for assessment.json event - states function onAnswer(answer, isCorrect=false, history=answer) { if (questionStack.length > 0) { const explainer = Object.create(null); explainer[true] = " ✅"; explainer[false] = " ❌"; const questionName = questionStack[questionStack.length - 1]; _addQuestionHistory(questionName, history + explainer[isCorrect]); const outputHistory = _getQuestionHistory(questionName); _view._addInteraction(_nullFunction, {name:questionName, answer:answer, isCorrect:isCorrect, action:"questionAnswer"}, {property: "answer", element:"questionLib"}); _view._addInteraction(_nullFunction, outputHistory, {property: "historyFor" + questionName, element: "questionLib"}); } } // for assessment.json event - end function endQuestion() { if (questionStack.length > 0) { const questionName = questionStack.pop(); _view._addInteraction(_nullFunction, {action:"questionEnd", name:questionName}, {element: "questionLib", property: "value"}); } } // for assessment.json marks function awardQuestionMarks(marks=1) { if (questionStack.length > 0) { const questionName = questionStack[questionStack.length - 1]; _view._addInteraction(_nullFunction, marks, {element:"questionLib", property:"awardMarkFor"+questionName}); } } // CHANGE: Add a utility function for making the first character of a string capitalized function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); } ]]> LIBRARY_EDITOR Lib Page true false HTML_VIEW_EDITOR HtmlView Page true false true Elements.Panel Elements.ComboBox 0)? opts[0]:""; // selected option if (option==""){ dragx = true; } ]]> Elements.CheckBox Elements.CheckBox true Elements.Panel Elements.Slider 5&&kx<25){ _view.comboBox2.setSelectedOptions(["medium"]); } else if ( kx>25){ _view.comboBox2.setSelectedOptions(["high"]); } */]]> Elements.Label Elements.ComboBox 0)? opts[0]:""; // selected option // CHANGE: A more efficient way of setting stiffness based on the selection for (let i = 0; i < rangeCount; i++) { if (option === rangeNames[i]) { kx = rangeDefaults[i]; break; } } /* if ( option=="low"){ kx= 5; } else if ( option=="medium"){ kx= 20; } else if ( option=="high"){ kx= 35 } */]]> false Elements.Panel Elements.Slider Elements.Label Elements.ParsedField Elements.TwoStateButton Elements.Button true Elements.Panel true Elements.PlottingPanel Elements.SpringSet2D Elements.SpringSet2D Elements.ShapeSet2D Elements.ShapeSet2D Elements.Text2D Elements.Text2D Elements.Panel Description

This simulation can be used to illustrate longitudinal waves, and investigate how the speed of a wave is affected when certain conditions are changed. It can also be used to model how the forces of attraction between particles in a medium affects the speed of sound in the medium.

What does the simulation show?

The simulation consists of a row of particles that are connected by springs. When a particle at one end is displaced (by pulling it to the left or right), the disturbance travels to the other end as a longitudinal wave.

What is the variable we are investigating?

In this simulation, we can vary the “stiffness” of the springs. When a spring is “stiffer” or less elastic, a greater force is exerted on the particles connected by the spring. Conversely, a less “stiff” or more elastic spring exerts a smaller force on the particles for the same displacement.

Possible investigations and inferences

The simulation can be used to investigate how varying the stiffness of the springs affects how fast the longitudinal wave travels. It can also model how the forces of attraction between particles in a medium affects the speed of sound in the medium.

The particles in the simulation interact through the springs, which exert forces on the particles; similarly, forces of attraction exist between particles in matter. In the solid state, forces of attraction between particles are strong. In the gaseous state, forces of attraction between particles are weak. The springs in the simulation model the attraction between particles in matter – the stiffer the springs, the stronger the forces of attraction between particles.

]]>