forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@204 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
c53730f2e9
commit
d4dc00e321
|
@ -832,8 +832,8 @@ int FixRigid::dof(int igroup)
|
|||
int *nall = new int[nbody];
|
||||
MPI_Allreduce(ncount,nall,nbody,MPI_INT,MPI_SUM,world);
|
||||
|
||||
// remove 3N - 6 dof for each rigid body if more than 2 atoms are in igroup
|
||||
// remove 3N - 5 dof for each diatomic rigid body
|
||||
// remove 3N - 6 dof for each rigid body if more than 2 atoms in igroup
|
||||
// remove 3N - 5 dof for each diatomic rigid body in igroup
|
||||
|
||||
int n = 0;
|
||||
for (int ibody = 0; ibody < nbody; ibody++) {
|
||||
|
|
|
@ -39,13 +39,12 @@
|
|||
|
||||
// customize by adding a keyword to this list:
|
||||
|
||||
// step, atoms, cpu, temp, press, pe, ke, etotal,
|
||||
// step, atoms, cpu, temp, press, pe, ke, etotal, enthalpy
|
||||
// evdwl, ecoul, epair, ebond, eangle, edihed, eimp, emol, elong, etail, erot
|
||||
// vol, lx, ly, lz, pxx, pyy, pzz, pxy, pxz, pyz
|
||||
// gke, grot (granular trans-ke and rotational-ke)
|
||||
// tave, pave, eave, peave (time-averaged quantities)
|
||||
// t_ID (user-defined temperatures)
|
||||
// enthalpy
|
||||
|
||||
// customize by adding a DEFINE to this list
|
||||
|
||||
|
@ -600,6 +599,9 @@ void Thermo::parse_fields(char *str)
|
|||
} else if (strcmp(word,"etotal") == 0) {
|
||||
addfield("TotEng",&Thermo::compute_etotal,FLOAT);
|
||||
tempflag = 1;
|
||||
} else if (strcmp(word,"enthalpy") == 0) {
|
||||
addfield("Enthal",&Thermo::compute_enthalpy,FLOAT);
|
||||
pressflag = 1;
|
||||
} else if (strcmp(word,"evdwl") == 0) {
|
||||
addfield("E_vdwl",&Thermo::compute_evdwl,FLOAT);
|
||||
} else if (strcmp(word,"ecoul") == 0) {
|
||||
|
@ -665,8 +667,6 @@ void Thermo::parse_fields(char *str)
|
|||
addfield("E_ave",&Thermo::compute_eave,FLOAT);
|
||||
} else if (strcmp(word,"peave") == 0) {
|
||||
addfield("PE_ave",&Thermo::compute_peave,FLOAT);
|
||||
} else if (strcmp(word,"enthalpy") == 0) {
|
||||
addfield("Enthalpy",&Thermo::compute_enthalpy,FLOAT);
|
||||
|
||||
// user-defined temperature (t_ID)
|
||||
// only 1st 8 chars of ID are passed to addfield
|
||||
|
@ -744,7 +744,8 @@ int Thermo::compute_value(char *word, double *answer)
|
|||
tempvalue = temperature->compute();
|
||||
fix_compute_pe();
|
||||
compute_etotal();
|
||||
} else if (strcmp(word,"evdwl") == 0) compute_evdwl();
|
||||
} else if (strcmp(word,"enthalpy") == 0) compute_enthalpy();
|
||||
else if (strcmp(word,"evdwl") == 0) compute_evdwl();
|
||||
else if (strcmp(word,"ecoul") == 0) compute_ecoul();
|
||||
else if (strcmp(word,"epair") == 0) compute_epair();
|
||||
else if (strcmp(word,"ebond") == 0) compute_ebond();
|
||||
|
@ -757,7 +758,6 @@ int Thermo::compute_value(char *word, double *answer)
|
|||
else if (strcmp(word,"erot") == 0) compute_erot();
|
||||
else if (strcmp(word,"gke") == 0) compute_gke();
|
||||
else if (strcmp(word,"grot") == 0) compute_grot();
|
||||
else if (strcmp(word,"enthalpy") == 0) compute_enthalpy();
|
||||
else if (strncmp(word,"t_",2) == 0) {
|
||||
int tempwhich;
|
||||
for (tempwhich = 0; tempwhich < force->ntemp; tempwhich++)
|
||||
|
@ -874,6 +874,24 @@ void Thermo::compute_etotal()
|
|||
dvalue += ke;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Thermo::compute_enthalpy()
|
||||
{
|
||||
compute_etotal();
|
||||
double etmp = dvalue;
|
||||
|
||||
compute_vol();
|
||||
double vtmp = dvalue;
|
||||
if (normflag) vtmp /= natoms;
|
||||
|
||||
compute_press();
|
||||
double ptmp = dvalue;
|
||||
|
||||
dvalue = etmp + ptmp*vtmp/(force->nktv2p);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Thermo::compute_evdwl()
|
||||
|
@ -1257,19 +1275,3 @@ void Thermo::compute_fix()
|
|||
dvalue = fixvalues[fixprint[ifix_print++]];
|
||||
if (normflag) dvalue /= natoms;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void Thermo::compute_enthalpy()
|
||||
{
|
||||
double etmp,vtmp,ptmp;
|
||||
compute_etotal();
|
||||
etmp = dvalue;
|
||||
compute_vol();
|
||||
vtmp = dvalue;
|
||||
if (normflag) vtmp /= natoms;
|
||||
compute_press();
|
||||
ptmp = dvalue;
|
||||
dvalue = etmp+ptmp*vtmp/(force->nktv2p);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ class Thermo : public LAMMPS {
|
|||
void compute_pe();
|
||||
void compute_ke();
|
||||
void compute_etotal();
|
||||
void compute_enthalpy();
|
||||
void compute_evdwl();
|
||||
void compute_ecoul();
|
||||
void compute_epair();
|
||||
|
@ -128,7 +129,6 @@ class Thermo : public LAMMPS {
|
|||
void compute_eave();
|
||||
void compute_peave();
|
||||
void compute_t_id();
|
||||
void compute_enthalpy();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue