variable of fix heat

Hi all,

I am in trouble with variable of fix heat. I am trying to apply a spatially-dependent heat flux to a group of atoms. As it is difficult to define a expression with atoms’ position to describe the heat flux, I map the atoms’ position with their atom ID and get a file contain the atoms’ ID and the atom style heat flux. Then I define an atomfile style variable as the input of fix heat. The input file is attached in the end. However, when I run this input file, The temperature of system didn’t change at all even though the heat flux is very large (about 10eV/ps).
Here is my question:
Q1. Does atomfile style variable is acceptable to fix heat, since the document of fix heat doesn’t say atomfile style variable is acceptable, but I didn’t get any error when I run the input file.
Q2.Below is the first 10 lines of my atom.file. Is it’s format correct?

236320 #Total number of atoms in group

1 3.813590e+00 # the first word is atom ID, the second word is value of heat flux
2 3.747139e+00
3 3.869359e+00
4 3.869359e+00
5 4.041673e+00
6 3.954873e+00
7 4.044444e+00
8 3.723723e+00
9 3.645886e+00
10 3.811840e+00

Any suggestion will be appreciate.

Jacobi

Here is the input file:

Hi all,

I am in trouble with variable of fix heat. I am trying to apply a spatially-dependent heat flux to a group of atoms. As it is difficult to define a expression with atoms’ position to describe the heat flux, I map the atoms’ position with their atom ID and get a file contain the atoms’ ID and the atom style heat flux. Then I define an atomfile style variable as the input of fix heat. The input file is attached in the end. However, when I run this input file, The temperature of system didn’t change at all even though the heat flux is very large (about 10eV/ps).

you don’t say which version of LAMMPS you are using. i tried applying your approach to one of the LAMMPS example inputs and it is working fine with the latest LAMMPS version (18 July 2019).

Here is my question:
Q1. Does atomfile style variable is acceptable to fix heat, since the document of fix heat doesn’t say atomfile style variable is acceptable, but I didn’t get any error when I run the input file.

atomfile style variables can be used whever atom style variables can be used. the documentation for the variable command states that. so, yes, atomfile variables are supported and can be used the way you are using them.

Q2.Below is the first 10 lines of my atom.file. Is it’s format correct?

seems to me. you can easily check by creating a custom dump, where you output the id and v_laser . those numbers should match what you read from the file.

236320 #Total number of atoms in group

1 3.813590e+00 # the first word is atom ID, the second word is value of heat flux
2 3.747139e+00
3 3.869359e+00
4 3.869359e+00
5 4.041673e+00
6 3.954873e+00
7 4.044444e+00
8 3.723723e+00
9 3.645886e+00
10 3.811840e+00

Any suggestion will be appreciate.

either you are not doing exactly what you are describing, not looking at the correct output, or you are using an outdated LAMMPS version that has some problem.

axel.