git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13170 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -13,7 +13,7 @@ OBJ = $(SRC:.cpp=.o)
|
||||
|
||||
# Package variables
|
||||
|
||||
PACKAGE = asphere body class2 colloid coreshell dipole fld gpu granular kim \
|
||||
PACKAGE = asphere body class2 colloid dipole fld gpu granular kim \
|
||||
kokkos kspace manybody mc meam misc molecule mpiio opt peri poems \
|
||||
qeq reax replica rigid shock snap srd voronoi xtc
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "random_mars.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "citeme.h"
|
||||
#include "math_const.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
@ -41,11 +42,34 @@ using namespace MathConst;
|
||||
|
||||
#define MAXLINE 1024
|
||||
|
||||
static const char cite_fix_ttm_mod[] =
|
||||
"fix ttm/mod command:\n\n"
|
||||
"@article{Pisarev2014,\n"
|
||||
"author = {Pisarev, V. V. and Starikov, S. V.},\n"
|
||||
"title = {{Atomistic simulation of ion track formation in UO2.}},\n"
|
||||
"journal = {J.~Phys.:~Condens.~Matter},\n"
|
||||
"volume = {26},\n"
|
||||
"number = {47},\n"
|
||||
"pages = {475401},\n"
|
||||
"year = {2014}\n"
|
||||
"}\n\n"
|
||||
"@article{Norman2013,\n"
|
||||
"author = {Norman, G. E. and Starikov, S. V. and Stegailov, V. V. and Saitov, I. M. and Zhilyaev, P. A.},\n"
|
||||
"title = {{Atomistic Modeling of Warm Dense Matter in the Two-Temperature State}},\n"
|
||||
"journal = {Contrib.~Plasm.~Phys.},\n"
|
||||
"number = {2},\n"
|
||||
"volume = {53},\n"
|
||||
"pages = {129--139},\n"
|
||||
"year = {2013}\n"
|
||||
"}\n\n";
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixTTMMod::FixTTMMod(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_fix_ttm_mod);
|
||||
|
||||
if (narg < 9) error->all(FLERR,"Illegal fix ttm/mod command");
|
||||
vector_flag = 1;
|
||||
size_vector = 2;
|
||||
@ -55,16 +79,16 @@ FixTTMMod::FixTTMMod(LAMMPS *lmp, int narg, char **arg) :
|
||||
restart_peratom = 1;
|
||||
restart_global = 1;
|
||||
seed = atoi(arg[3]);
|
||||
nxnodes = atoi(arg[4]);
|
||||
nynodes = atoi(arg[5]);
|
||||
nznodes = atoi(arg[6]);
|
||||
fpr = fopen(arg[7],"r");
|
||||
fpr_2 = fopen(arg[4],"r");
|
||||
nxnodes = atoi(arg[5]);
|
||||
nynodes = atoi(arg[6]);
|
||||
nznodes = atoi(arg[7]);
|
||||
fpr = fopen(arg[8],"r");
|
||||
if (fpr == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Cannot open file %s",arg[7]);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
fpr_2 = fopen(arg[8],"r");
|
||||
if (fpr == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Cannot open file %s",arg[8]);
|
||||
@ -233,6 +257,7 @@ FixTTMMod::FixTTMMod(LAMMPS *lmp, int narg, char **arg) :
|
||||
memory->create(sum_mass_vsq_all,nxnodes,nynodes,nznodes,
|
||||
"ttm/mod:sum_mass_vsq_all");
|
||||
memory->create(T_electron_old,nxnodes,nynodes,nznodes,"ttm/mod:T_electron_old");
|
||||
memory->create(T_electron_first,nxnodes,nynodes,nznodes,"ttm/mod:T_electron_first");
|
||||
memory->create(T_electron,nxnodes,nynodes,nznodes,"ttm/mod:T_electron");
|
||||
memory->create(net_energy_transfer,nxnodes,nynodes,nznodes,
|
||||
"ttm/mod:net_energy_transfer");
|
||||
@ -585,7 +610,21 @@ void FixTTMMod::end_of_step()
|
||||
// required this MD step to maintain a stable explicit solve
|
||||
int num_inner_timesteps = 1;
|
||||
double inner_dt = update->dt;
|
||||
double stability_criterion = 1.0 -
|
||||
double stability_criterion = 0.0;
|
||||
|
||||
for (int ixnode = 0; ixnode < nxnodes; ixnode++)
|
||||
for (int iynode = 0; iynode < nynodes; iynode++)
|
||||
for (int iznode = 0; iznode < nznodes; iznode++)
|
||||
T_electron_first[ixnode][iynode][iznode] =
|
||||
T_electron[ixnode][iynode][iznode];
|
||||
do {
|
||||
for (int ixnode = 0; ixnode < nxnodes; ixnode++)
|
||||
for (int iynode = 0; iynode < nynodes; iynode++)
|
||||
for (int iznode = 0; iznode < nznodes; iznode++)
|
||||
T_electron[ixnode][iynode][iznode] =
|
||||
T_electron_first[ixnode][iynode][iznode];
|
||||
|
||||
stability_criterion = 1.0 -
|
||||
2.0*inner_dt/el_specific_heat *
|
||||
(el_thermal_conductivity*(1.0/dx/dx + 1.0/dy/dy + 1.0/dz/dz));
|
||||
if (stability_criterion < 0.0) {
|
||||
@ -666,8 +705,18 @@ void FixTTMMod::end_of_step()
|
||||
T_electron_old[ixnode][iynode][iznode];
|
||||
if ((T_electron[ixnode][iynode][iznode] > 0.0) && (T_electron[ixnode][iynode][iznode] < electron_temperature_min))
|
||||
T_electron[ixnode][iynode][iznode] = T_electron[ixnode][iynode][iznode] + 0.5*(electron_temperature_min - T_electron[ixnode][iynode][iznode]);
|
||||
|
||||
if (el_properties(T_electron[ixnode][iynode][iznode]).el_thermal_conductivity > el_thermal_conductivity)
|
||||
el_thermal_conductivity = el_properties(T_electron[ixnode][iynode][iznode]).el_thermal_conductivity;
|
||||
if ((T_electron[ixnode][iynode][iznode] > 0.0) && (el_properties(T_electron[ixnode][iynode][iznode]).el_heat_capacity < el_specific_heat))
|
||||
el_specific_heat = el_properties(T_electron[ixnode][iynode][iznode]).el_heat_capacity;
|
||||
}
|
||||
}
|
||||
stability_criterion = 1.0 -
|
||||
2.0*inner_dt/el_specific_heat *
|
||||
(el_thermal_conductivity*(1.0/dx/dx + 1.0/dy/dy + 1.0/dz/dz));
|
||||
|
||||
} while (stability_criterion < 0.0);
|
||||
// output nodal temperatures for current timestep
|
||||
if ((nfileevery) && !(update->ntimestep % nfileevery)) {
|
||||
// compute atomic Ta for each grid point
|
||||
|
||||
Reference in New Issue
Block a user