Download as pdf or txt
Download as pdf or txt
You are on page 1of 63

PHYS3330

Numerical Methods in Physics and Computational Techniques

Lecture 01

Prof. Fabiano Rodrigues


Department of Physics
William B. Hanson Center for Space Sciences
The University of Texas at Dallas
Richardson, TX
Click to edit Master title style
PHYS3330

§ This course covers fundamental concepts about


numerical methods and computational techniques
commonly used for solving problems not only in
Physics, but other sciences and engineering.

§ It requires computer programming.

§ We will cover high-level programming with MATLAB.


Today
Click to edit Master title style

§ Introduction and shameless promotion of space


sciences
§ Details about PHYS3330
The
Clickinstructor
to edit Master title style

2001: BSc. Electrical Engineering, UFSM, Brazil


2003: MSc. Space Physics, INPE, Brazil
2003: Research Associate, Nottingham, UK
2008: PhD, Electrical and Computer Eng., Cornell, USA
2008-2012: Research Engineer, ASTRA

2012-2018: Assistant Professor, Physics, UTD


2018-Ongoing: Associate Professor, Physics and EE, UTD
A
Click
biased
to edit
motivation:
Master title
Study
style
of the Earth’s ionosphere

§ Earth’s ionosphere

§ Neutral atmosphere
§ Solar radiation
§ Chemistry
§ Neutral winds
§ Electric field
§ Geomagnetic field
§ Plasma dynamics

§ Computer models
Click to edit
Modeling theMaster
Earth’stitle
ionosphere
style

US Naval Research Lab – NRL Model


Click to edit
Modeling theMaster
Earth’stitle
ionosphere
style
Ne

US Naval Research Lab – NRL Model


Click to edit
Modeling theMaster
Earth’stitle
ionosphere
style

Huba et al., NRL, SAMI3; Muralikrishna and Vieira, 2007


Click to edit
Beyond physics:
Master
Applications
title style of ionospheric studies

1 𝑒 ! 𝑁"
𝑛~ 1− !
𝜔 𝜖# 𝑚 "

Huba et al., NRL, SAMI3; Muralikrishna and Vieira, 2007


Click to edit
Beyond physics:
Master
Applications
title style of ionospheric studies

1 𝑒 ! 𝑁"
𝑛~ 1− !
𝜔 𝜖# 𝑚 "

Matthew Proctor, 2017.


The
ClickW.
to B.
edit
Hanson
MasterCenter
title style
for Space Sciences
Ne [cm-3]
104 105 106

1000 DMSP

500
C/NOFS
Cubesats
200
Altitude (km)

100

50

20

10
Rockets

§ Provide new and accurate observations of the ionosphere and interpretation of these observations.
Click tostudies
Radar edit Master
of thetitle
ionosphere
style

𝑃∝ 𝑁 𝑘, 𝑓 !

f0 fDoppler
Click to edit Master title style

Arecibo, Puerto Rico

13
Poker Flat, AK Sondrestrom, Greenland
Click to edit Master title style

Millstone Hill, MA

ALTAR, Marshall Is. Jicamarca, Peru


Arecibo, Puerto Rico

14
Click to edit Master
Ionospheric Radar Remote
title styleSensing

Aug 7 2004
19:40:04 LT 19:58:04 LT 20:46:04 LT
700
Altitude (km)

-700 E-W Distance (km) 0

NASA EQUIS II rocket campaign, Hysell et al., 2004.


Click to edit
Modeling theMaster
Earth’stitle
ionosphere
style

(1)

(2)

(3)

Yokoyama et al. (2015)


Click to edit
Beyond physics:
Master
Applications
title style of ionospheric studies

1 𝑒 ! 𝑁"
𝑛~ 1− !
𝜔 𝜖# 𝑚 "

Matthew Proctor, 2017.


Click to edit Master
Opportunities for students
title style

Arecibo MIT Haystack NCAR NASA JSC Air Force Research Lab

Arecibo Jicamarca NCAR Sodankylä, Finland Arecibo


Click to edit Master title style
PHYS3330

§ Programming and numerical methods are not only good for


modeling.

§ Signal processing
§ Hardware
Click to edit
Signals of Opportunity
Master title style

vi
n
Click to edit
Signals of Opportunity
Master title style

vi
n
Click to edit
Signals of Opportunity
Master title style
Today
Click to edit Master title style

§ Introduction and shameless promotion of space


sciences
§ Details about PHYS3330
§ Questionnaire
This
Clickcourse
to edit Master title style

§ This course covers fundamental concepts about


numerical methods and computational techniques
commonly used for solving problems not only in
Physics, but other sciences and engineering.

§ It requires computer programming.

§ We will cover high-level programming with MATLAB.


Topics
Click totoedit
be Master
coveredtitle
(asstyle
much as we can)

1. Getting started with MATLAB


2. Solving non-linear equations
3. Solving systems of linear equations
4. Curve fitting
5. Curve interpolation
6. Spectral analyses
7. Numerical differentiation
8. Numerical integration
9. Ordinary Differential Equations: Initial-value problems
10. Ordinary Differential Equations: Boundary-value
problems
11. Partial Differential Equations
Click to edit Master title style

§ Thinking about some of topics covered in this course


Click to editequations
Non-linear Master title style
Click to editequations
Non-linear Master title style

20

15

10

5
f( )

−5

−10

−15

−20
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Click to editequations
Non-linear Master title style

20

15

10

5
f( )

−5

−10

−15

−20
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Click tosystem
Linear edit Master
of equations
title style
Click tosystem
Linear edit Master
of equations
title style
Click tosystem
Linear edit Master
of equations
title style
Click toCurve
Linear edit Master
Fitting title style

10

0
y

−2

−4

−6

−8
𝑦 = 𝛼$ + 𝛼! 𝑥
−10
0 2 4 6 8 10
x
Click toCurve
Linear edit Master
Fitting title style

10

0
y

−2

−4

−6

−8
𝑦 = 7.06 − 1.23𝑥
−10
0 2 4 6 8 10
x
Click toCurve
Linear edit Master
Fitting title style

10 10

8 8

6 6

4 4

2 2

0 0
y

y
−2 −2

−4 −4

−6 −6

−8
𝑦 = 7.06 − 1.23𝑥 −8 𝑦 = 8.70 − 1.68𝑥
−10 −10
0 2 4 6 8 10 0 2 4 6 8 10
x x
Click to editcurve
Non-linear Master
fitting
title style

100

𝑦 = 𝑓%&%'()% (𝛼,
⃗ 𝑥)
80

60
Amplitude (V)

40

20

−20
−1 0 1 2 3 4 5 6
t (seconds)
Click to Analysis
Fourier edit Master title style

Time Domain
Click to Analysis
Fourier edit Master title style

Time Domain Frequency domain


Click to edit Master title style
Discretization

0.8

0.6

0.4

0.2
Potential [V]

−0.2

−0.4

−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to edit Master title style
Discretization

0.8

1
𝑆𝑖𝑔𝑛𝑎𝑙 𝑠𝑎𝑚𝑝𝑙𝑒𝑑 𝑎𝑡 𝑓* =
0.6
Δ𝑡
0.4

0.2
Potential [V]

−0.2

−0.4

−0.6

Δ𝑡
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to edit Master title style
Discretization

0.8

1
𝑆𝑖𝑔𝑛𝑎𝑙 𝑠𝑎𝑚𝑝𝑙𝑒𝑑 𝑎𝑡 𝑓* =
0.6
Δ𝑡
0.4

0.2
Potential [V]

−0.2

−0.4

−0.6

Δ𝑡
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editDifferentiation
Numerical Master title style

0.8

𝑑𝑉 𝑡
0.6
=?
𝑑𝑡
0.4

0.2
Potential [V]

−0.2

−0.4

−0.6

Δ𝑡
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editDifferentiation
Numerical Master title style

0.8

𝑑𝑉 𝑡) V t +,$ − V(t +'$ )


~
𝑑𝑡 2Δ𝑡
0.6

0.4

0.2
Potential [V]

−0.2

−0.4

−0.6

Δ𝑡
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editDifferentiation
Numerical Master title style

0.8

0.6

0.4

0.2
Potential [V]

−0.2

−0.4

𝑉 = 𝐴𝑡 ! + 𝐵𝑡 + 𝐶
−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editIntegration
Numerical Master title style

0.8

0.6 ∫ 𝑉 𝑡 𝑑𝑡 = ?

0.4

0.2
Potential [V]

−0.2

−0.4

−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editIntegration
Numerical Master title style

0.8

0.6 ∫ 𝑉 𝑡 𝑑𝑡 ~ P 𝑉 𝑡 Δ𝑡
)
0.4

0.2
Potential [V]

−0.2

−0.4

−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editIntegration
Numerical Master title style

0.8

0.6

0.4

0.2
Potential [V]

−0.2

−0.4

𝑉 = 𝐴𝑡 ! + 𝐵𝑡 + 𝐶
−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to editIntegration
Numerical Master title style

0.8

0.6

0.4

0.2
Potential [V]

−0.2

−0.4

𝑉 = 𝐴𝑡 ! + 𝐵𝑡 + 𝐶
−0.6
0 1 2 3 4 5 6 7 8 9 10
Time [s]
Click to edit
Ordinary Differential
Master title
Equation
style (ODE): Example
𝑖(𝑡)

𝑉! 𝑡 = 𝑖 𝑡 𝑅
𝑉(𝑡)
𝑑𝑖 𝑡
𝑉" 𝑡 = 𝐿
𝑑𝑡

“Explicit” methods
Click to edit
Ordinary Differential
Master title
Equation
style (ODE): Example
𝑖(𝑡)

𝑉 𝑡 − 𝑉- 𝑡 − 𝑉. 𝑡 = 0
𝑉! 𝑡 = 𝑖 𝑡 𝑅
𝑉(𝑡) 𝑑𝑖(𝑡)
𝑑𝑖 𝑡 𝑉 𝑡 −𝑖 𝑡 𝑅−𝐿 =0
𝑉" 𝑡 = 𝐿 𝑑𝑡
𝑑𝑡
𝑑𝑖(𝑡)
𝐿 =𝑉 𝑡 −𝑖 𝑡 𝑅
𝑑𝑡

𝑑𝑖(𝑡) 1 𝑅
= 𝑉 𝑡 − 𝑖 𝑡
𝑑𝑡 𝐿 𝐿

𝑑𝑦(𝑥)
= 𝐴𝑔(𝑥) − 𝐵𝑦 𝑥
𝑑𝑥
“Explicit” methods
𝑑𝑦(𝑥)
= 𝑓(𝑥)
𝑑𝑥
Click to edit
Ordinary Differential
Master title
Equation
style (ODE): Example
𝑖(𝑡)

𝑉 𝑡 − 𝑉- 𝑡 − 𝑉. 𝑡 = 0
𝑉! 𝑡 = 𝑖 𝑡 𝑅
𝑉(𝑡) 𝑑𝑖(𝑡)
𝑑𝑖 𝑡 𝑉 𝑡 −𝑖 𝑡 𝑅−𝐿 =0
𝑉" 𝑡 = 𝐿 𝑑𝑡
𝑑𝑡
𝑑𝑖(𝑡)
𝐿 =𝑉 𝑡 −𝑖 𝑡 𝑅
𝑑𝑡

𝑑𝑖(𝑡) 1 𝑅
= 𝑉 𝑡 − 𝑖 𝑡
𝑑𝑡 𝐿 𝐿

𝑑𝑦(𝑥)
= 𝐴𝑔(𝑥) − 𝐵𝑦 𝑥
𝑑𝑥

𝑑𝑦(𝑥)
= 𝑓(𝑥)
𝑑𝑥
Click to edit
Ordinary Differential
Master title
Equation
style (ODE): Example
𝑖(𝑡)

𝑉 𝑡 − 𝑉- 𝑡 − 𝑉. 𝑡 = 0
𝑉! 𝑡 = 𝑖 𝑡 𝑅
𝑉(𝑡) 𝑑𝑖(𝑡)
𝑑𝑖 𝑡 𝑉 𝑡 −𝑖 𝑡 𝑅−𝐿 =0
𝑉" 𝑡 = 𝐿 𝑑𝑡
𝑑𝑡
𝑑𝑖(𝑡)
𝐿 =𝑉 𝑡 −𝑖 𝑡 𝑅
𝑑𝑡

𝑑𝑖(𝑡) 1 𝑅
= 𝑉 𝑡 − 𝑖 𝑡
𝑑𝑡 𝐿 𝐿

𝑑𝑦(𝑥)
= 𝐴𝑔(𝑥) − 𝐵𝑦 𝑥
𝑑𝑥

𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#
Click to edit
Ordinary Differential
Master title
Equation
style (ODE): Example
𝑖(𝑡)

𝑉 𝑡 − 𝑉- 𝑡 − 𝑉. 𝑡 = 0
𝑉! 𝑡 = 𝑖 𝑡 𝑅
𝑉(𝑡) 𝑑𝑖(𝑡)
𝑑𝑖 𝑡 𝑉 𝑡 −𝑖 𝑡 𝑅−𝐿 =0
𝑉" 𝑡 = 𝐿 𝑑𝑡
𝑑𝑡
𝑑𝑖(𝑡)
𝐿 =𝑉 𝑡 −𝑖 𝑡 𝑅
𝑑𝑡

𝑑𝑖(𝑡) 1 𝑅
= 𝑉 𝑡 − 𝑖 𝑡
𝑑𝑡 𝐿 𝐿

𝑑𝑦(𝑥)
= 𝐴𝑔(𝑥) − 𝐵𝑦 𝑥
𝑑𝑥

𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ] Initial value
𝑑𝑥
problem
𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#
Click to editofMaster
Statement the Problem
title style
𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#

y(x) 𝑦 𝑥 =?

𝑦),$ = 𝑦) + 𝑠𝑙𝑜𝑝𝑒 × ℎ

𝐴𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑠𝑙𝑜𝑝𝑒 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑤𝑖𝑡ℎ𝑖𝑛 ℎ.

𝑑𝑦
𝑠𝑙𝑜𝑝𝑒 = \ = 𝑓 𝑥) , 𝑦(𝑥) )
𝑑𝑥 /0/
!

y0

x0 x1 … xN-1 x
Click to editofMaster
Statement the Problem
title style
𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#

y(x) 𝑦 𝑥 =?

𝑦),$ = 𝑦) + 𝑠𝑙𝑜𝑝𝑒 × ℎ

𝐴𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑠𝑙𝑜𝑝𝑒 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑤𝑖𝑡ℎ𝑖𝑛 ℎ = 𝑥),$ − 𝑥) .

𝑑𝑦
𝑠𝑙𝑜𝑝𝑒 = \ = 𝑓 𝑥) , 𝑦(𝑥) )
𝑑𝑥 /0/
!

y0

x0 x1 … xN-1 x
Click to editofMaster
Statement the Problem
title style
𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#

y(x) 𝑦 𝑥 =?

𝑦),$ = 𝑦) + 𝑠𝑙𝑜𝑝𝑒 × ℎ

𝐴𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑠𝑙𝑜𝑝𝑒 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑤𝑖𝑡ℎ𝑖𝑛 ℎ = 𝑥),$ − 𝑥) .

𝑑𝑦
𝑠𝑙𝑜𝑝𝑒 = \ = 𝑓 𝑥) , 𝑦(𝑥) )
𝑑𝑥 /0/
!

y0

x0 x1 … xN-1 x
Click to editofMaster
Statement the Problem
title style
𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#

y(x) 𝑦 𝑥 =?

𝑦),$ = 𝑦) + 𝑠𝑙𝑜𝑝𝑒 × ℎ

𝐴𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑠𝑙𝑜𝑝𝑒 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑤𝑖𝑡ℎ𝑖𝑛 ℎ = 𝑥),$ − 𝑥) .

𝑑𝑦 y(t)
𝑠𝑙𝑜𝑝𝑒 = \ = 𝑓 𝑥) , 𝑦(𝑥) )
𝑑𝑥 /0/
!

y0

x0 x1 … xN-1 x
Click to editofMaster
Statement the Problem
title style
𝑑𝑦(𝑥)
= 𝑓[𝑥, 𝑦 𝑥 ]
𝑑𝑥

𝑊𝑖𝑡ℎ 𝑦 𝑥# = 𝑦#

y(x) 𝑦 𝑥 =?

𝑦),$ = 𝑦) + 𝑠𝑙𝑜𝑝𝑒 × ℎ

𝐴𝑠𝑠𝑢𝑚𝑖𝑛𝑔 𝑠𝑙𝑜𝑝𝑒 𝑖𝑠 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑤𝑖𝑡ℎ𝑖𝑛 ℎ = 𝑥),$ − 𝑥) .

𝑑𝑦 y(t)
𝑠𝑙𝑜𝑝𝑒 = \ = 𝑓 𝑥) , 𝑦(𝑥) )
𝑑𝑥 /0/
!

y0

x0 x1 … xN-1 x
Click to edit
Logistics: Brazos
Master
Labtitle style

§ 32 computers/seats are available.

§ We can only have 16 students [50% occupancy]


Click to edit Master title style
Logistics

1st Week:

- Everyone on Tuesday at SCI 2.204


- 16 students on Thursday at FO 1.206C

Potential route for 2nd and 3rd weeks:

- Slides with theory posted on Friday


- ½ class using laptops on Tuesday at SCI 2.204
- ½ class using lab PCs on Thursday at FO 1.206C
Click to edit
Material andMaster
Textbook
title style

§ Lecture slides will be made available every week


through eLearning.

§ A copy of Matlab is available to students. See


https://www.utdallas.edu/oit/howto/matlab/

§ You are responsible for saving your codes and data.


Click to edit
Material andMaster
Textbook:
titleUTD’s
style MATLAB copy
https://www.utdallas.edu/oit/howto/matlab/
Click to edit
Material andMaster
Textbook:
titleUTD’s
style MATLAB copy

You might also like