In the Connected Learning projects, we are studying students' learning of content through exploring and constructing computer-based models of that content. This paper present a case study of a high school physic teacher's design and exploration of a computer-based model of gas molecules in a box. We follow up the case study with shorter vignettes of students' exploration and elaboration of the Gas-in-a-Box model. The cases lead us to analyze and discuss the role of model-based inquiry in science and mathematics education as well as to draw some general conclusions with respect to the design of modeling languages and the design of pedagogies and activities appropriate for model-based inquiry in classroom settings.