Layer For Mobile1.5

layermobile是一款专为移动设备设计的弹层库,适用于手机和平板等WebKit内核浏览器/Webview环境。它采用Native JavaScript编写,与PC版layer相互独立。用户可根据实际应用场景选择合适的版本。

http://sentsin.com/layui/layer/


为了精确体验,您可通过手机浏览器访问该页。手机扫二维码进入

layer mobile是为移动设备(手机、平板等webkit内核浏览器/webview)量身定做的弹层支撑,采用Native JavaScript编写,完全独立于PC版的layer,您需要按照场景选择使用。github


# 初始模拟系统设置 units metal dimension 3 boundary p p p atom_style atomic neighbor 2.0 bin timestep 0.001 neigh_modify delay 0 every 10 check yes atom_modify map hash # 区域定义 region hezi block -3 403 -3 403 -5 300 create_box 5 hezi mass 1 47.867 # Ti mass 2 26.9815 # Al mass 3 26.9815 # Al (热浴层) mass 4 26.9815 # Al (边界层) mass 5 12 # C (金刚石球) # 读取data文件 read_data final_poly.lmp add append shift 0 0 0 #设置区域和原子组 region boundary_layer block 0 400 0 400 0 10 units box region thermostat_layer block 0 400 0 400 10 20 units box region newtonian_layer block 0 400 0 400 20 200 units box region workpiece union 3 newtonian_layer thermostat_layer boundary_layer #工件 #定义计算相关信息,固定原子 group boundary_layer region boundary_layer #边界层原子(通常固定边界) group newtonian_layer region newtonian_layer #牛顿力学层(不受热浴控制,遵循经典牛顿力学) group thermostat_layer region thermostat_layer #热浴层(通过温度控制维持恒温) region mobile union 2 newtonian_layer thermostat_layer units box #将newtonian_layer与thermostat_layer合为mobile组(位移层) group mobile region mobile group workpiece region workpiece #工件组 ### 定义原子间相互作用势 pair_style hybrid meam/c tersoff morse 2.05 pair_coeff * * meam/c library.meam Al Ti TiAl.meam Ti Al Al Al NULL pair_coeff * * tersoff SiC.tersoff NULL NULL NULL NULL C pair_coeff 1 5 morse 0.982 2.283 1.892 #Ti C pair_coeff 2*4 5 morse 0.4691 1.738 2.246 #Al C #温度初始化 velocity all create 300 482748 rot yes dist gaussian #高斯分布 对所有原子进行速度初始化,总体系的温度为300k,4928459为随机数,每个原子的速度被随机设置 #------------------------能量最小化 弛豫---------------------------- min_style cg minimize 1.0e-14 1.0e-14 100 100 compute new mobile temp #计算mobile原子组的温度 compute T1 newtonian_layer temp compute 1 mobile ke compute 2 mobile ke/atom #意思是计算每个原子的动能,计算名称为2(这个名称可以是数字,也可以是字符串,随个人风格) variable yuanziwendu atom c_2/1.5/8.617343e-5 #固定的格式 compute mytemp thermostat_layer temp compute 8 mobile displace/atom fix 0 mobile nvt temp 300 300 0.1 drag 0.1 #0.1 z 0.0 0.0 0.1 #fix语句ID标识符 原子组标识 温度标识 初始温度 结束温度 阻尼系数 #热力输出 thermo 200 thermo_style custom step temp etotal pe ke c_new c_mytemp c_T1 #c_1 c_7 c_new1 thermo_modify lost ignore #弛豫步数 dump 1 all custom 1000 whs.lammpstrj id type x y z run 100 unfix 0 undump 1 #金刚石球建模 lattice diamond 3.52 region tool sphere 30 200 260 30 units box #x y z r create_atoms 5 region tool region ball block 0 400 0 400 200 300 units box group ball region tool #---------------------- 命令改变原子的类型 ---------------------- set group boundary_layer type 3 #将boundary_layer组内的原子定义为类型3 set group thermostat_layer type 4 set group ball type 5 write_data whsfc.data #-----------------------------删除原子----------------- region duoyu block 0 400 0 400 290 300 units box group duoyu region duoyu delete_atoms group duoyu change_box all boundary p p s displace_atoms ball move 0 0 -38 units box write_data whsdong.data #----------------------------------应力应变---------------------------------- compute peratom mobile stress/atom NULL #计算每个原子的应力 compute 6 ball group/group workpiece variable press atom "sqrt(((c_peratom[1]/10000-c_peratom[2]/10000)^2+(c_peratom[2]/10000-c_peratom[3]/10000)^2+(c_peratom[1]/10000-c_peratom[3]/10000)^2+6*((c_peratom[4]/10000)^2+(c_peratom[5]/10000)^2+(c_peratom[6]/10000)^2))/2)" fix 10 mobile ave/atom 1 5000 5000 v_yuanziwendu fix 11 mobile ave/atom 1 10000 10000 v_yuanziwendu fix 12 mobile ave/atom 1 20000 20000 v_yuanziwendu fix 13 mobile ave/atom 1 40000 40000 v_yuanziwendu fix 14 mobile ave/atom 1 2000 2000 v_press fix 15 mobile ave/atom 1 5000 5000 v_press fix 16 mobile ave/atom 1 10000 10000 v_press dump 3 all custom 10000 00d1f3.lammpstrj id type x y z f_10 f_11 c_8[4] f_14 f_15 f_16 dump 4 all custom 20000 00d1f4.lammpstrj id type x y z f_10 f_11 f_12 c_8[4] dump 5 all custom 40000 00d1f5.lammpstrj id type x y z f_10 f_11 f_12 f_13 fix 1 mobile nve fix 2 boundary_layer setforce 0.0 0.0 0.0 fix 3 ball nve #fix 4 tool setforce NULL NULL NULL #将tool在xy方向上的受力设为0,z方向受力保持原值不变 fix 4 ball setforce 0.0 0.0 NULL #将tool在xy方向上的受力设为0,z方向受力保持原值不变 fix 5 ball aveforce 0.0 0.0 -0.008 #修复命令 fx,fy,fz = 力分量值(力单位 #velocity tool set 0.0 0.0 -1.0 units box variable dz equal xcm(ball,z) velocity thermostat_layer create 300 12345 dist gaussian fix 6 thermostat_layer temp/rescale 1 300 300 0.01 1.0 fix_modify 6 temp mytemp thermo_style custom step temp etotal pe ke press c_new v_dz c_mytemp c_T1 c_6 c_6[1] c_6[2] c_6[3] thermo_modify lost ignore timestep 0.001 thermo 500 variable A equal 35 #variable T equal 10.0 variable T equal 15.0 variable omega equal 3.0*PI/$T #variable x equal "1*step*dt" variable x equal "0.5*step*dt" #variable x equal "2*step*dt" variable y equal swiggle(0.0,$A,$T) fix 7 ball move variable v_x v_y NULL NULL NULL NULL units box #fix 9 tool move variable v_x v_y NULL NULL NULL NULL units box velocity ball set 0.0 0.0 0.0 #给刀具设置速度 #velocity tool set 4.0 3.0 0.0 #给刀具设置速度 dump 2 all custom 500 1.lammpstrj5 id type x y z run 400000 怎末改为刀具只围绕工件中心,做圆周摩擦运动?
最新发布
09-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值