lammps案例分析(2):石墨烯單軸拉伸之deform方式

分子動力學模擬拉伸除了velocity方式之外,還可以使用fix deform命令。

fix deform命令使系統在給定的應變速率下進行變形。

與velocity方式不同之處在于,deform方式下的拉伸并不需要固定被拉伸物體的兩端。在本例中,為防止在能量最小化階段石墨烯的飄動,同樣對石墨烯兩端進行了約束。


lammps案例分析(2):石墨烯單軸拉伸之deform方式的圖1

下面是石墨烯deform方式拉伸in文件代碼:

第一部分是模擬系統的初始設置參數,模擬單位為metal類型,周期性邊界。

#---------1 基本參數--------------------------------------units                metaldimension            3boundary            p p pneior            0.3 binneigh_modify        delay 0timestep            0.001#---------------------------------------------------------

第二部分以lattice方式建立石墨烯帶,當然也可以通過MS軟件建模,然后通過read_data命令讀取石墨烯模型。

用fix deform命令進行拉伸,并不需要固定石墨烯的兩端,為了和velocity進行對比,本例同樣對石墨烯兩端原子進行了設置。

#---------2 建模------------------------------------------region                box block 0 50 0 50 -5 5 units boxcreate_box            3 boxlattice custom 2.4768 a1 1.0 0.0 0.0 a2 0.0 1.732 0.0 a3 0.0 0.0 1.3727 &basis 0.0 0.33333 0.0 &basis 0.0 0.66667 0.0 &basis 0.5 0.16667 0.0 &basis 0.5 0.83333 0.0region                 graphene block 0 50 0 50 -1 2 units boxcreate_atoms        1 region graphenemass                * 12region                left block INF 4 INF INF INF INF units boxgroup                left region leftregion                right block 46 INF INF INF INF INF units boxgroup                right region rightgroup                boundary union left rightgroup                mobile subtract all boundaryset                    group left type 2set                    group right type 3#------------------------------------------------------

勢函數設置和velocity方式一樣,均為airebo勢

#------------3 勢函數設置------------------------------pair_style            airebo 3.0 0 0pair_coeff             * * CH.airebo C C C#------------------------------------------------------

建模完成后對體系進行能量最小化,獲得最優結構

#------------4 能量最小化------------------------------min_style             cgminimize            1e-10 1e-10 5000 5000#------------------------------------------------------

初始化溫度

#------------5 溫度初始化------------------------------velocity mobile create 300 4928459 dist gaussian units boxvelocity left set 0.0 0.0 0.0 units boxvelocity right set 0.0 0.0 0.0 units box#------------------------------------------------------

設置應變速率,拉伸應力值存儲到sigmaxx中

#------------6 計算設置--------------------------------compute    1 all stress/atom NULLcompute    2 all reduce sum c_1[1] c_1[2]variable   CorVol equal ly*lx*3.35variable   sigmaxx equal c_2[1]/(v_CorVol*10000)variable px equal -pxx/10000#應變variable l_x equal lxvariable lx0 equal ${l_x}variable strain equal (lx-v_lx0)/v_lx0#------------------------------------------------------

在npt系綜下進行弛豫

#------------7 結構弛豫--------------------------------fix                    1 boundary setforce 0 0 0fix                    2 all npt temp 300 300 0.01 iso 0 0 0.1thermo                1000thermo_modify       lost ignoredump                1 all atom 1000 relax.lammpstrjrun                    10000unfix                2undump                1reset_timestep        0#------------------------------------------------------

設置輸出參量,在nvt下對石墨烯進行單軸拉伸

#------------8 拉伸設置--------------------------------thermo_style custom step press v_strain v_px v_sigmaxx temp lx ly lz volthermo                100fix                    2 all nvt temp 300 300 0.01fix                    3 all deform 200 x erate 0.05 remap xdump                1 all atom 500 algp.lammpstrjrun                 10000

拉伸之后對數據進行處理,石墨烯在單軸拉伸下最大應力值大約103左右,應力-應變圖如下圖所示:

lammps案例分析(2):石墨烯單軸拉伸之deform方式的圖2

從物理意義上拉伸,使用velocity方式拉伸時,固定物體的一端,載荷加載到另一端上,更符合實際拉伸過程。

使用deform方式進行拉伸,模擬盒子在拉伸方向上伸長,原子根據盒子伸長的程度調整到相應的位置,雖然不如velocity更符合實際拉伸過程,但結果相差不大。

需要注意的是,使用velocity拉伸,在拉伸方向上不能使用周期性邊界條件,否則會出現拉不動的現象。使用deform拉伸方式,在拉伸方向上可以設置周期性邊界條件。

最后,有需求歡迎通過微信公眾號聯系我們。

微信公眾號:320科技工作室。

登錄后免費查看全文
立即登錄
App下載
技術鄰APP
工程師必備
  • 項目客服
  • 培訓客服
  • 平臺客服

TOP

6
4
5