天天看点

石墨烯海水淡化lammps模拟建模方法

大家好,我是小马老师。

本文讲解lammps海水淡化模拟的建模方法。

模型如下图所示,左侧部分为海水,主要成分为8000个水分子、800个Na+、800个Cl-,中间绿色部分为三层石墨烯。

石墨烯海水淡化lammps模拟建模方法

案例仅演示建模方法,参数是随便取的,水分子及NaCl的个数可根据需要替换。

水分子类型为TIP4P,分子模型文件为TIP4P.txt。

下面为完整建模文件,新建一个文本文件如in.water,把代码粘贴到in.water中,同时把TIP4P.txt保存到同一文件夹,在lammps中运行lmp -in in.water即可得到模型文件all.data。

#模型基本参数
units   real
atom_style  full
boundary  p p p
#自定义石墨烯晶格
lattice custom 2.4768 a1 1.3727 0.0 0.0 a2 0.0 1 0.0 a3 0.0 0.0 1.732 &
basis 0.0 0.0 0.33333 &
basis 0.0 0.0 0.66667 &
basis 0.0 0.5 0.16667 &
basis 0.0 0.5 0.83333 
#定义box尺寸
region      box block 0 45 0 25 0 20
#创建box
create_box  5 box bond/types 1 angle/types 1 extra/bond/per/atom 2 &
    extra/angle/per/atom 1 extra/special/per/atom 2
#填充石墨烯原子
region graphene block 90 100 INF INF INF INF units box
create_atoms  5 region graphene   
#创建海水区域
region  water_region block 2 88 INF INF INF INF units box
#定义TIP4P水分子
molecule  water TIP4P.txt
#填充水分子,水分子个数8000
create_atoms  0 random 8000 9090 water_region mol water 9567 units box
#随机填充Na原子,个数800个
create_atoms  3 random 800 8989 water_region
#设置Na电荷,Na原子变为Na+
set type 3 charge 1.0
#随机填充Cl原子,个数800个
create_atoms  4 random 800 8900 water_region
#设置Cl电荷,Cl->Cl-
set     type 4 charge -1.0
#设置摩尔质量
mass    1 15.9994
mass    2 1.008
mass    3 28.990
mass    4 35.453
mass    5 12
#保存轨迹文件
write_data all.data      

公众号案例代码以及学习交流,请加QQ群:754749935

扫描关注微信公众号:lammps加油站。