PHY3134 Computational Physics
2011-2012
Code: PHY3134
Level: 3
Title: Computational Physics
Instructors:
Dr J.M. Rowe
CATS Credit Value: 10
ECTS Credit Value: 5
Pre-requisites: Scientific Programming in C (
PHY2004)
Co-requisites: N/A
Duration:
T2:01-11
Availability: unrestricted
Background Assumed: N/A
Directed Study Time: 22 hours
Private Study Time: 21 hours
Assessment Tasks Time: 57 hours
Aims
The ability to write computer programs is an important skill for
careers both inside and outside of physics. PHY2004 introduced the C
programming language. This module concentrates on the principles of
writing effective, debuggable and maintainable computer
programs and applies these principles to physics problems
The module is designed both for students who wish to become
professional computer programmers and for those to whom it is just
another module in the course. The course is taught in C but the
principles are applicable to any procedural programming language.
Intended Learning Outcomes
Students will be able to:
- to understand and apply the principles of designing and
writing debuggable and maintainable computer programs;
- design and code data structures that reflect the problems;
- write appropriately structured code based on short routines
of clear purpose, with simple and unambiguous interfaces;
- explain and use those features of the C programming
language not previosuly covered in PHY2004, in particular:
structures, pointers and simple memory management;
- draw on experience of writing more-substantial
programs which apply their skills in the C programming language
to simple physical problems.
Transferable Skills
Design and implementation of computer programs, C programming. Numerical
solution of problems.
Learning / Teaching Methods
6×1 hour lectures (involving discourse, dialogue and small-group exercises);
6×1 hour computer sessions and 5×2 hour computer sessions;
practical assignments, project work;
e-learing resources.
Assignments
Assignments in the first part of this module last one to two weeks and
allow students to put into practice the concepts introduced in the
seminars. These require independent study by the student but are supported
in the scheduled classes with help from the staff.
The second half of the module consists of a number of physics-based
projects designed to build upon the principles learnt in the
first section and to give the students experience in solving physical
problems.
Assessment
Coursework (60%), test (40%) in final week.
Syllabus Plan and Content
- C programming
- Revision of PHY2004 (Scientific Programming in C)
- Program design
- Data design
- Functions
- Variables and scope.
- Initialisation.
- Function Prototypes.
- Memory
- Pointers
- Arrays
- Memory allocation
- Structures
- Pointers to structures
- Using structures to pass data between functions
- Linked lists
- Projects
A number of projects based upon the Stage 2 physics course.
The background physics required for each project is provided for
the student in the project description.
Core Text
Not applicable
Supplementary Text(s)
Kernighan B.W. and Richie D.M. (1988),
The C Programming Language (2
nd edition), Prentice Hall, ISBN 0-13-110362-8 (UL:
001.6424/C KER)
Formative Mechanisms
Feedback and guidance is provided via the assignments, both in their
marking and in the help given during the classes.
Evaluation Mechanisms
The module will be evaluated using information gathered via the student representation mechanisms, the staff peer appraisal scheme, and measures of student attainment based on summative assessment.