Dear all

I want to have J_x an J_y (heat flux in x and y directions)

Individually for all atoms in system. But no fixes and dumps do this

action, would you please help me. Thanks in advance.

Farrokh

Dear all

I want to have J_x an J_y (heat flux in x and y directions)

Individually for all atoms in system. But no fixes and dumps do this

action, would you please help me. Thanks in advance.

Farrokh

Dear Farrokh,

If I've understood you correctly, you want to get the following vector for each atom in your system:

J_i = e_i * v_i - S_i * v_i where e_i is the energy of atom i, v_i is the velocity, and S_i is the per atom stress. This is just the first equation from http://lammps.sandia.gov/doc/compute_heat_flux.html, without the summation.

You can print out e_i, v_i, and S_i for every atom, and then do this as a post-processing step. compute stress/atom virial will give you S_i. To get the total energy, you can use an atom style variable to combine the output of compute ke/atom and compute pe/atom. You can then use dump custom to output, e.g.:

compute s_a all stress/atom virial

compute ke_a all ke/atom

compute pe_a all pe/atom

variable e_tot atom c_ke_a+c_pe_a

dump flux_out all custom 50 flux.* id vx vy vz v_e_tot c_s_a[1] c_s_a[2] c_s_a[3] c_s_a[4] c_s_a[5] c_s_a[6]

This will give you a dump file every 50 timesteps with the columns: i, vx_i, vy_i, vz_i, e_i, s_xx_i, s_yy_i, s_zz_i, s_xy_i, s_xz_i, s_yz_i

In fact, you can go a step further in LAMMPS and save yourself some disk space.

You can define two more atom style variables to calculate Jx and Jy for you, and just dump those.

As an example, for J_xi = e_i*v_xi + S_xxi*v_xi + S_xyi*v_yi + S_xzi*v_zi:

compute s_a all stress/atom virial

compute ke_a all ke/atom

compute pe_a all pe/atom

variable e_tot atom c_ke_a+c_pe_a

variable Jx atom (v_e_tot*vx)+(c_s_a[1]*vx)+(c_s_a[4]*vy)+(c_s_a[5]*vz)

...

dump flux_out all custom 50 flux.* id v_Jx

Dear Niall

Thank you very much, You are correct.

In J_xi, is back of S mines? or plus?

Thanks

Sorry! Yes, you're quite right.

J_xi = e_i*v_xi - S_xxi*v_xi - S_xyi*v_yi - S_xzi*v_zi

Thank you Niall.