PatchNet: A Tool for Deep Patch Classification

Thong Hoang 1 , Julia Lawall 2 , Richard J. Oentaryo 4 , Yuan Tian 3 , David Lo 1 1 Singapore Management University/Singapore, 2 Sorbonne University/Inria/LIP6 3 Queen's University/Canada, 4 McLaren Applied Technologies/Singapore vdthoang.2016@smu.edu.sg, Julia.Lawall@lip6.fr, richard.oentaryo@mclaren.com, yuan.tian@cs.queensu.ca, davidlo@smu.edu.sg

Abstract-This work proposes PatchNet, an automated tool based on hierarchical deep learning for classifying patches by extracting features from commit messages and code changes. PatchNet contains a deep hierarchical structure that mirrors the hierarchical and sequential structure of a code change, differentiating it from the existing deep learning models on source code. PatchNet provides several options allowing users to select parameters for the training process. The tool has been validated in the context of automatic identification of stable-relevant patches in the Linux kernel and is potentially applicable to automate other software engineering tasks that can be formulated as patch classification problems. A video demonstrating PatchNet is available at https://goo.gl/CZjG6X. The PatchNet implementation is available at https://github.com/hvdthong/PatchNetTool.

I. INTRODUCTION AND RELATED WORK

Deep learning techniques have recently been used to automate some software engineering tasks such as code clone detection [START_REF] White | Deep learning code fragments for code clone detection[END_REF], software traceability link recovery [START_REF] Guo | Semantically enhanced software traceability using deep learning techniques[END_REF], and bug localization [START_REF] Lam | Bug localization with combination of deep learning and information retrieval[END_REF]. However, no existing work has investigated the problem of learning a semantic representation of code changes, i.e., patches, for classifying them into predefined classes. Patches are composed of a short text describing a change, the lines removed by the change, and the lines added by the change, and all these pieces need to be considered in a holistic way to produce a good semantic representation. Patch classification is an important problem since many automated software engineering tasks, such as just-in-time defect prediction [START_REF] Kamei | Studying just-in-time defect prediction using crossproject models[END_REF], tangled change prediction [START_REF] Kirinuki | Hey! are you committing tangled changes?[END_REF], code reviewer recommendation for a commit [START_REF] Rahman | Correct: code reviewer recommendation in github based on cross-project and technology experience[END_REF], etc. can be mapped to it.

Close to our work on patch classification is the prior work by Tian et al. [START_REF] Tian | Identifying Linux bug fixing patches[END_REF] that proposes an automated patch classification approach integrating LPU (Learning from Positive and Unlabeled Examples) [START_REF] Letouzey | Learning from positive and unlabeled examples[END_REF] and SVM (Support Vector Machine) to build a classification model. To apply LPU+SVM to patches, Tian et al. manually defined a set of features extracted from patches. However, this manual creation process may overlook features that are helpful to classify patches. The chosen features are also specific to a particular patch classification setting (i.e., bug fixing patch identification), and a new set of features is likely needed for other settings. In this work, we replace this manual feature engineering step by leveraging the power of deep learning. In particular, we construct a model that can extract a good semantic representation capturing a patch's hierarchical and structural properties.

This paper presents our tool PatchNet that performs learning on a set of patches. PatchNet performs deep patch classifica-tion in two phases. In the training phase, it takes as input a set of labeled patches to learn a deep learning model. This model is then used in the prediction phase on a set of unlabeled patches to produce scores that estimate how likely the given patches fit the class labels. Specifically, PatchNet aims to automatically learn two embedding vectors, representing a commit message and a set of code changes in a given patch, respectively. The two embedding vectors are then used to compute a prediction score from a given patch estimating how likely the patch is relevant to a particular class.

PatchNet is implemented as a command line tool. In the training phase, the user provides a file of labeled patches and the name of a folder in which to put the trained Patch-Net model. In the prediction phase, the command used to produce the prediction scores also takes two inputs: a file of unlabeled patches and the name of the folder containing the previously trained model. PatchNet also provides several supplementary options to allow users to select hyperparameters for the training process. PatchNet targets binary classification tasks, however, it can also be used for multi-label classification tasks by reducing the problem of multi-label classification to multiple binary classification problems [START_REF] Bishop | Pattern Recognition and Machine Learning (Information Science and Statistics)[END_REF]. PatchNet currently only supports patches on C code.

PatchNet has been applied to the task of stable patch identification in the Linux kernel. Specifically, the Linux kernel follows a two-tiered release model in which a mainline version accepts bug fixes and feature enhancements, and a series of stable versions accepts only bug fixes [START_REF] Lee | From a firm-based to a communitybased model of knowledge creation: The case of the Linux kernel development[END_REF]. While the mainline targets users who want to benefit from the latest features, the stable versions target users who value the stability of their kernel. The stable kernel development process requires that all patches be submitted to the mainline, and then propagated by maintainers from there to review for inclusion in stable kernels. The wide variation in rates at which patches are propagated by maintainers to stable kernels across the code base suggest that some bug-fixing patches may be being overlooked. There is thus the potential for an automated, learning-based approach to improve this process. Our evaluation on 82,403 recent Linux patches shows that PatchNet outperforms the state-of-the-art baseline (i.e., LPU+SVM), achieving precision of 0.839 and recall of 0.907. By releasing our tool, we hope to enable others to apply PatchNet to other patch classification tasks.

The rest of this paper is organized as follows. Section II provides a bird's-eye view of the PatchNet architecture. Section III describes how PatchNet preprocesses the patch data before initiating the learning process. Section IV illustrates how PatchNet can be used in various scenarios. Section V summarizes some experiments with PatchNet. Finally, we conclude in Section VI.

II. OVERALL DESIGN

Figure 1 shows the overall design of PatchNet. PatchNet accepts as input a set of patches, each of which contains both a commit message and a code change. The output of PatchNet associates each patch with a prediction score reflecting how likely the patch satisfies the criteria of the classification. Our framework includes three main modules: the commit message module, the code change module, and the classification module. The commit message module and the code change module transform the commit message and the code change into embedding vectors e m and e c , respectively. The two embedding vectors are then passed to the classification module, which computes the prediction score. In the rest of this section, we give an overview of each of these modules. Commit message module: The architecture of the commit message module is the same as the one proposed by Kim [START_REF] Kim | Convolutional neural networks for sentence classification[END_REF] for sentence classification. This module takes a commit message as input and outputs an embedding vector that represents the most salient features of the message. Specifically, we encode the commit message as a two-dimensional matrix by viewing the message as a sequence of vectors where each vector represents a word appearing in the message. We then apply a convolutional layer followed by a max-pooling operation to obtain the message's salient features. Code change module: Similar to a commit message, a code change can be viewed as a sequence of words. This view, however, overlooks the structure of code changes, as needed to distinguish between changes to different files, changes in different hunks (contiguous sequences of removed and added code), and different kinds of changes (removals or additions). To address this challenge, PatchNet contains a deep hierarchical structure that mirrors the hierarchical and sequential structure of patch code, making it distinctive from the existing deep learning models on source code [START_REF] Huo | Enhancing the unified features to locate buggy files by exploiting the sequential nature of source code[END_REF]. For the code changes in a given patch, PatchNet outputs an embedding vector that represents the most salient features of these changes.

The code change module contains a file module that automatically builds an embedding vector representing the code changes made to a given file in the patch. Figure 2 shows the architecture of the file module. This module takes as input two matrices (denoted by "-" and "+" in Figure 2) representing the removed code and added code for the affected file in a patch, respectively. These two matrices are passed to the removed code module and the added code module, respectively, to construct the corresponding embedding vectors by taking into account the structure of the removed or added code.

The input of the removed code module is a three dimensional matrix, indicating the removed code in the affected file of the given patch, denoted by B r ∈ R H×N ×L , where H, N , and L are the number of hunks, the number of removed code lines for each hunk, and the number of words of each removed code line in the affected file, respectively. This module constructs an embedding vector (denoted by e r ) representing the removed code in the affected file. The added code module also takes as input a three dimensional matrix, indicating the added code in the affected file of the given patch. It follows the same architecture as the removed code module to construct an embedding vector (denoted by e a ) representing the added code in the affected file. These changes in the added and removed code are padded or truncated to have the same number of hunks (H), number of lines for each hunk (N ), and number of words in each line (L) for parallelization. Moreover, both modules also share the same vocabulary.

The two embedding vectors are then concatenated to represent the code changes in each affected file, i.e., e f = e r ⊕ e a . The embedding vectors of the code changes at the file level are then concatenated into a single vector representing all the code changes made by the patch. Classification module: The classification module takes as input the commit message embedding vector (e m ) and the code change embedding vector (e c ) (see Figure 1). These two vectors are then concatenated to form a single vector representing the patch, i.e., e = e m ⊕ e c . The concatenated vector e is passed to a fully-connected layer and an output layer, which computes a probability score for the patch. If an additional source of information is available, PatchNet can be easily extended by concatenating an additional information vector (denoted by e i ), collected from the data, to the commit message embedding vector and the code change embedding vector (i.e., e = e m ⊕e c ⊕e i ) to form a new vector representing the given patch. Parameter learning: During the training process, PatchNet uses adaptive moment estimation (Adam) [START_REF] Kingma | Adam: A method for stochastic optimization[END_REF] to minimize the regularized loss function [START_REF] Haykin | Kalman filtering and neural networks[END_REF]. PatchNet learns the following parameters: the word embedding matrices for commit messages and code changes, the filter matrices and bias of the convolutional layers, and the weights and bias of the fully connected layer and the output layer.

III. DATA SELECTION AND PREPROCESSING

The user is responsible for selecting commits for training and annotating them according to the chosen classification scheme. For each commit, preprocessing is then applied to the commit message and the code changes. For the commit message, PatchNet applies standard natural language preprocessing techniques, such as stemming and stop word elimination. For the code changes, PatchNet detects the changed lines using diff, and then expands these changes to include the complete innermost enclosing simple statement, if any, or the header of a conditional or loop, if the change occurs in such code. Lines within the changes are annotated as errorchecking code (an if test that checks for failure of a previous operation), error-handling code (code that performs cleanup in case of failure of a previous operation) or normal (for everything else), reflecting one aspect of the semantics of the code. PatchNet keeps the names of called functions that are IV. USAGE In this section, we first describe the use of the preprocessor and then illustrate several usage scenarios for the training and classification process. Moreover, we describe a number of PatchNet's key hyperparameters used during the training process.

A. Preprocessing

The preprocessing step is time consuming for large datasets, and is thus separated from the rest of the training and classification process. The main input to the preprocessing step is a file containing a list of commit identifiers and their labels. The preprocessing step also needs to know the pathname of the git tree containing the commits and a prefix used to construct the names of the various output files. The output is a pair of files, containing the patch data and a dictionary for interpreting the patch data. Only the former needs to be provided to the subsequent training and classification process. A typical command line is: PatchNet has been developed and tested on the Linux platform. However, we believe that PatchNet can be employed

C. Scenario II -Tuning PatchNet's Hyperparameters

Table I highlights the key hyperparameters that control how PatchNet trains its model. The --data_type flag allows the user to choose what information to include from the patches (i.e., commit messages, code changes, or both). The user can also change other hyperparameters of the model such as the dimension of embedding vectors (i.e., "--embedding_dim"), number of filter sizes (i.e., "--filter_sizes"), number of filters (i.e.,"--num_filters"), etc. The following example illustrates how to execute PatchNet with custom settings: python PatchNet.py --train --data data.out --model patchnet --embedding_dim 128 --filter_sizes "1,2" --num_filters 64

V. STABLE PATCH IDENTIFICATION

We have applied PatchNet to the problem of identifying Linux kernel bug-fixing patches that should be backported to previous stable versions. Based on a set of 42,408 stable patches and 39,995 non-stable patches drawn from Linux kernel versions from v3.0 (July 2011) to v4.12 (July 2017), we trained and tested the PatchNet model using its default hyperparameters following 5-fold cross-validation. Considered patches are limited to 100 lines of changed code, following the Linux kernel stable patch guidelines. Non-stable patches in the dataset are chosen to have the same size properties (number of files and number of changes lines) as the stable ones.

Table II shows the performance (i.e., accuracy, precision, recall, and F1) on this problem of LPU+SVM [START_REF] Tian | Identifying Linux bug fixing patches[END_REF] VI. CONCLUSION In this work, we present PatchNet, a tool that learns a semantic representation of patches for classification purposes. PatchNet contains a deep hierarchical structure that mirrors the hierarchical and sequential structure of commit code, making it distinctive from the existing deep learning models on source code. We have demonstrated the tool's applicability in identifying stable patches in Linux kernel. We encourage future researchers to benefit from PatchNet by applying it to other tasks that can be mapped to a patch classification problem. PatchNet is open-source and can be run from the command line with simple options.

Fig. 1 .Fig. 2 .

 12 Fig.1. The overall design of PatchNet to classify stable vs. non-stable patches. A sample patch contains both a textual commit message (lines 5-12) and a set of code changes (lines 14-28) that are applied to an affected file. em and ec are embedding vectors collected by the commit message module and code change module, respectively. e is a single vector formed by concatenating these two embedding vectors.

  getinfo --commit_list commit_list_file --git /path/to/git -o training_data B. Scenario I -Simple Command PatchNet is implemented in Python 2.7 with Tensorflow 1.4.1, 1 scikit-learn 0.19.1, 2 and numpy1.14.3. 3 PatchNet performs deep patch classification in two phases: the training phase and the prediction phase. In the training phase, PatchNet takes the command-line arguments --train indicating the training phase, --data indicating the path of a list of labeled patches, and --model indicating the name of the output folder in which to put the model. A sample command that trains a model is as follows: python PatchNet.py --train --data training_data.out --model patchnet This command instructs PatchNet to train a model using the data training_data.out with the default hyperparameters. In the default setting, the dimension of the embedding vectors, the number of filters, and the number of hidden layers are set to 32, 32, and 10, respectively. The dropout for the training process, the regularization error, and the learning rate are set to 0.5, 1e-5, and 1e-4, respectively. PatchNet automatically creates a new folder with the name patchnet (or empties a folder with that name, if it exists) and saves a learned model, consisting of three files, in the folder. For parallelization, the number of changed files, the number of hunks for each file, the number of lines for each hunk, the number of words of each removed or added code are set to 5, 8, 10, and 120, respectively. In the prediction phase, PatchNet takes the commandline arguments --predict indicating the prediction phase, --data indicating the path of a list of unlabeled patches, and --model indicating the name of the folder containing the model. The following is a sample command to collect a list of prediction scores for a set of unlabeled patches: python PatchNet.py --predict --data test_data.out --model patchnet

  and three variants of PatchNet: PatchNet-C, PatchNet-M, and Patch-Net. PatchNet-C uses only code change information while PatchNet-M uses only commit message information. PatchNet uses both commit message and code change information. Accuracy, precision, recall, F1, and AUC for the stable patch identification problem drop by 15-20% if we ignore code

TABLE II CONTRIBUTION

 II OF COMMIT MESSAGES AND CODE CHANGES TO PATCHNET'S PERFORMANCE 17% if we ignore the commit message, showing the interest of a model that incorporates both kinds of information. Table II also shows that PatchNet outperforms the state-of-the-art baseline (i.e., LPU+SVM) for the task of stable patch identification.

		Accuracy	Precision Recall	F1	AUC
	LPU+SVM	0.731	0.751	0.716	0.733	0.731
	PatchNet-C	0.722	0.727	0.748	0.736	0.741
	PatchNet-M	0.737	0.732	0.778	0.759	0.753
	PatchNet	0.862	0.839	0.907	0.871	0.860
	changes and 14-

https://www.tensorflow.org/

http://scikit-learn.org/stable/

http://www.numpy.org/

Acknowledgement. This research was supported by the Singapore National Research Foundation (award number: NRF2016-NRF-ANR003) and the ANR ITrans project.


Alina Alwast
email: alina.alwast@uni-hamburg.de

Katrin Vorhölter
email: katrin.vorhoelter@uni-hamburg.de

Enhancing future teachers' situation-specific modelling competencies by using staged videos

Keywords: Mathematical modelling, teachers' situation-specific competencies, teachers' expertise, video vignettes, staged videos

Although discussed frequently, there is still a gap between theory conveyed at university and the teachers' practical work at school after finishing their degree, which can lead to the problem that new teachers do not act based on theoretical constructs although they know about them. The paper describes an innovative project, which aims at tackling this problem and fostering teachers' situation-specific competencies by helping future teachers making their knowledge applicable. Therefore, staged video vignettes are created to support future teachers episodical memory through repeated practice with videos, which simulate real classroom situations. This theoretically informed paper focuses on identifying criteria for staged video vignettes based on the concept of teacher's expertise in mathematical modelling, using those when creating video vignettes and implementing them in an innovative learning environment.

Introduction

In the last decade a great number of small-scale as well as a few large-scale studies in the field of mathematics education have focused on teachers' expertise (e.g., large-scale studies: TEDS-M, see Blömeke, Kaiser, & Lehmann, 2010; COACTIV, see Kunter, Baumert, & Blum, 2011). These studies focus on conceptualizing the teacher's knowledge and observe their performance in comparison. However, there exists a gap between knowledge and performance, which is addressed by [START_REF] Blömeke | Beyond dichotomies[END_REF] in their PID-model. Their conception of competence as a continuum consisting of dispositions (knowledge and an affective-motivational component), situation-specific competencies and performance suggest a greater relevance of situation-specific skills for the teaching profession. In an innovative project at the University of Hamburg these situation-specific skills are enhanced by the intensive use of videos during a master seminar for future teachers, which deals with the content of mathematical modelling. This paper will describe the development of criteria for staged video vignettes in a theoretically informed approach and the usage of the thereby developed video vignettes during a modelling seminar.

Teachers' professional competencies

As mentioned above this project especially pays attention to the situation-specific competencies as a mean to bridge the gap between theory and practice. A close connection of theory and practice according to the concept of practice transfer is aimed at through the analysis of video vignettes. [START_REF] Prenzel | Geheimnisvoller Transfer?[END_REF] defines transfer (based on studies by [START_REF] Messner | Wissen und Anwenden: Zur Problematik des Transfers im Unterricht; eine psychologisch-didaktische Analyse[END_REF][START_REF] Renkl | Träges Wissen: Wenn Erlerntes nicht genutzt wird[END_REF] as the implementation of a solution developed or knowledge acquired in situation A to another situation B. Effectively solving the problem in situation B means the transfer was successful. [START_REF] Nölle | Probleme der Form und des Erwerbs unterrichtsrelevanten pädagogischen Wissens[END_REF] suggests that professional competence can only be improved through broad knowledge as a basis but also through episodic experiences. Apparently, a categorical system of knowledge combined with episodical elements is required for the useful application of knowledge and favours a differentiated perception of teaching [START_REF] Nölle | Probleme der Form und des Erwerbs unterrichtsrelevanten pädagogischen Wissens[END_REF].

A model, which covers all aspects of teachers' expertise, namely knowledge as well as the skills needed to transfer knowledge into action (called situation-specific skills1 ) and the observable behaviour, was developed by [START_REF] Blömeke | Beyond dichotomies[END_REF]. The so-called PID-model (see Figure 1) combines the analytic view on teachers' competencies, which analyses teachers' dispositions in all its aspects (knowledge and affective-motivational components), with the holistic view, which focuses on the teacher's performance. The situation-specific skills serve as a link between dispositions and performance and can be distinguished in the professional perception of a teaching situation, the interpretation of the perceived situation and the decisions made, which are based on the interpretation. For this project, the PID-model is used as a theoretical basis. The PID-model describes general teaching competencies but can be applied to specific domains as well. However, in every domain certain knowledge and concepts are required. For teaching mathematical modelling specifically, there exists little research on what exactly is needed to foster students' modelling competencies. Mathematical modelling is a complex task for students, because it demands a lot of cognitive work. Thus, supporting students during their modelling process is also a major challenge [START_REF] Blum | Can Modelling Be Taught and Learnt? Some Answers from Empirical Research[END_REF].

Borromeo Ferri and Blum (2010) developed a model, in which they divided teacher's pedagogical content knowledge (PCK) regarding modelling in four dimensions:

(1) a theoretical dimension (incl. modelling cycles or aims and perspectives of modelling as background knowledge), (2) a task dimension (incl. multiple solutions or cognitive analyses of modelling tasks), (3) an instructional dimension (incl. interventions, support and feedback), and (4) a diagnostic dimension (incl. recognising students' difficulties and mistakes). (Blum, 2015, p. 89) [START_REF] Blum | Quality teaching of mathematical modelling: What do we know, what can we do[END_REF] also highlights that a transfer from knowledge into actions cannot be expected automatically. Supporting teachers in applying their knowledge, which is based on Borromeo Ferri and Blum's four dimensions, is therefore an important aim of this project. Furthermore, [START_REF] Blum | Quality teaching of mathematical modelling: What do we know, what can we do[END_REF] summarizes ten important characteristics for adequately teaching mathematical modelling based on the concepts of quality mathematics teaching. Besides the principles named above, he mentions an "effective and learner-oriented classroom management", providing a variety of examples and exercises for different real-world and mathematical contexts, encouraging multiple solutions, supporting students' positive beliefs and attitudes towards modelling and using digital tools as an aid.

Moreover, in a study evaluating the modelling seminar university students mention the importance of interventions and the wish to deepen their knowledge and practical skills in this area [START_REF] Vorhölter | Notwendige Kompetenzen zur Betreuung von Modellierungsaktivitäten aus Sicht von Studierenden -Evaluation und Weiterentwicklung eines Seminars zur Vermittlung modellierungsspezifischer Lehrerkompetenzen[END_REF]. As shown in various studies, a crucial tool in supporting students are strategic interventions, which are already mentioned in Borromeo Ferri and Blum's third dimension as PCK.

In his study with a focus on the procedural aspect [START_REF] Leiß | Lehrerinterventionen beim mathematischen Modellieren[END_REF] points out the importance of strategic interventions to support students' independent modelling process. [START_REF] Stender | Scaffolding in complex modelling situations[END_REF] discover similar findings adding that strategic interventions can only take place if the teacher is trained in this special field. This is based on the [START_REF] Zech | Grundkurs Mathematikdidaktik: Theoretische und praktische Anleitungen für das Lehren und Lernen von Mathematik[END_REF] Besides, enhancing students' metacognitive-strategies is essential as shown by various studies (for an overview see [START_REF] Stillman | Applying metacognitive knowledge and strategies in applications and modelling tasks at secondary school[END_REF]. Metacognitive strategies are needed to independently overcome problems during the modelling process and a lack of these will most probably lead to considerable problems [START_REF] Vorhölter | Theoretical and pedagogical considerations in promoting students' metacognitive modeling Competencies[END_REF]. Therefore, teachers need to promote cognitive but also metacognitive strategies.

For overcoming the gap between theory and practice, staged videos can be used during teacher education. According to [START_REF] Oser | Die Messung der Qualität von professionellen Kompetenzprofilen von Lehrpersonen mit Hilfe der Einschätzung von Filmvignetten. Chancen und Grenzen des advokatorischen Ansatzes[END_REF] videos are situation-specific, authentic, complex and context-bound, which makes them the closest tool to imitate real classroom situations. Thus, the substantive aspect of construct validity [START_REF] Messick | Validity of psychological assessment: Validation of inferences from persons' responses and performances as scientific inquiry into score meaning[END_REF], which is defined as measuring the cognitive processes of competence as close as possible to the theoretical construct, is met. In a meta-analysis of studies regarding the use of videos in teacher education [START_REF] Coles | Mathematics teachers learning with video: The role, for the didactician, of a heightened listening[END_REF] summarizes that positive effects can be found when "engaging in a process that makes evaluative discourse unlikely" (Coles, 2014, p. 271). Therefore, it is important to explicitly focus on details and their interpretation when watching video clips in contrast to judging the behaviour of students and teachers in the video.

Concept of the modelling seminar

The University of Hamburg offers a modelling seminar during the master's program -usually attended in the first semester-, which every future mathematics teacher gets the chance to attend.

The seminar is open for future teachers of primary and secondary school as well as special-needs school and about 30 students attend it every year. Supervising year 9 students during a two-day modelling project is part of the seminar, which aims at enabling future teachers to independently and adequately teach modelling at school in their future job.

The content of the seminar follows the model by Borromeo Ferri and [START_REF] Borromeo Ferri | Mathematical modelling in teacher education -Experiences from a modelling seminar[END_REF] and can therefore be divided into four aspects:

1. The theoretic dimension is implemented by reflecting and discussing articles regarding the following topics: modelling cycles, goals and perspectives of modelling, students' modelling competencies, beliefs and both heuristic and metacognitive strategies. With different methods knowledge about these topics is gained and practiced using worked examples by school students. 2. To acquire knowledge in the task dimension the university students have to solve complex modelling tasks themselves and discuss the appropriateness of different solutions including the three tasks they have to supervise during the modelling days. Furthermore, modelling tasks are analysed concerning their demands and difficulties. 3. The instructional dimension is discussed by planning the modelling days, e.g. preparing and reflecting the structure, the introductory phase and especially appropriate interventions, which support independent student work. 4. To address the diagnostic dimension, the university students analyse past students' posters presenting their work and identify difficulties and obstacles.

The seminar concludes with the modelling days at school, where the gained knowledge can be implemented and reflected on. Usually the future teachers work in a tandem to discuss each other's performance and reflect on the success of their interventions (for a detailed description of the modelling days and the role of the university students' see [START_REF] Stender | Scaffolding in complex modelling situations[END_REF]).

Besides providing declarative knowledge, not only relevant for teaching mathematical modelling but also for other domains in mathematics education, a major focus is the transfer from theory to practice. Due to the university's structure, the future teachers usually do not have hands-on experience with teaching when joining the seminar. Therefore, to support the application of knowledge, videos are used as an import tool to simulate real classroom situations, which will be further discussed in the next section. For a more detailed description of the modelling seminar, see [START_REF] Vorhölter | Notwendige Kompetenzen zur Betreuung von Modellierungsaktivitäten aus Sicht von Studierenden -Evaluation und Weiterentwicklung eines Seminars zur Vermittlung modellierungsspezifischer Lehrerkompetenzen[END_REF]. The transition between theory and praxis is an ongoing process including knowing theoretical constructs, implementing them and reflecting on experience to deepen those theoretical constructs. Group discussions during the seminar regarding university students' video analyses as well as self-reflections on the modelling days in the context of a final assessment also allow them to refer empirical knowledge back to theoretical constructs.

Developing criteria for staged videos

A previous evaluation of the modelling seminar shows that the theoretical knowledge was not perceived as relevant for the university students when teaching at school and could not be translated into practical and usable knowledge in a satisfactory manner [START_REF] Vorhölter | Notwendige Kompetenzen zur Betreuung von Modellierungsaktivitäten aus Sicht von Studierenden -Evaluation und Weiterentwicklung eines Seminars zur Vermittlung modellierungsspezifischer Lehrerkompetenzen[END_REF]. To help them make their knowledge applicable videos will be used as stimulation of the reality. As video recordings usually contain distracting background noises, show long stretches of irrelevant behaviour and sometimes do not catch the students' material or facial expressions, we aim at creating staged videos based on authentic situations found in the original recordings.

To create videos, which show typical situations during a modelling process relevant for future teachers on the one hand, but also limit the amount of irrelevant and time-consuming information on the other hand, a cyclic process characterized by various revisions took place. First, recorded lessons were used to identify relevant situations. These were developed during the project MEMO (Vorhölter, 2018a), which includes 2 fully recorded lessons of over 50 small groups of students each time, in which mathematical modelling takes place. Only a few of the original recordings could be used due to their length and the great number of distractors.

Therefore, a script was written based on teachers' required modelling competencies and students' typical mistakes regarding modelling. These aspects were identified based on the theoretical construct of teacher expertise in modelling. The script empathizes relevant aspects in order to make them noticeable without being in the context of the lesson in real-time. Important aspects were:

1. Each video shows a different phase of the modelling cycle, which can be expected to be recognized. Different phases generate different problems and are therefore crucial for a diagnosis. 2. Because modelling is a cognitive demanding task, it can lead to various difficulties and obstacles, which can be mathematical, group work related, concerning the modelling process in general and so forth. The video vignettes try to address a wide range of these problems. 3. To tackle these problems, sometimes the teacher has to intervene. Interventions are part of the video vignettes as well as the request for the viewer to describe his or her own intervention as if he or she were there to support the students during a difficult situation at the end of the video. 4. To overcome problems during the modelling process students not only use heuristic but also metacognitive strategies, which can especially be helpful. Different metacognitive strategies such as planning and regulation can be found in the videos. 5. Modelling problems are usually solved in a group. Therefore, heuristic and metacognitive strategies influence the group work process and each member of the group plays a different role during the process.

The script created, which considers these aspects, was revised by an expert group, which has already worked with staged videos. Another group of experts in mathematics education afterwards played the role of the students following the script, which was videotaped, and improvised in a second take to adapt the situation to a more reality-based setting. Changes in language as well as in behaviour instructions were made and added to the script. Furthermore, a second revision took place based on expert ratings, where the experts were either specialized in the field of mathematical modelling or in the creation and use of staged video vignettes. Finally, three short videos were made by filming year 9 students, who acted according to the script.

Implementing the developed videos

As described above the university students lacked the ability to implement their theoretical knowledge sufficiently during the modelling days. The project aims at providing an innovative learning environment, which offers the opportunity to practice the implementation of knowledge by using staged videos as well as five extracts of recorded lessons.

Important theoretical constructs are conveyed as described above but also exemplified through the staged video vignettes: The videos are used to practice noticing relevant aspects based on theoretical constructs discussed before in a short time. Furthermore, the following discussion and reflection in plenum can lead to a better understanding of the lesson shown and improve the perception and interpretation of the next video. Moreover, decision-making is required when evaluating the possible interventions at the end of the video. The repeated use of these videos with different content and various modelling-specific problems is sought to lead to a better application of knowledge. This will become clear during the last part of the course, where the future teachers supervise students at school during a two-day modelling project and can implement their knowledge and skills in their performance.

Looking ahead

Making knowledge applicable is an important aspect in teacher education. This innovative project, which uses videos during the described modelling seminar to foster future teachers' perception, interpretation and decision-making, is embedded in a study evaluating the development of teachers' situation-specific competencies and its underlying dispositions as well as the consequences with a mixed methods study design.

Hence, video vignettes serve a dual purpose: Staged videos as well as recorded video clips are used during the modelling seminar to enhance situation-specific competencies. Furthermore, staged videos are used in a pre-post-test design to analyse the development of situated competencies. The Pre-and Post-test also includes a questionnaire, which assesses through closed and open questions knowledge facets based on the model by Borromeo Ferri and [START_REF] Borromeo Ferri | Mathematical modelling in teacher education -Experiences from a modelling seminar[END_REF]. Therefore, the effect of knowledge on the situated competencies and the development of both aspects can be examined.

During the modelling days a few selected university students are filmed while supervising the students. Thus, their performance can be observed and all aspects of the PID-model can be analysed and possible connections identified.

In the long term, all three staged videos can sustainably be used in the modelling seminar without further effort or may serve as a means for assessment of the university students' development and performance.

Figure 1 :

 1 Figure 1: Competence as a continuum (Blömeke, Gustafsson, Shavelson, 2015, p. 7)

  taxonomy of assistance, which categorizes interventions from minimal help such as motivational interventions to content-related interventions.

The ability to notice and interpret remarkable situations in the classroom is also known as professional vision (cf. among others[START_REF] Goodwin | Professional vision[END_REF] or[START_REF] Seidel | Modeling and measuring the structure of professional vision in preservice teachers[END_REF]) or as noticing (cf.Van Es & Sherin (2002)).


Arsène Chemin

Victor Levy

Dit Vehel

Aude Caussarieu

Nicolas Plihon

published or not. The documents may come

Heat transfer and evaporative cooling in the function of pot-in-pot coolers

The physics of pot-in-pot coolers Arsène Chemin, [START_REF] Breslyn | Clay pot refrigerators[END_REF] Victor Levy Dit Vehel, [START_REF] Breslyn | Clay pot refrigerators[END_REF] Aude Caussarieu, [START_REF] Breslyn | Clay pot refrigerators[END_REF] Nicolas Plihon, [START_REF] Breslyn | Clay pot refrigerators[END_REF] and Nicolas Taberlet 1, a) Univ Lyon, Ens de Lyon, Univ Claude Bernard, CNRS, Laboratoire de Physique, Département de Physique, F-69342 Lyon, France (Dated: 14 February 2017)

A pot-in-pot cooler is an affordable electricity-free refrigerator which uses the latent heat of vaporization of water to maintain a low temperature inside an inner compartment. In this article we experimentally investigate the influence of the main physical parameters in model pot-in-pot coolers. The effect of the wind on the evaporation rate of the cooling fluid is studied in model experiments while the influence of the fluid properties (thermal conductivity, specific heat and latent heat) is elucidated using a variety of cooling fluids (water, ethanol and ether). A model based on a simplified heat conduction equation is proposed and is shown to be in good quantitative agreement with the experimental measurements.

I. INTRODUCTION

A pot-in-pot cooler, clay-pot cooler, or zeer, is a simple and cheap electricity-free evaporative cooling device. It consists in a porous outer pot, in which a smaller waterproof inner pot (often glazed clay) containing the foodstuff is fitted. The spacing between the pots is filled with sand and water which slowly percolates to the outer surface of the pot and evaporates (see Fig. 1). Since the vaporization of water is an endothermic process the energy required is taken from the system, causing the temperature in the inner pot to drop by typically 5 • C to 20 • C. [START_REF] Breslyn | Clay pot refrigerators[END_REF][START_REF] Anyanwu | Design and measured performance of a porous evaporative cooler for preservation of fruits and vegetables[END_REF] The use of pot-in-pot coolers can be tracked to 2500 BC in Egypt and as early as 3000 BC in Indus Valley civilizations [START_REF] Dales | Excavations at Mohenjo Daro, Pakistan[END_REF] but interest in such affordable and simple devices has recently been renewed. [START_REF]Ancient technology preserves food[END_REF][START_REF]Food cooling system[END_REF] Similar devices can be found in different cultures: a botijo is a traditional element of the Spanish culture and consists in a single porous clay pot, usually filled with water. It relies on the same principle although the stored fluid itself acts as the refrigerant. [START_REF] Zubizarreta | An ancient method for cooling water explained by mass and heat transfer[END_REF] Pot-in-pot coolers are still widely used and their design and optimization is the focus of a vast technical engineering literature (see [START_REF] Harish | Thermal analysis of clay pot in pot refrigerator[END_REF][START_REF] Naik | Forced flow evaporative cooling of a volumetrically heated porous layer[END_REF][START_REF] Date | Heat and mass transfer analysis of a clay-pot refrigerator[END_REF][START_REF] Damle | Heat and mass transfer in a clay-pot refrigerator: Analysis revisited[END_REF][START_REF] Pandey | Heat and mass transfer analysis of a pot-in-pot refrigerator using reynolds flow model[END_REF][START_REF] Basediya | Evaporative cooling system for storage of fruits and vegetables-a review[END_REF] and references therein).

The goal of this paper is to propose simple hands-on experiments to explore the physics behind the pot-in-pot cooler. In a single project-based laboratory work, students could practice modelling and grasp fundamental concepts in thermodynamics which are often adressed in separate experiments. Namely, the proposed setup is a great introduction to heat conduction [START_REF] Díaz-Guilera | On heat conduction in one-dimensional solids[END_REF][START_REF] Karls | Modeling heat flow in a thermos[END_REF][START_REF] Sullivan | An experiment on the dynamics of thermal diffusion[END_REF] , to the concept of latent heat [START_REF] Arvin | Latent heat of vaporization experiment[END_REF][START_REF] Salinger | Measurement of the heat of vaporization of a liquid[END_REF] , supercooling [START_REF] Tan | A study of the occurrence of supercooling of water[END_REF] and can demonstrate that water can be frozen into ice through evaporation. [START_REF] Kruglak | Freezing water by evaporation[END_REF][START_REF] Miller | Freezing water by evaporationa remarkable situation[END_REF] The article is organized as follows. Section II is dedicated to the modeling of the simplified systems. The influence of the wind speed and of the nature of the liquids used are studied and a simplified governing equation is proposed. In section III experimental results on the cooling of various versions of clay-pot coolers are presented, a) Electronic mail: nicolas.taberlet@ens-lyon.fr and the agreement with the theoretical predictions are discussed.

II. MODELING

In this paragraph, simplifying hypotheses are presented, the influence of the key parameters (size, nature of the evaporating fluid, wind) is discussed and a simplified governing equation is proposed.

A. From real pot-in-pot coolers to experimental models Let us first discuss important parameters controlling the cooling efficiency of a real pot-in-pot cooler, as displayed in Fig. 1 and in Fig. 2a. As explained in the introduction, the matter within the pot -referred to as "cooled matter" in the remaining of the text -is cooled through the evaporation of a liquid stored between the inner and outer pots -referred to as "evaporating liquid" in the remaining of the text. The size of the cooler is the first important parameter: increasing the surface increases the cooling energy provided to the pot but the associated increase in total volume, and therefore total heat capacity, might counterbalance the benefits. As it is customary in heat conduction problems, the total heat capacity scales as the volume while the thermal losses scales as the surface area of the system. [START_REF] Rowat | The kitchen as a physics classroom[END_REF][START_REF] Olszewski | From baking a cake to solving the diffusion equation[END_REF] Moreover, in a pot-in-pot cooler, the cooling power also scales as the surface and while it initially exceeds the losses, they eventually balances out to reach an equilibrium. Therefore, at the first order, the equilibrium temperature should be independent of the size (provided that the outer pot is kept wet), whereas the cooling dynamics should be faster for smaller systems. The thickness of the pots and of the sand-layer lying in between is also an important geometric parameter. Increasing this thickness increases the thermal resistance to heat conduction, the effect of which remains unclear. Indeed, a greater resistance will help maintaining the pot cool, but it will simultaneously limit the cooling provided by the evaporation. Again, the optimal size will depend strongly on the exact conditions of use (and more specifically on the water resources available).

The role of the sand is to help prevent the inner pot from floating and to evenly distribute the water on the whole height of the pot through capillarity. In most actual pot-in-pot coolers, the inner pot is glazed to prevent any water leakage inside the cooling compartment. However, as explained in the introduction, a simpler cooling device can be used: a botijo simply consists in a unique porous clay pot in which the stored and cooled liquid also acts as the evaporating liquid (see Fig. 2b). This kind of cooler is usually used to cool water (or sometimes wine) although some of the liquid is lost. In order to simplify the system and focus on the main physical parameters, most of the experiments reported in this article were conducted in long cylindrical containers (test tubes or graduated cylinders) as displayed in the rightmost panel of Fig. 2. The cooled matter was re-stricted to liquids (water or ethanol) for simplicity. The height is noticeably greater than the diameter and as a crude approximation, the system may be considered two-dimensional. Note that the temperature gradient is mostly radial (the containers were capped) and as a consequence little convection within the fluid is expected. Our model pot-in-pot cylinder is wrapped in a thin paper towel, initially soaked in an evaporating liquid.

B. Nature of the evaporating liquid

As explained above, the origin of the cooling lies in the latent heat of evaporation of the outer liquid. During evaporation at the surface of the porous outer pot, the corresponding energy is taken both from the pot itself and the surrounding environment.

The optimization of the pot-in-pot cooler thus requires a combination of high latent heat of evaporation L v (of the evaporating liquid) as well as a high evaporation rate, ṁe . Table I reports the physical properties of the three liquids used (water, ethanol and ether). The exact computation of the evaporation rate is a rather complex task [START_REF] Branca | A physical model to help explain evaporation[END_REF] , beyond the scope of the current paper, but at the first order, it follows:

24 ∂m e ∂t ∝ P eq (1 -H), (1)
where P eq the equilibrium vapor pressure of the evaporating liquid and H its corresponding humidity (ratio of partial pressure to P eq ). While the latent heat of water exceeds that of ethanol (by a factor 2) and ether (by a factor 6), the huge discrepancy in their equilibrium vapor pressure (that of ether being 25 times that of water) shows that ether is a much more efficient cooling fluid.

C. Influence of air flow on the evaporation rate

A simple and efficient way to reduce the local partial pressure at the surface of the pot is to increase air advection, i.e. to increase the wind. Experiments were conducted using a Petri dish (of diameter 8 cm and height 1 cm) filled with water, surrounded by air at 75 % humidity and at temperature T = 23 o C. Air is blown from the side of the cylinder, using a fan. Fig. 3 (a) reports the evolution of the evaporation rate (measured from the mass evolution of a the water) as a function of the wind speed measured using an anemometer. The effect of wind is crucial: the evaporation rate is multiplied by a factor ten between a situation without wind (when the partial pressure at the surface decreases mostly through molecular diffusion [START_REF] Abraham | A simple method for measurement of the diffusion of vapors[END_REF] ) and a wind speed of 5 ± 0.5 m.s -1 when advection dominates. The smallest air flow that the fan could produce (1.5 ± 0.2 m.s -1 ) already causes a large increase in the evaporation rate (by a factor 5). The wind speed therefore appears to critically affect the evaporation dynamics and actual pot-in-pot coolers are better used in a windy environment.

D. Governing equation

Let us first consider the heat diffusion in a long solid cylinder, of diameter a, height h, thermal conductivity λ, density ρ and specific heat c, initially at temperature T i , quenched to the ambient temperature T 0 . The heat diffusion equation in cylindrical coordinates can be analytically solved and a simple long-term evolution of the temperature at the center of the cylinder is given in terms of series of Bessel functions of the first kind [START_REF] Ozisik | Heat conduction[END_REF] . Letting j 0 2.405 be the first zero of the J 0 Bessel function, the dominant term reads:

T -T 0 = (T i -T 0 ) e -t/τ , where τ = a 2j 0 2 ρc λ (2)
Note that the temperature relaxation time may be conveniently expressed as τ = 1/RC, where C = π(a/2) 2 hρc is the total heat capacity and R = 1/(j 2 0 πλh) is an effective thermal resistance. The system can therefore be seen as a simple capacitor charging (or discharging) through a resistor.

In order to validate this approach, experimental measurements were conducted using a solid PVC cylinder (30 mm in diameter and 200 mm in height) initially heated at 52 • an then placed in a flow of cold (T 0 = 20 • ) air blowing at 3 ± 0.3 m.s -1 . Obviously no convection occurs in the solid and conduction is the prevalent mode of heat transfer. A small hole was drilled along the axis of the cylinder and the temperature was recorded at its center using a thermo-couple. Fig. 4 shows the time evolution of the temperature difference T -T 0 . After a transient (typically 100s), the dynamics of cooling is very well fitted by an exponential law (see red lines and insets).

Although the temperature within a solid cylinder (or in the water inside a pot-in-pot cooler) is clearly not uniform, its average value is directly linked to that at its center. Therefore, we propose to model the pot-in-pot cooler as a system of uniform temperature T and heat capacity C, cooled at a rate given by ṁe L v , where ṁe is the evaporation rate of the evaporating liquid and L v its latent heat of vaporization. Energy is lost to the ambient environment at temperature T 0 through an effective thermal resistance R. The dynamics is then governed by:

C dT dt = L v ṁe - 1 R (T -T 0 ) (3)
Note that in general ṁe does not remain constant throughout an experiment, unless the evaporating liquid is continuously supplied to the system. The predicting power of this simplified equation is discussed throughout section III.

III. COOLING EXPERIMENTS A. A real botijo

The first experiment was conducted in a single actual clay-pot, modeling a botijo (see Fig. 2b). In this setup the cooled liquid (water) therefore also acts as the evaporating liquid. The clay-pot has a 3 L volume, a height h = 20 cm, an upper diameter of 15 cm, while its walls are 5 mm thick and its mass is 1554 g. The pot is filled with 2 L of water. The total heat capacity of the system (C p = 9900 J/K) is simply computed as the sum of that of the water and of the clay. During all the measurements, a fan was used to create a constant wind (10 ± 2 m.s -1 ).

The humidity was measured using a hygrometer and remained between 72 and 74 % during the whole experiment. The mass is recorded using a weight scale (see Fig. 5(a)) and the inner temperature is measured using a thermocouple placed at the center of the pot (Fig. 5(b)) while the ambient temperature T 0 remains constant (21 • ) during the experiments. In this experiment with a constant ventilation acting on the pot, and a virtually infinite amount of evaporating liquid, the overall mass decreases linearly, indicating a constant evaporation rate, ṁe = -41 ± 5 g.h -1 given by the linear fit shown in Fig. 5(a).

The temperature of the water gradually decreases from 21 • C to 15.3 • C over the course of four hours and then stabilizes. This corresponds to an equilibrium between the negative energy gain due to the evaporating water and the positive conductive heat flow from the warmer ambient air through the pot.

The solid red line on Fig. 5(b) represents the theoretical prediction of the evolution of the temperature calculated from Eq. 3 considering a constant evaporation rate:

T = T eq + (T 0 -T eq ) e -t/RC T eq = T 0 + RL v ṁe (4)
The value of the effective thermal resistance can be computed from the equilibrium temperature T eq and the previously fitted evaporation rate ṁe as:

1 R f it = L v ṁe T 0 -T eq = 4.7 ± 0.5 W.K -1 . ( 5
)
The agreement between the theory and the experimental measurement is very satisfactory. Indeed, with no further fitting parameter, the characteristic decay time is well predicted. The agreement is all the more satisfactory that roughly 15% of the water has evaporated over the duration of the experiment, changing the total heat capacity.

Note that the fitted value of the effective thermal resistance can be compared to that of a long water cylinder

The values are of the same order of magnitude but differ significantly. Indeed, the clay pot used is far from a 2D system and the surface area of the bottom and the top of the container should be taken into account: the measured resistance is thus considerably less than that of a corresponding infinite cylinder.

B. Model pot-in-pot cooler

A model pot-in-pot cooler, with a limited amount of evaporating liquid, consisting in a plastic test tube, is studied in this section.

Experimental details

The test tube has a diameter of 30 mm, a height of 90 mm, while the walls are 1 mm-thick, and it is filled with 50 mL of distilled water. The contribution of the container itself is therefore neglected in the total heat capacity of the system and in the effective thermal resistance. The test tube is wrapped in a paper towel, initially soaked with m e0 = 5 g of ethanol, acting as the evaporating liquid. The model pot-in-pot is placed vertically in a constant air flow of 3.2 ± 0.3 m.s -1 created by a fan, and as discussed above, the partial pressure of ethanol in the environment remains negligible throughout the experiment. The time evolution of ethanol mass is recorded by a weight scale and is plotted in Fig. 6(a).

Evaporation rate

Contrary to the previous experiment where the amount of evaporating liquid was virtually unlimited, the evaporation rate of ethanol, ṁe is not constant but decays exponentially (solid red line in Fig. 6(a)).

A rudimentary first-order explanation of the exponential decay of the evaporation rate can be given. If, as a crude assumption, it is assumed that the ethanol percolates to the bottom so that the wet surface of the paper towel is proportional to the amount of remaining ethanol, then (assuming a constant evaporation rate per unit of wet surface) the amount of ethanol decreases exponentially (and so does the evaporation rate). Thus the time evolution of the mass of ethanol is given by an exponential law:

m e (t) = m e0 e -t/τ ṁ , (7)
where the characteristic time, τ ṁ, depends on the speed of wind, on the nature of the evaporating liquid used, and on the dimensions of the test tube. For the experimental results reported in Fig. 6, τ ṁ ∼ 250 ± 10 s. Note that the mass decay reported in Fig. 6(a) is compatible with an exponential decay only over the first 500 s of the experiment. Discrepancies at later time are due to condensation of water vapor contained in the surrounding air onto the ethanol-wet paper towel. However, the discrepancy is small and occurs only after the evaporation rate is already negligible.

Temperature evolution Fig. 6(b) represents the time evolution of the temperature measured using a thermocouple at the center of the test tube (black squares). Initially, due to the high evaporation rate, the temperature drops rapidly. As the temperature decreases, the heat loss to the ambient air increases while the cooling power decreases, which leads to a minimum temperature (which does not coincide with the arrest of the evaporation). Over longer times (t > 800 s) the evaporation rate can be considered null and the system simply warms up in the surrounding air. The temperature therefore exponentially relaxes to the ambient temperature, as can be seen on the inset in Fig. 6(b). Not only does this confirm the exponential relaxation but it also allows one to precisely measure the characteristic relaxation time τ RC .

Prediction

To summarize, the evaporation rate of ethanol ṁe (t) is known, the total heat capacity C is computed from the amount of water used, and the characteristic time τ RC linked to the effective thermal resistance is fitted on the final relaxation of the temperature. Eq. 3 can therefore be solved and yields:

T (t) = T 0 - L v m 0 C τ RC τ RC -τ ṁ e -t/τ ṁ -e -t/τ RC (8)
This empirical/analytical solution is shown as a red line in Fig. 6(b) and shows a good overall agreement with the experimental data. Let us emphasize again that the value of the thermal resistance was computed during the final relaxation regime in which all the ethanol has evaporated. The initial cooling regime is decently fitted while the minimum temperature (and the time at which it is reached) is very well predicted. Again, one can conclude that a complex system such as a pot-in-pot cooler is accurately governed by the simplified governing Eq. 3.

C. Continuous cooling

In this paragraph, a small quantity of water (9 mL) placed in a thin plastic test tube (5 mm in diameter and 50 mm in height) and wrapped in a wet paper towel, is cooled by evaporating ether. Ether is constantly added to the system (using a pipette) as it evaporates on the paper towel. The test tube is submitted to a strong wind using a compressed air gun (10 ± 2 m/s) in order to further increase the evaporation rate and the experiments were conducted in a fume hood. However, the wind also has counterproductive consequences since a portion of the ether, 1 -φ (estimated below) is blown away before being able to play its role as evaporating liquid. In this experiment, ṁe is directly measured from the volume released by the pipette. A further limitation is that the ether is added at room temperature, which constitutes a source of energy and tends to warm up the water stored in the tube. Finally, it should be mentioned that in such a small test tube, the effect of the temperature probe itself might not be neglected. Not only can it significantly contribute to the total heat capacity, but also acts as a radiator, conducting heat from the ambient air. The thermocouple consisted in a thin cable (the metal part has a diameter of 0.5 mm, 1.7 mm with the plastic insulator) but it was clear that the temperature in its direct vicinity was higher than in the rest of the fluid since it was there that the water froze last.

Experimental details

Experimental results

Fig. 7 shows the time evolution of the water temperature. Initially the temperature drops quickly at the rate of 1 degree every 3 s , and within two minutes, it becomes negative indicating that the water is in a supercooled state. When the temperature reaches -7 • C the water abruptly starts to freeze into ice. It takes roughly 1000 s for the entire water to turn into ice, after which the cooling resumes.

As explained above, only a (large) fraction φ of the ether is used as a cooling fluid This fraction can be computed by fitting the first regime in which liquid water cools down to -7 • C, which yields φ 78 ± 5%, meaning that 22 ± 5% of the ether is lost.

Interestingly, one can predict the duration of the freezing plateau, ∆t, knowing the latent heat of vaporization of ether L v , the mass of water, m w , and its latent heat of solidification, L s , and taking into account the temperature of the supercooled water, T f = -7 • C:

φ ṁe L v ∆t = m W L s + CT f , (9)
which yields: ∆t = 780 ± 100s. Again, the predicted duration coincides well with the experimental data since the duration of the freezing plateau is 1100 -240 = 860 ± 100s.

Discussion

Finally, we need to mention that the final regime in which the ice cools down is not very well predicted by the governing equation. According to our simplified model, there should be a clear kink in the temperature and a sharper initial decrease. Indeed, the heat capacity of ice is typically half that of liquid water while its thermal conductivity is 3 to 4 times higher. The characteristic cooling time of ice should therefore be much shorter (6 to 8 times) than that of liquid water, which is in clear contradiction with the experimental data. The origin of this discrepancy can be attributed to the formation of frost (condensed from the humidity of the ambient air) on the paper towel, drastically reducing the effectiveness of the evaporative cooling.

IV. CONCLUSION

This paper shows that the complex balance between evaporation cooling and conduction heating of a system in an asymmetric air flow can actually be very well approximated by an elementary model, involving very few parameters. Provided the evaporating liquid does not contribute significantly to the heat capacity of the system, we can model the whole system as a solid object in a environment at constant temperature, with the cooling simply derived from its small mass loss. This model was verified with a very basic experimental setup, further showing the robustness of the model. The same setup can explore past the limitations of the model as well, in the case of a phase transition for instance, as shown in the last section.

FIG. 1 .

 1 FIG.1. Sketch of a pot-in-pot cooler. The water in the sand filling the gap between the two pots percolates through the porous outer clay pot and evaporates, cooling the entire system. Foodstuff can be safely stored inside the refrigerated inner compartment (often a glazed clay pot).

FIG. 2 .

 2 FIG. 2. Sketches of a) a real pot-in-pot cooler, b) a botijo and c) a model pot-in-pot cooler (a test tube).

FIG. 3 .

 3 FIG.3. Evaporation rate of water in a Petri dish (50 cm 2 ) at 75% of humidity. The surface of the water is planar and the flow is plotted in terms of the surface wind speed.

FIG. 4 .

 4 FIG. 4. Temperature evolution of a cooled PVC cylinder. Initially the cylinder is homogeneously heated at 52 • C then placed in a 20 • C air flow. After a transient, the temperature evolution can be described by an exponential law (see solid red line). The inset show the same data on a semi-log scale.

Fit

  FIG. 5. (a) Time evolution of the the mass of the evaporating liquid (water). The solid red line is a linear fit, corresponding to a constant evaporation rate ṁe = -41 g.h -1 . (b) Temperature evolution of the water measured at the center of the clay pot. The solid red line is the prediction of Eq. 4

  FIG. 6. (a) Time evolution of the the mass of evaporating liquid (ethanol) and exponential fit (solid red lines). The inset shows the data on a semi-log scale. (b) Temperature evolution of the water (at the center of the test tube) and model (solid red line). The inset shows the data on a semilog scale and the red line indicates an exponential fit of the final regime.

FIG. 7 .

 7 FIG. 7. (a) Temperature evolution of 9 mL of water in a narrow tube wrapped in a paper towel, continuously soaked with ether (added at room temperature). The water rapidly cools down into a supercooled state before it freezes (at t = 240 ± 5s). The cooling resumes once the liquid water has entirely turned to ice (at t = 1100 ± 100s). The solid red line corresponds to the solution of the governing Eq. 3.

ACKNOWLEDGMENTS

The authors acknowledge support from the PALSE program of the University of Lyon Saint-Etienne, the University Lyon Claude Bernard, the École Normale Supérieure de Lyon and its Physics Department and Laboratoire de Physique. We are thankful to A. Bourges, A. Guittonneau, C. Gouiller, C. Malciu, J. Sautel, B. Guiselin and E. Jaupart for fruitful discussions.


Hydraulic logic gates: building a digital water computer Nicolas Taberlet, 1, a) Quentin Marsal, 1 Jérémy Ferrand, 1 and Nicolas Plihon 1 Univ Lyon, Ens de Lyon, Univ Claude Bernard, CNRS, Laboratoire de Physique, Département de Physique, F-69342 Lyon, France (Dated: 13 December 2019)

In this article, we propose an easy-to-build hydraulic machine which serves as a digital binary computer. We first explain how an elementary adder can be built from test tubes and pipes (a cup filled with water representing a 1, and empty cup a 0). Using a siphon and a slow drain, the proposed setup combines AND and XOR logical gates in a single device which can add two binary digits. We then show how these elementary units can be combined to construct a full 4-bit adder. The sequencing of the computation is discussed and a water clock can be incorporated so that the machine can run without any exterior intervention.

I. INTRODUCTION

Physics has been the cornerstone of all major technical advances throughout the history of computing 1 , with fundamental concepts emerging from solid and fluid mechanics, electronics and solid-state physics, as well as quantum physics in recent years. In mechanics, pin-wheel computers include Pascal's calculator 2 (designed as early as 1642, the Pascaline was the first calculator to be patented), the arithmometer (the first mass-marketed commercial calculator, about 5500 units were produced and sold world-wide) 3 , Babbage's programmable analytical engine (designed in 1834 and considered to be the ancestor of modern computers 4 ) or the famous cypher enigma machine, most notably used by Nazi Germany during WWII 5 . In fluid mechanics, processing and computing devices include the Tesla valve 6,7 , pressure-actuated valves acting as analog transistors, non-linear amplifiers relying on deflecting a weaker jet striking a stronger jet of fluid 8 , digital pneumatic logic gates [START_REF] Rhee | Microfluidic pneumatic logic circuits and digital pneumatic microprocessors for integrated microfluidic systems[END_REF][START_REF] Dewhirst | Passive Pneumatic Half-adder with No Moving Parts[END_REF] , as well as the MONIAC (a water-based analog computer designed to model economy). [START_REF] Bissell | Historical perspectives-the moniac a hydromechanical analog computer of the 1950s[END_REF][START_REF] Colander | The moniac, modeling, and macroeconomics[END_REF] It is important to note that computing using advanced fluidics systems was deeply studied and implemented in operational systems until the 1970's 13? , before fluidics could not compete against electronics. In electronics, vacuum tubes 14 remained fundamental components for electronics throughout the first half of the XX th century 15 until the invention of semiconductors and the discovery of the transistor effect (which was honored with the Nobel Prize in Physics in 1956) [START_REF] Weste | Cmos vlsi design[END_REF] . Another leap came with the invention of the integrated circuit (patented in 1959) for which Kilby won the 2000 Nobel Prize in Physics [START_REF] Weste | Cmos vlsi design[END_REF] . Finally, the concept of quantum computation has attracted much interest in the past two decades [START_REF] Bennett | Quantum information and computation[END_REF][START_REF] Mermin | From cbits to qbits: Teaching computer scientists quantum mechanics[END_REF][START_REF] Candela | Undergraduate computational physics projects on quantum computing[END_REF] . While promising recent technical developments in this field brought the concept closer to reality [START_REF] Dicarlo | Demonstration of two-qubit algorithms with a superconducting quantum processor[END_REF][START_REF] Somaschi | Near-optimal single-photon sources in the solid state[END_REF] , building a fully-functioning large-scale quantum computer still remains a challenge. 22 a) Electronic mail: nicolas.taberlet@ens-lyon.fr One of the most fundamental tasks any computer has to perform is arithmetic operations. Adding binary numbers (a and b) is nothing more than the routine children are taught in elementary school. For example, 1101 + 1001 (i.e. 13+9) is computed as follows (starting from the right-most digit):

• 1 and 1 is zero and 1 is carried • 0 and 1 is zero, which makes 1 with the carry • 1 and 0 is one, • 1 and 1 is zero and 1 is carried • resulting in 10110 (=22).

In this paper we present an easy-to-built hydraulic digital adding machine with relies on simple physical principles proposed by Gitton [START_REF] Gitton | [END_REF] . We first explain (section II) how using a siphon, a slow drain and a overflowing gauge one is able to construct AND and XOR logic gates in one single device. In section III we explain how these processing units can be arranged so as to form a full binary adding machine, while section IV describes the experimental 4-bit water computer that we have built.

II. ADDING TWO DIGITS

Logical operations

Adding the first digit of each number (a 0 and b 0 ) yields the first digit of their sum (d 0 ) and the first carry (c 0 ). The carry is 1 if and only if a 0 = b 0 = 1 while the first digit of the sum is 1 if and only if either a 0 or b 0 is 1 (not both) (see Table I). In terms of logical operations this can be summarized as:

c 0 = a 0 AND b 0 d 0 = a 0 XOR c 0 ( 1
)
a0 0 0 1 1 b0 0 1 0 1 c0 0 0 0 1 d0 0 1 1 0 TABLE I. Carry, c0
, and digit, d0, of the sum of a0 and b0.

In logical operations: c0 = a0 AND b0 while d0 = a0 XOR b0.

Hydraulic AND and XOR gates

The addition of the first two digits therefore only requires an AND and XOR gate. The hydraulic device shown in Fig. 1 combines both gates in one single apparatus. It consists in a central container into which the content of two smaller cups (representing a 0 and b 0 ) is simultaneously poured. The cups can be either completely empty (representing a 0) or completely full (representing a 1) and their volume is half that of the central container. A small hole is drilled at the bottom of the main container (bottom right in Fig. 1) so that its content can slowly drain out. On the other side (bottom left in Fig. 1), a large hole is connected to a siphon, whose height is greater than half of that of the main container.

If one and only one of the top cups is full, the water poured into the central container gradually winds up in the bottom-right cup. On the other hand, if both top cups are full, the siphon is almost instantly primed and the content of the main container quickly empties out into the bottom left cup, whose overflow tube ensures that the results remains binary. Overflow is a generic feature of fluidics devices in which vents were widely implemented [START_REF] Belsterling | Fluidic systems design[END_REF] . Note that even when the siphon is primed and the water is quickly evacuated, a small amount still leaks through the slow drain. The diameters of the drain and siphon must be chosen so that the flow rate through the siphon is far greater.

Therefore, the bottom cups give the results of the logical operation AND (for the left cup) and XOR (for the right cup). The smaller cups (top and bottom) act as memory units while the larger central container incorporates the logic gates.

It is important to note that the gates presented here are basic digital components which do not rely on basic analog hydraulic components. This is a fundamental difference with electronic digital circuits, designed as the association of several analog circuits, namely transistors [START_REF] Horowitz | The art of electronics[END_REF] .

Technical details

The central container is a 50 mL plastic test tube, 27 mm in diameter. The smaller cups (memory units) are made of the same test tube cut in half (25 mL). The hole through which water slowly drains out is pierced using an incandescent needle which gives a diameter of typically 500 µm (±20%). The siphon and the overflow tube are built using plastic straws (5mm in diameter). Straws are very convenient as they are made to be bent without buckling or pinching. In this device it took approximatively 2 min for the content of one cup (25mL) to slowly drain through the XOR gate whereas it takes less than 5 s for the content of two cups (50mL) to quickly evacuate through the AND gate (the primed siphon).

In order to guide the water gradually leaking through the XOR gate, a straw (see Fig. 3) is glued around the small hole. A release valve, consisting in a 5 mm rubber stopper, is placed at the bottom of each memory unit for further processing.

Note that capillary effects may cause a number of problems: some liquid can stay trapped in the straws while the flow through the small drain can be hindered. This can be overcome by reducing the surface tension of the liquid. Soap must be avoided since it creates bubbles or foam but adding a small amount of ethanol to the water is enough to considerably help.

III. FULL-ADDER

Adding the n th digits The device sketched in Fig. 1 allows one to add two 1-bit numbers and yields a 2-bit number and is known as a half-adder. [START_REF] Page | A practical introduction to computer architecture[END_REF] As explained above, it can be used to compute the sum of the first digits (a 0 and b 0 ). However, when adding any n th digits (a n and b n ), the carry (c n-1 ) originating from all previous calculations must be taken into account. A full-adder is therefore an operation with three inputs and two outputs :

(a n , b n , c n-1 ) → (c n , d n ).
As illustrated in the introductory addition of 1101 (13) and 1001 (9), a full-adder must first add the n th digits together, their XOR result then needing to be added to the n -1 th carry. That second operation gives the n th digit of the sum (d n ). The AND results of both computations give the n th carry. Note that not possible for both AND gates to yield 1 and no further precaution (such as an additional OR gate) needs to be taken. The combination of two half-adders is known as a full-adder and a sketch of a device built with our hydraulic gates is shown in Fig. 2.

Clock rate

When using a full-adder, great care must be given to the timing of the operations. The first half-adder (container 1 in Fig. 2) can perform its computation as soon as the device is started (t=0) but the second computation (container 2 in Fig. 2) must wait for all previous operations to have been performed. As explained above, the output of a AND gate in our device is given in less than 5 s while that of the XOR gate is given in T = 2 min. Therefore, one must ensure that enough time is given for all halfadditions to be over before further processing. Therefore, the second operation of the n th full adder must be performed at time t = nT . Our water computer can only boast a disheartening clock rate of the order of 0.01Hz, far less than the typical 10 10 Hz of modern microchips. [START_REF] Rodwell | High-speed integrated circuit technology: towards 100 GHz logic[END_REF] For the sake of simplicity, the version of the full adder presented here does not include a fully integrated hydraulic clock and relies on the successive manual opening of valves. However, it is in principle possible to build a dedicated clock which uses hydraulically controlled valves and whose sequencing is governed by the associated timing diagrams of the computer [START_REF] Belsterling | Fluidic systems design[END_REF] .

FIG. 2. Sketch of a full-adder allowing one to add two digits (an and bn) while taking into account the carry (cn-1) resulting from the earlier stages of computation. The full-adder yields the n th digit of the sum (dn) as well a the n th carry (cn). The computation must be sequenced so as to ensure that the second computation of the stage (2) is triggered only after all previous operations have terminated.

IV. 4-BIT HYDRAULIC DIGITAL COMPUTER

A full 4-bit adder Figure 3 shows a 4-bit adding machine built by assembling 7 half-adders. As explained in section II, the memory units (the smaller cups) are emptied out into the processing units (the central containers) through 5-mm holes at their bottom when rubber stoppers are removed. The red straws channel the results of the XOR gates into the memory units while the AND gates (the siphons) are made of green straws. For clarity, the water is died blue. The initial state is shown on Fig. 3a: a = 1101 (= 13) and b = 1001 (= 9). After 8 minutes, the computation is complete and the result can be read in the bottom memory units (Fig. 3b). As expected the sum is indeed d = 10110 (= 22).

Subtraction

The digital hydraulic adder presented above can also be used to perform subtractions (13-9 for instance) using a method known as the two's complement [START_REF] Null | The essentials of computer organization and architecture[END_REF] , that allows one to use signed binary numbers. The two's complement defines negative 9 as -9 = NOT(9)+1, to which 13 can be added. Table II presents the operation. The result must not be interpreted as a 5-digit number since obviously the difference between two 4-digit numbers is less than 15. Instead, the 5 th is only an indication of the sign. In the example shown in Table II, the result, 1 0100, must be read as +4.

The NOT operation can be performed using the hydraulic half-adder presented in section II since for each 9 1 0 0 1 NOT (9) 0 1 1 0 NOT(9)+1 0 1 1 1 +13 1 1 0 1 -9+13 1 0 1 0 0 TABLE II. Computation of 13-9 using the two's complement method in which -9 is given by NOT(9)+1. Since the difference cannot exceed 2 4 -1 = 15, the 5 th digit must be ignored, and the result is 0100=4, as expected.

digit NOT(a n )=a n XOR 1. One simply needs to collect the result of the XOR gate (the slow drain), the b cup being always filled, while the result of the AND gate is irrelevant. The 4-bit adder presented in section IV can then first be used to add 1 to -9, and then used again to add 13 to the result.

V. CONCLUSION

In this paper, the principle of a digital binary adder was described and the use of the AND and XOR logic gates was explained. We proposed a simple arithmetic unit relying on hydraulic principles which combines both AND and XOR gates in a single device, easily built with plastic test tubes and straws. Arranging 7 of these elementary processing units, a functioning hydraulic 4-bit digital adder was constructed. The proposed design can be improved in several ways.

A water-based clocked can be built to automatically trigger the computation every two minutes. Weights attached to the two rubber stoppers above the processing unit, through initially loose strings, can be placed on a balance beam with a leaking cup of water acting as a counterweight. After the desired duration, the balance beam tips over, causing the weight to fall and to pull the stoppers out, thereby releasing the water, i.e. triggering the computation. Such a simple independent clock allows the machine to run free of any human intervention during the computing process (which viewers may perceive as a deception).

Moreover, it is well known that during the adding process information is lost (in mathematical terms, addition is not bijective). Obviously, for instance adding 13 and 9 yields the same results as adding 8 and 14. However, in our 4-bit adding machine, a trick might be used to identify the original numbers (a and b) from the result (d).

If each initial digit is assigned a specific color, then analyzing the hue of the final digits in the sum could allow one to deduce the value of the two initial numbers.

FIG. 1 .

 1 FIG. 1. Hydraulic digital arithmetic unit: the content of one (and only one) cup (i.e. 1+0) slowly leaks out of the central container through the XOR gate while the content of two cups (1+1) primes the siphon and is rapidly evacuated through the AND gate. The smaller cups have a volume of 25 mL while that of the central container is 50 mL, and the height of the siphon is 2/3 of the total height.

FIG. 3 .

 3 FIG. 3. Pictures of our 4-bit hydraulic digital adder made of 7 processing units. The initial state shows the two numbers to be added (a = 1101) and (b = 1001) and the result can be read in the final state (d = 10110) after 8 minutes of computation.

M. Wolf, The Physics of Computing. Elsevier,

2 D. Adamson, Blaise Pascal: mathematician, physicist and thinker about God. Springer, 1994. 3 E. D. Reilly, Milestones in computer science and information technology. Greenwood Publishing Group, 2003. 4 B. V. Bowden, "Faster than thought: a symposium on digital computing machines," 1953. 5 W. Kozaczuk, Enigma: how the German machine cipher was broken, and how it was read by the Allies in World War Two. Foreign intelligence book series, University Publications of America, 1984. 6 P. Tabeling, Introduction to microfluidics. Oxford University Press on Demand, 2005.

ACKNOWLEDGMENTS

The authors acknowledge support from the University Lyon Claude Bernard, the Société Française de Physique and from the École Normale Supérieure de Lyon and its Physics Department and Laboratoire de Physique.