Abstract. A computational toy model for viscosity in gases is presented. The model, appropriate for undergraduate university and (in part) for high school students, is based on an iterative representation of the exchange of matter between a succession of trains sliding on parallel rails, representing the reciprocally sliding layers of a fluid in laminar motion, that is the usual mesoscopic model for defing viscosity. The model is useful both to improve students cohomprension of viscosity and to consolidate their computational skills, giving in the meantime pedagogically useful hints on the physical interpretation of the elements of a matrix: a useful skill in view of the students’ learning of quantum mechanics.
Computation has become so important in physics education  that it justifies such claims as “…a curriculum in which computation is absent or plays a minor role is inauthentic to the contemporary discipline” . STEM disciplines (and their teaching/learning processes) traditionally relie on two pillars: theory and experiment. This state of affairs has profoundly changed in recent decades, when a real paradigm shift has occurred, ignited and promoted by the wide availability of computers and the increasing power of computational tools, even of educational grade . The theory/experiment duo has been significantly changed by the development of a real third pillar, i.e. computation, that “… has blurred the distinction between theory and experiment” . In this context, a major role of computation and programming is highly appropriate in the preparation of high school and university undergraduate students  and, even earlier, in primary education .
Viscosity is a property of fluids often affected by misconceptions . In particular, the concept of viscosity as “friction in fluids” (as it is defined in many tesxtbooks), by evoking the intermolecular interactions giving rise to friction between solids, could be didactically misleading, since students are led to overlook of viscosity as a transport phenomenon . On the other side, properly modelling viscosity as a transport phenomenon is not feasable at high school level, nor for university undergraduates, since it would require employing the Boltzmann transport equation .
In this context, we present a new computational toy model for viscosity, which is articulated in steps of progressive difficulty and completeness, and allows students to computationally explore the shearing behaviour of a gas when some parameters are varied. The proposed toy model is equipped by multimedia features, by implementing a (partial, for now) graphical user interface, based on the interactivitiy capabilities of the software Wolfram Mathematica.
2 The toy model for viscosity
The model is based on the mechanical coupling between many systems, by the exchange of matter. In particular, it relies on the analogy between: on the one hand, the usual model of a fluid flow in terms of layers sliding over each other; on the other hand, a succession of bodies (trains) free to slide on a series of parallel tracks. Sliding trains exchange massive balls each other, resulting in a net trasfer of momentum from faster trains to slower ones (Fig. 1).
Fig. 1 The layered model of a flowing fluid is transposed in the analogical model: N trains sliding frictionless on N parallel rails. Each train exchanges massive balls with its two nearest neighbors. This exchange causes the momentum to flow transversally with respect to the direction of motion of the trains.
The time evolution of the system (when the first train is acted upon by a constant force parallel to the rails, while the last train is braked by a conventional friction force) is obtained by an iterative process. Each step of the iteration is formulated as an appropriate matrix operation, so that the overall time evolution can be expressed as powers and sum of a single matrix, whose elements are readily interpreted in terms of interaction between a given train and its neighbors. The computational implementation of the model by means of the Wolfram Mathematica software allows to interactively explore many aspects of a typical viscous flow, such as the concept of velocity profile through the flux and the role of various physical parameters, whose physical meaning can be highlighted by comparison with the parameters of the computational model.
 E. Behringer, L. Engelhardt, AAPT Recommendations for computational physics in the undergraduate physics curriculum, and the Partnership for Integrating Computation into Undergraduate Physics, Am J. Phys. 85 (2017) 325.
 W. Christian and B. Ambrose, An introduction to the theme double-issue, Am J. Phys. 76 (2008) 293.
 R. Chabay and B. Sherwood, Computational physics in the introductory calculus-based course, Am J. Phys. 76 (2008) 307.
 V. Dagdilelis, M. Satratzemi and G. Evangelides, Introducing Secondary Education Students to Algorithms and Programming, Educ. Inform. Technologies. 9 (2004) 159.
 P. Sapia, G. Bozzo and R. Guerriero, Integrated Use of Scratch and EJsS for Promoting Coding Skills of Prospective Primary Teachers. In L.-J. Thoms & R. Girwidz (Eds.), in: Selected Papers from the 20th International Conference on Multimedia in Physics Teaching and Learning, Mulhouse: European Physical Society, 2016.
 I. Irwansyah, S. Sukarmin and M. Harjana, Analysis Profile of Student Misconceptions on The Concept of Fluid Based Instrument Three-Tier Test, J. Phys. Conf. Ser. 1097 (2018) 012020.
 R. Blandford, K. Thorne, Modern Classical Physics, Princeton University Press, Princeton, 2017.