Under the Hood: Inputs and Outputs to Next-Generation MW Interactives
Our Next-Generation Molecular Workbench (MW) allows you to build Web-based simulations to explore emergent scientific phenomena. Years of experience tell us that learning happens best when students actively manipulate such models to ask and answer questions—and the Next Generation Science Standards call for students to do just that. Next-Generation MW helps foster inquiry with models by supporting custom properties, which you can define to expose the most relevant features of the model to observation and direct manipulation.
Consider a 2D simulation of nonreactive noble gas atoms compressed into the left side of a box at constant temperature by a piston (as shown below). The core Next-Generation MW engine, called MD2D for Molecular Dynamics 2D, understands the simulation as a set of atoms, an obstacle (perfectly hard rectilinear object of fixed shape and density), and so on.
The parameters entry tells MD2D to add pressure to the list of properties it “knows” about, and the onChange code describes how to update the force applied to the piston when requested pressure changes. The pressure parameter can be bound to a UI control (as in the demo) and is recorded, so that when you step back in the model’s “tape recorder” you see the parameter value that prevailed at that time.
Because we save complete state, even conceptually irreversible onChange actions can be reversed: changing the “number” parameter in the interactive below destroys or creates atoms, but you can always rewind the model to any point in its history and restart it from there. Inherent reversibility frees students to investigate without having to worry about messing up the simulation, making them free to explore.