资源描述
模拟物理导论,凝聚态物质的数值模拟方法(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.,whereisthetransportcoefficient,andAisaphysicalvariableappearingintheperturbationHamiltonian.ThereisalsoanEinsteinrelationassociatedwiththiskindofexpression,whichholdsforlarget,(t,whereistherelaxationtimeof).,2003-10-21,上海交通大学理论物理研究所马红孺,分子模型,Theshearviscosityisgivenby,or,Here,ThenegativeofPisoftencalledstresstensor.,2003-10-21,上海交通大学理论物理研究所马红孺,MonteCarlo模拟,MonteCarlosimulationofParticleSystems,粒子系统的MonteCarlo模拟和自旋系统原则上是一样的。Metropolis算法为:1,随机或顺序选取一个粒子,其位置矢量为,对此粒子做移动2,计算前后的能量差,决定是否接受移动。3,在达到平衡后,收集数据,计算物理量。,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),whereLarevectorsalongtheedgesoftherectangularsystemvolumeandthesumoverniswithallintegersn.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:,Thedistributionofisuniformintheinterval0,2.,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,Generaterandomnumbersforagivendistribution,ForagivendistributionP(y)weconsiderhowtogetarandomnumberydrawfromP(y)fromarandomnumberxdrawfromuniform0,1,i.e.,wearegoingtofindafunctionf(x),fromwhichforaseriesofrandomnumbersxdistributeduniformlyintheinterval0,1,y=f(x)willdistributedaccordingtoP(y).,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,then,Since,Exponentialdistribution,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,Thedistributionofv:,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,Drawrandomnumbersuniformlydistributedintheinterval0,2.,AnothermethodofdrawrandomnumbersintheGaussiandistributionisthroughthefollowingempiricalmethods.,Considerthedistribution,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,Accordingtothecentrallimittheorem,ifwedrawuniformrandomnumbersriininterval0,1,anddefineavariable,whenn!1thedistributionofistheGaussiandistribution,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,上海交通大学理论物理研究所马红孺,分子动力学模拟,hereAisthevalueofAatthtimestep.Usuallythedatastoredineachstepinclude:,1,thekineticenergy2,thepotentialenergy3,thevirial,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,Wealsoneedsdatatocalculatethepaircorrelationfunction,thisisdonebydividetheinterval0,rintosubintervalsir,(i+1)r,ateachstageofupdating,addthenumberofpairswithseparationintheintervalir,(i+1)r,toanarrayn(i)andfindtheaveragevalueaftersimulation,thepaircorrelationfunctiongivenby,2003-10-21,上海交通大学理论物理研究所马红孺,分子动力学模拟,练习:1,WriteprogramsforthetwomethodstogenerateGuassianrandomnumbers.2,Comparethetwomethodsforefficiencyandquality.3,Generaterandomnumberswithexponentialdistributionbymeansofthetransformationmethoddescribedbeforeandcheckthequality.,
展开阅读全文