chapter 6 partial differential equations...
TRANSCRIPT
4/11/17
1
Chapter6PartialDifferentialEquationsI
PHYS4840Prof.HannahJang-Condell
Announcements
• Problemset5dueWednesday,April12• Noclass4/20,noofficehours4/21• Problemset6dueWednesday,April26• Thefinalproblemsetisoptional,andwilltaketheplaceofyourcurrentlowestproblemsetscore.
• ThefinalexamwillbeThursday,May11at10:15amin**ENG2105**
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
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
4/11/17
4
Discussion
• Cantheboundaryconditionsforaninitialvalueproblembederivatives(andnotjustboundaryvalues)?
• Ifyouclaimthatderivativescouldbeused,whatkindofderivativeswouldtheybe:withrespecttotimeorspace?
Typesofboundaryconditions
• Dirichlet𝑢 𝑥 = 𝑎, 𝑡 =fixed
• Neumann𝑑𝑢𝑑𝑥 𝑥 = 𝑎, 𝑡 = 0
• Periodic(wrapsaround)
x
x=a x=b
𝑢 𝑥 = 𝑎, 𝑡 = 𝑢 𝑥 = 𝑏, 𝑡𝜕𝑇𝜕𝑥-./0
=𝜕𝑇𝜕𝑥-./1
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?
4/11/17
6
• ParabolicandhyperbolicPDEsaretypicallyinitialvalueproblemswithsomeboundaryconditionsimposed.
• EllipticPDEsaretypicallyboundaryvalueproblems
Solvinganinitialvalueproblem
t=nτ
x=−L/2+ihi = 0, … , Nh = L/N
ui,n=u(xi , tn)
time
4/11/17
7
Diffusion
• Supposeyouheatthecenterofaconductingmetalbartoahightemperature.TheendsofthebararefixedtoT=0 K.Howdoyouexpectthetemperatureasafunctionofpositionalongthebartoevolve?(Assumenoheatescapestotheairaroundit.)
Diffusion
• Example:heattransfer𝜕𝜕𝑡 𝑇 𝑥, 𝑡 = 𝜅
𝜕3
𝜕𝑥3 𝑇(𝑥, 𝑡)
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
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
4/11/17
10
Methodofimages
• Neumann
x
T
-L/2 L/2 –L L
Methodofimages
• Neumann
x
T
-L/2 L/2 –L L
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
4/11/17
12
Stabilityvs.efficiency
• Initialvalueproblem:stabilitymatters• Boundaryvalueproblem:efficiencymatters
• Stabilityforthediffusionproblem:
isthemaximumtimestep
tσ =h2
2κ