## SCME211 Computer Programming and Simulation

Instructor: Chaiwoot Boonyasiriwat (chaiwoot@gmail.com) Class Hours: Tuesday (10:00AM - 1:00PM) Classroom: Computer Room in SC3 Objectives: To understand the fundamentals of computer programming and simulation, and to develop programming skills for solving real-world problems Grading: Homework 60, Examination 30, Participation 10 Policies: Copying the work of others without acknowledgement is not allowed and may result in a failure to pass the course ## Tentative Course Schedule

Lecture Date Lecture Notes Notifications 1 Aug 16, 2016 Course overview, computer system and architecture,Introduction to C programming Example codes 2 Aug 23, 2016 Introduction to C programming

Covered topics: Oracle Virtualbox, Ubuntu Linux system, vi, gedit, makeHomework 1: evaluating a finite series 3 Aug 30, 2016 Introduction to C programming

Brownian motionHomework 2: find prime numbers between 1 and 100 4 Sep 6, 2016 Introduction to C programming: array, introduction to Octave

1D random walk (random_walk1d_initial.cpp, random_walk1d_final.cpp), linear curve fitting5 Sep 13, 2016 Polynomial curve fitting, Gaussian elimination, power series and Taylor series expansion

Exercise: Radioactive decay (decay.cpp, view_decay.m, decay_incomplete.cpp)Homework 3: radioactive decay and 2D random walk 6 Sep 20, 2016 Writing programs with multiple source files, structure Homework 4: Julia set fractal

julia_incomplete.cpp, view_julia.m7 Sep 27, 2016 Octave programming, Euler method and the simulation of projectile motion with air drag

projectile.m, drag_projectile.m8 Oct 4, 2016 Summary 1: data types, data I/O, for loop, if else, structure, header, array, Taylor's series, finite difference approximation - Oct 11, 2016 Midterm examination 9 Oct 18, 2016 Answers to midterm exam problems, memory address, pointer, standard input/output, theory of least-squares curve fitting 10 Oct 25, 2016 Octave programming, graph plotting

Resources: Octave codesHomework 5 11 Nov 1, 2016 Numerical methods for solving differential equations

Resource: radioactive_decay.mHomework 6 12 Nov 8, 2016 Numerical methods for solving differential equations (continued)

Resource: simple_harmonic_euler.m, simple_harmonic_heun.mHomework 7, hw7_euler.m 13 Nov 15, 2016 Finite difference solution to PDEs

Resource: wave1d.m, gaussian.m, wave_packet_1d.mHomework 8 14 Nov 22, 2016 Finite difference solution to PDEs (continued)

Resource: arbitrary_well1d.m15 Nov 29, 2016 Summary of numerical methods - Dec 6, 2016 Final examination ## References

- A. R. Bradley, 2011, Programming for Engineers: A Foundational Approach to Learning C and Matlab, Springer. (Online access on campus only)
- Linge, S., and H. P. Langtangen, 2016, Programming for Computations - MATLAB/Octave: A Gentle Introduction to Numerical Simulations with MATLAB/Octave, Springer. (Online access on campus only)
- Quarteroni, A., F. Saleri, and P. Gervasio, 2014, Scientific Computing with MATLAB and Octave, Springer. (Online access on campus only)
- Wouwer, A. V., P. Saucez, and C. Vilas, 2014, Simulation of ODE/PDE Models with MATLAB, OCTAVE and SCILAB, Springer.(Online access on campus only)
- Boas, M. L., 2006, Mathematical Methods in the Physical Sciences, Chapter 1, 3rd Ed., John Wiley & Sons Inc.
- Chapra, S. C., and R. P. Canale, 2010, Numerical Methods for Engineers, McGraw-Hill.
- Deitel, P., and H. Deitel, 2010, C How to Program, Pearson Education.
- Heath, M. T., 2002, Scientific Computing: An Introductory Survey, Second Edition, McGraw-Hill.
- LeVeque, R. J., 2007, Finite Difference Methods for Ordinary and Partial Differential Equation, SIAM.