## How can I integrate computation into my physics classes and curriculum?

As educators, we should give our students the opportunity to engage with computation throughout the physics curriculum both to better support our students to enter an increasingly data-rich and model-driven world, and to better represent the discipline of physics in light of where it is - with many of the most recent noteworthy discoveries in physics (Aad et al. 2012; Chatrchyan et al. 2012; Abbott et al. 2017) involving extensive use of computation. Nationally, more physics faculty are integrating computation into their courses (Caballero and Merner 2018) in a variety of ways from small to big: incorporating a few computational activities into existing courses, creating a “Computational Physics” course, or more methodically integrating computation throughout the four years of an undergraduate degree. It is ok to start small and make gradual changes! In this recommendation we will (a) discuss how to make a plan, (b) link to resources and to examples of successful approaches from a variety of instructors at a variety of institutions, and (c) talk about other issues to consider as you integrate computation.

### What kinds of computation skills might I want to teach my students?

Computational skills encompass three different types of skills:

**computational physics skills**(e.g., translating models into code, choosing scales and units, choosing appropriate algorithms and tools, extracting physical insight, understanding the limitations of computers and computer models),**the use of a variety of computational tools**(e.g., spreadsheets, structured programming languages, computer-based symbolic manipulations, modeling packages), and**technical computing skills**(e.g., analysis, visualization, and presentation of data).

For any course you are teaching, think about the course goals and how they relate to computation. For example, a goal for a physics course may be for students to model physical systems and understand the limitations of those models. To see more examples of goals for computations skills, see the AAPT Recommendations for Computational Physics in the Undergraduate Physics Curriculum (Behringer et al. 2016) which lists learning outcomes, curricular issues, and challenges.

### Where can I find resources and materials for teaching computational skills?

The PICUP collection of peer-reviewed Exercise Sets as well as contributions to the Faculty Commons contain many computational activities with implementations in a variety of programming languages that can be adapted to your course; materials can be filtered by course level or by subject. Also consider joining the PICUP Community on Slack - an inclusive and supportive community where faculty can ask each other questions about pedagogy, get help resolving technical issues, and ask for advice in using computing in your physics classes.

Three good places to start for ideas for how think more broadly about integrating computation throughout the undergraduate physics curriculum and examples of successful approaches are

- the AAPT Recommendations for Computational Physics in the Undergraduate Physics Curriculum (Behringer et al. 2016) which lists learning outcomes, curricular issues, and challenges;
- the EP3 Guide’s chapter on Computational Skills which has information on benefits, effective practices, and programmatic assessments; and
- the 2021 PICUP Virtual Capstone Conference Report which discusses the current state of computation in the physics classroom, themes that emerged from the conference such as how to create an effective computational learning environment for students, how to support faculty looking to integrate computation, and considerations for integrating computation across the curriculum, and includes an appendix with a literature review of resources for adopters.

### How can my department integrate computation into the broader physics curriculum?

We should remember that the reason we are integrating computing into our physics courses is for our students to learn physics well. In each of our classes, we need to support students with all forms for prior experience with physics and attitudes towards physics or computing. We must work to design instruction that is active as well as inclusive and to promote positive attitudes towards computing in physics. Providing responsive and supportive feedback to students as they develop their knowledge and skill of computing is key.

The uses of computing in physics are many and varied, and we should support all attempts to make our course instruction in physics more relevant and practiced. There are many ways to start integrating computing in your course, but it is critical to take an intentional and steady approach. Collect data around your goals. Talk with your students. What is working? What is not? Reflect on your data. Share your reflections with friends and colleagues, and with the PICUP community.

For departments, it is, again, important to support all attempts to integrate computing in physics. As we’ve found, the time, energy, and expense of doing this work is real (Dancy and Henderson 2008; Wieman 2017; Leary, Irving, and Caballero 2018). Chairs and deans can support their faculty and students through mini grants, teaching and learning projects, teaching releases, sabbatical projects, and so on. Again, collect data. Talk with students and instructors. And encourage open and respectful discussion of the goals and progress.

Computational skills can be included in an existing physics course, or you can develop a whole course on computational physics. Integrating these skills into a single existing course is an easy way to start. Developing a whole intro course is a good way to set you up for integrating these skills throughout the curriculum.

### How do I include computation in an existing physics course?

Think about the course goals and how they relate to computation. For example, a goal for a physics course may be for students to model physical systems and understand the limitations of those models. Doing this computationally at the introductory level could include building a spreadsheet or using GlowScript to model projectile motion with air resistance and then investigating how the model works for different projectile speeds and sizes. At the upper-level students could model heat flow through a rod, the efficiency of a water turbine, rainbows, gravitational waves from binary orbits, or other interesting phenomena

### How do I design a whole course on computational physics?

One important question will be where this course fits into your broader physics curriculum: at the introductory level, or at the upper level? This question will impact both the details of what happens inside of the course, and how the course connects with the other courses in the curriculum.

For example, there are advantages to having students take this course during the same semester that they take introductory E&M. With introductory mechanics as a course prerequisite, there are plenty of computational activities from which to choose, and there are many opportunities to foreshadow more advanced topics by giving your students a little peek, or taste, of what is to come.

If you develop a computational course that is offered at the introductory level, consider the next steps that can be taken to help benefit the entire curriculum:

- Make this course a graduation requirement for the physics major — and perhaps also for engineering majors if you have them. This doesn’t need to happen immediately, but whenever the opportunity arises, add this requirement!
- Add this course as a prerequisite for your upper-level physics courses. This doesn’t mean that faculty are required to integrate computation into their upper-level courses, but it will make it easier for them to do so if they so desire.
- Once the computational course has been added as a prerequisite, talk to your colleagues who are teaching the upper-level courses, show them what the students already know how to do, and help them to think about ways that computation could be added to their courses…which might start out as just making some plots of the traditional physics content.
- Hopefully computation will eventually find its way throughout your curriculum, and when that happens, update the catalog descriptions for the upper-level physics courses to state that computation is an important part of the course. This will make it more likely for this integration of computation to persist into the future when different faculty teach the courses.

#### Designing an introductory computation physics course

In an introductory computational physics course, students need to learn certain basic programming skills, which include: using some programming platform (e.g., Python, Matlab, etc.), writing lines of code to use the computer as a calculator (using variables), writing code to use the computer as a spreadsheet (storing numbers in arrays), creating plots, and looping to iteratively update the values of variables. In the process of learning these basic skills, students will also begin to learn about the process of debugging, and hopefully by the end of the course they will become proficient at debugging!

Once the students have been introduced to these basic skills, they can apply these skills to many interesting mechanics problems. With a basic knowledge of 1D free-body diagrams, they can use their computational skills to analyze the stresses within a space elevator. They can simulate and analyze dynamics problems that have a time dependent force, including air resistance, which can be applied to skydiving from the upper atmosphere or launching a V2 rocket. Two dimensional problems can be analyzed, such as traveling to Mars, 2-body orbits, and even binary systems of extremely massive objects that lead to an in-spiral orbit with the emission of gravitational waves.

Other typical topics include basic data science (file input and output, fitting data, and using libraries such as pandas), an introduction to Monte Carlo methods, solving systems of equations (basic linear algebra, often using libraries such as scipy and/or sympy), and basic Fourier analysis (for a full list of computational skills, see Behringer et al. 2016). If time permits, students could also be introduced to more advanced topics such as Machine Learning and Molecular Dynamics.

Popular books for an introductory-level computational physics course include Newman 2012 and Kinder and Nelson 2021. Open source alternatives are also available: Linge and Langtangen 2020 provides a free, open access introduction to scientific computing, and Langtangen 2016 provides a more comprehensive reference.

#### Designing an upper-level computational physics course

For an upper-level computational physics course, there are many great textbooks available, and the physics content that can be simulated is vast! To get a sense of the types of problems that you can consider, Gould, Tobochnik, and Christian 2007 and Landau, Paez, and Bordeianu 2011 are both freely available from ComPADRE and both cover a lot of physics content. An upper-level computational physics course is a lot of fun to teach, and can help to prepare students for graduate study and future employment. But it is unlikely that it will provide as much of an opportunity to prepare students to use computation in their other undergraduate courses, as compared with an introductory-level computational course.

### How do I integrate computation in an equitable and inclusive way?

All of this work will have little impact if we do not support all learners, instructors, and staff to do this work. In order to create a diverse, equitable, and inclusive physics curriculum, we should reflect on our instruction and practice in critical ways when integrating computing. Who is getting supported? Who is not? Do you need to establish pathways to support anyone who requires accommodations? While inclusive teaching and learning in physics is an active area of research, there are already resources for instructional designs that support all students including some linked from the Effective Practices for Physics Program site.

### How do I decide on appropriate programming platforms?

Thinking about the course goals, as well as what resources you and your students have access to, will help you decide on an appropriate programming platform. For introductory courses, this often means spreadsheets, GlowScript/vPython, simulations, and video analysis software. At the introductory level, computational activities are often integrated into the laboratory or problem-solving sessions given the longer time period and smaller class size. For upper-level courses common programming language choices are Python, MATLAB, and Mathematica, with computational activities given as homework or longer projects. The PICUP Resources page contains a selection of recorded workshops for faculty demonstrating different programming platforms and showing examples of how to engage students with them, as well as examples of how faculty at different kinds of institutions integrate computation into their courses.

### References

- G. Aad et al., Observation of a new particle in the search for the Standard Model Higgs boson with the ATLAS detector at the LHC, Phys. Lett B
**716**(1), 1-29 (2012). - B. P. Abbott et al., GW170817: Observation of Gravitational Waves from a Binary Neutron Star Inspiral, Phys. Rev. Lett.
**119**, 161101 (2017). - E. Behringer, J. Burciaga, D. Dietz, A. Gavrin, J. Kozminski, and V. Migenes, AAPT Recommendations for Computational Physics in the Undergraduate Physics Curriculum (American Association of Physics Teachers, 2016).
- M. D. Caballero and L. Merner, Prevalence and nature of computational instruction in undergraduate physics programs across the United States, Phys. Rev. Phys. Educ. Res.
**14**(2) 020129 (2018). - S. Chatrchyan et al., Observation of a new boson at a mass of 125 GeV with the CMS experiment at the LHC, Phys. Lett. B
**716**(1), 30-61(2012). - M.H. Dancy and C. Henderson, Barriers and Promises in STEM Reform (2008).
- H. Gould, J. Tobochnik, and W. Christian, An Introduction to Computer Simulation Methods Third Edition (revised), 3rd ed. (2007).
- J.M. Kinder and P. Nelson, A Student's Guide to Python for Physical Modeling: Second Edition (Princeton University Press, 2021).
- R. Landau, M. Paez, and C. Bordeianu, A Survey of Computational Physics: Python Multimodal eBook (2011).
- H.P. Langtangen, A Primer on Scientific Programming with Python (Springer Berlin, Heidelberg, 2016).
- A. Leary, P. Irving, and M. Caballero, The difficulties associated with integrating computation into undergraduate physics., presented at the Physics Education Research Conference 2018, Washington, DC, 2018.
- S. Linge and H.P. Langtangen, Programming for Computations - Python (Springer Open, 2020).
- M. Newman, Computational Physics (CreateSpace Independent Publishing Platform, 2012).
- C. Wieman, Improving How Universities Teach Science: Lessons from the Science Education Initiative (Harvard University Press, 2017).