上海交通大學理論物理研究所馬紅孺.ppt
模擬物理導論,凝聚態(tài)物質的數(shù)值模擬方法(V)馬紅孺,,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Molecularsystems:,Inmostcasestheinteractionpartcanbeapproximatedbypairinteractions:,OnefamousexampleistheLennard-Jonespotential,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Averyimportantquantityinstatisticalmechanicsisthepaircorrelationfunctiong(r,r0),definedas,where,Itmayalsobewrittenas,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Forahomogeneoussystemthepaircorrelationfunctiondependsonlyonthedistancebetweenrandr0.Inthiscasewedenoteitasg(r).,Theg(r,r0)isproportionaltotheprobabilitythatgivenaparticleatpointrandfindanotherparticleatpointr0.Atlargedistanceg(r)tendsto1,wemaydefinethetotalcorrelationfunction,TheFouriertransformoftheabovefunctiongivesthestaticstructurefunction(orstructurefactor),2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,ThestructurefunctionisdefinedasthecorrelationfunctionofFouriercomponentofdensityfluctuations,[Thedensityisdefinedas:,andthedensityfluctuationis:,anditsFouriercomponentis:],2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,當體積趨于無限時,紅顏色的部分可以略去.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Thestructurefactorcanbemeasureddirectlybyscatteringexperimentsandcanalsobecalculatedbysimulations.,Manyphysicalquantitiescanbeexpressedintermsofthepaircorrelationfunctions,forexampletheenergyinNVTensembleis,Thepressureis,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Thecompressibility,Thisexpressioncanbederivedfromthefluctuationsofparticlenumbers,Sinceso,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Ontheotherhand,itcanbeprovedthat,Wehavethefinalresult.,Thetimecorrelationfunctionisthecorrelationsoftwophysicalquantitiesatdifferenttimes,,Forsystemsatequilibriumthetimecorrelationfunctionisafunctionofthetimedifferenceonlyandcanbewrittenas,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Thevelocityautocorrelationfunctionoftheithparticleis,Thiscanbederivedfromthedefinition(wewillbacktothispoint),Whichisrelatedtothediffusionconstantoftheparticle.,whichholdsforlarget.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Ingeneral,transportcoefficientisdefinedintermsoftheresponseofasystemtoaperturbation.,where?isthetransportcoefficient,andAisaphysicalvariableappearingintheperturbationHamiltonian.ThereisalsoanEinsteinrelationassociatedwiththiskindofexpression,whichholdsforlarget,(t?,where?istherelaxationtimeof).,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子模型,Theshearviscosity?isgivenby,or,Here,ThenegativeofP??isoftencalledstresstensor.,2003-10-21,上海交通大學理論物理研究所馬紅孺,MonteCarlo模擬,MonteCarlosimulationofParticleSystems,粒子系統(tǒng)的MonteCarlo模擬和自旋系統(tǒng)原則上是一樣的。Metropolis算法為:1,隨機或順序選取一個粒子,其位置矢量為,對此粒子做移動2,計算前后的能量差,決定是否接受移動。3,在達到平衡后,收集數(shù)據(jù),計算物理量。,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Moleculardynamicssimulations,MDmethodisessentiallytheintegrationoftheequationofmotionoftheclassicalmany-particlesysteminaperiodoftime.Thetrajectoriesofthesysteminthephasespacearethusobtainedandaveragesofthetrajectoriesgivevariousphysicalproperties.SinceweworkonrealdynamicsinMDsimulationswecanalsostudythedynamicpropertiesofthesystemsuchasrelaxationtoequilibrium,transportetc.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,ConsiderarectangularvolumeofL1L2L3,withNclassicalparticlesputin.Theparticlesareinteractwitheachother.Inprinciple,theinteractionincludepairinteractions,threebodyinteractionsaswellasmanybodyinteractions.Forsimplicitywewillconsiderhereonlypairinteractions.Inthiscaseeachparticlefeelaforcebyallotherparticlesandwefurtherassumetheforceisdependonlyondistancesfromotherparticlesandforeachpairtheforcedirectedalongthelinejointhepairofparticles.Sotheforceontheithparticleis,whereisanunitvectoralongrj-ri.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Periodicboundarycondition(PBC),whereL?arevectorsalongtheedgesoftherectangularsystemvolumeandthesumoverniswithallintegersn?.Usuallythissumisthemosttimeconsumingpartinasimulation.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,GeneralprocedureofMD(NVEensemble),1.Initialize;2.Startsimulationandletthesystemreachequilibrium;3.Continuesimulationandstoreresults.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Initialize:1,Specifythenumberofparticlesandinteraction;2,Setupthesimulationbox;3,Specifythetotalenergyofthesystem;4,Assignpositionandmomentaofeachparticle.a,InmanycasesweassignparticlesinaFCClattice,,IfweusecubicunitcellandcubeBOXthenthenumberofparticlesperunitcellis4,andthetotalnumberofparticlesarea4M3,M=1,2,3,?.ThatiswemaysimulationsystemswithtotalnumberofparticlesN=108,256,500,864,?.,b,ThevelocitiesofparticlesaredrawfromaMaxwelldistributionwiththespecifiedtemperature.,ThisisaccomplishedbydrawingthethreecomponentsofthevelocityfromtheGaussiandistribution.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Thedistributionofthex-componentofvelocityis,DrawnumbersfromaGaussian:Consider:,Then,wherev2=vx2+vy2and,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Sothedistributionofvxandvymaybeobtainedfromvand?.Thedistributionofv:,Thedistributionof?isuniformintheinterval[0,2?].,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Generaterandomnumbersforagivendistribution,ForagivendistributionP(y)weconsiderhowtogetarandomnumberydrawfromP(y)fromarandomnumberxdrawfromuniform[0,1],i.e.,wearegoingtofindafunctionf(x),fromwhichforaseriesofrandomnumbersxdistributeduniformlyintheinterval[0,1],y=f(x)willdistributedaccordingtoP(y).,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,then,Since,Exponentialdistribution,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Thedistributionofv:,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Drawrandomnumbers?uniformlydistributedintheinterval[0,2?].,AnothermethodofdrawrandomnumbersintheGaussiandistributionisthroughthefollowingempiricalmethods.,Considerthedistribution,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Accordingtothecentrallimittheorem,ifwedrawuniformrandomnumbersriininterval[0,1],anddefineavariable,whenn!1thedistributionof?istheGaussiandistribution,Ifwetaken=12,weget,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Afterthegenerationofthevelocityofeachparticle,wemayshiftthevelocitysothatthetotalmomentumiszero.,ThestandardVerletalgorithmisthefirstsuccessfulmethodinhistoryandstillwideusedtodayindifferentforms.Itis,Tostarttheintegrationweneedr(h),givenby,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Variationsofthismethodare,and,Bothofthesevariationsaremathematicallyequivalenttotheoriginalonebutmorestableunderfiniteprecisionarithmetic.,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Thetemperatureofthesystemisgivenbytheequalpartitiontheorem,thatistheaverageofkineticenergyofeachdegreeoffreedomishalfkBT,,TheN-1isduetotheconservationofthetotalmomentumwhichreducethedegreeoffreedomby3.,Toreachthedesiredtemperaturewemayscalethevelocityateveryfewstepsofintegration,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Afterthesystemreachtoequilibriumtheintegrationcontinueinthesamemethodasabovewithoutscalingofvelocity.Thedataarestoredoraccumulatedforthecalculatingphysicalproperties.ThestaticpropertiesofphysicalquantityAisgivenbytimeaverage,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,hereA?isthevalueofAat?thtimestep.Usuallythedatastoredineachstepinclude:,1,thekineticenergy2,thepotentialenergy3,thevirial,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,Wealsoneedsdatatocalculatethepaircorrelationfunction,thisisdonebydividetheinterval[0,r]intosubintervals[i?r,(i+1)?r],ateachstageofupdating,addthenumberofpairswithseparationintheinterval[i?r,(i+1)?r],toanarrayn(i)andfindtheaveragevalueaftersimulation,thepaircorrelationfunctiongivenby,2003-10-21,上海交通大學理論物理研究所馬紅孺,分子動力學模擬,練習:1,WriteprogramsforthetwomethodstogenerateGuassianrandomnumbers.2,Comparethetwomethodsforefficiencyandquality.3,Generaterandomnumberswithexponentialdistributionbymeansofthetransformationmethoddescribedbeforeandcheckthequality.,