visualizing physical models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf ·...

78
Visualizing Physical Models (and their consequences) Visualizing Physical Models Visualizing Physical Models (and their consequences) (and their consequences) Ruth Chabay Bruce Sherwood Department of Physics North Carolina State University NC STATE UNIVERSITY Purdue SECANT 2007-11-15

Upload: others

Post on 31-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Visualizing Physical Models (and their consequences)

Visualizing Physical Models Visualizing Physical Models (and their consequences)(and their consequences)

Ruth ChabayBruce Sherwood

Department of PhysicsNorth Carolina State University

NC STATE UNIVERSITY

Purdue SECANT 2007-11-15

Page 2: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Physical models: Not just about data� Structure and function

• protein folding, molecular conformations• nanotube electronic and physical properties

� Consequences of physical models: time evolution• Solar system evolution• Neutrino flux in supernovas

� Emergent behavior in complex systems• Chaos (phase space)• Molecular dynamics• Plasma dynamics (solar events)

� Experimental event identification• Monte Carlo simulations and neural networks in high energy

event identification• Numerical relativity: prediction of gravitational radiation pulse

shapes

Page 3: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

What do we need to visualize?

� Physical models (ontology and action)• ball–spring model of a solid• magnetic domains in an Ising magnet• lattice gas model of fluid dynamics

� Abstract quantities• force, momentum, fields, flux, energy

� Spatial and temporal dynamics• fields, states, reactions, currents

Page 4: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

“…anyone can imagine a simple radial inverse square field without the help of a picture.”

E. Purcell, Electricity and Magnetism

2d edition, p. 18

Page 5: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

3D in a “2D” situation?

� Cyclotron

� 2D model� 3D model

A kick to the right

A kick to the left

E = 0 E = 0B

The design and operation of a cyclotron is discussed in Section 20.1.4. (a) Show that the "period" of the motion, the time between one kick tothe right and the next kick in the same direction, does not depend on thecurrent speed of the proton (at speeds small compared to the speed oflight). As a result, we can place across the dees a simple sinusoidal potentialdifference having this period and achieve continual acceleration out to themaximum radius of the cyclotron. See Figure 20.80. (b) One of Ernest Lawrence's first cyclortons, built in 1932, had a diam-eter of only about 30 cm and was placed in a magnetic field of about 1 tesla.What was the frequency (= 1/period, in hertz = cycles/second) of thesinusoidal potential dfference placed across the dees to accelrate theprotons? (c) Show that the equivalent accelerating potential of this little cyclotronwas about a million volts! That is, the kinetic energy gain from the center tothe outermost radius was K = e�Veq, with �Veq = 1e6 volts. (d) If the sinusoidal potential difference applied to the dees had anamplitude of 500 volts (that is, it varied between +500 and -500 volts),show that it took about 65 microseconds for a proton to move from thecenter to the outer radius.

Figure 20.80 A cyclotron (Problem 20.4)

Page 6: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Simple examples

� Magnetic field of a moving particle� Gauss’s Law� Magnetic field of a current loop� Ball-spring model of a solid� Energy in a 3D mass-spring system� Ising magnet

Page 7: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce
Page 8: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Intervention topics

Page 9: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Intervention topics

Page 10: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Student Mechanics Programs•VPython intro

•Motion with piecewise constant velocity

•Gravitational force vector in 3D

•Planet around fixed star; binary star system

•Spring-mass oscillator

•Energy graph for planet

•Energy graph for damped spring-mass oscillator

•Rutherford scattering (discovery of nucleus)

•Quantum statistical mechanics (temperature dependence of heat capacity)

Page 11: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

E&M Programs

•VPython intro

•Electric field of point charge

•Electric field of dipole

•Electric field of a charged rod

•Magnetic field of a moving charge

•Moving charge in a magnetic field

•Positron in an electromagnetic wave

Page 12: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

VPython

http://vpython.org

Page 13: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Visualizing a principle

� The momentum principle• a.k.a. Newton’s second law

� The superposition principle

t��� Fp��

Page 14: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

The Newtonian SynthesisOpen-ended prediction of motion into the future

)r(F ��f� Force as a function of position

t��� Fp�� The momentum principle

ppp ��� ��� Update momentum

t��� vrr ���Update position

do it again

Page 15: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

The Momentum Principle

student program

Page 16: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

� No black boxes • Student codes all the physics

� Same fundamental principles invoked in different situations

� Links multiple representations• Equations• Code• 3D Animation of motion / visualization• Graph

Programming: Why?

Page 17: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Matter & Interactions

New introductory calculus-based physics course for engineers and scientists emphasizing:

� Small number of fundamental principles� Atomic nature of matter� Modeling physical systems

Including computational modeling

Page 18: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

PY205/PY208 at NC State

� Calculus-based intro course• Engineering and science students

� 3 interactive lectures / week• 100 students per section• 12 sections in Spring 2005

� 1 two-hour studio lab / week• 24 students per section

� Computer homework system (WebAssign)

Page 19: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Interactive LecturesInteractive Lectures

• Computer visualizations

• Interactive lecture demonstrations

• Student response system

Page 20: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Students responding to a question in lecture

Page 21: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Discussion of student responses

Page 22: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

• Teaching assistant (TA): physics graduate student

• Teaching assistant assistant (TAA): undergraduate who did well in course

Coaching 24 students who work in groups of two or three

Interactive Studio LabsInteractive Studio Labs

Page 23: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Experiments closely tied to theory

Page 24: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Group work: solving large, difficult problems

Page 25: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Writing a computer program to model a system in 3D (VPython)

Page 26: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce
Page 27: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

M.U.P.P.E.T.University of Maryland 1980s

Turbo Pascal

Output: graphs only

Needed numerical analysis (Runga-Kutta, etc.) because computers were slow

Large amount of setup code provided to students

http://www.physics.umd.edu/perg/muppetMacDonald, W. M., Redish, E. F., and Wilson, J. M. (1988). The M.U.P.P.E.T. Manifesto. Computers in Physics, 2, (4) 23-30.

Redish, E. F., Wilson, J. M. (1993). Student Programming in the Introductory Physics Course: M.U.P.P.E.T. American Journal of Physics, 61, (3) 222-232.

Page 28: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce
Page 29: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce
Page 30: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Constraints� Many students have never written a

program before this� Very little time can be spent on

programming instructionTherefore� Teach minimal set of programming

concepts� Language and environment must be

easy to learn and use (VPython)

Page 31: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

What difficulties do students have with programming?

Page 32: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Interview StudyMatt Kohlmyer

� Paid volunteers from two M&I classes• Spring 2003: N=4• Fall 2003: N=5

� Three 1-hour-long interviews per student� Work on computer programs� Think-aloud protocols

• For detailed data on student reasoning• Videotaped and transcribed

� If stuck, could ask questions, or look at VPythonsyntax help

Page 33: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Orbit problem:

� Moon orbits Earth� Given: orbit is

circular, period is 28 days, masses of moon and earth

VPython 3-D graphical output(spheres not to scale)

Students had previously written an orbit program in class.

Page 34: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Quantitative analysis of dialogue

� Count lines of transcribed dialogue� Interviewer gave more hints on force than on any

other topic

0

10

20

30

40

50

60

Gen. Loops t & dt Force Init. v &p

Mom.prin.

Mom.def.

Pos. up. Other

Line

s of

dia

logu

e

1st sem.2nd sem.

Page 35: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

r=planet.pos-moon.posrmag=sqrt(r.x**2 + r.y**2 + r.z**2)rhat=r/rmagFmag=G*moon.m*planet.m/rmag**2F=Fmag*rhat

3D force calculationmoonplanet rrr ��� ��

221 / rF ��

mGm�

222 zyx ���r�

rrr �� /ˆ �

rFF ˆ��

� �rrF ˆ/ 221

��mGm�Steps encapsulated in:

Page 36: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Force as scalarmoon.rmag=3.8e8Fnet=6.7e-11*(moon.m*earth.m)/moon.rmag**2

Error on run: adding vectors and scalars when updating momentum

moon.p=moon.p+F*deltat

Kyle, phase 2 (others made similar errors)

Page 37: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Force in constant directionFnet=vector(0, -Fmag, 0)

• Direction does not update with time• Possible confusion with mg?• Force in direction of motion?• Two other students: Fnet=vector(Fmag, 0, 0)

F�

Kyle

Page 38: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Discrimination between vectors

I: Do you remember how we defined Fnet, so that it's always pointing towards the earth?K: You take the, you take the uh, final position minus the initial position.I: Yeah. Yeah, that's gonna be involved.K: And I need to define, or I can say earth dot pos, minus moon dot pos.

Fnet = earth.pos-moon.posInterviewer explained: this is not the force, only a vector in the same direction as the force.

Kyle

Page 39: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Need for unit vector

Kyle’s fix:Fnet = (earth.pos-moon.pos)*Fmag

Interviewer explains: Magnitude too large. Kyle does not understand. Interviewer shows a written numerical example, and explains r-hat. Kyle then remembers r-hat from lecture and homework

Kyle

Page 40: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Why is force difficult?� Combines many different quantities and

concepts• Force magnitude • Relative position vector• Magnitude of relative position vector• Unit vector

� Changing force (magnitude & direction)� VPython syntax still not familiar

Page 41: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Physics or programming?

Computer program requires correctness in features that might be ignored in written work:• Force is not a scalar• Force is not constant in an orbit• You can’t divide by a vector

F = G*(moon.m*earth.m)/r**2where r is a vector

Page 42: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Revised instructional sequence (S2005)

� Lab 1: VPython intro (objects, position vectors, simple loops)

� Lab 2: piecewise constant velocity motion constant force motion

� Lab 3: gravitational force vector at multiple static locations

� Lab 4: bring it all together—planet in elliptical orbit around star

Page 43: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

VPythonhttp://vpython.org

Matter & Interactionshttp://www4.ncsu.edu/~rwchabay/mi

Page 44: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce
Page 45: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Physics for the 21Physics for the 21stst Century: New ContentCentury: New Content� Microscopic (atomic-level) view of matter

• No atoms in traditional course� Computational modeling of physical systems

• No computer modeling in traditional course� Application of fundamental principles to a

wide range of systems (from nuclei to stars)• Traditional course emphasizes plugging numbers

into specific formulas for specific situations; not a good preparation for attacking new problems

� Solving complex, real-world problems• Traditional course emphasizes sanitized

unrealistic situations

Page 46: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Setup3D graphics

Create objects,give initial pos.

Constants

Initial momentum

TimestepInitialize time

from visual import *Sun = sphere(pos=vector(0,0,0), radius =

1e10, color=color.yellow)Earth = sphere(pos=vector(1.5e11,0,0),

radius = 5e9, color=color.cyan)Earth.trail=curve(color=Earth.color)Earth.m = 6e24Sun.m = 2e30G=6.67e-11Earth.p = Earth.m*vector(0,2e4,0)deltat = 1e4t=0

Page 47: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Physics loopwhile t < 3e7:

r = Earth.pos-Sun.posrmag = sqrt(r.x**2 + r.y**2 + r.z**2)rhat = r/rmagFmag = G*moon.m*planet.m/rmag**2F = -Fmag*rhatEarth.p = Earth.p+F*deltatEarth.pos = Earth.pos +

Earth.p/Earth.m*deltatEarth.trail.append(pos=Earth.pos)t = t+deltat

Rel. pos. vector & unit vector

Grav. force vector

Update pUpdate pos.

Draw trailUpdate time

Page 48: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

3D Vector Force Calculationwhile t<28*24*60*60:

r=planet.pos-moon.posrmag=sqrt(r.x**2 + r.y**2 + r.z**2)rhat=r/rmagFmag=G*moon.m*planet.m/rmag**2F=Fmag*rhatmoon.p=moon.p+F*deltatmoon.pos=moon.pos+moon.p/moon.m*deltatmoon.trail.append(pos=moon.pos)t=t+deltat

Rel. pos. vector & unit vector

Grav. force vector

Page 49: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

The traditional calculus-based introductory physics course

� Where are the fundamental concepts?• Force: chapter 5• Energy: chapter 7• Momentum: chapter 9• Angular momentum: chapter 12

• What do students see as most fundamental?

x = ½ at2

Page 50: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

3D Vectorsmmr 25,5,2323,19,6 �������

� � � � mr 222 581429 ������

rrr �� /ˆ �

Page 51: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Typical rationale for introductory physics

� Learn systematic problem solving� Learn to separate world into system &

surroundings� Practice applying mathematics

• See the unity of physics?• See the power of fundamental principles?

Page 52: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

The traditional calculus-based introductory physics course

Instruction focuses on solutions to classes of problems (constant acceleration, circular motion at constant speed, static equilibrium, parallel resistors, RC circuits…) rather than reasoning from fundamental principles.

Therefore, students see the course as a collection of unrelated problem types.

Page 53: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

What should we teach?

Research shows that a large investment by teachers and students is required for effective learning.

What is important enough to be worth a large investment on the part of students and teachers?

We need clear goals on which to base decisions.

Physics Education Research (PER) has focused on teaching the traditional course more effectively. However, we need to ask:

Page 54: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

� Emphasize a small number of fundamental principles(unify mechanics & thermal physics; electrostatics & circuits)

� Integrate contemporary physics(atomic viewpoint; connections to chemistry, biology, materials science,nanotechnology, electrical engineering, nuclear engineering, computer engineering, …)

� Engage students in physical modeling(idealization, approximation, assumptions, estimation)

� Introduce computational physics(now a partner of theory and experiment)

• Omit topics that do not contribute to this goal.

Physics for the 21st Century

Page 55: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Modeling the physical world

� Students should see clearly that a small number of fundamental principles can explain a very wide range of phenomena

� Students should see the place of classical physics in the larger physics framework (including the atomic nature of matter, quantum mechanics, relativity)

Page 56: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Research Supporting DevelopmentTheoretical

New views of standard physicsCognitive task analysesPredictions based on models of learning

ExperimentalAnalysis of students’ written workThink-aloud protocol analysis (video)Fine-grained assessmentLarge scale assessment

Time Scale14 years (and still going…)

Page 57: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

� Matter & Interactions I: Modern Mechanicsmechanics;integrated thermal physics

� Matter & Interactions II:Electric & Magnetic Interactionsmodern E&M; physical optics

Supporting text:

John Wiley & Sons, 2002

Page 58: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Bobby (1)

Page 59: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Norman (1)

Page 60: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Paul (1)

Page 61: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Richard (1)

Page 62: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Andrew (2)

Page 63: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Charles (2)

Page 64: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Kyle (2)

Page 65: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Nick (2)

Page 66: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

3D Vector Force Calculationwhile t < 3e7:

r = Earth.pos-Sun.posrmag = sqrt(r.x**2 + r.y**2 + r.z**2)rhat = r/rmagFmag = G*moon.m*planet.m/rmag**2F = -Fmag*rhatEarth.p = Earth.p+F*deltatEarth.pos = Earth.pos +

Earth.p/Earth.m*deltatEarth.trail.append(pos = Earth.pos)t = t+deltat

Rel. pos. vector & unit

vector

Grav.force vector

Page 67: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

r = Earth.pos-Sun.posrmag = sqrt(r.x**2+r.y**2+r.z**2)rhat = r/rmagFmag = G*Earth.m*Sun.m/rmag**2F = -Fmag*rhat

Force calculation

rFF

rGMmF

rrrzyxr

rrr EarthSun

ˆ

/

/ˆ2

222

��

��

��

���

��

���

��

Page 68: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

2nd session interview

� Moon orbit program� Took place after about 6 weeks� Students had completed several

programming assignments• Including a model of a planet orbiting a

star, which was similar to interview task

Page 69: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Introductory Calculus-Based Physics for Engineers & Scientists:

Why computation?

� Authentic physics• Theory + Experiment + Computation

� Modeling complex systems• No analytical solutions

� Fundamental principles• Time evolution (Newtonian Synthesis)• Vectors as tools

� 3D visualization

Page 70: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Two kinds of dynamics problem

• Given known motion, deduce unknown forces.

• Given force law (and initial conditions), predict unknown motion.

Page 71: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Traditional Problems

Given known motion, deduce force

Page 72: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Open-ended Problems

Given initial conditions and force law, predict unknown motion

Binary star

Rutherford scattering

Page 73: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

E&M: 3D Fields

� Superposition� Variation in time and space� 3D vectors as tools

Page 74: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Programming: How?Many students have never written a program before

� Must be easy to learn• Minimum set of programming concepts• No interface or graphics coding• Student concentrates on physics

� No fancy algorithms• Computers are now very fast!• Just take very small steps

Page 75: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Python programming languageIDLE interactive development environmentVisual 3D rendering moduleNumeric fast array manipulation module

FreeOpen sourceMultiplatform: Windows, Linux, MacOSXOriginated by David Scherer

http://vpython.org

VPython:3D programming for ordinary mortals

Page 76: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Write a VPython program

VPythonProduces 3D real-time navigable animations as a side effect of physics computation

Mean free path of a gas molecule

Page 77: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

Visualizing a principle

� The momentum principle

� The superposition principle• Finding the net field at a location in space

Page 78: Visualizing Physical Models (and their consequences)secant.cs.purdue.edu/_media/chabay.pdf · 2007-11-19 · Visualizing Physical Models (and their consequences) Ruth Chabay Bruce

The superposition principle

To calculate the field due to many charged particles:

� Add up the contribution of each particle or group of particles

� These contributions are not changed by the presence of other particles