Setting a variable equal to compute heat/flux changes its value

Hi,

I am calculating trying to calculate the heat flux of a liquid using the standard lammps command:

compute myFlux all heat/flux myKE myPE myStress 
My problem is that if I assign part of that vector to a variable
variable myVar equal c_myFlux[1]
then myVar is a completely different value than c_myFlux[1] (not only as a value but also in scale as it is over 10000 times bigger). Does anyone know why that may be the case?
Thanks in advance for your help

Hi,

I am calculating trying to calculate the heat flux of a liquid using the
standard lammps command:

compute myFlux all heat/flux myKE myPE myStress

My problem is that if I assign part of that vector to a variable

variable myVar equal c_myFlux[1]

then myVar is a completely different value than c_myFlux[1] (not only as a
value but also in scale as it is over 10000 times bigger). Does anyone know
why that may be the case?

how should anybody know based on this insufficient information?

axel.

I suppose I didn’t really make my problem very clear. The issue I am having is that I assign a compute to a variable and yet if I print them separately, they have completely different values. So if I don something like this:

compute fluxnanofluidGroup nanofluidGroup heat/flux nanofluidGroupKE nanofluidGroupPE nanofluidGroupStress
variable test equal c_fluxnanofluidGroup[1]

thermo_style custom step temp press v_test c_fluxnanofluidGroup[1]

The output I am getting is this:

Step Temp Press test fluxnano
0 0.64356895 -0.32865401 -3458.3593 -0.98782043
5000 0.64107967 0.2604219 2230.6403 0.63714377
10000 0.63961111 -0.11383091 -1272.5796 -0.36349033
15000 0.6389519 0.08849037 -4660.7015 -1.3312487
20000 0.63587742 -0.15904484 5786.6021 1.6528426
25000 0.63725356 -0.063411203 4467.1334 1.2759593
30000 0.63485856 0.38710774 -166.42823 -0.04753734
35000 0.63351729 0.075207227 -4885.2714 -1.3953931
40000 0.6327215 -0.019377663 -1419.2063 -0.4053717
45000 0.64432148 -0.024335769 -1538.6679 -0.43949384
50000 0.63827874 0.0061451092 4345.8763 1.2413243
55000 0.64536643 0.012014914 -959.45479 -0.27405164
60000 0.63875202 -0.00065928524 -2560.2884 -0.73130202
65000 0.63621437 0.19713005 7137.6544 2.0387473

As you can see the value of the variable is different than that of the compute although I assign the later to the former. The ratios between them are always the same (roughly 2.8E-4) which leads me to believe that they are showing the same thing using different units. Is that the case?

I suppose I didn't really make my problem very clear. The issue I am having
is that I assign a compute to a variable and yet if I print them separately,
they have completely different values. So if I don something like this:

this is still *incomplete* and thus forces me to guess and to ask
additional questions. is it so difficult to understand that to get
help, you have to provide complete information? have you ever
considered that the problem may be caused by something that you are
not thinking about?

so here we go:
are you by any chance using reduced units? or are you explicitly
normalizing thermo output?

as it is explained in the documentation, the heat/flux compute
produces an *extensive* property.
does the scaling factor correlate to the number of atoms in the
nanofluid group? i.e. you have about 3600 atoms in it?
once you assign a property to a variable LAMMPS cannot know whether it
is an intensive or an extensive property and will not normalize it in
thermo output.

axel.

You are right. The scaling factor is just the number of atoms int he group.

Thanks for your help