[lammps-users] error on fix heat

Dear all,

I am trying to use ‘fix heat’ to conduct NEMD simulation, which add and reduce energy from two regions for every n time steps. And I used the new version of fix heat which contains ‘region’ option. While I got this error ’ Could not find fix group ID’. This error came after the fix heat command. The following is the input files.

Thanks.

MD simulation of Ar thermal conductivity

Initialization

units lj
dimension 3
newton on
boundary p p p
atom_style atomic
neighbor 0.3 bin
neigh_modify check yes
lattice fcc 0.844
region box block -4 4 -4 4 -4 4 units lattice
create_box 1 box
create_atoms 1 box
region up1 block INF INF INF INF -0.5 -0.25 units lattice
region up2 block INF INF INF INF 0.5 0.75 units lattice
region up union 2 up1 up2
region down1 block INF INF INF INF -3.5 -3.25 units lattice
region down2 block INF INF INF INF 3.5 3.75 units lattice
region down union 2 down1 down2
region hot block INF INF INF INF 0.0 0.25 units lattice
group hot region hot
region cold block INF INF INF INF -4.0 -3.75 units lattice
group cold region cold
mass 1 1.0
#mass0 6.633e-26
#epsilon0 1.67e-21
#sigma0 3.405e-10
velocity all create 0.71 458127641 mom yes rot yes dist gaussian units box

Tersoff potential *********************************************************

pair_style lj/cut 2.8
pair_coeff 1 1 1.0 1.0 # LJ parameters for Ar-Ar
fix temp all temp/berendsen 0.71 0.71 0.0466
fix nve all nve
compute ke all ke/atom
variable temp atom c_ke/(1.5*1.0)
fix temp_profile all ave/spatial 1 100000 100000 z lower 0.25 v_temp file temp.profile units lattice
compute up_temp all temp/region up
compute down_temp all temp/region down
variable delta_temp equal c_up_temp-c_down_temp
fix delta_out all ave/time 1 100000 100000 v_delta_temp file delta_temp.dat
thermo_style custom step temp etotal vol
thermo_modify lost warn
thermo 1000

Run

timestep 0.000466
run 100001
unfix temp

fix hot qin heat 1 1.0 region hot
fix cold qout heat 1 -1.0 region cold
variable thermal_conductivity equal 50.00.51.67e-21/3.405e-10/sqrt(6.633e-26/1.67e-21)/((4.08.08.08.0/0.844)^(1.0/3.0)3.405e-102.0f_delta_out*1.67e-21/1.3806504e-23)*6.0/8.0
fix thermal_conductivity_out all ave/time 100000 1 100000 v_thermal_conductivity file thermal_conductivity.dat

Run

run 1000000

It says itself. Where is your group ID qin and qout? AC

2010/6/15 yutom55 <yutom55@…127…>

Ajing, thanks for reply. I modified the fix heat to:
fix 7 hot heat 1 1.0 region hot
fix 8 cold heat 1 -1.0 region cold

while then I got ’ Illegal fix heat command '. I seems this format can not recognized by Lammps.

在2010-06-16 04:29:35,“Ajing Cao” <caolammps@…24…> 写道:

Are you using the latest version? the region option was added recently. So, please see the manual for the correct command in the doc directory corresponding to your lammps version.

2010/6/16 YuTom <yutom55@…127…>

Vikas, thanks. I know that the region option was added in April. So I update my version to the latest one, if I am not mistaken…when I input ‘svn update’, I got ‘At revision 4267’, then I input ‘make package-update’ and make Lammps finally. But from the error information, it seems my version is the old one. I am wondering if I have other way to check my Lammps version? Or this problem is just not caused by version issue?

在2010-06-17 03:25:44,“Vikas Varshney” <vv0210@…24…> 写道:

I think you should go to the fix_heat.cpp and see what causes this error (I mean what causes lammps to write the error line. ). See if that is string size.

2010/6/16 YuTom <yutom55@…127…>

Change this line in fix_heat.cpp
  int iarg = 6;
to
  int iarg = 5;

I'll post a patch.

Steve

2010/6/16 YuTom <[email protected]...>:

Steve, thanks. It works now.

在2010-06-17 22:07:32,“Steve Plimpton” <sjplimp@…24…> 写道: >Change this line in fix_heat.cpp > int iarg = 6; >to > int iarg = 5; > >I’ll post a patch. > >Steve > >2010/6/16 YuTom <yutom55@…127…>: >> Ajing, thanks for reply. I modified the fix heat to: >> fix 7 hot heat 1 1.0 region hot >> fix 8 cold heat 1 -1.0 region cold >> while then I got ’ Illegal fix heat command ‘. I seems this format can not >> recognized by Lammps. >> >> 在2010-06-16 04:29:35,“Ajing Cao” <caolammps@…24…> 写道: >> >> It says itself. Where is your group ID qin and qout? AC >> >> >> 2010/6/15 yutom55 <yutom55@…127…> >>> >>> Dear all, >>> >>> I am trying to use ‘fix heat’ to conduct NEMD simulation, which add and >>> reduce energy from two regions for every n time steps. And I used the new >>> version of fix heat which contains ‘region’ option. While I got this error ’ >>> Could not find fix group ID’. This error came after the fix heat command. >>> The following is the input files. >>> >>> Thanks. >>> >>> # MD simulation of Ar thermal conductivity >>> # Initialization >>> units lj >>> dimension 3 >>> newton on >>> boundary p p p >>> atom_style atomic >>> neighbor 0.3 bin >>> neigh_modify check yes >>> lattice fcc 0.844 >>> region box block -4 4 -4 4 -4 4 units lattice >>> create_box 1 box >>> create_atoms 1 box >>> region up1 block INF INF INF INF -0.5 -0.25 units >>> lattice >>> region up2 block INF INF INF INF 0.5 0.75 units >>> lattice >>> region up union 2 up1 up2 >>> region down1 block INF INF INF INF -3.5 -3.25 units >>> lattice >>> region down2 block INF INF INF INF 3.5 3.75 units >>> lattice >>> region down union 2 down1 down2 >>> region hot block INF INF INF INF 0.0 0.25 units >>> lattice >>> group hot region hot >>> region cold block INF INF INF INF -4.0 -3.75 units >>> lattice >>> group cold region cold >>> mass 1 1.0 >>> #mass0 6.633e-26 >>> #epsilon0 1.67e-21 >>> #sigma0 3.405e-10 >>> velocity all create 0.71 458127641 mom yes rot yes dist >>> gaussian units box >>> # Tersoff potential >>> ********************************************************* >>> pair_style lj/cut 2.8 >>> pair_coeff 1 1 1.0 1.0 # >>> LJ parameters for Ar-Ar >>> fix temp all temp/berendsen 0.71 0.71 0.0466 >>> fix nve all nve >>> compute ke all ke/atom >>> variable temp atom c_ke/(1.51.0) >>> fix temp_profile all ave/spatial 1 100000 100000 >>> z lower 0.25 v_temp file temp.profile units lattice >>> compute up_temp all temp/region up >>> compute down_temp all temp/region down >>> variable delta_temp equal c_up_temp-c_down_temp >>> fix delta_out all ave/time 1 100000 100000 >>> v_delta_temp file delta_temp.dat >>> thermo_style custom step temp etotal vol >>> thermo_modify lost warn >>> thermo 1000 >>> # Run >>> timestep 0.000466 >>> run 100001 >>> unfix temp >>> >>> fix hot qin heat 1 1.0 region hot >>> fix cold qout heat 1 -1.0 region cold >>> variable thermal_conductivity equal >>> 50.00.51.67e-21/3.405e-10/sqrt(6.633e-26/1.67e-21)/((4.08.08.08.0/0.844)^(1.0/3.0)3.405e-102.0f_delta_out1.67e-21/1.3806504e-23)*6.0/8.0 >>> fix thermal_conductivity_out all ave/time 100000 1 >>> 100000 v_thermal_conductivity file >>> thermal_conductivity.dat >>> # Run >>> run 1000000 >>> >>> ________________________________ >>> 网易为中小企业免费提供企业邮箱(自主域名) >>> >>> ------------------------------------------------------------------------------ >>> ThinkGeek and WIRED’s GeekDad team up for the Ultimate >>> GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the >>> lucky parental unit. See the prize list and enter to win: >>> http://p.sf.net/sfu/thinkgeek-promo >>> _______________________________________________ >>> lammps-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/lammps-users >>> >> >> >> >> ________________________________ >> 网易为中小企业免费提供企业邮箱(自主域名) >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED’s GeekDad team up for the Ultimate >> GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> lammps-users mailing list >> [email protected]


>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>
>>