Heat transfer in a 1D harmonic crystal: regular temperature
This page is an extension of the page Heat transfer in a 1D harmonic crystal. The program below demonstrates an attempt to set the initial temperature in a regular way, in order to answer the question: Isn't there some way to choose the initial conditions that makes all of the averaging unnecessary?
The idea is to set the initial velocities randomly, but then the displacements are chosen in a way that the total energy (sum of kinetic and potential energies) associated with particles is a regular (not random) function of the particle number. The simulation below shows evolution of the spatial profiles of the total, kinetic and potential energies.