Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
NumericalAlgorithmsforPhysics:ProjectList
AndreaMignonePhysicsDepartment,UniversityofTorino
AA2018-2019
WritingtheProject• InthefollowingIwillshowalistofprojectsforthiscourse.
• Eachprojectshouldbenomorethan≈10pageslong(excludingthecodelistedintheappendix).
• A.pdffileisstronglyrecommended.
• Thedocumentstructureshouldconsistsof
– Anabstract/Introductorypartwherethephysicalproblemisexplainedandwhyweneedtoresorttonumericalintegration.
– Atestsectionwherethenumericalmethodisvalidatedagainstknownanalytical/referencesolution.
– Amodelstudyoftheproblemincludingplots.– Afinalsummary/discussion.– Anappendixincludingthecodeusedfortheproject,usingfixed-sizefonts(afontwhose
lettersandcharacterseachoccupythesameamountofhorizontalspace,e.g.,Courier,CourierNew,LucidaConsole,Monaco,andConsolas).
Project#1:FinitePotentialWell• Considerthetime-independentSchrödingerequationinonedimension,
whereψ(x)isthewavefunction,mistheparticlemass,EitsenergyandV(x)isthe
potentialenergy.Theprobabilitytofindtheparticlebetweenxandx+dxis• Considerthepotentialwellgivenby
• InthiscasetheSchrödingerequationbecomes
• Sincethepotentialissymmetric,weassumethatthewavefunctionshavedefined
parity(oddoreven).
Project#1:FinitePotentialWell:Wavefunctions• ForanevenwavefunctionwemusthaveInx=aweimposecontinuityconditions:BysolvingthisequationweobtaintheeigenvaluesE.Rememberthatαandβare
functionsofE.
• Foranoddfunction,andimposingthesamecontinuityconditionsweget
Project#1:FinitePotentialWell:Purpose• Computetheeigenvaluesofthefinitepotentialwell.
• Usedimensionlessunitsbyintroducingsothattheequationstobesolved(inη)are:• Lookforboundstateswhichsatisfy–K<η<0and,toavoiddealingwithsingularities
inthetangentitisbettertorewritetheequationsas
Project#2:RealisticProjectileMotion• Weconsiderthemotionofaparticlesubjecttodragforce
whereisthedragforceduetoairresistance(forthepresentcalculationyoucanuseB = 4.e-5 m-1).
• Thisforceisalwaysoppositetovelocityandthereforeremembertowriteitinvectorcomponents.
• Foragiveninitialvelocityv0anddistanceLtoatarget,determinetheangles(ifany)youmustorientyourcannonatinordertohitthetarget.
y
xθ
L
Project#3:RealisticPendulum• Hereweconsidertheequationofapendulumforarbitraryamplitudeandsubjectto
dampingaswellasdrivingforce:
• HereqisameasureofdampingwhileFDandΩDaretheamplitudeandfrequencyofthedrivingterm.Transformtheproblemintoasystemofcoupled1storderODE:
• Sothatourvectorofunknownsis,Y = (θ, ω).
• Withzerodrivingforcethemotionisdamped.– WithFD=0.5therearetworegimes:– AninitialtransientdecaywherethemotionwithangularfrequencyOmegaisdamped– Afollowingphasewherethependulumsettlesinintoasteadyoscillationinresponsetothe
drivingforce.
Project#3:RealisticPendulum• ThebehaviorchangesdramaticallywhenFD=1.2sincethemotionisnolongersimple
evenatlongtimes.• Thesystemdoesnotsettleintoarepeatingsteadystatebehaviorandthisisan
indicationofchaoticbehavior.
Project#4:theDoublePendulum• Adoublependulumconsistsofonependulum
attachedtoanother.Itisanexampleofasimplephysicalsystemwhichcanexhibitchaoticbehavior.
• Consideradoublebobpendulumwithmassesm1 andm2 attachedbyrigidmasslesswiresoflengthsL1andL2.Further,lettheanglesthetwowiresmakewiththeverticalbedenotedθ1andθ2.
• Thepositionofthetwomassesaregivenby
Project#4:theDoublePendulum• Aftersometediousalgebra,theequationsofmotioncanbewrittenas:
• Usingm1 = m2 andL1 = L2,studythedoublependulummotionbydirectintegrationoftheequationsofmotion.
• Trytoaddressthefollowingissues:
– Isenergyconserved?– Canyoudeterminearangeofinitialconditionthatleadsthesystemtochaos?– Doesthependulumflip?
Project#5:Three-bodyproblem• Considerthesimplestthree-bodyproblemgivenbytheearth,theSunandJupiter.
• WeknowthatwithoutJupiter,theEarth’sorbitisstableanddoesnotchangeintime.
• OurobjectiveistoquantifyhowmucheffectthegravitationalfieldofJupiterhasonEarth’smotion.
• ChangetheJupitermassbyafactorof10,100and1000:doyoustartseeinganeffect?
Project#6:Lane-EmdenEquation• Inastrophysics,theLane–EmdenequationisadimensionlessformofPoisson's
equationforthegravitationalpotentialofaNewtonianself-gravitating,sphericallysymmetric,polytropicfluid.ItisnamedafterastrophysicistsJonathanHomerLaneandRobertEmden.
• Asphericallysymmetricstarinhydrostaticequilibriummustobeythehydrostaticbalanceequation
wheremassisrelatedtodensityby
• Assuminganadiabatic“quasi-static”changeofstateofthegasfollowing:
onecanrewritethepreviousequationasThisistheLane-Emdenequation.• Theequationiswrittenintermsofdimensionlessvariabledefinedby
Project#6:Lane-EmdenEquation• ExactsolutionstotheLane-Emdenexistforn=0,1,5(seee.g.,wikipedia)but
otherwisenumericalintegrationmustbeused.• Boundaryconditions:togetauniquesolutiontotheLane-EmdenEquation,weneed
tospecifytwoboundaryconditionsforthis2ndorderODE.Arealisticmodelcannothavea‘cusp’attheoriginwhichmeansthat
• Becauseρ≈θn,onlyθ≥0canberealistic:thisdefinesthesurfaceofthepolytropeisdefinedastheradiusatwhichθfirstbecomeszero(orquitesmall).Thisisdesignatedasξs,so
• Ifthesurfaceseemstobeapproachinginfinityinsize,(e.g.forn=5)thecodeshouldstoptheintegration.
• Notethat,atthebeginning,anindefinitevalueof1/ξ*dθ/dξexists.Thisissolvedbyexpandingθas
Project#6:Lane-EmdenEquation• SolvetheLane-Emdenequationsfordifferentvalues
ofn=0,1,3/2,3.• Verify(whenpossible)againstanalyticalsolution
(e.g.n=1àθ=sinξ/ξ).• Findtheradiusofthedifferentpolytropesandmake
plotofthedensityinunitsofthecentraldensity.
• Forwhitedwarfswithhighdensities,theequationofstateiswellapproximatedbyapolytropicequationofstatewithindexn=3.TheconstantKinthepolytropicequationofstatethenis
• Whatisthemassofahighdensitywhitedwarf?Ifyouhavedoneeverything
• right,youwillhaverediscoveredtheChandrasekharMass!
Project#7:Particle(s)inEMFields• Studythemotionofoneormore(non-relativistic)particlesinafixedelectromagnetic
field:
• Thepreviousequationiswritteninthec.g.ssytem(widelyusedinastrophysics)butdimensionlessunitsarerecommended.
• Theequationofmotion(possibly)involvespropagationinall3direction(x,y,z).
• Theelectricandmagneticfieldvectoraregivenexternallyandparticlesdonotinteractwitheachother.
• TheprojectinvolvesdirectintegrationoftheequationofmotionusingRK-typeintegratorsand/orthegeneralizationofsymplecticintegrationschemetothecaseofvelocity-dependentforce(theBorisalgorithmistheprogenitorofsuchschemes).
Project#7:Particle(s)inEMFields• Provideaprojectwithatleastthreedifferentcases.Asuggestionisgivenhere:
Case Npart E B Notes
Simplegyration 1 (0,0,0) (0,0,1) Considerbothperpendicularandparallelpropagation.Checkyourresultswithanalyticalformula.
ExBdrift 1 (0,E,0)withE<1
(0,0,1) Considerpropagationalongy-direction:whatmotiondoyousee?Doestheparticleaccelerate?Explain.
Xpoint 103 (0,0,1/2) (y/L,x/L,0)L=103.
Placeparticlesuniformlyinthesquaredomain[-L,L]2andinitializeparticlevelocityto0.1usingrandomlynumbersdistributedangles.Describeyourresults:- Whatkindofmotionisobserved?- Doparticlesaccelerate?Where?
Project#8:PhysicsofPartiallyIonizedHydrogen• Inavarietyofastrpphysicalscenarios(protoplanetarydisks,interstellarmedium,
stellarinteriors,supernovae,etc…)theinternalenergyoftheplasmaissubjecttoradiativecoolingduetoavarietyofprocesses,includingbremmstrahlung,collisionalionizationandexcitation,etc…
• Forauniformgasdistribution(nospatialvariation)andassumingapartiallyionizedhydrogengas,thisequationmaybesimplifiedandwrittenas
whereΛ(n,T)isthecoolingfunction,neisthenumberofelectrons,nisthehydrogennumberdensity.• Thegasinternalenergyincludesastandardkinetictermplustheionizationenergy
(neutralatomshaveapotentialenergythatislowerthanthatofionsbyanamountχ0=13.6eV).
• Herex(T)istheionizationfraction,definedby
Project#8:PhysicsofPartiallyIonizedHydrogen• Indilutegases(asitisthecaseforseveralastrophysicalenvironmentssuchasthe
interstellarmediumoraproto-planetarydisk),thedegreeofionizationxcanbecomputedusingCollisionalexcitationequilibrium(CIE),accordingtowhich
whereα=157890.0,whileχ0=13.6.• Thecoolingfunctionisusuallytabulatedbut,asaverycrudeapproximation,wecan
usethefollowingempiricalrelation:
whereC=10-22erg/(cm3s).
Project#8:PhysicsofPartiallyIonizedHydrogen• AssuminganinitialtemperatureofT=106Kandacloudofconstantdensityn=1cm-3,
solvetheinternalenergyequation
• Notethatateachstep,thetemperaturemustbefoundfromtheinternalenergyby
invertingtheexpressionfortheinternalenergy:
wheren(thegasnumberdensity)isfixedthroughouttheevolution.Arootfindingalgorithmmustbeused.• StopwhenyoureachT≈103K.
• Produceaplotofthetemperatureasafunctionoftime.
Project#9:Potentialflowaroundcylinder• Thepotentialflowaroundacircularcylinderisaclassicalsolutionfortheequationsof
aninviscid,incompressiblefluidflow.• Farfromthecylinder,theflowisunidirectionalanduniform.• Theflowisincompressibleandhasnovorticity:sothatitsvelocitycanthusbewritten
1. asthegradientofapotential:2. usingthestreamfunction:• BoththevelocitypotentialandthestreamfunctionssatisfytheLaplaceequation:
Project#9:Potentialflowaroundcylinder• Solvetheprobleminpolarcoordinates(r,θ)
• Discretizedthepreviousequationonadomaindefinedbya≤r≤5a,0≤θ≤2π[orsimilar,seta=1]
• Usetheexactsolution(simple)toprescribethe
boundaryconditions.• OracombinationorDirichlet+Neumannb.c.
• Computeerror.
a
Project#10:PoissonEquationinAxialsymmetry• Threedimensionalproblemswithaxialsymmetrycanbetreatedusingcylindrical
coordinates(r,z).
• GeneralizetheiterativealgorithmspresentedinCh.10totosolvethePoissonequationin2Dcylindricalcoordinates
• Applytheresultingdiscretizationtoanumberofproblemssuchas:– Uniformlychargeddisk– Uniformlychargedring– Dipolefield(assumechargesaredistributedonafinitesizespheres).
• Compareresultswithknownanalyticalsolutionsontheaxis.