Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in...

64
Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National Superconducting Cyclotron Laboratory Michigan State University, East Lansing and Department of Physics and Center of Mathematics for Applications University of Oslo The Ohio State University, February 28 2012 1 / 64

Transcript of Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in...

Page 1: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Computing in Science Education (CSE)A New Way to Teach Science?

Morten Hjorth-Jensen

National Superconducting Cyclotron LaboratoryMichigan State University, East Lansing and

Department of Physics and Center of Mathematics for ApplicationsUniversity of Oslo

The Ohio State University, February 28 2012

1 / 64

Page 2: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

People and weblinksMain contributorsHans Petter Langtangen, Computer ScienceKnut Mørken, Computer ScienceAnders Malthe Sørensen and Arnt Inge Vistnes, PhysicsTom Lindstrøm, MathematicsØyvind Ryan, Mathematics and Computer Science and manymore

AdministrationAnnik Myhre, Dean of EducationHanne Sølna, Director of studies

Website and documenthttp://www.mn.uio.no/english/about/collaboration/cse/http://www.mn.uio.no/english/about/collaboration/cse/national-group/computing-in-science-education.pdf

2 / 64

Page 3: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Wouldn’t it be cool if your mechanics students couldreproduce results in a PRL?

Grand challenge project inFYS-MEK1100(Mechanics), SecondSemester: a friction modelto be solved as coupledODEs

or actually find problems with the article?

orperhaps go to the local amusement park, take the roller coaster and collectdata with your smartphone?

3 / 64

Page 4: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Selected Material

Python and our first programming course, first semesterhttp://www.uio.no/studier/emner/matnat/ifi/INF1100/h11/.Excellent new textbook by Hans Petter Langtangen

Mathematical modelling course, first semester http://www.uio.no/studier/emner/matnat/math/MAT-INF1100/h11/.Textbook by Knut Mørken to be published by Springer.

Mechanics, second semesterhttp://www.uio.no/studier/emner/matnat/fys/FYS-MEK1100/v12/.New textbook by Anders Malthe-Sørenssen,

Computational Physics I, fifth semester,http://www.uio.no/studier/emner/matnat/fys/FYS3150/h11/

4 / 64

Page 5: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

5 / 64

Page 6: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Principles

Central aims behind our CSE reformAlgorithmic thinking as a way to

I Enhance instruction based teachingI Introduce Research based teaching from day oneI Trigger further insights in math and other disciplinesI Validation and verification of scientific results (the PRL

example), with the possibility to emphasize ethical aspectsas well. Version control is central.

6 / 64

Page 7: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Research based teaching

How do we define it?One possible definition: It is coupled to a direct participation inactual research and builds upon established knowledge andinsights about scientific methods.

I It is the standard situation at all universities and takesnormally place at the senior undergraduate/graduate level(isn’t it too late?)

I It is seldom done in undergraduate courses.I Taught by a researcherI The student starts seeing the countour of the scientific

approach leading her/him to make new interpretations,develop new insights and understandings that lead tofurther research.

7 / 64

Page 8: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Research based education

What should the education contain?The standard situation we meet at an almost daily basis:

I Theory+experiment+simulation is almost the norm inresearch and industry

I To be able to model complex systems with no simpleanswers on closed form. Solve real problems.

I Emphasis on insight and understanding of fundamentalprinciples and laws in the Sciences.

I Be able to visualize, present, discuss, interpret and comewith a critical analysis of the results, and develop a soundethical attitude to own and other’s work.

Our education should reflect this.

8 / 64

Page 9: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Research based education

Normal workflow in Science and Engineering

I A problem is properly described using a precise (normal)language.

I It is translated to a mathematical problem using knownlaws and principles.

I It is solved, normally via numerical similations.I The solution is visualized and analyzed.I The solution to the problem is formulated.

People who master these skills bring an importantcompentence to society. Gain via increased efficiency andquality due to interdisciplinarity at a more detailed level. Forcatastrophic consequences seehttp://www.cscamm.umd.edu/people/faculty/tadmor/courses/Misc/disasters/sleipner.html

9 / 64

Page 10: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Computers and science teaching

EducationI During the last 25 years there has been considerable focus

on technology at all levels in the educational ladder.I Calculators, text processing, email, digital learning

environments etc.I Much focus on means and technologies, but what about

the content, or more importantly, insight into physicalsystems?

I The basic topics (math, chemistry, physics, . . . ) are taughtmore or less in the same fashion as before — unchangedover several decades!

10 / 64

Page 11: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Computers and science teaching

EducationI During the last 25 years there has been considerable focus

on technology at all levels in the educational ladder.I Calculators, text processing, email, digital learning

environments etc.I Much focus on means and technologies, but what about

the content, or more importantly, insight into physicalsystems?

I The basic topics (math, chemistry, physics, . . . ) are taughtmore or less in the same fashion as before — unchangedover several decades!

11 / 64

Page 12: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

More observations

Computation in the Sciences

I Computations is a fundamental tool to gain new insightsI Computer simulations can act as a lab — can save both

time and resourcesI Computations is a central component in modern industry

and research in the sciences, spanning almost every field:Materials science and nanotechnology, weatherforecasting, earthquake simulations and forecasting,medical technology, industrial design, design of newcomputers, the entertainment industry, almost all aspectsof our modern society!!

12 / 64

Page 13: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Large scale simulationsFluid dynamical simulations central in air industry.

13 / 64

Page 14: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Nano and macro-scale reactions in rocks

Permanent storage of CO2 (as rocks)

Large-scale fluid flow: Fluid flow near surface, coupling to deformation

Micro-scale fluid flow: Fluid flow near surface, coupling to fracturing, surface tension effects.

Large-scale reactions: Coupling between flow, reaction, and deformation.

Nano-scale fluid flow: Flow in narrow fractures, reaction dynamics.

Micro-scale reactions: Thermodynamic formulation for reaction-diffusion-deformation problem.

Nano-scale reactions: How do volume expanding reactions occur on the atomic scale?

Nano-scale mechanics: What determines material failure mechanisms on the atomic scale?

Micro-scale deformations: What are the main failure mechanisms from micro- to macro-scales?

14 / 64

Page 15: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Examples of multiscale systems: systems biology

15 / 64

Page 16: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Further observations

Computations should enter science education

I Our teaching should include an education in basicnumerical methods, normally taught in differentdepartments, and often disconnected. In the US severalsmaller university colleges have implemented somethingsimilar to our project, see Computing in Science andEngineering, Vol. 8, sept/oct issue 2006.

I The students should also learn to develop new methodsand learn new tools when needed.

I Need an adequate computational platform.(Python ascomputing language?).

16 / 64

Page 17: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

More observations

Observations about implementations

I One creates different physics courses and graduateprograms which bake in computations, typically variousComputational Physics courses from sophomore tograduate level. The problem is that these courses are notcompulsory. The result is often an uneven background ofthe students.

I Dedicated teachers incorporate numerical exercises (atdifferent levels) in their physics courses. When newteachers take over, the whole initiative may disappear.

I Quite many physics departments in Europe teach theirown math and computer science courses! But have still notbeen able to coordinate properly computational topics.

17 / 64

Page 18: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Can we catch many birds with one stone?

I How can we include and integrate an algorithmic(computational) perspective in our basic education?

I Can this enhance the students’ understanding ofmathematics and science?

I Can it strengthen research based teaching?

Own hobby horse: And can we enhance the visibility of ahigh-performance computing perspective? (students come withdual-core laptops and quad-core PCs are standard now! Andwhat about GPU programming?)

18 / 64

Page 19: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Preliminary summary

Computations should enter basic science education

I Computation is a fundamental tool to gain new insights andshould be included in our elementary teaching.

I Requires development of algorithmic thinking.I Basic numerical methods should be part of the compulsory

curriculum.I The students should also learn to develop new numerical

methods and adapt to new software tools.I Requires more training than simple programming in a

mathematics course.

19 / 64

Page 20: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Preliminary summary

Computations should enter basic science education

I Computation is a fundamental tool to gain new insights andshould be included in our elementary teaching.

I Requires development of algorithmic thinking.I Basic numerical methods should be part of the compulsory

curriculum.I The students should also learn to develop new numerical

methods and adapt to new software tools.I Requires more training than simple programming in a

mathematics course.

20 / 64

Page 21: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

What is needed?

ProgrammingA compulsory programming course with a strong mathematicalflavour. Should give a solid foundation in programming.Programming is understanding!

Mathematics and numericsMathematics is at least as important as before, but should besupplemented with development and analysis of numericalmethods.

SciencesTraining in modelling and problem solving with numericalmethods and visualisation, as well as traditional methods inScience courses, Physics, Chemistry, Biology, Geology,Engineering...

21 / 64

Page 22: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

What is needed?

ProgrammingA compulsory programming course with a strong mathematicalflavour. Should give a solid foundation in programming.Programming is understanding!

Mathematics and numericsMathematics is at least as important as before, but should besupplemented with development and analysis of numericalmethods.

SciencesTraining in modelling and problem solving with numericalmethods and visualisation, as well as traditional methods inScience courses, Physics, Chemistry, Biology, Geology,Engineering...

22 / 64

Page 23: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

What is needed?

ProgrammingA compulsory programming course with a strong mathematicalflavour. Should give a solid foundation in programming.Programming is understanding!

Mathematics and numericsMathematics is at least as important as before, but should besupplemented with development and analysis of numericalmethods.

SciencesTraining in modelling and problem solving with numericalmethods and visualisation, as well as traditional methods inScience courses, Physics, Chemistry, Biology, Geology,Engineering...

23 / 64

Page 24: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation

Crucial ingredients

I Support from governing bodiesI Cooperation across departmental boundariesI Willingness by individuals to give priority to teaching reform

Consensus driven approach.

24 / 64

Page 25: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: Organization

University of Oslo’s (UiO) information and communicationtechnology (ICT) strategyTwo of five strategic goals involve ICT.

I ICT should be integrated as a pedagogical tool in oureducation

I UiO wishes to develop and increase its employee’scompetence and motivation in the usage of ICT ineducational matters.

From the Faculty of Math and Sciences’ strategic plan2005-2009Integrate central modern computational tools, instrumentationand techniques, in order to modernize our Math and Scienceeducation. Computations and numerical modelling has acentral place here.

25 / 64

Page 26: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: Organization

University of Oslo’s (UiO) information and communicationtechnology (ICT) strategyTwo of five strategic goals involve ICT.

I ICT should be integrated as a pedagogical tool in oureducation

I UiO wishes to develop and increase its employee’scompetence and motivation in the usage of ICT ineducational matters.

From the Faculty of Math and Sciences’ strategic plan2005-2009Integrate central modern computational tools, instrumentationand techniques, in order to modernize our Math and Scienceeducation. Computations and numerical modelling has acentral place here.

26 / 64

Page 27: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE project

GoalsI Include and integrate a computational perspective in the

bachelor curriculum in the mathematically orientedsciences.

I Give the students realistic examples from our research,this brings our research into the undergraduate teaching ata much earlier stage than before.

I Upgrade the staff’s competence on computational topics.I Focus on fundamental (long-lasting) knowledge that

prepares the students for a long professional career, alsoin the area of computer use.

I Aim at strengthening instruction based teaching.

27 / 64

Page 28: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE projectWhat we do

I Coordinated use of computational exercises and numericaltools in most undergraduate courses.

I Help update the scientific staff’s competence oncomputational aspects and give support (scientific,pedagogical and financial) to those who wish to revise theircourses in a computational direction.

I Teachers get good summer students to aid in introducingcomputational exercises

I Develop courses and exercise modules with acomputational perspective, both for students and teachers.

I Basic idea: mixture of mathematics, computation,informatics and topics from the physical sciences.

Interesting outcome: higher focus on teaching and pedagogicalissues!!

28 / 64

Page 29: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE projectWhat we do

I Coordinated use of computational exercises and numericaltools in most undergraduate courses.

I Help update the scientific staff’s competence oncomputational aspects and give support (scientific,pedagogical and financial) to those who wish to revise theircourses in a computational direction.

I Teachers get good summer students to aid in introducingcomputational exercises

I Develop courses and exercise modules with acomputational perspective, both for students and teachers.

I Basic idea: mixture of mathematics, computation,informatics and topics from the physical sciences.

Interesting outcome: higher focus on teaching and pedagogicalissues!!

29 / 64

Page 30: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE projectWhat we do

I Coordinated use of computational exercises and numericaltools in most undergraduate courses.

I Help update the scientific staff’s competence oncomputational aspects and give support (scientific,pedagogical and financial) to those who wish to revise theircourses in a computational direction.

I Teachers get good summer students to aid in introducingcomputational exercises

I Develop courses and exercise modules with acomputational perspective, both for students and teachers.

I Basic idea: mixture of mathematics, computation,informatics and topics from the physical sciences.

Interesting outcome: higher focus on teaching and pedagogicalissues!!

30 / 64

Page 31: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE projectWhat we do

I Coordinated use of computational exercises and numericaltools in most undergraduate courses.

I Help update the scientific staff’s competence oncomputational aspects and give support (scientific,pedagogical and financial) to those who wish to revise theircourses in a computational direction.

I Teachers get good summer students to aid in introducingcomputational exercises

I Develop courses and exercise modules with acomputational perspective, both for students and teachers.

I Basic idea: mixture of mathematics, computation,informatics and topics from the physical sciences.

Interesting outcome: higher focus on teaching and pedagogicalissues!!

31 / 64

Page 32: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Implementation in Oslo: The CSE projectWhat we do

I Coordinated use of computational exercises and numericaltools in most undergraduate courses.

I Help update the scientific staff’s competence oncomputational aspects and give support (scientific,pedagogical and financial) to those who wish to revise theircourses in a computational direction.

I Teachers get good summer students to aid in introducingcomputational exercises

I Develop courses and exercise modules with acomputational perspective, both for students and teachers.

I Basic idea: mixture of mathematics, computation,informatics and topics from the physical sciences.

Interesting outcome: higher focus on teaching and pedagogicalissues!!

32 / 64

Page 33: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Organizational framework

Educational Reform

I The reform in 2003 (Bachelor+Master+Phd) paved the way forcoordinated introduction of computational topics in severalbachelor programs.

I There are six major bachelor programs in the sciences withseveral common mathematics, physics and informatics coursesin the first 3–4 semesters.

I Modern software has a low learning threshold and it is easy tovisualize and program complicated systems.

Centers of excellenceThe Faculty (co-)hosts four (++) centers of excellence wherecomputations are central. These play an important role in catalyzingcross-disciplinary research and educational projects.

33 / 64

Page 34: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Example of bachelor programPhysics, Astronomy and Meteorology, Astrophysics path

I First semester common for several Bachelor programs (Math, Physics,Astrophysics, Meteorology, Materials Science, Nanotechnology, Math andEconomy, Electronics, Geology)

I The mathematics courses MAT1100, MAT1110, MAT1120 and MEK1100 arealso common to many Bachelor programs.

34 / 64

Page 35: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Example: Computations from day one

DifferentiationThree courses the first semester: MAT1100, MAT-INF1100 ogINF1100.

I Definition of the derivative in MAT1100 (Calculus and analysis)

f ′(x) = limh→0

f (x + h)− f (x)h

.

I Algorithms to compute the derivative in MAT-INF1100(Mathematical modelling with computing)

f ′(x) ≈ f (x + h)− f (x − h)2h

.

I Implementation and use in applications in the programmingcourse INF1100, with Python as programming language.

35 / 64

Page 36: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Example: Computations from day one

DifferentiationThree courses the first semester: MAT1100, MAT-INF1100 ogINF1100.

I Definition of the derivative in MAT1100 (Calculus and analysis)

f ′(x) = limh→0

f (x + h)− f (x)h

.

I Algorithms to compute the derivative in MAT-INF1100(Mathematical modelling with computing)

f ′(x) ≈ f (x + h)− f (x − h)2h

.

I Implementation and use in applications in the programmingcourse INF1100, with Python as programming language.

36 / 64

Page 37: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Example: Computations from day one

DifferentiationThree courses the first semester: MAT1100, MAT-INF1100 ogINF1100.

I Definition of the derivative in MAT1100 (Calculus and analysis)

f ′(x) = limh→0

f (x + h)− f (x)h

.

I Algorithms to compute the derivative in MAT-INF1100(Mathematical modelling with computing)

f ′(x) ≈ f (x + h)− f (x − h)2h

.

I Implementation and use in applications in the programmingcourse INF1100, with Python as programming language.

37 / 64

Page 38: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Example: Computations from day one

DifferentiationThree courses the first semester: MAT1100, MAT-INF1100 ogINF1100.

I Definition of the derivative in MAT1100 (Calculus and analysis)

f ′(x) = limh→0

f (x + h)− f (x)h

.

I Algorithms to compute the derivative in MAT-INF1100(Mathematical modelling with computing)

f ′(x) ≈ f (x + h)− f (x − h)2h

.

I Implementation and use in applications in the programmingcourse INF1100, with Python as programming language.

38 / 64

Page 39: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Other Examples

Integration by Trapezoidal Rule

I Definition of integration in MAT1100 (Calculus and analysis).

I The algorithm for computing the integral vha the Trapezoidal rulefor an interval x ∈ [a,b]∫ b

a(f (x)dx ≈ 1

2[f (a) + 2f (a + h) + · · ·+ 2f (b − h) + f (b)]

is taught in MAT-INF1100 (Mathematical modelling)

I The algorithm is then implemented in INF1100 (programmingcourse).

39 / 64

Page 40: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Other Examples

Integration by Trapezoidal Rule

I Definition of integration in MAT1100 (Calculus and analysis).

I The algorithm for computing the integral vha the Trapezoidal rulefor an interval x ∈ [a,b]∫ b

a(f (x)dx ≈ 1

2[f (a) + 2f (a + h) + · · ·+ 2f (b − h) + f (b)]

is taught in MAT-INF1100 (Mathematical modelling)

I The algorithm is then implemented in INF1100 (programmingcourse).

40 / 64

Page 41: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Other Examples

Integration by Trapezoidal Rule

I Definition of integration in MAT1100 (Calculus and analysis).

I The algorithm for computing the integral vha the Trapezoidal rulefor an interval x ∈ [a,b]∫ b

a(f (x)dx ≈ 1

2[f (a) + 2f (a + h) + · · ·+ 2f (b − h) + f (b)]

is taught in MAT-INF1100 (Mathematical modelling)

I The algorithm is then implemented in INF1100 (programmingcourse).

41 / 64

Page 42: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Coordination

More Examples

I The courses MAT1100, MAT-INF1100 og INF1100 have manycommon examples and topics, amongst these ordinarydifferential equations. They solve the pendulum at the end ofINF1100.

I Differential equations are in turn used widely in our mechanicscourse, which comes in the second semester,with examplesspanning from the classical pendulum to rocket launching.

I Differential equations (partial and ordinary) are in turn used inmany many other courses, from electromagnetism to quantumphysics.

I The central mathematics courses MEK1100, MAT1110 ogMAT1120 develop further numerical exercises and problems,from linear algebra to multi-dimensional integration.

42 / 64

Page 43: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Coordination

I Teachers in other courses need therefore not use much time onnumerical tools— it is naturally included in other courses.

43 / 64

Page 44: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Learning outcomes three first semesters

Knowledge of basic algorithms

I Differential equations: Euler, modified Euler andRunge-Kutta methods

I Numerical integration: Trapezoidal and Simpson’s rule,multidimensional integrals

I Random numbers, random walks, probability distributionsand Monte Carlo integration

I Linear Algebra and eigenvalue problems: Gaussianelimination, LU-decomposition, SVD, QR, Givens rotationsand eigenvalues, Gauss-Seidel.

I Root finding and interpolation etc.I Processing of sound and images.

The students have to code several of these algorithms duringthe first three semesters.

44 / 64

Page 45: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Later courses

Later courses should build on this foundation as much aspossible.

In particular, the course should not be too basic! There shouldbe progression in the use of mathematics, numerical methodsand programming, as well as science.

Computational platform: Python, fully object-oriented andallows for seamless integration of c++ and Fortran codes, aswell as Matlab-like programming environment. Makes it easy toparallelize codes as well.

45 / 64

Page 46: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

FYS-MEK1100 (Mechanics), Second Semester

θ

Mass m

Length l

Realistic PendulumClassical pendulum with damping andexternal force

mld2θ

dt2 + νdθdt

+ mgsin(θ) = Asin(ωt).

Easy to solve numerically withoutclassical simplification, and then visualizethe solution. Done in first semester!Same equation for an RLC circuit

Ld2Qdt2 +

QC

+ RdQdt

= V (t).

46 / 64

Page 47: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

FYS1120 Electromagnetism, Third Semester

V

L

C

R

RLC circuitSame equation as the pendulum for anRLC circuit

Ld2Qdt2 +

QC

+ RdQdt

= V (t).

From the numerics, the students foundthe optimal parameters for studyingexperimentally chaos in an RLC circuit.Then they did the experiment.

47 / 64

Page 48: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

What can we do with the pendulum?

Many interesting problems

I Can study chaos, theoretically, numerically and experimentally,can choose ’best’ parameters for experimental setup.

I Can test different algorithms for solving ordinary differentialequations, from Euler’s to fourth-order Runge Kutta methods.Tight connection with algorithm and physics.

I Can make classes of differential equation solvers.

I Can make a general program that can be applied to otherscientific cases in later courses, such as electromagnetism (RLCcircuits). Students realize that much of the same mathematicsenters many physics cases.

48 / 64

Page 49: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

More Examples from Physics Courses, 2-5 semesterSecond-fourth semester

1. Air resistance in two and three dimensions with quadraticvelocity dependence.

2. Launching a probe into a tornado

3. Rocket launching with realistic parameters, gravity assist

4. How to kick a football and model its trajectory.

5. Planet motion and position of planets

6. Magnetic fields with various geometries based on Biot-Savart’slaw

7. Harmonic oscillations and various forms of electromagneticwaves.

8. Combined effect of different potentials such as the electrostaticpotential and the gravitational potential.

9. Simple studies of atoms and molecules, and much more

49 / 64

Page 50: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

More Examples from Physics Courses

Waves and oscillations course, fourth semester

1. Four students wrote together with the teacher a scientific articleon The rainbow as a student project involving numericalcalculations

2. Am. J. Phys. 77, 795 (2009).

50 / 64

Page 51: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

New wisdom/insight?

I A computational environment like our Python framework allows one to solvedifferential equations with boundary conditions. Alternatively the students canuse Matlab (students learn Matlab in addition to Python) As in many applications,the physics case is in the boundary conditions. The students have to understandthese and solve the problem with different boundary conditions. Requires abetter understanding of the problem and more interactions and discussionsamong students and teachers.

I This example can easily be transferred to other single-particle problems, such asthe harmonic oscillator, the hydrogen atom etc. Increases the capability to makeabstractions.

I The students can play with the parameters and uncover relations betweenvarious constants (here potential strength and extension) which most studentsnormally never do.

I It brings our research closer to the students as well. Much more fun to teach. Butmuch work for teachers and students.

I Can easily extend to atoms and molecules.

51 / 64

Page 52: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Can we bake in Parallelization at an early stage?

Late: Fifth semester, FYS3150 Computational PhysicsQuad-core is standard now for most supermarket PCs!! Should bakein parallelization.The integral we need to solve is the quantum mechanical expectationvalue of the correlation energy between two electrons, namely

〈 1|r1 − r2|

〉 =∫ ∞−∞

dr1dr2e−2α(r1+r2)1

|r1 − r2|.

Students use either Python, C++ or Fortran95 as programminglanguages on our supercomputing cluster (educational nodes, withMPI-2).It took the students on average 1-2 hours at the lab to becomeoperative with their first MPI program. http://www.uio.no/studier/emner/matnat/fys/FYS3150/h10/,see under projects, projects 3-5.

52 / 64

Page 53: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Can we bake in Parallelization at an early stage?

Late: Fifth semester, FYS3150 Computational PhysicsThe tasks they are to solve

a) Use Gauss-Legendre quadrature and compute the integral byintegrating for each variable x1, y1, z1, x2, y2, z2 from −∞ to∞.

b) Compute the same integral but now with brute force Monte Carloand compare your results with those from the previous point.Discuss the differences. With bruce force we mean that youshould use the uniform distribution.

c) Improve your brute force Monte Carlo calculation by usingimportance sampling. Hint: use the exponential distribution.Does the variance decrease? Comment your results.

d) Parallelize your code from the previous point and comparethe CPU time needed with that from point [c)]. Do youachieve a good speedup?

53 / 64

Page 54: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Can we bake in Parallelization at an early stage?

Late: Fifth semester, FYS3150 Computational Physics

I Integration and Monte carlo methods are embarrasingly trivial(ET), only few students had problems when parallelizing.

I The students found it easy to implement MPI as long as supportwas given.

I To use MPI or similar libraries,it is important that theinfrastructure has a as low as possible threshold. On averagethey used 1-2 hours to have MPI running. Thys fall: GPUprogramming with openCL as option.

I Solving quantum mechanical problems by Variational MonteCarlo or study phase transitions (ising and Potts model).

54 / 64

Page 55: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I Standard objection: computations take away the attentionfrom other central topics in ’my course’.

CSE incorporates computations from day one, andcourses higher up do not need to spend time oncomputational topics (technicalities), but can focus on theinteresting science applications.

I The students become better qualified than their teachers.Good teaching assistants aid to improve this aspect.

I Pedagogical courses which can aid university teachers.

55 / 64

Page 56: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I Standard objection: computations take away the attentionfrom other central topics in ’my course’.

CSE incorporates computations from day one, andcourses higher up do not need to spend time oncomputational topics (technicalities), but can focus on theinteresting science applications.

I The students become better qualified than their teachers.Good teaching assistants aid to improve this aspect.

I Pedagogical courses which can aid university teachers.

56 / 64

Page 57: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I Standard objection: computations take away the attentionfrom other central topics in ’my course’.

CSE incorporates computations from day one, andcourses higher up do not need to spend time oncomputational topics (technicalities), but can focus on theinteresting science applications.

I The students become better qualified than their teachers.Good teaching assistants aid to improve this aspect.

I Pedagogical courses which can aid university teachers.

57 / 64

Page 58: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I It will take a long time to develop a body of goodcomputational exercises of the same quality as theclassical ones (developed over many decades, or evencenturies).

I Continuity is important when teachers change. Newtextbooks are being written.

I Major challenge: How to reflect computational exercises ingrading and final evaluations?

I What about students from other universities?

58 / 64

Page 59: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I It will take a long time to develop a body of goodcomputational exercises of the same quality as theclassical ones (developed over many decades, or evencenturies).

I Continuity is important when teachers change. Newtextbooks are being written.

I Major challenge: How to reflect computational exercises ingrading and final evaluations?

I What about students from other universities?

59 / 64

Page 60: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I It will take a long time to develop a body of goodcomputational exercises of the same quality as theclassical ones (developed over many decades, or evencenturies).

I Continuity is important when teachers change. Newtextbooks are being written.

I Major challenge: How to reflect computational exercises ingrading and final evaluations?

I What about students from other universities?

60 / 64

Page 61: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges . . .

. . . and objections

I It will take a long time to develop a body of goodcomputational exercises of the same quality as theclassical ones (developed over many decades, or evencenturies).

I Continuity is important when teachers change. Newtextbooks are being written.

I Major challenge: How to reflect computational exercises ingrading and final evaluations?

I What about students from other universities?

61 / 64

Page 62: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Challenges and future plans

I The project depends crucially on few individuals.I Need to get more teachers involved, not only good TAs.I How to implement a CSE perspective in other programs

like Chemistry, Molecular Biology, Biology, Engineering.New courses are being developed. Key issue:modularization of topics and development of a’technological platform’ which glues together differentmodules.

I Now a national pilot for other universities and regionalcolleges.

62 / 64

Page 63: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Which aspects are important for a successfulintroduction of CSE?

I Early introduction, programming course at beginning ofstudies linked with math courses and science andengineering courses.

I Crucial to learn proper programming at the beginning.I Choice of software.I Textbooks and modularization of topics.I Resources and expenses.I Tailor to specific disciplines.I Organizational matters.

63 / 64

Page 64: Computing in Science Education (CSE) A New Way to …ntg/hjorth-jensen_osucse.pdf · Computing in Science Education (CSE) A New Way to Teach Science? Morten Hjorth-Jensen National

Summary

CSEI Try to accomodate an international trend.I Make our research visible in early undergraduate courses,

enhance research based teachingI Possibility to focus more on understanding and increased

insight.I Impetus for broad cooperation in teaching.I Strengthening of instruction based teaching (expensive

and time-consuming).I Give our candidates a broader and more up-to-date

education with a problem-based orientation, oftenrequested by potential employers.

I And perhaps the most important issue: does this enhancethe student’s insight in the Sciences?

64 / 64