- Computational Physics Laboratory
- Summary
Course Syllabus
Obiettivi
Conoscenza e capacità di comprensione: lo studente dovrà apprendere le basi del calcolo scientifico numerico.
Conoscenza e capacità di comprensione applicate: lo studente dovrà essere in grado di applicare i concetti del calcolo scientifico numerico allo studio di problemi di interesse per la Fisica con il computer.
Autonomia di giudizio: lo studente svilupperà capacità critiche e di giudizio nel saper scegliere tra gli strumenti forniti a lezione quello più appropriato per la soluzione di un determinato problema specifico, come ad esempio la scelta di un determinato algoritmo.
Abilità comunicative: lo studente dovrà acquisire un linguaggio scientifico corretto e appropriato alle tematiche svolte nel corso
Capacità di apprendere: lo studente sarà in grado di approfondire concetti specifici, non presentati durante il corso, e di proseguire in modo autonomo nello studio avanzato su testi scientifici specializzati.
Contenuti sintetici
Introduzione e concetti base della programmazione al computer. Metodi per la soluzione numerica di integrali, equazione differenziali ordinarie, sistemi lineari di equazioni e loro applicazioni.
Programma esteso
Introduzione e concetti base
- Rappresentazione dei numeri su un computer, aritmetica floating-point ed errori di round-off
- Propagazione degli errori, Condition Numbers, e stabilità
Interpolazione/Ottimizzazione
- Interpolazione tramite polinomi
Integrazione numerica
- La formula di integrazione di Newton e Cotes: regola dei trapezi, metodo di Simpson, forumle composte, etc.
- Metodi di integrazione Gaussiana. Analisi degli errori
- Applicazione ad integrali semplici
Sistemi di equazioni lineari
- Teniche e algoritmi per la soluzione di sistemi lineari
- Data Fitting: problema lineare dei minimi quadrati e l'equazione normale
Ricerca degli zeri e punti di minimo tramite metodi iterativi
- Sviluppo dei metodi iterativi e studio della loro convergenza
- Metodi e algoritmi: bisezione, Newton-Raphson, etc.
- Alcune applicazioni
Problema degli autovalori
- Introduzione e nozione sugli autovalori
- Metodi per la determinazione degli autovalori e autovettori di una matrice
Equazioni differenziali ordinarie
- Alcuni teoremi sulla teoria delle equazioni differenziali ordinarie
- Tecniche per la soluzione numerica di un'equazione differenziale: metodo di Eulero, Runge-Kutta
- Alcune applicazioni
Prerequisiti
Insegnamenti degli anni precedenti. Non sono richiesti prerequisiti particolari a livello di programmazione oltre alla conoscenza dei concetti base del linguaggio C: struttura di un codice, definizione di una variabile, di un array, di una funzione e di un ciclo.
Modalità didattica
L'attività si svolge esclusivamente in presenza nel laboratorio di informatica "Marco Comi" (aula 2026, piano 2, edificio U2). Le tecniche numeriche per la soluzione degli esercizi vengono presentate in alcune lezioni teoriche; ogni studente esegue in modo individuale le esercitazioni sotto la supervisione e con il supporto del docente.
Materiale didattico
Verranno caricate le note dei docenti sulla pagina del corso.
In aggiunta, si consiglia la consultazione dei seguenti volumi:
Titolo: Matematica numerica (4a ed.)
Autori: A. Quarteroni, R. Sacco, F. Saleri, P. Gervasio
Editore: Springer
Lingua: Italiano
Titolo: Calcolo Scientifico: Esercizi e problemi risolti con MATLAB e Octave (6a ed.)
Autori: A. Quarteroni, F. Saleri, P. Gervasio
Editore: Springer
Lingua: Italiano
Titolo: Introduction to Numerical Analysis (3a ed.)
Autori: J. Stoer, R. Bulirsch
Editore: Springer
Lingua: Inglese
Titolo: Numerical Recipes
Autori: William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery
Editore: CAMBRIDGE UNIVERSITY PRESS
Lingua: Inglese
Periodo di erogazione dell'insegnamento
Il primo turno del corso si terrà durante il primo semestre, mentre il secondo turno durante il secondo semestre. Gli studenti verranno divisi dai docenti sui due turni.
Modalità di verifica del profitto e valutazione
- Nel laboratorio lo studente deve risolvere numericamente una serie di problemi scrivendone il corrispondente codice.
- Ogni studente raccoglie i risultati ottenuti e lo studio effettuato in una relazione che deve essere inviata in formato pdf per email al docente almeno due settimane prima dell'orale, insieme ai codici e ai risultati.
- Esame orale che consiste nella discussione della relazione, delle soluzioni agli esercizi e del materiale
La valutazione finale è determinata dall'esame orale (3.) tenendo conto del report (2.) e dell'attivita' di laboratorio (1.)
Se lo desiderano, gli studenti (Erasmus) possono sostenere l'esame in lingua inglese (sia la parte orale che la relazione scritta).
Gli studenti che seguiranno il corso durante il primo o il secondo semestre verranno valutati dai docenti corrispondenti.
Orario di ricevimento
Su appuntamento, scrivendo un'e-mail al docente di riferimento del turno (primo o secondo semestre)
Sustainable Development Goals
Aims
Knowledge and understanding: The student will learn the basis of scientific numerical calculus.
Applying knowledge and understanding: The student will learn to apply the concepts of scientific numerical calculus to the study of physically interesting problems using the computer.
Making judgments: The student will develop critical thinking and judgment skills in selecting the most appropriate tool, among those provided during the course, to solve a specific problem.
Communication skills: The student will be expected to acquire a correct and appropriate scientific language suited to the topics covered in the course.
Learning skills: The student will be able to deepen their understanding of specific concepts not covered during the course and to independently pursue advanced study using specialized scientific texts.
Contents
Introduction and basic concepts of computer programming. Methods to numerically solve integrals, ordinary differential equations, linear systems of equations, and their applications.
Detailed program
Introduction and basic concepts
- Representation of Numbers on a Computer, round-off errors and Floating-Point Arithmetic
- Error Propagation, Condition Numbers, and Stability
Interpolation/Optimization
- Interpolations by Polynomials
Topics in Integration
- The Integration Formulas of Newton and Cotes: Trapezoidal rule, Simpson’s rule, Composite rules, etc.
- Gaussian Integration Methods. Error Analysis
- Applications to simple integrals
Systems of Linear Equations
- Techniques and Algorithms for solving Linear Systems
- Data Fitting: Linear Least Squares and the Normal Equation
Finding Zeros and Minimum Points by Iterative Methods
- Development of Iterative Methods and their Convergence
- Basic Methods and Algorithms: Bisection, Newton-Raphson, etc.
- Applications
Eigenvalue Problems
- Introduction and basic facts on Eigenvalues
- Methods for Determining the Eigenvalues and Eigenvectors of a Matrix
Ordinary Differential Equations
- Some Theorems from the Theory of Ordinary Differential Equations
- Techniques for the numerical solution of a differential equation: Euler, Runge-Kutta
- Applications
Prerequisites
Teachings of previous years. No particular coding skills are required other than very basic concepts of the C programming language, like the general structure of a code and the definition of a variable, of an array, of a function and of a loop.
Teaching form
Activity is carried out in the computer lab "Marco Comi" (room 2026, 2nd floor, building U2). The numerical techniques useful for solving the exercises are presented in a few theoretical lectures; each student works individually with the support of the teacher in case of need.
Textbook and teaching resource
The lecture notes by the teachers will be uploaded on the course webape.
In addition, we recommend the students to consult the following books:
Title: Numerical Mathematics (2nd ed.)
Authors: A. Quarteroni, R. Sacco, F. Saleri
Editor: Springer
Language: English
Title: Scientific Computing with MATLAB and Octave (4th ed.)
Authors: A. Quarteroni, F. Saleri, P. Gervasio
Editor: Springer
Language: English
Title: Introduction to Numerical Analysis (3rd ed.)
Authors: J. Stoer, R. Bulirsch
Editor: Springer
Language: English
Title: Numerical Recipes
Authors: William H. Press, Saul A. Teukolsky, William T. Vetterling, Brian P. Flannery
Editor: CAMBRIDGE UNIVERSITY PRESS
Language: English
Semester
The first instance of the course will take place during the first semester, while a second instance will take place during the second semester. Students will be split up in the two instances by the teachers.
Assessment method
- In the computer lab the student has to solve numerically a number of execises by writing computer codes.
- Every student collects the results of the study in a written report. The report (in pdf format) as well as the codes and the results of the numerical study have to be sent to the teacher by email at least two weeks before the exam.
- The exam, oral, consists in the discussion of the report and the solutions of the exercises.
The overall evaluation is determined from the oral exam (3.) and informed by the lab activity (1.) and the final report(2.).
If desired, (Erasmus) students can give the exam in English (both the oral part and the written report).
The students that will attend the course during the first or second semester will be evaluated by the corresponding teachers.
Office hours
By fixing an appointment via e-mail with the teacher of the corresponsping semester (first and second)