forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9717 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
836502a357
commit
87023e98bb
|
@ -85,6 +85,9 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
|||
rotation_group = 0;
|
||||
rotation_groupbit = 0;
|
||||
rotation_inversegroupbit = 0;
|
||||
pressure_flag = false;
|
||||
pressure = 0.0;
|
||||
fugacity_coeff = 1.0;
|
||||
|
||||
// read options from end of input line
|
||||
|
||||
|
@ -199,6 +202,15 @@ void FixGCMC::options(int narg, char **arg)
|
|||
max_rotation_angle = atof(arg[iarg+1]);
|
||||
max_rotation_angle *= MY_PI/180;
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"pressure") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix gcmc command");
|
||||
pressure = atof(arg[iarg+1]);
|
||||
pressure_flag = true;
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"fugacity_coeff") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix gcmc command");
|
||||
fugacity_coeff = atof(arg[iarg+1]);
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix gcmc command");
|
||||
}
|
||||
}
|
||||
|
@ -335,6 +347,7 @@ void FixGCMC::init()
|
|||
force->boltz*reservoir_temperature));
|
||||
sigma = sqrt(force->boltz*reservoir_temperature/gas_mass/force->mvv2e);
|
||||
zz = exp(beta*chemical_potential)/(pow(lambda,3.0));
|
||||
if (pressure_flag) zz = pressure*fugacity_coeff*beta/force->nktv2p;
|
||||
|
||||
imagetmp = ((tagint) IMGMAX << IMG2BITS) |
|
||||
((tagint) IMGMAX << IMGBITS) | IMGMAX;
|
||||
|
|
|
@ -63,6 +63,7 @@ class FixGCMC : public Fix {
|
|||
int regionflag; // 0 = anywhere in box, 1 = specific region
|
||||
int iregion; // GCMC region
|
||||
char *idregion; // GCMC region id
|
||||
bool pressure_flag; // true if user specified reservoir pressure, false otherwise
|
||||
|
||||
int maxmol; // largest molecule tag across all existing atoms
|
||||
int natoms_per_molecule; // number of atoms in each gas molecule
|
||||
|
@ -84,6 +85,7 @@ class FixGCMC : public Fix {
|
|||
double displace;
|
||||
double max_rotation_angle;
|
||||
double beta,zz,sigma,volume;
|
||||
double pressure,fugacity_coeff;
|
||||
double xlo,xhi,ylo,yhi,zlo,zhi;
|
||||
double region_xlo,region_xhi,region_ylo,region_yhi,region_zlo,region_zhi;
|
||||
double region_volume;
|
||||
|
|
Loading…
Reference in New Issue