Patching heat implementation and adding example
This commit is contained in:
@ -81,7 +81,7 @@ Syntax
|
||||
q, mux, muy, muz, mu,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz, tqx, tqy, tqz,
|
||||
heatflux, temperature,
|
||||
heatflow, temperature,
|
||||
c_ID, c_ID[I], f_ID, f_ID[I], v_name,
|
||||
i_name, d_name, i2_name[I], d2_name[I]
|
||||
|
||||
@ -108,7 +108,7 @@ Syntax
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
tqx,tqy,tqz = torque on finite-size particles
|
||||
heatflux = flux of heat into particle
|
||||
heatflow = flow of heat into particle
|
||||
temperature = temperature of particle
|
||||
c_ID = per-atom vector calculated by a compute with ID
|
||||
c_ID[I] = Ith column of per-atom array calculated by a compute with ID, I can include wildcard (see below)
|
||||
|
||||
@ -62,7 +62,7 @@ not invoked during :doc:`energy minimization <minimize>`.
|
||||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
This fix requires that atoms store temperature and a heat flux
|
||||
This fix requires that atoms store temperature and heat flow
|
||||
as defined by the :doc:`atom_style sphere/temp <atom_style>` command.
|
||||
|
||||
Related commands
|
||||
|
||||
@ -186,7 +186,7 @@ specified as v_name, where name is the variable name. In this case, the
|
||||
variable will be evaluated each timestep, and its value used to determine
|
||||
the temperature. This option must be used in conjunction with a heat
|
||||
conduction model defined in :doc:`pair_style granular <pair_granular>`
|
||||
and a compatible atom style which stores temperature and a heat flux
|
||||
and a compatible atom style which stores temperature and a heat flow
|
||||
as defined by the :doc:`atom_style sphere/temp <atom_style>` command.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
|
||||
@ -209,7 +209,7 @@ specified as v_name, where name is the variable name. In this case, the
|
||||
variable will be evaluated each timestep, and its value used to determine
|
||||
the temperature. This option must be used in conjunction with a heat
|
||||
conduction model defined in :doc:`pair_style granular <pair_granular>`
|
||||
and a compatible atom style which stores temperature and a heat flux
|
||||
and a compatible atom style which stores temperature and a heat flow
|
||||
as defined by the :doc:`atom_style sphere/temp <atom_style>` command.
|
||||
|
||||
Restart, fix_modify, output, run start/stop, minimize info
|
||||
|
||||
@ -634,7 +634,7 @@ attractive force. This keyword cannot be used with the JKR or DMT models.
|
||||
|
||||
----------
|
||||
|
||||
The optional *heat* keyword enables heat conduction . The options currently
|
||||
The optional *heat* keyword enables heat conduction. The options currently
|
||||
supported are:
|
||||
|
||||
1. *none*
|
||||
@ -643,7 +643,7 @@ supported are:
|
||||
If the *heat* keyword is not specified, the model defaults to *none*.
|
||||
|
||||
For *heat* *area*, the heat
|
||||
:math:`Q` conducted across an interface is given by
|
||||
:math:`Q` conducted between two particles is given by
|
||||
|
||||
.. math::
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ Syntax
|
||||
value can be an atom-style variable (see below)
|
||||
*density/disc* value = particle density for a 2d disc or ellipse (mass/distance\^2 units)
|
||||
value can be an atom-style variable (see below)
|
||||
*temperature* value = particle temperature for a finite-size particle particle (temperature units)s
|
||||
*temperature* value = temperature for finite-size particles (temperature units)
|
||||
value can be an atom-style variable (see below)
|
||||
*volume* value = particle volume for Peridynamic particle (distance\^3 units)
|
||||
value can be an atom-style variable (see below)
|
||||
|
||||
83
examples/granular/in.pour.heat
Normal file
83
examples/granular/in.pour.heat
Normal file
@ -0,0 +1,83 @@
|
||||
# pour one types of particles into cylinder and oscillate
|
||||
# temperature of the bottom plate
|
||||
|
||||
variable name string heat_plate
|
||||
|
||||
atom_style sphere/temp
|
||||
units lj
|
||||
|
||||
###############################################
|
||||
# Geometry-related parameters
|
||||
###############################################
|
||||
|
||||
variable boxx equal 10
|
||||
variable boxy equal 10
|
||||
variable boxz equal 50
|
||||
|
||||
variable drum_rad equal ${boxx}*0.5
|
||||
variable drum_height equal 30
|
||||
|
||||
variable xc equal 0.5*${boxx}
|
||||
variable yc equal 0.5*${boxx}
|
||||
variable zc equal 0.5*${boxz}
|
||||
|
||||
###############################################
|
||||
# Particle-related parameters
|
||||
###############################################
|
||||
variable rlo equal 0.25
|
||||
variable rhi equal 0.5
|
||||
variable dlo equal 2.0*${rlo}
|
||||
variable dhi equal 2.0*${rhi}
|
||||
|
||||
variable cyl_rad_inner equal ${drum_rad}-1.1*${rhi}
|
||||
|
||||
variable dens equal 1.0
|
||||
|
||||
variable skin equal 0.4*${rhi}
|
||||
|
||||
#############
|
||||
processors * * 1
|
||||
region boxreg block 0 ${boxx} 0 ${boxy} 0 ${boxz}
|
||||
create_box 2 boxreg
|
||||
change_box all boundary p p f
|
||||
|
||||
pair_style granular
|
||||
pair_coeff * * hertz/material 1e5 0.2 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0
|
||||
|
||||
region curved_wall cylinder z ${xc} ${yc} ${drum_rad} 0 ${drum_height} side in
|
||||
region bottom_wall plane ${xc} ${yc} 0 0 0 1 side in
|
||||
|
||||
region insreg cylinder z ${xc} ${yc} ${cyl_rad_inner} ${drum_height} ${boxz}
|
||||
|
||||
fix 0 all balance 100 1.0 shift xy 5 1.1
|
||||
fix 1 all nve/sphere
|
||||
fix 2 all temp/integrate constant 1.0
|
||||
fix grav all gravity 10 vector 0 0 -1
|
||||
fix ins1 all pour 1000 1 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens}
|
||||
fix ins2 all pour 1000 2 1234 region insreg diam range ${dlo} ${dhi} dens ${dens} ${dens}
|
||||
|
||||
comm_modify vel yes
|
||||
|
||||
neighbor ${skin} bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
variable oscillate equal 1.0*sin(step*0.0001)
|
||||
|
||||
fix 3 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji region curved_wall
|
||||
fix 4 all wall/gran/region granular hertz/material 1e5 0.1 0.3 tangential mindlin NULL 1.0 0.5 damping tsuji heat area 5.0 region bottom_wall temperature v_oscillate
|
||||
|
||||
thermo_style custom step atoms ke pxx pyy pzz
|
||||
thermo_modify lost warn
|
||||
thermo 100
|
||||
|
||||
timestep 0.001
|
||||
|
||||
#dump 1 all custom 1000 ${name}.dump id type radius mass x y z temperature heatflow
|
||||
|
||||
#For removal later
|
||||
compute 1 all property/atom radius
|
||||
variable zmax atom z+c_1>0.5*${drum_height}
|
||||
group delgroup dynamic all var zmax every 10000
|
||||
|
||||
run 100000
|
||||
|
||||
@ -33,17 +33,17 @@ AtomVecSphereTemp::AtomVecSphereTemp(LAMMPS *lmp) : AtomVec(lmp)
|
||||
|
||||
atom->sphere_flag = 1;
|
||||
atom->radius_flag = atom->rmass_flag = atom->omega_flag = atom->torque_flag = 1;
|
||||
atom->temperature_flag = atom->heatflux_flag = 1;
|
||||
atom->temperature_flag = atom->heatflow_flag = 1;
|
||||
|
||||
// strings with peratom variables to include in each AtomVec method
|
||||
// strings cannot contain fields in corresponding AtomVec default strings
|
||||
// order of fields in a string does not matter
|
||||
// except: fields_data_atom & fields_data_vel must match data file
|
||||
|
||||
fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflux"};
|
||||
fields_grow = {"radius", "rmass", "omega", "torque", "temperature", "heatflow"};
|
||||
fields_copy = {"radius", "rmass", "omega", "temperature"};
|
||||
fields_comm_vel = {"omega", "temperature"};
|
||||
fields_reverse = {"torque", "heatflux"};
|
||||
fields_reverse = {"torque", "heatflow"};
|
||||
fields_border = {"radius", "rmass", "temperature"};
|
||||
fields_border_vel = {"radius", "rmass", "omega", "temperature"};
|
||||
fields_exchange = {"radius", "rmass", "omega", "temperature"};
|
||||
@ -107,7 +107,7 @@ void AtomVecSphereTemp::grow_pointers()
|
||||
rmass = atom->rmass;
|
||||
omega = atom->omega;
|
||||
temperature = atom->temperature;
|
||||
heatflux = atom->heatflux;
|
||||
heatflow = atom->heatflow;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -117,7 +117,7 @@ void AtomVecSphereTemp::grow_pointers()
|
||||
|
||||
void AtomVecSphereTemp::force_clear(int n, size_t nbytes)
|
||||
{
|
||||
memset(&heatflux[n], 0, nbytes);
|
||||
memset(&heatflow[n], 0, nbytes);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -40,7 +40,7 @@ class AtomVecSphereTemp : public AtomVec {
|
||||
private:
|
||||
double *radius, *rmass;
|
||||
double **omega;
|
||||
double *temperature, *heatflux;
|
||||
double *temperature, *heatflow;
|
||||
|
||||
int radvary;
|
||||
double radius_one, rmass_one;
|
||||
|
||||
@ -438,8 +438,7 @@ void ContactModel::calculate_forces()
|
||||
scale3(-1, torquesi);
|
||||
if (contact_type == PAIR) copy3(torquesi, torquesj);
|
||||
|
||||
if (!classic_model) {
|
||||
if (contact_type == PAIR) {
|
||||
if (!classic_model && contact_type == PAIR) {
|
||||
dist_to_contact = radi - 0.5 * delta;
|
||||
scale3(dist_to_contact, torquesi);
|
||||
dist_to_contact = radj - 0.5 * delta;
|
||||
@ -448,7 +447,6 @@ void ContactModel::calculate_forces()
|
||||
dist_to_contact = radi;
|
||||
scale3(dist_to_contact, torquesi);
|
||||
}
|
||||
}
|
||||
|
||||
double torroll[3];
|
||||
if (rolling_defined) {
|
||||
|
||||
@ -59,5 +59,5 @@ void HeatArea::coeffs_to_local()
|
||||
|
||||
double HeatArea::calculate_heat()
|
||||
{
|
||||
return conductivity * contact->area * (contact->Ti - contact->Tj);
|
||||
return conductivity * contact->area * (contact->Tj - contact->Ti);
|
||||
}
|
||||
|
||||
@ -77,8 +77,8 @@ void FixTempIntegrate::init()
|
||||
|
||||
if (!atom->temperature_flag)
|
||||
error->all(FLERR,"Fix temp/integrate requires atom style with temperature property");
|
||||
if (!atom->heatflux_flag)
|
||||
error->all(FLERR,"Fix temp/integrate requires atom style with heatflux property");
|
||||
if (!atom->heatflow_flag)
|
||||
error->all(FLERR,"Fix temp/integrate requires atom style with heatflow property");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -88,7 +88,7 @@ void FixTempIntegrate::final_integrate()
|
||||
// update temperature of atoms in group
|
||||
|
||||
double *temperature = atom->temperature;
|
||||
double *heatflux = atom->heatflux;
|
||||
double *heatflow = atom->heatflow;
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
int *type = atom->type;
|
||||
@ -99,12 +99,12 @@ void FixTempIntegrate::final_integrate()
|
||||
if (rmass) {
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
temperature[i] += dt * heatflux[i] / (calc_cp(i) * rmass[i]);
|
||||
temperature[i] += dt * heatflow[i] / (calc_cp(i) * rmass[i]);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
temperature[i] += dt * heatflux[i] / (calc_cp(i) * mass[type[i]]);
|
||||
temperature[i] += dt * heatflow[i] / (calc_cp(i) * mass[type[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,7 +125,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
error->all(FLERR, "Illegal fix wall/gran command, must specify "
|
||||
"twisting model after twisting keyword");
|
||||
model->init_model(std::string(arg[iarg++]), TWISTING);
|
||||
iarg += 1;
|
||||
iarg = model->twisting_model->parse_coeffs(arg, iarg, narg);
|
||||
} else if (strcmp(arg[iarg], "heat") == 0) {
|
||||
iarg++;
|
||||
@ -133,7 +132,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
error->all(FLERR, "Illegal fix wall/gran command, must specify "
|
||||
"heat model after heat keyword");
|
||||
model->init_model(std::string(arg[iarg++]), HEAT);
|
||||
iarg += 1;
|
||||
iarg = model->heat_model->parse_coeffs(arg, iarg, narg);
|
||||
heat_flag = 1;
|
||||
} else if (strcmp(arg[iarg], "xplane") == 0 ||
|
||||
@ -211,20 +209,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
wallstyle = REGION;
|
||||
idregion = utils::strdup(arg[iarg+1]);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"temperature") == 0) {
|
||||
if (narg < iarg+2) error->all(FLERR,"Illegal fix wall/gran command");
|
||||
if (utils::strmatch(arg[iarg+1], "^v_")) {
|
||||
tstr = utils::strdup(arg[3] + 2);
|
||||
} else {
|
||||
Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp);
|
||||
}
|
||||
Twall_defined = 1;
|
||||
iarg += 2;
|
||||
} else wallstyle = NOSTYLE;
|
||||
|
||||
if (heat_flag != Twall_defined)
|
||||
error->all(FLERR, "To model conduction, must define both heat model and wall temperature");
|
||||
|
||||
// optional args
|
||||
|
||||
wiggle = 0;
|
||||
@ -256,9 +242,21 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
size_peratom_cols = 8;
|
||||
peratom_freq = 1;
|
||||
iarg += 1;
|
||||
} else if (strcmp(arg[iarg],"temperature") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix wall/gran command");
|
||||
if (utils::strmatch(arg[iarg+1], "^v_")) {
|
||||
tstr = utils::strdup(arg[iarg+1] + 2);
|
||||
} else {
|
||||
Twall = utils::numeric(FLERR,arg[iarg+1],false,lmp);
|
||||
}
|
||||
Twall_defined = 1;
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix wall/gran command");
|
||||
}
|
||||
|
||||
if (heat_flag != Twall_defined)
|
||||
error->all(FLERR, "To model conduction, must define both heat model and wall temperature");
|
||||
|
||||
if (wallstyle == NOSTYLE)
|
||||
error->all(FLERR,"No wall style defined");
|
||||
if (wallstyle == XPLANE && domain->xperiodic)
|
||||
@ -360,8 +358,8 @@ void FixWallGran::init()
|
||||
if (heat_flag) {
|
||||
if (!atom->temperature_flag)
|
||||
error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with temperature property");
|
||||
if (!atom->heatflux_flag)
|
||||
error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with heatflux property");
|
||||
if (!atom->heatflow_flag)
|
||||
error->all(FLERR,"Heat conduction in fix wall/gran requires atom style with heatflow property");
|
||||
}
|
||||
|
||||
// check for FixRigid so can extract rigid body masses
|
||||
@ -408,7 +406,7 @@ void FixWallGran::post_force(int /*vflag*/)
|
||||
{
|
||||
int i,j;
|
||||
double dx,dy,dz,del1,del2,delxy,delr,rwall,meff;
|
||||
double *forces, *torquesi, dq;
|
||||
double *forces, *torquesi;
|
||||
double vwall[3];
|
||||
double w0[3] = {0.0};
|
||||
bool touchflag = false;
|
||||
@ -471,11 +469,7 @@ void FixWallGran::post_force(int /*vflag*/)
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
double *rmass = atom->rmass;
|
||||
double *temperature, *heatflux;
|
||||
if (heat_flag) {
|
||||
temperature = atom->temperature;
|
||||
heatflux = atom->heatflux;
|
||||
}
|
||||
double *temperature, *heatflow;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
@ -490,6 +484,8 @@ void FixWallGran::post_force(int /*vflag*/)
|
||||
model->vj = vwall;
|
||||
model->omegaj = w0;
|
||||
if (heat_flag) {
|
||||
temperature = atom->temperature;
|
||||
heatflow = atom->heatflow;
|
||||
if (tstr)
|
||||
Twall = input->variable->compute_equal(tvar);
|
||||
model->Tj = Twall;
|
||||
@ -574,13 +570,12 @@ void FixWallGran::post_force(int /*vflag*/)
|
||||
|
||||
forces = model->forces;
|
||||
torquesi = model->torquesi;
|
||||
if (heat_flag) dq = model->dq;
|
||||
|
||||
// apply forces & torques
|
||||
add3(f[i], forces, f[i]);
|
||||
|
||||
add3(torque[i], torquesi, torque[i]);
|
||||
if (heat_flag) heatflux[i] += dq;
|
||||
if (heat_flag) heatflow[i] += model->dq;
|
||||
|
||||
// store contact info
|
||||
if (peratom_flag) {
|
||||
|
||||
@ -22,11 +22,13 @@
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "neighbor.h"
|
||||
#include "math_extra.h"
|
||||
#include "region.h"
|
||||
#include "update.h"
|
||||
#include "variable.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@ -124,7 +126,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
||||
{
|
||||
int i, m, nc, iwall;
|
||||
double dx, dy, dz, meff;
|
||||
double *forces, *torquesi, dq;
|
||||
double *forces, *torquesi;
|
||||
double vwall[3];
|
||||
double w0[3] = {0.0};
|
||||
bool touchflag = false;
|
||||
@ -167,11 +169,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
||||
double **torque = atom->torque;
|
||||
double *radius = atom->radius;
|
||||
double *rmass = atom->rmass;
|
||||
double *temperature, *heatflux;
|
||||
if (heat_flag) {
|
||||
temperature = atom->temperature;
|
||||
heatflux = atom->heatflux;
|
||||
}
|
||||
double *temperature, *heatflow;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
@ -188,7 +186,13 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
||||
// Define constant wall properties (atom j)
|
||||
model->radj = 0.0;
|
||||
model->omegaj = w0;
|
||||
if (heat_flag) model->Tj = Twall;
|
||||
if (heat_flag) {
|
||||
temperature = atom->temperature;
|
||||
heatflow = atom->heatflow;
|
||||
if (tstr)
|
||||
Twall = input->variable->compute_equal(tvar);
|
||||
model->Tj = Twall;
|
||||
}
|
||||
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
if (! mask[i] & groupbit) continue;
|
||||
@ -269,13 +273,12 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
||||
|
||||
forces = model->forces;
|
||||
torquesi = model->torquesi;
|
||||
if (heat_flag) dq = model->dq;
|
||||
|
||||
// apply forces & torques
|
||||
add3(f[i], forces, f[i]);
|
||||
|
||||
add3(torque[i], torquesi, torque[i]);
|
||||
if (heat_flag) heatflux[i] += dq;
|
||||
if (heat_flag) heatflow[i] += model->dq;
|
||||
|
||||
// store contact info
|
||||
if (peratom_flag) {
|
||||
|
||||
@ -161,9 +161,9 @@ void PairGranular::compute(int eflag, int vflag)
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
double *heatflux, *temperature;
|
||||
double *heatflow, *temperature;
|
||||
if (heat_flag) {
|
||||
heatflux = atom->heatflux;
|
||||
heatflow = atom->heatflow;
|
||||
temperature = atom->temperature;
|
||||
}
|
||||
|
||||
@ -265,13 +265,13 @@ void PairGranular::compute(int eflag, int vflag)
|
||||
|
||||
scale3(factor_lj, torquesi);
|
||||
add3(torque[i], torquesi, torque[i]);
|
||||
if (heat_flag) heatflux[i] += dq;
|
||||
if (heat_flag) heatflow[i] += dq;
|
||||
|
||||
if (force->newton_pair || j < nlocal) {
|
||||
sub3(f[j], forces, f[j]);
|
||||
scale3(factor_lj, torquesj);
|
||||
add3(torque[j], torquesj, torque[j]);
|
||||
if (heat_flag) heatflux[j] -= dq;
|
||||
if (heat_flag) heatflow[j] -= dq;
|
||||
}
|
||||
|
||||
if (evflag) {
|
||||
@ -446,8 +446,8 @@ void PairGranular::init_style()
|
||||
if (heat_flag) {
|
||||
if (!atom->temperature_flag)
|
||||
error->all(FLERR,"Heat conduction in pair granular requires atom style with temperature property");
|
||||
if (!atom->heatflux_flag)
|
||||
error->all(FLERR,"Heat conduction in pair granular requires atom style with heatflux property");
|
||||
if (!atom->heatflow_flag)
|
||||
error->all(FLERR,"Heat conduction in pair granular requires atom style with heatflow property");
|
||||
}
|
||||
|
||||
// allocate history and initialize models
|
||||
|
||||
14
src/atom.cpp
14
src/atom.cpp
@ -124,7 +124,7 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
|
||||
ellipsoid = line = tri = body = nullptr;
|
||||
quat = nullptr;
|
||||
temperature = nullptr;
|
||||
heatflux = nullptr;
|
||||
heatflow = nullptr;
|
||||
|
||||
// molecular systems
|
||||
|
||||
@ -413,7 +413,7 @@ void Atom::peratom_create()
|
||||
add_peratom("body",&body,INT,0);
|
||||
|
||||
add_peratom("temperature",&temperature,DOUBLE,0);
|
||||
add_peratom("heatflux",&heatflux,DOUBLE,0);
|
||||
add_peratom("heatflow",&heatflow,DOUBLE,0);
|
||||
|
||||
// BPM package
|
||||
|
||||
@ -617,7 +617,7 @@ void Atom::set_atomflag_defaults()
|
||||
molecule_flag = molindex_flag = molatom_flag = 0;
|
||||
q_flag = mu_flag = 0;
|
||||
rmass_flag = radius_flag = omega_flag = torque_flag = angmom_flag = 0;
|
||||
temperature_flag = heatflux_flag = 0;
|
||||
temperature_flag = heatflow_flag = 0;
|
||||
vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0;
|
||||
cs_flag = csforce_flag = vforce_flag = ervelforce_flag = etag_flag = 0;
|
||||
rho_flag = esph_flag = cv_flag = vest_flag = 0;
|
||||
@ -2612,10 +2612,10 @@ length of the data area, and a short description.
|
||||
- double
|
||||
- 1
|
||||
- temperature of the particles
|
||||
* - heatflux
|
||||
* - heatflow
|
||||
- double
|
||||
- 1
|
||||
- heatflux of the particles
|
||||
- heatflow of the particles
|
||||
* - i_name
|
||||
- int
|
||||
- 1
|
||||
@ -2673,7 +2673,7 @@ void *Atom::extract(const char *name)
|
||||
if (strcmp(name,"body") == 0) return (void *) body;
|
||||
if (strcmp(name,"quat") == 0) return (void *) quat;
|
||||
if (strcmp(name,"temperature") == 0) return (void *) temperature;
|
||||
if (strcmp(name,"heatflux") == 0) return (void *) heatflux;
|
||||
if (strcmp(name,"heatflow") == 0) return (void *) heatflow;
|
||||
|
||||
if (strcmp(name,"vfrac") == 0) return (void *) vfrac;
|
||||
if (strcmp(name,"s0") == 0) return (void *) s0;
|
||||
@ -2798,7 +2798,7 @@ int Atom::extract_datatype(const char *name)
|
||||
if (strcmp(name,"body") == 0) return LAMMPS_INT;
|
||||
if (strcmp(name,"quat") == 0) return LAMMPS_DOUBLE_2D;
|
||||
if (strcmp(name,"temperature") == 0) return LAMMPS_DOUBLE;
|
||||
if (strcmp(name,"heatflux") == 0) return LAMMPS_DOUBLE;
|
||||
if (strcmp(name,"heatflow") == 0) return LAMMPS_DOUBLE;
|
||||
|
||||
if (strcmp(name,"vfrac") == 0) return LAMMPS_DOUBLE;
|
||||
if (strcmp(name,"s0") == 0) return LAMMPS_DOUBLE;
|
||||
|
||||
@ -80,7 +80,7 @@ class Atom : protected Pointers {
|
||||
double **omega, **angmom, **torque;
|
||||
int *ellipsoid, *line, *tri, *body;
|
||||
double **quat;
|
||||
double *temperature, *heatflux;
|
||||
double *temperature, *heatflow;
|
||||
|
||||
// molecular systems
|
||||
|
||||
@ -183,7 +183,7 @@ class Atom : protected Pointers {
|
||||
int molecule_flag, molindex_flag, molatom_flag;
|
||||
int q_flag, mu_flag;
|
||||
int rmass_flag, radius_flag, omega_flag, torque_flag, angmom_flag, quat_flag;
|
||||
int temperature_flag, heatflux_flag;
|
||||
int temperature_flag, heatflow_flag;
|
||||
int vfrac_flag, spin_flag, eradius_flag, ervel_flag, erforce_flag;
|
||||
int cs_flag, csforce_flag, vforce_flag, ervelforce_flag, etag_flag;
|
||||
int rho_flag, esph_flag, cv_flag, vest_flag;
|
||||
|
||||
@ -41,7 +41,7 @@ enum{ID,MOL,PROC,PROCP1,TYPE,ELEMENT,MASS,
|
||||
XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI,
|
||||
IX,IY,IZ,
|
||||
VX,VY,VZ,FX,FY,FZ,
|
||||
Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,HEATFLUX,TEMPERATURE,
|
||||
Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER,heatflow,TEMPERATURE,
|
||||
OMEGAX,OMEGAY,OMEGAZ,ANGMOMX,ANGMOMY,ANGMOMZ,
|
||||
TQX,TQY,TQZ,
|
||||
COMPUTE,FIX,VARIABLE,IVEC,DVEC,IARRAY,DARRAY};
|
||||
@ -930,11 +930,11 @@ int DumpCustom::count()
|
||||
for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i];
|
||||
ptr = dchoose;
|
||||
nstride = 1;
|
||||
} else if (thresh_array[ithresh] == HEATFLUX) {
|
||||
if (!atom->heatflux_flag)
|
||||
} else if (thresh_array[ithresh] == heatflow) {
|
||||
if (!atom->heatflow_flag)
|
||||
error->all(FLERR,
|
||||
"Threshold for an atom property that isn't allocated");
|
||||
ptr = atom->heatflux;
|
||||
ptr = atom->heatflow;
|
||||
nstride = 1;
|
||||
} else if (thresh_array[ithresh] == TEMPERATURE) {
|
||||
if (!atom->temperature_flag)
|
||||
@ -1392,10 +1392,10 @@ int DumpCustom::parse_fields(int narg, char **arg)
|
||||
error->all(FLERR,"Dumping an atom property that isn't allocated");
|
||||
pack_choice[iarg] = &DumpCustom::pack_diameter;
|
||||
vtype[iarg] = Dump::DOUBLE;
|
||||
} else if (strcmp(arg[iarg],"heatflux") == 0) {
|
||||
if (!atom->heatflux_flag)
|
||||
} else if (strcmp(arg[iarg],"heatflow") == 0) {
|
||||
if (!atom->heatflow_flag)
|
||||
error->all(FLERR,"Dumping an atom property that isn't allocated");
|
||||
pack_choice[iarg] = &DumpCustom::pack_heatflux;
|
||||
pack_choice[iarg] = &DumpCustom::pack_heatflow;
|
||||
vtype[iarg] = Dump::DOUBLE;
|
||||
} else if (strcmp(arg[iarg],"temperature") == 0) {
|
||||
if (!atom->temperature_flag)
|
||||
@ -1867,7 +1867,7 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
|
||||
else if (strcmp(arg[1],"radius") == 0) thresh_array[nthresh] = RADIUS;
|
||||
else if (strcmp(arg[1],"diameter") == 0) thresh_array[nthresh] = DIAMETER;
|
||||
else if (strcmp(arg[1],"heatflux") == 0) thresh_array[nthresh] = HEATFLUX;
|
||||
else if (strcmp(arg[1],"heatflow") == 0) thresh_array[nthresh] = heatflow;
|
||||
else if (strcmp(arg[1],"temperature") == 0) thresh_array[nthresh] = TEMPERATURE;
|
||||
else if (strcmp(arg[1],"omegax") == 0) thresh_array[nthresh] = OMEGAX;
|
||||
else if (strcmp(arg[1],"omegay") == 0) thresh_array[nthresh] = OMEGAY;
|
||||
@ -2783,12 +2783,12 @@ void DumpCustom::pack_diameter(int n)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void DumpCustom::pack_heatflux(int n)
|
||||
void DumpCustom::pack_heatflow(int n)
|
||||
{
|
||||
double *heatflux = atom->heatflux;
|
||||
double *heatflow = atom->heatflow;
|
||||
|
||||
for (int i = 0; i < nchoose; i++) {
|
||||
buf[n] = heatflux[clist[i]];
|
||||
buf[n] = heatflow[clist[i]];
|
||||
n += size_one;
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ class DumpCustom : public Dump {
|
||||
void pack_mu(int);
|
||||
void pack_radius(int);
|
||||
void pack_diameter(int);
|
||||
void pack_heatflux(int);
|
||||
void pack_heatflow(int);
|
||||
void pack_temperature(int);
|
||||
|
||||
void pack_omegax(int);
|
||||
|
||||
Reference in New Issue
Block a user