Hello,

In the langevin example to calculate the thermal conductivity of a material.

In the method we thermostat a hot and cold region:

region hot block INF INF INF INF 0 1

region cold block INF INF INF INF 10 11

compute Thot all temp/region hot

compute Tcold all temp/region cold

And then following this part in the README:

dQ = 8000 * 0.5*(0.905+0.947) / 100 / 18.82^2 / 2

8000 atoms

0.5*(0.905+0.947) = from log file =

ave of total in/out energy for 2 regions normalized by # of atoms

100 = 20,000 steps at 0.005 tau timestep = run time in tau

xy box area = 18.82^2

divide by 2 since energy flux goes in 2 directions due to periodic z

dTemp = 0.578 from log file for average Temp difference between 2 regions

dZ = 18.82

My question is: In this, how do we find the total energy in/out for 2 regions and obtained the value of 0.905 and 0.947 in this. I am unable to understand this. If it will be elaborated a little it will be a great help.

Thanking you in advance.

It will be more educational if you carefully study all the commands in the input and check out their respective documentation.

Sir,

Thank you for your kind reply.

Please forgive me, I have gone through all the commands used in the input script of the example (named as â€śin.langevinâ€ť) but am unable to understand how the value 0.905 and 0.947 is obtained?

The keyboard tally yes in fix Langevin is calculating the cumulative energy added/subtracted to the atoms as they are thermostatted. But, the value obtained in the log file with this is -0.89036148 and 0.88285227. Now, I am confused is this the total energy in/out, and does the average of these two energies have to be taken for calculation?

I donâ€™t know what README file you are quoting, but these are the values in the README file that *I* have, so you must be looking at the wrong file.

Again, this is *very* obvious from the log file and studying the documentation. You are too fixated on specific numbers and are ignoring common sense and basic calculus.

A couple hints that might help you:

- please note that with any command using random numbers on different machines using different compiler with different numbers of processes you can easily get some varying numbers that are of similar magnitude but not identical. This is often used as a measure of statistical convergence. You are looking at an example that explicitly states that it is only showing the principle and that for properly converged results you need to run longer (and likely bigger, too).
- please keep in mind that
`A - -B`

is the same as `A + B`

.

Thank you axel sir. Again, you solved my doubt.

The read-me file that I am having makes me confused. So, instead of having a bad concept, I thought to clear it and you cleared it very well.

Sir, you are really full of knowledge. The students who are working with you are so fortunate that they are learning from you.

I donâ€™t have time (or funding) to have students, I spend too much time answering emails and forum messages.

2 Likes