Spatial profile of heat flux

Dear LAMMPS users,

I am trying to dump the spatial profile of the heat flux with the command ave/chunk.

This command does not work because: “Fix ave/atom does not calculate per-atom values”.

Is there a way to convert a per-atom value quantity so that fix ave/atom can calculate it?

Here is part of my script

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
compute flux all heat/flux myKE myPE myStress

variable Jx equal c_flux[1]/vol
variable Jy equal c_flux[2]/vol
variable Jz equal c_flux[3]/vol

compute layers all chunk/atom bin/1d x 0. {Dz} 0.05 units reduced fix 2 all ave/chunk {Ne} {Nr} {Nf} layers c_flux[1] file profile.heat

Thank you,

Abdou

Dear LAMMPS users,

I am trying to dump the spatial profile of the heat flux with the command
ave/chunk.

This command does not work because: "Fix ave/atom does not calculate
per-atom values".

​your inquiry makes no sense. there is _no_ fix ave/atom in the commands
you quoted below, so none of those commands can be the cause of the error
you are reporting.

axel.

Sorry for that mistake. I’ve been trying many things since this morning, including fix ave/tom which works for the stress but not for the heat flux.

When I tried this code (this only part of my script),

compute myKE all ke/atom

compute myPE all pe/atom

compute myStress all stress/atom NULL virial

compute flux all heat/flux myKE myPE myStress

variable Jx equal c_flux[1]/vol

variable Jy equal c_flux[2]/vol

variable Jz equal c_flux[3]/vol

compute layers all chunk/atom bin/1d x 0. ${Dz} 0.05 units reduced

fix 2 all ave/chunk {Ne} {Nr} ${Nf} layers c_flux[1] file profile.heat

I got this error: " Error: Illegal compute chunk/atom command
Last command: compute layers all chunk/atom bin/1d x 0. ${D} units reduced"

What is the right way to dump the spatial profile of the heat flux (x, Jx) ?

Abdou

Sorry for that mistake. I’ve been trying many things since this morning, including fix ave/tom which works for the stress but not for the heat flux.

When I tried this

compute myKE all ke/atom

compute myPE all pe/atom

compute myStress all stress/atom NULL virial

compute flux all heat/flux myKE myPE myStress

variable Jx equal c_flux[1]/vol

variable Jy equal c_flux[2]/vol

variable Jz equal c_flux[3]/vol

compute layers all chunk/atom bin/1d x 0. ${Dz} 0.05 units reduced

fix 2 all ave/chunk {Ne} {Nr} ${Nf} layers c_flux[1] file profile.heat

I got this error: " Error: Illegal compute chunk/atom command
Last command: compute layers all chunk/atom bin/1d x 0. ${D} units reduced"

What is the right way to dump the spatial profile of the heat flux (x, Jx) ?

Abdou

Sorry for that mistake. I've been trying many things since this
morning, including fix ave/tom which works for the stress but not for the
heat flux.

When I tried this code (this only part of my script),

compute myKE all ke/atom
compute myPE all pe/atom
compute myStress all stress/atom NULL virial
compute flux all heat/flux myKE myPE myStress

variable Jx equal c_flux[1]/vol
variable Jy equal c_flux[2]/vol
variable Jz equal c_flux[3]/vol

compute layers all chunk/atom bin/1d x 0. \{Dz\} 0\.05 units reduced fix 2 all ave/chunk {Ne} \{Nr\} {Nf} layers c_flux[1] file
profile.heat

I got this error: " Error: Illegal compute chunk/atom command
                         Last command: compute layers all chunk/atom
bin/1d x 0. ${D} units reduced"

​this error is also not consistent with the quoted​ input script code.

axel.

Here is the error:

ERROR: Fix ave/chunk compute does not calculate per-atom values (…/fix_ave_chunk.cpp:293)
Last command: fix 22 all ave/chunk {Ne} {Nr} ${Nf} layers c_flux[1] file profile.heat

My script file is attached. The lines that do not seem to work are:

compute layers all chunk/atom bin/1d x 0. {Dz} units reduced fix 22 all ave/chunk {Ne} {Nr} {Nf} layers c_flux[1] file profile.heat

in.MOD (3.65 KB)

Here is the error:

ERROR: Fix ave/chunk compute does not calculate per-atom values
(../fix_ave_chunk.cpp:293)
Last command: fix 22 all ave/chunk \{Ne\} {Nr} ${Nf} layers
c_flux[1] file profile.heat

​yes, and the error message is correct since c_flux is not a per-atom
property, but a global vector. you *must* use a per-atom compute for being
able to use fix ave/chunk.

axel.

Thank you Axel.

So here is what I am trying do, and any help or suggestion would be very welcome.

I want to see how the heat flux evolves spatially. That is why I used fix ave/chunk but as you mentioned c_flux is not a per-atom property therefore it can’t be used with this command.

Is there something else I can use to obtain the heat flux profile? How could I compute a per-atom property heat flux or convert the global quantity I already have to a per-atom property?

Abdou

Thank you Axel.

So here is what I am trying do, and any help or suggestion would be very
welcome.

I want to see how the heat flux evolves spatially. That is why I used fix
ave/chunk but as you mentioned c_flux is not a per-atom property therefore
it can't be used with this command.

Is there something else I can use to obtain the heat flux profile? How
could I compute a per-atom property heat flux or convert the global
quantity I already have to a per-atom property?

​you would have to write a custom compute heat/flux/atom style yourself.

axel.

Alright. Thank you.

Abdou