Open Source Physics Curriculum Material for Teaching Upper Level Physics Wolfgang Christian Jan Tobochnik, and Harvey Gould Teaching Computational Physics.

Slides:



Advertisements
Similar presentations
Chapter 3 Application Software p. 6.
Advertisements

MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Scott Johnson, John Rossman, Charles Harnden, Rob Schweitzer, Scott Schlef Department of Physics, Bridgewater State College // Bridgewater MA, Mentor:
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Boyce/DiPrima 10th ed, Ch 10.5: Separation of Variables; Heat Conduction in a Rod Elementary Differential Equations and Boundary Value Problems, 10th.
EQNet Travel Well Criteria.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Software Development. Chapter 3 – Your first Windows 8 app.
Android 4: Creating Contents Kirk Scott 1. Outline 4.1 Planning Contents 4.2 GIMP and Free Sound Recorder 4.3 Using FlashCardMaker to Create an XML File.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Chapter 13 Programming Languages and Program Development 1.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Copyright © Allyn & Bacon 2008 POWER PRACTICE Chapter 6 Academic Software START This multimedia product and its contents are protected under copyright.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Developing Simulations and Demonstrations Using Microsoft Visual C++ Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation.
A First Program Using C#
WIKI IN EDUCATION Giti Javidi. W HAT IS WIKI ? A Wiki can be thought of as a combination of a Web site and a Word document. At its simplest, it can be.
Advanced Forms Lesson 10.
Chapter 5 Engineering Tools for Electrical and Computer Engineers.
An innovative learning model for computation in first year mathematics Birgit Loch Department of Mathematics and Computing, USQ Elliot Tonkes CS Energy,
Room 2032 China Canada Winnipeg Manitoba.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Javier Junquera Molecular dynamics in the microcanonical (NVE) ensemble: the Verlet algorithm.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
CMPD 434 MULTIMEDIA AUTHORING Chapter 06 Multimedia Authoring Process IV.
Ch 9 pages Lecture 23 – The Hydrogen Atom.
Overview: Text delivery in introductory college and university physics classes are dominated by massive, encyclopedic textbooks that take immense individual.
General Relativity Simulations Using Open Source Physics Sharon E. Meidt and Wolfgang Christian Physics Department, Davidson College PO Box 6910 Davidson,
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
Chaotic motion in the double pendulum Dan Hampton and Wolfgang Christian Abstract The double pendulum provides an ideal system in which to study chaotic.
6.852: Distributed Algorithms Spring, 2008 April 1, 2008 Class 14 – Part 2 Applications of Distributed Algorithms to Diverse Fields.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
1 Chapter 13 Programming Languages and Program Development Tools.
28.3 THE BOHR THEORY OF HYDROGEN At the beginning of the 20th century, scientists were puzzled by the failure of classical physics to explain the characteristics.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
1 ACTIVATION OF THE ST ScI ELECTRONIC GRANTS MANAGEMENT SYSTEM BY INSTITUTIONAL AUTHORIZING OFFICIALS January, 2001.
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Teaching and Learning with Technology Master title style  Allyn and Bacon 2002 Teaching and Learning with Technology to edit Master title style  Allyn.
 Programming - the process of creating computer programs.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Open Source Physics Content Delivery: Computation, Curriculum, and Libraries NSDL, November 18, 2009 Bruce Mason, University of Oklahoma Wolfgang Christian.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
V7 Foundation Series Vignette Education Services.
Copyright © 2009 Pearson Education, Inc. Biot-Savart Law.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Development Environment
MET4750 Techniques for Earth System Modeling
Introduction to Visual Basic 2008 Programming
Biot-Savart Law.
CIS16 Application Development – Programming with Visual Basic
Engineering Tools for Electrical and Computer Engineers
Presentation transcript:

Open Source Physics Curriculum Material for Teaching Upper Level Physics Wolfgang Christian Jan Tobochnik, and Harvey Gould Teaching Computational Physics Good programming practice is best taught by having students modify, compile, test, and debug their own code. A typical exercise in An Introduction to Computer Simulation Methods begins with a discussion of theory, the presentation of an algorithm, and the introduction of the necessary Java syntax. We implement the algorithm in a sample application and then ask the reader to test it with various parameters. The user then modifies the model, adds visualizations such as graphs and tables, and performs further analysis. The focus is on both the physics and programming. The user interface need not be very sophisticated, and a simple user interface that includes a few buttons and a table for data entry is all that is needed for a computational physics textbook. Modifications to the program, such as a custom user interface or web delivery, allow the program to be used with different pedagogies such as in-class demonstrations, Peer Instruction, traditional homework, and Just-in-Time Teaching as described below. Because Open Source Physics code is released under a GNU GPL license, our code can be used without restrictions. Users can write their own narrative for other contexts such as astronomy and classical mechanics. However, if a program uses any portion of the code in the org.opensourcephysics package or any subpackage (subdirectory) of this library, this code must also be released under the GNU GPL license. Curriculum Packages The OSP technologies that were developed to teach computational physics are now being used to create simulations for upper level physics. These simulations are distributed in Java archive (jar) files that can be executed by clicking (or double-clicking) on the file in a file-system browser if Java has been installed using default parameters. Although it would be possible to distribute every OSP simulation in its own jar file, this approach is not well suited for the distribution of curricular packages. A large curriculum development project creates many programs and each program may be used in multiple contexts with different initial conditions. The Launcher program addresses this distribution requirement. Launcher is a Java application that can launch (execute) other Java programs. We use Launcher to organize and distribute collections of ready-to-use programs, documentation, and curricular material in a single easily modifiable package. Delivering curricular material in Launcher packages has several advantages. First, the material can be made self-contained. Second, the material is only dependent on having a Java VM on a local machine and not on the type of operating system or browser used. The OSP curriculum packages can be downloaded from the Open Source Physics website. Introduction The Open Source Physics (OSP) project has developed a Java library and an easy to use xml vocabulary for the development of physics software and the distribution of Web-based curricular material. This technology enables us to develop new curricular materials, teach computational physics, store parameters, initial conditions, and results from a computer simulation, associate a simulation, a set of initial conditions, and a narrative into a topical unit, and combine topical units into a curriculum module that can be further adapted and customized by users. We have used the OSP framework to author and organize curricular material from computational physics, classical mechanics, E&M, statistical physics, and quantum mechanics. The Open Source Physics code library, documentation, and sample curricular material is available on CD and can be downloaded from Open Source Physics Project Although there are many computer-based resources for teaching physics, few are based on an object-oriented open source code library. What is needed by the physics education community is not another computer program (although programs are essential), but a synthesis of curriculum development, computational physics, computer science, and physics education research that will be useful for students and adaptable for teachers wishing to write their own simulations and develop their own curricular material. The Open Source Physics (OSP) project was established to meet this need. OSP is an NSF-funded curriculum development project that is developing and distributing a code library, programs, and examples of computer-based interactive curricular material. Distribution of compiled programs fails for upper-level physics simulations that require advanced computational techniques or discipline-specific expertise. Users and developers of these types of programs often have specialized curricular needs that can only be addressed by having access to the source code. However, anyone who has ever written a Java program knows that writing code for opening windows and creating buttons, text fields, and graphs can be tedious and time consuming. Moreover, it is not in the spirit of object-oriented programming to rewrite these methods for each application or applet. The Open Source Physics project solves this problem by providing a consistent object-oriented library of Java components for anyone wishing to write their own simulations. The basic Open Source Physics library includes the following packages: controls: A framework for building graphical user interfaces and components. display: A drawing framework based on the DrawingPanel class and the Drawable interface. display2d: Tools for two-dimensional visualizations such as contour and surface plots. display3d: Tools for three-dimensional visualizations. ejs: Custom user-interface components. numerics: Analysis tools such as ordinary differential equation solvers. tools: Small programs, such as data analysis and video capture, that collect data from other programs. Tools can be added to a menu bar. Open Source Physics libraries are based on Swing and Java 1.4. Although the focus of the basic libraries is traditional computational physics, they have already been extended to include topics not covered in computational physics texts such as video analysis. These packages are available from other OSP developers and from the OSP web site. A number of authors have adopted OSP for their projects and have agreed to let the OSP project distribute their programs as examples. These projects include: An Introduction to Computer Simulation Methods (3rd ed.) by Harvey Gould, Jan Tobochnik, and Wolfgang Christian. Statistical and Thermal Physics by Harvey Gould and Jan Tobochnik. Easy Java Simulations high-level modeling tool by Francisco Esquembre. Tracker video analysis program by Doug Brown. The development of these programs has enabled the Open Source Physics project to improve the core library in may ways. The API has been made more consistent, bugs have been found and squashed, and we have learned what tools are useful to the developer community. But most importantly, Open Source Physics developers have produced great tools for the physics education community. Partial funding for this work was obtained through NSF grant DUE and Davidson College. General Relativity: Consider the computation of particle trajectories in the vicinity of a black hole. The book narrative develops the differential equations for particle motion from the Schwarzschild metric and then asks the reader to do the following: Exercise Modify the PlanetApp program introduced in Chapter 5 so that the classical trajectory of a particle is calculated using polar variables rather than Cartesian variables. Use (10.10) and (18.13) to determine the initial state and compare your results with those of the previous program. Exercise 18.11a. Write a program that plots the general relativistic trajectory of a particle using Schwarzschild coordinates. Verify that circular orbits are obtained for v = (M/r)1/2. Exercise 18.11b. Show that there are no stable circular orbits for r < 6M. Exercise 18.11c. Add the differential equation for proper time. What is the proper time for one complete orbit at r = 6? This interval is the orbital period as measured by an observer traveling with the particle. Compare this wristwatch orbital period to the faraway orbital period and to the time interval predicted by (18.24). Explain any differences in your numerical values. Exercise 18.11d. Perturb the circular orbit at r=9 by giving the particle an initial tangential velocity of v = 0.345c. At what rate does the perihelion of the orbit advance? Electromagnetism: Consider the computation of electric field lines. The book narrative asks the reader to do the following: Problem 10.2a. Use the FieldLineApp program to draw field lines for a few simple sets of one, two, and three charges. Choose sets of charges for which all have the same sign, and sets for which they are different. Verify that the field lines never connect charges of the same sign. Why do field lines never cross? Are the units of charge and distance relevant? Problem 10.4a. The FieldLineApp program plots field lines in two dimensions. Sometimes this restriction can lead to spurious results (see Freeman). Consider four identical charges placed at the corners of a square. Use the program to plot the field lines. What, if anything, is wrong with the results? What should happen to the field lines near the center of the square? Problem 10.4b. The two-dimensional analog of a point charge is an infinite line (thin cylinder) of charge perpendicular to the plane. The electric field due to an infinite line of charge is proportional to the linear charge density and inversely proportional to the distance (instead of the distance squared) from the line of charge to a point in the plane. Modify the FieldLine class to compute the field lines from line charges with E(r) = 1/r. Use your modified class to draw the field lines due to four identical line charges located at the corners of a square, and compare the field lines with your results in part a. Problem 10.4c. Use your modified program from part b to draw the field lines for the two-dimensional analogs of the distributions considered in Problem Compare the results for two and three dimensions and discuss any qualitative differences. Problem 10.4d. Can your program be used to demonstrate Gauss's law using point charges? What about line charges? Mechanics: Consider the classical three-body model of Helium. The book narrative asks the reader to do the following: Project 5.19a. Modify the program PlanetApp to simulate the classical Helium atom. Let the initial value of the time step be  t = Some of the possible orbits are similar to those we have already studied in our mini-solar system Project 5.19b. The initial condition r1 = (1.4,0), r2 = (-1,0), v1 = (0,0.86), and v2 = (0,-1) gives “braiding” orbits. Most initial conditions result in unstable orbits in which one electron eventually leaves the atom (autoionization). Make small changes in this initial condition to observe autoionization. Project 5.19c. The classical helium atom is capable of very complex orbits (see Figure 3). Investigate the motion for the initial condition r1 = (3,0), r2 = (1,0), v1 = ( 0,0.4), and v2 = (0,-1). Does the motion conserve the total angular momentum? Project 5.19d. Choose the initial condition r1 = (2,0), r2 = (-1,0), and v2 = (0,-1).Then vary the initial value of v1 from (0.6,0) to (1.3,0) in steps of vx = For each set of initial conditions calculate the time it takes for autoionization. Assume that ionization occurs when either electron exceeds a distance of six from the nucleus. Run each simulation for a maximum time equal to Plot the ionization time versus v1x. Repeat for a smaller interval of v centered about one of the longer ionization times.