lammps模拟实例详解

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

#BigcolloidparticlesandsmallLJparticlesunitsljThiscommandsetsthestyleofunitsusedforasimulation.Itdeterminestheunitsofallquantitiesspecifiedintheinputscriptanddatafile,aswellasquantitiesoutputtothescreen,logfile,anddumpfiles.Typically,thiscommandisusedattheverybeginningofaninputscript.这个指令设定模拟的格式,它决定了在输入脚本文件和数据文件以及在屏幕上显示的输出物,日志文件和垃圾文件中所有的单元格式。典型的是,它经常用于输入脚本的开头Forstylelj,allquantitiesareunitless.Withoutlossofgenerality,LAMMPSsetsthefundamentalquantitiesmass,sigma,epsilon,andtheBoltzmannconstant=1.Themasses,distances,energiesyouspecifyaremultiplesofthesefundamentalvalues.Theformulasrelatingthereducedorunitlessquantity(withanasterisk)tothesamequantitywithunitsisalsogiven.Thusyoucanusethemass&sigma&epsilonvaluesforaspecificmaterialandconverttheresultsfromaunitlessLJsimulationintophysicalquantities.对于lj格式,所有数量都是无量纲的。不失一般性的,lammps设定了基本量质量sigmaepsilon和波尔兹曼常数=1。你定义的质量,距离,能量是这些基本值的倍数。公式把衰减量或者是无量纲量(用*)和单元给出的相同的量关联起来。因此你可以用mass,sigma,epsilon值表示一个具体材料并且改变一个无量纲lj模拟的物理量的结果。mass=massormdistance=sigma,wherex*=x/sigmatime=tau,wheretau=t*=t(epsilon/m/sigma^2)^1/2energy=epsilon,whereE*=E/epsilonvelocity=sigma/tau,wherev*=vtau/sigmaforce=epsilon/sigma,wheref*=fsigma/epsilontorque=epsilon,wheret*=t/epsilontemperature=reducedLJtemperature,whereT*=TKb/epsilonpressure=reducedLJpressure,whereP*=Psigma^3/epsilondynamicviscosity=reducedLJviscosity,whereeta*=etasigma^3/epsilon/taucharge=reducedLJcharge,whereq*=q/(4piperm0sigmaepsilon)^1/2dipole=reducedLJdipole,momentwhere*mu=mu/(4piperm0sigma^3epsilon)^1/2electricfield=force/charge,whereE*=E(4piperm0sigmaepsilon)^1/2sigma/epsilondensity=mass/volume,whererho*=rhosigma^dimatom_styleatomic原子类型atomic(原子的)Definewhatstyleofatomstouseinasimulation.Thisdetermineswhatattributesareassociatedwiththeatoms.Thiscommandmustbeusedbeforeasimulationissetupviaaread_data,read_restart,orcreate_boxcommand.定义在模拟中用到的原子类型,这个决定了与原子有关的属性,这个命令必须用在模拟被设定之前通过read_data,read_restart,orcreate_boxAtomiconlythedefaultvaluescoarse-grainliquids,solids,metalsAtomic附加属性是只是默认值用于粗粒液体,固体和金属的模拟dimension2二维latticesq0.01建造一个sq类型的二维晶格,lj折合密度rho*=0.01LatticeDefinealatticeforusebyothercommands.InLAMMPS,alatticeissimplyasetofpointsinspace,determinedbyaunitcellwithbasisatoms,thatisreplicatedinfinitelyinalldimensions.Theargumentsofthelatticecommandcanbeusedtodefineawidevarietyofcrystallographiclattices.Lattice指令定义了一个其他指令可以使用的晶格,在lammps中,一个晶格是一个空间中简单的点集,被基本原子构成的所有维度中无限复制的晶胞在所决定。Lattice指令额参数可以被用来定义各种各样的晶格。AlatticeisusedbyLAMMPSintwoways.First,thecreate_atomscommandcreatesatomsonthelatticepointsinsidethesimulationbox.Notethatthecreate_atomscommandallowsdifferentatomtypestobeassignedtodifferentbasisatomsofthelattice.Second,thelatticespacinginthex,y,zdimensionsimpliedbythelattice,canbeusedbyothercommandsasdistanceunits(e.g.create_box,regionandvelocity),whichareoftenconvenienttousewhentheunderlyingproblemgeometryisatomsonalattice.一个lattice明令在lammps中有两种实用方式,首先,create_atomscommand在模拟盒子内部的格点上创建原子。注意,ecreate_atomscommand允许不同的原子类型去分配到晶格中不同的基本原子。第二,晶格间距在x,y,z轴分量隐含在晶格中,可以被其他命令应用作为距离单元。这个距离单元当潜在问题的几何构型是在晶格中的原子的时候经常被方便的使用。Alatticeconsistsofaunitcell,asetofbasisatomswithinthatcell,andasetoftransformationparameters(scale,origin,orient)thatmaptheunitcellintothesimulationbox.Thevectorsa1,a2,a3aretheedgevectorsoftheunitcell.Thisisthenomenclatureforprimitivevectorsinsolid-statecrystallography,butinLAMMPStheunitcelltheydeterminedoesnothavetobeaprimitivecellofminimumvolume.一个晶格由晶胞,晶胞内部的基本原子构成的集合,一个将晶胞绘制入模拟盒子的基本参数构成的集合构成。矢量a1,a2,a3是晶胞的棱矢量,在固态物理学里面用术语primitive矢量来表示。但是在lammps中不一定要用最小体积的原胞来定义晶胞Lattice应用:latticestylescalekeywordvaluesstyle=noneorscorbccorfccorhcpordiamondorsqorsq2orhexorcustomscale=scalefactorbetweenlatticeandsimulationboxforstylenone:scaleisnotspecified(noranyoptionalarguments)forallotherstyles:scale=reduceddensityrho*(forLJunits)scale=latticeconstantindistanceunits(fornon-LJunits)Latticesofstylesqandsq2are2dlatticesthatdefineasquareunitcellwithedgelength=1.0.Thismeansa1=100anda2=010.Asqlatticehas1basisatomatthelower-leftcornerofthesquare.Asq2latticehas2basisatoms,oneatthecornerandoneatthecenterofthesquare.sqandsq2格式的晶格是一个2维晶格这个晶格定义了一个棱长为1.0的直角晶胞的2维晶胞。这意味着a1=100,a2=010。一个sq晶格在正方形左下角有一个基本的原子。Sq2则有两个基本原子,一个在角落另一个在正方形的中心。Forunitstylelj,thescaleargumentistheLennard-Jonesreduceddensity,typicallywrittenasrho*.LAMMPSconvertsthisvalueintothemultiplicativefactorviatheformulafactor^dim=rho/rho*,whererho=N/VwithV=thevolumeofthelatticeunitcellandN=thenumberofbasisatomsintheunitcell(describedbelow),anddim=2or3forthedimensionalityofthesimulation.Effectively,thismeansthatifLJparticlesofsizesigma=1.0areusedinthesimulation,thelatticeofparticleswillbeatthedesiredreduceddensity.对于li单元,scale是Lennard-Jones折算密度,典型写为rho*。Lammps通过公式factor^dim=rho/rho*将这个值转变为倍增因子。Rho=N/V,v=晶格单元的体积,n=晶胞中基本原子的数量,dim根据模拟的维度等于2或者3。实际上这表明如果在模拟中使用的lj粒子的sigma=1.0,那么晶格中的粒子将会有预期的折算密度。regionboxblock030030-0.50.5在空间xlo=0,xhi=30,ylo=0,yhi=30,zlo=—0.5,zhi=0.5的范围内创建区域。RegionThiscommanddefinesageometricregionofspace.Variousothercommandsuseregions.Forexample,theregioncanbefilledwithatomsviathecreate_ato

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功