dimension 3 boundary p p p units real atom_style full bond_style harmonic angle_style harmonic pair_style hybrid/overlay lj/cut/coul/long 10.0 lj/cut 10.0 kspace_style pppm 1.0e-5 #------------------------------------------------------- read_data Data-SaltwaterGraph3_AfterRun.txt #--------------------------------------------------------- # 1: Oxygen # 2: Hydrogen # 3: Carbon (graphwall) # 4: HP Piston # 5: LP Piston # 6: Hydrogen wall # 7: Natrium # 8: Chlorine pair_coeff 1 1 lj/cut/coul/long 0.102 3.188 pair_coeff 2 2 lj/cut/coul/long 0. 0. pair_coeff 1 2 lj/cut/coul/long 0. 0. pair_coeff 1 3 lj/cut 0.07495 3.18 pair_coeff 1 4 lj/cut 0.07495 3.18 3.18 pair_coeff 1 5 lj/cut 0.07495 3.18 3.18 pair_coeff 1 6 lj/cut 0. 0. pair_coeff 1 7 lj/cut/coul/long 0.094439444 2.963 pair_coeff 1 8 lj/cut/coul/long 0.060251822 4.107 pair_coeff 2 3 lj/cut 0. 0. pair_coeff 2 4 lj/cut 0. 0. pair_coeff 2 5 lj/cut 0. 0. pair_coeff 2 6 lj/cut 0. 0. pair_coeff 2 7 lj/cut/coul/long 0. 0. pair_coeff 2 8 lj/cut/coul/long 0. 0. pair_coeff 3 3 lj/cut 0. 0. pair_coeff 3 4 lj/cut 0.1 3.12 3.12 pair_coeff 3 5 lj/cut 0.1 3.12 3.12 pair_coeff 3 6 lj/cut 0. 0. pair_coeff 3 7 lj/cut 0.07285304 3.0535 pair_coeff 3 8 lj/cut 0.04647982 4.1975 pair_coeff 4 4 lj/cut 0. 0. pair_coeff 4 5 lj/cut 0.1 3.12 3.12 pair_coeff 4 6 lj/cut 0.1 3.12 3.12 pair_coeff 4 7 lj/cut 0.07285304 3.0535 3.0535 pair_coeff 4 8 lj/cut 0.04647982 4.1975 4.1975 pair_coeff 5 5 lj/cut 0. 0. pair_coeff 5 6 lj/cut 0.1 3.12 3.12 pair_coeff 5 7 lj/cut 0.07285304 3.0535 3.0535 pair_coeff 5 8 lj/cut 0.04647982 4.1975 4.1975 pair_coeff 6 6 lj/cut 0. 0. pair_coeff 6 7 lj/cut 0. 0. pair_coeff 6 8 lj/cut 0. 0. pair_coeff 7 7 lj/cut/coul/long 0.0874393 2.738 pair_coeff 7 8 lj/cut/coul/long 0.055785769 3.882 pair_coeff 8 8 lj/cut/coul/long 0.035591 5.026 bond_coeff 1 3500 0.9572 angle_coeff 1 550 104.52 neighbor 2.0 bin neigh_modify delay 0 every 1 check yes group water type 1 2 group graphwall type 3 6 group hppiston type 4 group lppiston type 5 group natrium type 7 group chlor type 8 group saltwater type 1 2 7 8 velocity water create 300. 3241 velocity natrium create 300. 3241 velocity chlor create 300. 3241 timestep 2 fix constnvt water nvt temp 300.0 300.0 500.0 fix constnvtna natrium nvt temp 300.0 300.0 500.0 fix constnvtch chlor nvt temp 300.0 300.0 500.0 variable highpress equal 120 #bar variable lowpress equal 60 #bar fix consnvehp hppiston nve fix consnvelp lppiston nve velocity graphwall set 0.0 0.0 0.0 units box fix fixcntset graphwall setforce 0.0 0.0 0.0 fix fixcntave graphwall aveforce 0.0 0.0 0.0 # Moving wall HP variable highforce equal ${highpress}*3.74225E-05 fix fixwallhpave hppiston aveforce 0.0 0.0 v_highforce # Moving wall LP variable lowforce equal ${lowpress}*-3.74225E-05 fix fixwalllpave lppiston aveforce 0.0 0.0 v_lowforce #dump dumpminimize all custom 1 Dump-WaterGraph5Minimize.lammpstrj id type x y z minimize 1.0e-4 1.0e-5 1000 3000 fix shakewater all shake 1.0e-4 200 0 b 1 a 1 compute T water temp #--------------------------Polluted Region Density------------------------------ region reg1 block -15.1981 16.48356 -17.06981 17.06981 -5.0 -0.0 side in units box region reg2 block -15.1981 16.48356 -17.06981 17.06981 -10.0 -5.0 side in units box region reg3 block -15.1981 16.48356 -17.06981 17.06981 -15.0 -10.0 side in units box region reg4 block -15.1981 16.48356 -17.06981 17.06981 -20.0 -15.0 side in units box region reg5 block -15.1981 16.48356 -17.06981 17.06981 -25.0 -20.0 side in units box region reg6 block -15.1981 16.48356 -17.06981 17.06981 -30.0 -25.0 side in units box region reg7 block -15.1981 16.48356 -17.06981 17.06981 -35.0 -30.0 side in units box variable volreg equal 31.68166*(17.06981*2)*5 variable densna1 equal ((count(natrium,reg1)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna2 equal ((count(natrium,reg2)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna3 equal ((count(natrium,reg3)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna4 equal ((count(natrium,reg4)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna5 equal ((count(natrium,reg5)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna6 equal ((count(natrium,reg6)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna7 equal ((count(natrium,reg7)/6.022e23)*22.98977)/(v_volreg*10e-24) variable denscl1 equal ((count(chlor,reg1)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl2 equal ((count(chlor,reg2)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl3 equal ((count(chlor,reg3)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl4 equal ((count(chlor,reg4)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl5 equal ((count(chlor,reg5)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl6 equal ((count(chlor,reg6)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl7 equal ((count(chlor,reg7)/6.022e23)*35.453)/(v_volreg*10e-24) variable denswa1 equal ((count(water,reg1)/6.022e23)*18)/(v_volreg*10e-24) variable denswa2 equal ((count(water,reg2)/6.022e23)*18)/(v_volreg*10e-24) variable denswa3 equal ((count(water,reg3)/6.022e23)*18)/(v_volreg*10e-24) variable denswa4 equal ((count(water,reg4)/6.022e23)*18)/(v_volreg*10e-24) variable denswa5 equal ((count(water,reg5)/6.022e23)*18)/(v_volreg*10e-24) variable denswa6 equal ((count(water,reg6)/6.022e23)*18)/(v_volreg*10e-24) variable denswa7 equal ((count(water,reg7)/6.022e23)*18)/(v_volreg*10e-24) #-------------------------Pure Region Density------------------- region reg1p block -15.1981 16.48356 -17.06981 17.06981 0.0 5.0 side in units box region reg2p block -15.1981 16.48356 -17.06981 17.06981 5.0 10.0 side in units box region reg3p block -15.1981 16.48356 -17.06981 17.06981 10.0 15.0 side in units box region reg4p block -15.1981 16.48356 -17.06981 17.06981 15.0 20.0 side in units box region reg5p block -15.1981 16.48356 -17.06981 17.06981 20.0 25.0 side in units box variable densna1p equal ((count(natrium,reg1p)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna2p equal ((count(natrium,reg2p)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna3p equal ((count(natrium,reg3p)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna4p equal ((count(natrium,reg4p)/6.022e23)*22.98977)/(v_volreg*10e-24) variable densna5p equal ((count(natrium,reg5p)/6.022e23)*22.98977)/(v_volreg*10e-24) variable denscl1p equal ((count(chlor,reg1p)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl2p equal ((count(chlor,reg2p)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl3p equal ((count(chlor,reg3p)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl4p equal ((count(chlor,reg4p)/6.022e23)*35.453)/(v_volreg*10e-24) variable denscl5p equal ((count(chlor,reg5p)/6.022e23)*35.453)/(v_volreg*10e-24) variable denswa1p equal ((count(water,reg1p)/6.022e23)*18)/(v_volreg*10e-24) variable denswa2p equal ((count(water,reg2p)/6.022e23)*18)/(v_volreg*10e-24) variable denswa3p equal ((count(water,reg3p)/6.022e23)*18)/(v_volreg*10e-24) variable denswa4p equal ((count(water,reg4p)/6.022e23)*18)/(v_volreg*10e-24) variable denswa5p equal ((count(water,reg5p)/6.022e23)*18)/(v_volreg*10e-24) #------------------------------Water Molecules (Feed Side)----------------- region regwafed block -15.1981 16.48356 -17.06981 17.06981 -65.0 -0.0 side in units box variable wamolecule equal count(water,regwafed) #------------------------------Water Molecules (Pure Side)----------------- region regwapure block -15.1981 16.48356 -17.06981 17.06981 0.0 100.0 side in units box variable wamoleculepure equal count(water,regwapure) #------------------------------Water Molecules (All Side)----------------- #region regwall block -17.1981 18.48356 -19.06981 19.06981 -65.0 100.0 side in units box #variable wamoleculeall equal count(water,regwall) #-----------------------------Feed Side Pressure--------------------------- region regfed block -15.1981 16.48356 -17.06981 17.06981 -33.0 -5.0 side in units box compute peratom saltwater stress/atom compute p1 saltwater reduce/region regfed sum c_peratom[1] c_peratom[2] c_peratom[3] variable volfed equal ((15.1981+16.48356)*(17.06981*2)*(28.0)) variable pressfed equal -(c_p1[1]+c_p1[2]+c_p1[3])/(3*v_volfed) #-------------------------------Pure Side Pressure--------------------------- region regpure block -15.1981 16.48356 -17.06981 17.06981 5.0 24.0 side in units box compute peratompure saltwater stress/atom compute p2 saltwater reduce/region regpure sum c_peratompure[1] c_peratompure[2] c_peratompure[3] variable volpure equal ((15.1981+16.48356)*(17.06981*2)*(19.0)) variable presspure equal -(c_p2[1]+c_p2[2]+c_p2[3])/(3*v_volpure) #---------------------------------------------------------------------------- fix avetdens1 all ave/time 10 100 1000 v_denswa1 v_denswa2 v_denswa3 v_denswa4 v_denswa5 v_denswa6 v_denswa7 v_densna1 v_densna2 v_densna3 v_densna4 v_densna5 v_densna6 v_densna7 v_denscl1 v_denscl2 v_denscl3 v_denscl4 v_denscl5 v_denscl6 v_denscl7 file OutC_Densz120_ver12_2.txt fix avetdens2 all ave/time 10 100 1000 v_denswa1p v_denswa2p v_denswa3p v_denswa4p v_denswa5p v_densna1p v_densna2p v_densna3p v_densna4p v_densna5p v_denscl1p v_denscl2p v_denscl3p v_denscl4p v_denscl5p file OutC_DenszPure_120ver12_2.txt fix avewamolecule all ave/time 10 20 200 v_wamolecule v_wamoleculepure file OutC_Water-Molecule_120ver12_2.txt fix avepressfedpure all ave/time 10 20 200 v_pressfed v_presspure file OutC_Pressfedpure3_120ver12_2.txt dump dumpwater all custom 100 DumpC-SaltwaterGraph3_120ulangver12.lammpstrj id type x y z #dump dumphppiston hppiston custom 100 DumpC_HP_Piston3ver11.lammpstrj fx fy fz #dump dumplppiston lppiston custom 100 DumpC_LP_Piston3ver11.lammpstrj fx fy fz thermo 100 thermo_style custom step temp etotal press v_pressfed v_presspure thermo_modify flush yes #------------------------------------------------------------------------ run 50000