chapter 6 partial differential equations...

12
4/11/17 1 Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah Jang-Condell Announcements Problem set 5 due Wednesday, April 12 No class 4/20, no office hours 4/21 Problem set 6 due Wednesday, April 26 The final problem set is optional, and will take the place of your current lowest problem set score. The final exam will be Thursday, May 11 at 10:15am in **ENG 2105**

Upload: others

Post on 05-May-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

1

Chapter6PartialDifferentialEquationsI

PHYS4840Prof.HannahJang-Condell

Announcements

• Problemset5dueWednesday,April12• Noclass4/20,noofficehours4/21• Problemset6dueWednesday,April26• Thefinalproblemsetisoptional,andwilltaketheplaceofyourcurrentlowestproblemsetscore.

• ThefinalexamwillbeThursday,May11at10:15amin**ENG2105**

Page 2: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

2

OrdinaryDifferentialEquationsvs.

PartialDifferentialEquations

∂u∂t, ∂

2u∂t2,

∂u∂x, ∂

2u∂x2,

∂u∂y, ∂

2u∂y2,

dxdt, d

2xdt2,

Generalsecond-orderPDE

• Hyperbolic• Parabolic• Elliptic

A∂2u∂x2

+ B ∂2u∂x∂y

+C ∂2u∂y2

+D ∂u∂x

+ E ∂u∂y

+ Fu(x, y)+G = 0

B2−4AC > 0B2−4AC = 0B2−4AC < 0

Page 3: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

3

PDEExamples

• Hyperbolic(Ch 7)–Waveequation(7.1)

• Parabolic(Ch 6)– Diffusionequation(6.2)

• Elliptic(Ch 8)– Poissonequation ∂2u

∂x2+∂2u∂y2

= ρ(x, y)

∂u∂t=∂∂x

D ∂u∂x

"

#$

%

&'

∂2u∂t2

= v2 ∂2u∂x2

Initialvalueproblems

vsBoundaryvalue

problems

imagecredit:NumericalRecipesinC

time

Page 4: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

4

Discussion

• Cantheboundaryconditionsforaninitialvalueproblembederivatives(andnotjustboundaryvalues)?

• Ifyouclaimthatderivativescouldbeused,whatkindofderivativeswouldtheybe:withrespecttotimeorspace?

Typesofboundaryconditions

• Dirichlet𝑢 𝑥 = 𝑎, 𝑡 =fixed

• Neumann𝑑𝑢𝑑𝑥 𝑥 = 𝑎, 𝑡 = 0

• Periodic(wrapsaround)

x

x=a x=b

𝑢 𝑥 = 𝑎, 𝑡 = 𝑢 𝑥 = 𝑏, 𝑡𝜕𝑇𝜕𝑥-./0

=𝜕𝑇𝜕𝑥-./1

Page 5: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

5

PeriodicboundaryconditionsSupposewearerunningasimulationon10classicalparticles,eachofmassmandinitiallyatrestwithinacubeofdimensionL.Furthersupposethatweareemployingperiodicboundaryconditions,onallfacesofthecube,forboththepositionandvelocityoftheparticles.Eachparticlehasaspeedsuchthatitmovesadistancedxinonetimestepdt.Oneoftheparticlesinoursimulationisperpendicularlyapproachingthecenterofthebottomsideofthecube;attimestepNtheparticleis0.5*dxabovethecenterofthebottom.Inoursimulation,attimestepN+1wheredowefindthisparticle?

0.5*dx v=dx/dt

L

Supposeyouhavealongmetalbarthatconductsheat.

• HowwouldyoucreateDirchlet boundaryconditions?

• HowwouldyoucreateNeumannboundaryconditions?

• Howwouldyoucreateperiodicboundaryconditions?

Page 6: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

6

• ParabolicandhyperbolicPDEsaretypicallyinitialvalueproblemswithsomeboundaryconditionsimposed.

• EllipticPDEsaretypicallyboundaryvalueproblems

Solvinganinitialvalueproblem

t=nτ

x=−L/2+ihi = 0, … , Nh = L/N

ui,n=u(xi , tn)

time

Page 7: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

7

Diffusion

• Supposeyouheatthecenterofaconductingmetalbartoahightemperature.TheendsofthebararefixedtoT=0 K.Howdoyouexpectthetemperatureasafunctionofpositionalongthebartoevolve?(Assumenoheatescapestotheairaroundit.)

Diffusion

• Example:heattransfer𝜕𝜕𝑡 𝑇 𝑥, 𝑡 = 𝜅

𝜕3

𝜕𝑥3 𝑇(𝑥, 𝑡)

Page 8: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

8

Diffusion

• Example:heattransfer𝜕𝜕𝑡 𝑇 𝑥, 𝑡 = 𝜅

𝜕3

𝜕𝑥3 𝑇(𝑥, 𝑡)

• Analyticsolution:

𝑇6 𝑥, 𝑡 =1

𝜎(𝑡) 2𝜋� exp− 𝑥 − 𝑥@ 3

2𝜎3 𝑡𝜎 𝑡 = 2𝜅𝑡�

• Ast→0,limD→@

𝑇6 𝑥, 𝑡 = 𝛿(𝑥 − 𝑥@)

Diffusionsolution

x

T

Page 9: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

9

Methodofimages

• Constructasolutionfromasuperpositionofstates

𝑇 𝑥, 𝑡 = G −1 H𝑇6(𝑥 + 𝑛𝐿, 𝑡)L

H/ML

• ValidforDirchlet boundaryconditions,x0=0

Methodofimages

• Dirchlet

x

T

–L/2 L/2 –L L

Page 10: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

10

Methodofimages

• Neumann

x

T

-L/2 L/2 –L L

Methodofimages

• Neumann

x

T

-L/2 L/2 –L L

Page 11: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

11

ForwardTimeCenteredSpaceScheme

• Howdoyoucalculatethetemperatureevolutioncomputationally?

• Forwardtimederivative𝜕𝜕𝑡 𝑇 𝑥, 𝑡 =

𝑇(𝑥N, 𝑡H + 𝜏) − 𝑇(𝑥, 𝑡H)𝜏 =

𝑇NHPQ − 𝑇NH

𝜏• Centeredspacederivative

𝜕3

𝜕𝑥3 𝑇 𝑥, 𝑡 =𝑇NPQH + 𝑇NMQH − 2𝑇NH

ℎ3

FTCS

𝑇NHPQ = 𝑇NH +𝜅𝜏ℎ3 𝑇NPQH + 𝑇NMQH − 2𝑇NH

Page 12: Chapter 6 Partial Differential Equations Iphysics.uwyo.edu/.../lectures/411/Ch6_PDEsI_handout.pdf · 2017. 4. 13. · Chapter 6 Partial Differential Equations I PHYS 4840 Prof. Hannah

4/11/17

12

Stabilityvs.efficiency

• Initialvalueproblem:stabilitymatters• Boundaryvalueproblem:efficiencymatters

• Stabilityforthediffusionproblem:

isthemaximumtimestep

tσ =h2