low pressure fails in fix gcmc

Hi,

I’m tring simulate adsoprtion of pure gas in a box (Argon to 87K)

I created a data.file with a cube of l 20A and a atom Ar inside.

then I created a mol file with a Argon atom

in my input file a create region and atom

region

region zone1 block 0 {l} 0 {l} 0 ${l}

probe

molecule Arprobe Ar.txt

create atoms

create_atoms 0 random 10 {vel_seed} zone1 mol Arprobe {vel_seed}

group

group Ars type 1 0

mass

mass * 39.948000000

Minimization Step

min_style cg
min_modify line quadratic
minimize 1.0e-6 1.0e-6 100000 100000
reset_timestep 0

velocity

velocity Ars create {Temp} {vel_seed} sum yes dist uniform loop all

compute TArs Ars temp
compute_modify TArs dynamic/dof yes

nvt

fix Arsnvt Ars nvt temp 87 87 10.0
fix_modify Arsnvt dynamic/dof yes temp TArs

thermo_style custom step vol temp press atoms v_rho v_T v_P
thermo ${Nequilib}

timestep 0.5
run ${Nequilib}

unfix Arsnvt
reset_timestep 0

gcmc

fix Arsgcmc Ars gcmc 100 100 0 {vel_seed} 87 {mu} ${drTrasl} mol Arprobe pressure 0.1 fugacity_coeff 0.998 tfac_insert 2 full_energy

compute average density (probe/cell)

fix rho_Ave Ars ave/time 1 10000 10000 v_rho file rho_ave.log ave running

#compute average temp
fix temp_Ave Ars ave/time 1 10000 10000 v_T file temp_ave.log ave running

#compute average press
fix press_Ave Ars ave/time 1 10000 10000 v_P file press_ave.log ave running

dynamically update default temperature ndof

compute_modify thermo_temp dynamic/dof yes

thermo_style custom step vol temp press atoms v_rho v_T v_P etotal
thermo 1000

timestep 0.5
run 10000

After equilibration nvt I noticed with no insert of molecules is done to gcmc. the temp becomes O so also the pressure

Why?
there is a bug?, or lammps cannot calculare a low pressure

my nvt output

Step Volume Temp Press Atoms v_rho v_T v_P
0 8000 87 14.468132 11 0.001375 87 14.468132
10000 8000 84.32683 14.34321 11 0.001375 84.32683 14.34321

0 atoms in group FixGCMC:gcmc_exclusion_group:Arsgcmc
0 atoms in group FixGCMC:rotation_gas_atoms:Arsgcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (…/neighbor.cpp:472)
Per MPI rank memory allocation (min/avg/max) = 10.11 | 10.11 | 10.11 Mbytes
Step Volume Temp Press Atoms v_rho v_T v_P TotEng
0 8000 84.32683 14.342547 11 0.001375 84.32683 14.342547 1.3743711
WARNING: Using kspace solver on system with no charge (…/kspace.cpp:289)
1000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
2000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
3000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
4000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
5000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
6000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
7000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
8000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
9000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989
10000 8000 0 -0.084108694 0 0 0 -0.084108694 -0.0049065989

how I could fix it??
Regards

Al

Hello Alberto , I have some comments .

Hope it helps.!

Hi,

I’m tring simulate adsoprtion of pure gas in a box (Argon to 87K)

You mean just inserting Argon in a box with argon ?? If that so, the box will empty or fill related to the vapor pressure of argon at that temperature, Do you know it. ??? that will give you a hint if the box should be empty or with very little amount of particles or filled

I created a data.file with a cube of l 20A and a atom Ar inside.

then I created a mol file with a Argon atom

Argon is an atom, why using a the mol file??? it is just necessary when you are inserting molecules

in my input file a create region and atom

region

region zone1 block 0 {l} 0 {l} 0 ${l}

probe

molecule Arprobe Ar.txt

Again this is actually not needed

create atoms

create_atoms 0 random 10 {vel_seed} zone1 mol Arprobe {vel_seed}

group

group Ars type 1 0

mass

mass * 39.948000000

Minimization Step

min_style cg
min_modify line quadratic
minimize 1.0e-6 1.0e-6 100000 100000
reset_timestep 0

velocity

velocity Ars create {Temp} {vel_seed} sum yes dist uniform loop all

compute TArs Ars temp
compute_modify TArs dynamic/dof yes

nvt

fix Arsnvt Ars nvt temp 87 87 10.0
fix_modify Arsnvt dynamic/dof yes temp TArs

thermo_style custom step vol temp press atoms v_rho v_T v_P
thermo ${Nequilib}

timestep 0.5
run ${Nequilib}

unfix Arsnvt

Why did you unfix the nvt ?? the gcmc works better when coupled with md to update the positions of the particles.

reset_timestep 0

gcmc

fix Arsgcmc Ars gcmc 100 100 0 {vel_seed} 87 {mu} ${drTrasl} mol Arprobe pressure 0.1 fugacity_coeff 0.998 tfac_insert 2 full_energy

you should not use full energy with Argon atoms it slows down the calculation and is not nesesary as you also don’t have charges

At your input pressure 0.1 you should see if it is above or below the vapor pressure of argon at that temperature, if it is below you have a gas phase, at fist approximation you could estimate the number of argon particles in the volume of the simulation box by using ideal gases this will give you a hit of what result to expect .

compute average density (probe/cell)

fix rho_Ave Ars ave/time 1 10000 10000 v_rho file rho_ave.log ave running

#compute average temp
fix temp_Ave Ars ave/time 1 10000 10000 v_T file temp_ave.log ave running

#compute average press
fix press_Ave Ars ave/time 1 10000 10000 v_P file press_ave.log ave running

dynamically update default temperature ndof

compute_modify thermo_temp dynamic/dof yes

thermo_style custom step vol temp press atoms v_rho v_T v_P etotal
thermo 1000

timestep 0.5
run 10000

After equilibration nvt I noticed with no insert of molecules is done to gcmc. the temp becomes O so also the pressure

Why?
there is a bug?, or lammps cannot calculare a low pressure

my nvt output

Step Volume Temp Press Atoms v_rho v_T v_P
0 8000 87 14.468132 11 0.001375 87 14.468132
10000 8000 84.32683 14.34321 11 0.001375 84.32683 14.34321

0 atoms in group FixGCMC:gcmc_exclusion_group:Arsgcmc
0 atoms in group FixGCMC:rotation_gas_atoms:Arsgcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (…/neighbor.cpp:472)

Do not use kspace you don’t have charges