{"id":775,"date":"2020-04-22T23:21:45","date_gmt":"2020-04-22T23:21:45","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/spectrometer\/?p=775"},"modified":"2020-04-23T14:40:47","modified_gmt":"2020-04-23T14:40:47","slug":"david-roundys-ph366-computational-physics-lab-models-covid-19","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/spectrometer\/2020\/04\/22\/david-roundys-ph366-computational-physics-lab-models-covid-19\/","title":{"rendered":"David Roundy\u2019s PH366 Computational Physics Lab models epidemic like COVID-19"},"content":{"rendered":"\n<p>When the novel coronavirus pandemic hit, the Physics Department, like the rest of Oregon State University, scrambled to get its course offerings ready for remote learning in a few days.&nbsp; Professor David Roundy and his teaching team scrambled as hard as anyone \u2013 and incorporated some beginning epidemic modeling into the computational physics class so that the students would begin to acquire the skills that will serve them well as members of the technological community of which they are now junior members.<\/p>\n\n\n\n<p><em>About the class:<\/em><\/p>\n\n\n\n<p>PH366 \u2013 Computational Physics \u2013 is a course in which students learn how to solve mathematical equations in real-world, complex situations where analytical, \u201cpencil-and-paper\u201d solutions are far too difficult.&nbsp; For example, it\u2019s easy for a student in Introductory Physics to solve a simple differential equation to find a solution in the form of an equation that describes how a ball falls towards the earth under the influence of gravity, a constant force near the earth\u2019s surface.&nbsp; But add extra forces that describe real conditions like air resistance, wind and the earth\u2019s rotation, and a simple equation to describe position as a function of time is impossible.&nbsp; The computer solves the problem numerically, chopping it up into very small time slices and finding a position and velocity for each of the times based on what is was at the previous time. In the PH36x Computational Physics series, students learn techniques to find numerical solutions to many differential equations and they can explore very complex, real-world situations. Roundy has chosen the Python programming language for this class, but the lessons are applicable to any language. In real physics research, few problems are already worked out in a textbook and numerical methods to solve them improve all the time, so the best information is often distributed all over the internet. Physics students must learn to navigate the body of existing literature and identify what information they need to solve a problem.<\/p>\n\n\n\n<p>Another view of the solution shows the difference between displaying results on a linear plot and a logarithmic plot. The logarithmic plot (below) highlights the infection and recovery numbers, which are a small fraction of the overall population and we\u2019d be tempted to ignore the fact that there are hundreds of thousands of sick people if we saw only the linear plot (above).<\/p>\n\n\n\n<p>An example that David Roundy chose for the Spring 2020 Computational Physics course was about the spread of an epidemic, like covid-19.&nbsp; It was all everyone was talking about, and he wanted the students to learn how their new computational skills are at the heart of epidemiological modeling that gives us the information to understand and mitigate the spread of the coronavirus.&nbsp; This isn\u2019t an accurate model, Roundy stresses, but it has valuable elements \u2013 start with a simple model, probably unrealistic, test it, make sure it works as expected.&nbsp; Add some complexity, test that, and then proceed. In his easy-to-read description at the <a href=\"http:\/\/sites.science.oregonstate.edu\/~roundyd\/COURSES\/ph366\/index.html\">PH366 course website<\/a>, Roundy shows students how to model exponential growth \u2013 the increase in number of covid-19 cases is proportional to the number of cases: <em>d<\/em>I\/<em>dt<\/em> = <em>RI<\/em>. Then you have to add in the real-world fact that the population is finite (with a doubling time of 1 day, the world human population would be infected in a little over a month). Some people recover and have immunity (we hope), so that must be factored into a more realistic model.&nbsp; More complexity comes in when you consider how long infected people are contagious, and whether there is a period of immunity following recovery. <\/p>\n\n\n\n<p> Actually, the problem is not too hard to set up \u2013 it\u2019s the solution that becomes tedious.&nbsp; That\u2019s the beauty of computers is that they don\u2019t care about tedium.&nbsp; They swiftly toil through tedious calculations without becoming bored or tired and their error rate is effectively zero!&nbsp; The humans have to set up the problem correctly, though, otherwise the results are meaningless.&nbsp; And this is the skill that Roundy teaches his students. The screenshots below show an example of the students\u2019 work in PH366, with the by-now-familiar plot of an exponential rise in infections at the start, with a peak and fall.&nbsp; We see the basic recovery and death trends, too.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"169\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2-300x169.png\" alt=\"\" class=\"wp-image-779\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2-300x169.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2-1024x576.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2-768x432.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2-1536x864.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image2.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption>Screenshot of a student&#8217;s model of infections, recoveries and deaths due to an infectious disease<\/figcaption><\/figure>\n\n\n\n<p>Another view of the solution shows the difference between displaying results on a linear plot and a logarithmic plot. The logarithmic plot (below) highlights the infection and recovery numbers, which are a small fraction of the overall population and we\u2019d be tempted to ignore the fact that there are hundreds of thousands of sick people if we saw only the linear plot (above).<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"169\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1-300x169.png\" alt=\"\" class=\"wp-image-776\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1-300x169.png 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1-1024x576.png 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1-768x432.png 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1-1536x864.png 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/image1.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption>Linear and log plots emphasize different details<\/figcaption><\/figure>\n\n\n\n<p>Julian Wulf, one of the Physics majors currently in PH 366 commented, \u201cMy favorite part of the class is how it allowed me to model physical situations that were too complex to picture, or model by hand. I have found it quite rewarding to finish coding something and have it modeled in front of me, a model that is often easy to adjust to new circumstances.\u201d It\u2019s easy to see how Julian would relish the challenge of modeling a much more complicated solution that factored in even more complexity such as social contact and real transmission rates.&nbsp;<\/p>\n\n\n\n<p><em>Teaching in the age of coronavirus:<\/em><\/p>\n\n\n\n<p>To deliver PH366, David Roundy goes into Weniger Hall by himself every Tuesday and Thursday and turns on some 20 computers with separate Zoom sessions running (see the panorama view below).&nbsp; The 40 students and the 4 TAs (teaching assistants) log in from their remote locations. The students implement Roundy\u2019s \u201cpair programming\u201d strategy where they decide how to solve the problem and code in pairs, each providing the crucial check on the other to ensure that the steps make sense.&nbsp; They constantly question their results, and look up techniques to improve their code and to interpret the results. It\u2019s a real-world programmer situation!&nbsp; Roundy and the teaching assistants hop between the Zoom breakout rooms to discuss with each pair of students how to troubleshoot and debug their code.&nbsp; It wasn\u2019t easy for the instructors to change their mode of operation from in-person to remote learning. TA Elena Wennstrom comments, \u201cAt the beginning, our TA meetings were devoted to brainstorming possible class formats, testing the limits of our Zoom powers, and discussing issues and possible improvements to the class we had the day before. Now we are more able to focus on the content, and trying out the assignments ourselves (like usual). I&#8217;m really proud of the system we&#8217;ve developed. Classes go surprisingly smoothly,&nbsp;and the time flies.\u201d&nbsp; Wennstrom adds that she gets more and better questions from the students in the remote mode.&nbsp; Roundy remarks that he will offer this new mode of teaching to students with seasonal influenza in \u201cnormal\u201d times to help curb the spread of that particular virus.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-1024x175.jpg\" alt=\"\" class=\"wp-image-777\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-1024x175.jpg 1024w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-300x51.jpg 300w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-768x131.jpg 768w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-1536x263.jpg 1536w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/PANO_20200409_135358.vr_-2048x351.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>A panoramic view of the computers in the PH366 classroom in Weniger Hall<\/figcaption><\/figure>\n\n\n\n<p><em>The students\u2019 response:<\/em><\/p>\n\n\n\n<p>The students agree. Julian Wulf says, \u201cI think the transition to remote learning has mostly gone smoothly. There has been a rapid increase in how well things are being communicated remotely, as well as an increasing ability of the teaching assistants and professor to respond to difficulties we encounter while programming. I find myself looking forward to the continued improvement as each class has run more smoothly than the last, with the teaching assistants and Professor Roundy being increasingly able to react to difficulties people encounter by jumping in and out of Zoom breakout rooms to help.\u201d<\/p>\n\n\n\n<p>As \u201cnewbie programmer\u201d, Wulf feels that the pair programming method helped him get over an initial fear of programming, and that he has learned to appreciate how quickly he learns to solve new problems. He found the disease and epidemic modeling project interesting, intellectually stimulating and fun.<\/p>\n\n\n\n<p>Wulf says that the coding skills he is developing will be useful in the future, and that they have already entirely changed his perspective.&nbsp; He now routinely plots equations in Mathematica to visualize a physical situation, and his new skills make the task \u201cpain-free\u201d and fun rather than being as a dreaded chore.<\/p>\n\n\n\n<p>Former Physics major John Waczak, now a graduate student in Physics at the University of Texas at Dallas, offers similar observations about the Computational Physics series. He says that Computational Physics is an incredibly powerful tool for building physics understanding and to tackle problems that are otherwise unsolvable. It also enables him to create detailed visualizations of just about anything, and those visualizations don&#8217;t have to be static! Computers makes it possible to manipulate 2-, 3-, and even 4-dimensional data and create animations. \u201cI have been using this skill a lot lately to visualize results in my [graduate] classes,\u201d he says. Waczak further appreciates that PH36x made him an autodidact.&nbsp;\u201cDr. Roundy encouraged us to become familiar with the documentation and common programming forums like Stack Exchange. Instead of giving us working code to start with, we had to learn how to diagnose bugs and navigate the wide variety of (often incorrect) answers that exist online.\u201d This meant that he became better programmer (and physicist). \u201cI certainly do not know all of the tools and features that exist in the python programming language. What I do understand is how to evaluate the credibility of a resource and how to extract what&#8217;s important from the large body of existing information.\u201d&nbsp;<\/p>\n\n\n\n<p>Prof. Roundy\u2019s PH366 covid-19 assignment is available at <a href=\"http:\/\/sites.science.oregonstate.edu\/~roundyd\/COURSES\/ph366\/epidemic.html\">http:\/\/sites.science.oregonstate.edu\/~roundyd\/COURSES\/ph366\/epidemic.html<\/a> <br>The TAs for the class are Elena Wennstron, Kira McCoy, Alex Kuepper and Steven Neiman.<\/p>\n\n\n\n<p><a href=\"http:\/\/sites.science.oregonstate.edu\/~roundyd\/\">David Roundy<\/a> is an Associate Professor of Physics at Oregon State University, and has been teaching and researching at OSU since 2006.&nbsp; His work in computational physics spans exotic superconductors, metal-organic frameworks, classical and quantum density functional theory, biological motor proteins and many other topics. He invented the Darcs version control software.&nbsp; He is a member of the Paradigms in Physics team with significant funding from the National Science Foundation for education-related research focusing on thermal physics and computational physics.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium is-style-rounded\"><img loading=\"lazy\" decoding=\"async\" width=\"233\" height=\"300\" src=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/external-content.duckduckgo.com_-233x300.jpg\" alt=\"\" class=\"wp-image-780\" srcset=\"https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/external-content.duckduckgo.com_-233x300.jpg 233w, https:\/\/osu-wams-blogs-uploads.s3.amazonaws.com\/blogs.dir\/2237\/files\/2020\/04\/external-content.duckduckgo.com_.jpg 758w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When the novel coronavirus pandemic hit, the Physics Department, like the rest of Oregon State University, scrambled to get its course offerings ready for remote learning in a few days.&nbsp; Professor David Roundy and his teaching team scrambled as hard as anyone \u2013 and incorporated some beginning epidemic modeling into the computational physics class so&hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/spectrometer\/2020\/04\/22\/david-roundys-ph366-computational-physics-lab-models-covid-19\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6814,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1138650,2368,173126,186942],"tags":[],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-covid-19","category-faculty","category-teaching-and-learning","category-undergraduates"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/users\/6814"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":4,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":784,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/posts\/775\/revisions\/784"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/spectrometer\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}