KEMBAR78
Lecture 1 | PDF | Numerical Analysis | Python (Programming Language)
0% found this document useful (0 votes)
15 views23 pages

Lecture 1

The document outlines the course CL249 for Autumn 2025, taught by Prof. Swati Bhattacharya, focusing on coding and numerical methods. Students are expected to write their own code without the aid of AI tools, and the grading consists of 70% for weekly assignments and 30% for a written exam. Key topics include numerical algorithms, Python programming, and various mathematical methods relevant to engineering problems.

Uploaded by

tanmoy010904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views23 pages

Lecture 1

The document outlines the course CL249 for Autumn 2025, taught by Prof. Swati Bhattacharya, focusing on coding and numerical methods. Students are expected to write their own code without the aid of AI tools, and the grading consists of 70% for weekly assignments and 30% for a written exam. Key topics include numerical algorithms, Python programming, and various mathematical methods relevant to engineering problems.

Uploaded by

tanmoy010904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Introduction

CL249
2025 Autumn
Prof. Swati Bhattacharya
Course Introduction
• Instructor: Prof. Swati Bhattacharya
• Email swaticb@che.iitb.ac.in
• Office: Lab 2A, CESE-DESE Building [Click for Coordinates]
• Office Hours: Email for Appointment.
• In general, on days without CL249 classes, I am available between 4
and 5 PM.
• You can also drop by in the morning between 10 AM-12 PM on most
days..
Teaching Method
• Teaching Method: As a lab course, students will work out problems by
themselves. I will give a brief summary/recap of the tools in the first hour.
Then assign a problem. Students will solve in class.
• Sharing: Some slides, or material will be shared on Moodle. Reading
material, links to online Tuts if necessary will be shared on Moodle. This is
particularly important in the first two weeks.
• Combined class for both sections.
• Tuesdays: Lecture and Solving Problems in class. Students will upload the
solutions, codes in moodle.
• Fridays: Viva and grading. A slot will be given for each student. You will
bring your laptops and demonstrate and explain your code to the TA.
Reasons why using AI to learn coding is bad
• Loss of coding skill
• Shallow understanding
• Inability to debug
• This course will be totally useless if you ask AI to write the codes
Outcome of this course-
(i) if you are given an algorithm- you should be able to translate it into
a code
(ii) You should also be able to create your own algorithms depending
on the problem you want to solve
AI Policy
▪ Purpose of the course is to help you go inside the black-box of the
software. You have to write your own codes.
▪ Students can use – Textbook, class notes, books on coding language
▪ You cannot ask ChatGPT or any such tool to write your codes
▪ If any student is caught using AI to write their codes- zero marks for that
particular class.
▪ We will switch off the WIFI in some classes.
▪ Please have an offline coding environment in your laptops
▪ You are allowed to use numpy, math, matplot. But you are not allowed to
use inbuilt functions for solving the problems. Eg. Linear algebra, ODE
packages. Small functions to calculate sin, cos, log etc are OK.
Expectations from Students
• Bring your own laptop. You will be coding in class in your own laptop.
• Please also keep a pen and paper on hand.
• Please set up an environment for python coding. Eg. Install Anaconda.
• You can also bring a textbook for reference, or keep a pdf version if
available.
• Each student will write his or her code individually. You should put
comments.
• Write your own codes, and demonstrate the code individually.
General Information
• TUESDAY: 14:00 to 16:55
• FRIDAY: 14:00 to 16:55
*Lecture on both Tuesday and Friday in the First week. This is an
exception.
* If required, we can convert Friday class to a lecture.
Examination and Grading
• 70% for weekly coding assignment
• 30% for end-semester exam, which is written.
• There is no mid-semester examination.
• Attendance policy: 80% attendance is required.
• Each week, only the weekly assignment will be evaluated and not
previous assignment.
• One extra day will be allotted for grading old assignments only for
those who have missed a class for valid medical reasons.
Why do we need numerical methods?

• Problem - Description

• Mathematical Model

• Solving the mathematical model

• Validation or using the solution


Computational techniques or numerical methods –
Using computers to solve problems that you cannot do directly with a
pen and paper.

General features of numerical algorithms:


Iterations
Repeated calculations
You can save the code and use it repeatedly by changing inputs
• Most engineering problems do not have solutions that can be solved
exactly analytically, i.e with pen and paper.
• We have to use computers to solve realistic problems.
• Don’t think of computers as black-boxes. We will learn about the
algorithms and their limitations.
• Algorithms should be
✓Clear
✓Concise
✓Robust
✓Require minimum resources
✓Compute in reasonable amount of time
Popularity and importance of Numerical
Methods
• Widespread use of computers
• Wide availability of software packages
• Now possible for us to take up realistic problems even at the
classroom level.

Serious Issue:
• Using software tools blindly
• Not having any idea of the methods and their limitations
• How to choose a technique
Stock Image for illustration
CRE example
• Determine the activation energy
for decomposition of benzene
diazonium chloride to give
chlorobenzene and nitrogen:
𝐸𝐴
𝑘 = 𝐴𝑒𝑥𝑝 −
𝑅𝑇

𝒌 (𝒔−𝟏 ) 0.000 0.001 0.001 0.003 0.007


43 03 80 55 17
𝑇 (𝐾) 313.0 319.0 323.0 328.0 333.0
CRE example

𝐸𝐴
𝑘 = 𝐴𝑒𝑥𝑝 −

ln(𝑘)
𝑅𝑇
𝐸𝐴
Gives ln 𝑘 = ln 𝐴 −
𝑅𝑇

𝐽
Take 𝑅 = 8.314
𝑚𝑜𝑙⋅𝐾
1/𝑇
Text books
• Numerical Methods for Engineers, Chapra and Canale
• Numerical Methods for Engineers, S. K. Gupta
Broad Topics
1) Simultaneous Linear Equations
2) Roots of Nonlinear Equations
3) Curve Fitting via Interpolation
4) Numerical Integration
5) Differentiation
6) Curve Fitting via Regression
7) Ordinary Differential Equations. (Initial Value and Boundary Value
Problems)
8) Partial Differential Equations
Python
• Easy to learn
• Platform independent
• Free and Open Source (you can code at home without needing any
license)
• Portable
• Rich Library Support
• Plenty of tutorials available online
• Interpreted – Easy to Debug
Python
1. Install Anaconda
https://docs.anaconda.com/anaconda/install/windows/
It is recommended that you use Linux as your OS. But even with Windows,
you can install.

Instruction Video:
https://youtu.be/WUeBzT43JyY?si=1ZzoddH-I0ZJWJnT
Or
2. Try Jupyter directly on your browser
https://jupyter.org/try
Link to videos for Jupyter notebook
https://youtu.be/WUeBzT43JyY?si=sn9UsettYLvk2Pgr
Or
https://youtu.be/Ou-7G9VQugg?si=blMEn9Pk2JC5jq7X
Topics to learn in python
• Variables, Strings
• Tuples, Lists, Numpy Arrays, Multidimensional Arrays
• Arithmetic Operators, Comparison Operators,
• Conditionals: i.e., if, elif,else
• Loops: while, for, continue
• Type conversion
• Mathematical Functions, abs, max,min,
• Printing output
• Open and close file, Read data, Write data
• Functions, Modules
• Plots (2D and 3D, surface plots)
• Advanced: Error control, i.e Try, except

You might also like