set atom-style variable

Riccardo Maione's picture
Submitted by Riccardo Maione on Tue, 04/15/2014 - 16:48

Hi all,

I'm trying to setting a variable heat source depending on particle temperature i've read that this is a task that it can be accomplished with the new version of liggghts, so here is my code:

#---------------INIT SECTION------------------------------------------------------------------------

echo screen
lattice sc 0.1
atom_style hybrid granular molecular
atom_modify map array
boundary m m m
newton off
communicate single vel yes
neighbor 0.01 bin
units si
variable dt equal 0.000001
variable h equal step*dt
neigh_modify delay 0

#--------------- LEGNO -----------------------------------------------------------------------------

read_data "data.fine"

#--------------- SETTING SECTION -------------------------------------------------------------------

group bois1 type 1
group bois2 type 2
group bois union bois1 bois2
fix m8 bois rigid molecule
neigh_modify delay 0 exclude molecule bois

fix m1 all property/global youngsModulus peratomtype 9.18e8 9.18e8 1.65e11
fix m2 all property/global poissonsRatio peratomtype 0.382 0.382 0.27
fix m5 all property/global coefficientRollingFriction peratomtypepair 3&
0.75 0.75 0.35&
0.75 0.75 0.35&
0.35 0.35 0.04
fix m3 all property/global coefficientRestitution peratomtypepair 3&
0.603 0.603 0.66&
0.603 0.603 0.66&
0.660 0.660 0.8
fix m4 all property/global coefficientFriction peratomtypepair 3&
0.5 0.5 0.5&
0.5 0.5 0.5&
0.5 0.5 0.5

region OO block -1 1 -1 1 -1 1 units box

fix heattransfer all heat/gran initial_temperature 298.
fix ftco all property/global thermalConductivity peratomtype 0.12 0.12 20
fix ftca all property/global thermalCapacity peratomtype 1700 1700 500

pair_style gran model hertz tangential history rolling_friction cdt
pair_coeff * *

group bois1 type 1
group bois2 type 2
group bois union bois1 bois2
group acier type 3

#--------------- FINAL SECTION ---------------------------------------------------------------------

compute rke all erotate/sphere
compute A all pair/gran/local id contactArea
thermo_style custom step atoms ke c_rke vol f_heattransfer
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes

timestep ${dt}
run 0

variable T atom f_Temp
variable Q1 atom 5*(923-v_T)
fix MO acier nve/sphere
run 0
set atom * property/atom heatSource v_Q1
dump dmp all custom 1000 dump.heatgen3.0 id type x y z ix iy iz vx vy vz fx fy fz mass omegax omegay omegaz radius f_Temp f_heatFlux f_heatSource v_Q1

run 1000
run 50000
set type 2 property/atom Temp 800
run 20000000 upto

so the thing is that when i try to set this variable all the heatsources are zero, even if the variable is not. What am I doing wrong?
thanks for the help

kunzhang's picture

kunzhang | Wed, 07/23/2014 - 19:15

Have you fixed this problem? I would like to do a similar thing and use the variable to set atom * property/atom value. The results is the same as you that the value is 0.

Could you please share how do you solve this problem?

Thanks!

Kun

kunzhang

ckloss's picture

ckloss | Sat, 07/26/2014 - 21:47

Hi Riccardo,

that's actually a bug because the doc claims this functionailty works, but it's actually not implemented.
I'll put it on my list for the next release (no guaranty however :-)

Best wishes Christoph

Riccardo Maione's picture

Riccardo Maione | Tue, 08/26/2014 - 08:19

if you want i have partially fixed the problem, I say partially because the script does not work with mpi, but I can share it

ckloss's picture

ckloss | Wed, 08/27/2014 - 19:30

Hi Riccardo,

functionality will be added to 3.0.3 to be released tomorrow!

Christoph