Dear All,

I’m trying to calculate the thermal conductivity of a nanofluid. I used the ehex.in template from the KAPPA example folder.

When calculating average Temp difference using the compute chunk/atom, it seems to be heavily influenced by the choice of “delta = thickness of spatial bins in dim”

Here is the command I use

```
compute layers all chunk/atom bin/1d z lower 0.5 units box
fix 2 all ave/chunk 10 100 1000 layers v_temp file profile.ehex
variable tdiff equal f_2[11][3]-f_2[1][3]
fix ave all ave/time 1 1 1000 v_tdiff ave running start 100
thermo_style custom step c_Thot c_Tcold v_tdiff temp f_ave
```

How does one choose a proper delta value? and based on which criteria?

Best regards,

Yunes Salman

When you change the value of delta you also change the number of bins.

With a different number of bins the variable `tdiff`

must be defined over different chunk indices, or else it won’t represent the difference between the hot and the cold region.

So that you get statistically converged and accurate results.

If you choose smaller bins, fewer atoms are in them and more averaging (and thus a longer simulation) is needed to get statistically converged results. If you choose larger bins the average value will be tainted because you also include atoms at a temperature range. Obviously there is some optimum there, but there is no simple formula or rule that you can apply, mostly because convergence is also system dependent. You need to observe convergence of your data in general and also read up on any recommendations from the original literature describing the method.

1 Like

Hi Axel,

You need to observe convergence`

Can you please elaborate on that? Can I check convergence by checking whether the temperature gradient becomes linear or not?

Sorry, but this is not a LAMMPS question but a question about how to do research and proper statistical analysis of your data. You should consult with your adviser about it and - if necessary - ask to arrange for some proper training/tutoring in how to properly determine statistical relevance and convergence of data. This is certainly not something that can be explained in a simple “do this, not that” kind of way.

Dear Axel,

Thank you for your feedback. I will definitely do that.