Note that only left and right side walls exist in the system and the distribution of angles at the phonon source is set to random, zero angle is implied by default. Make sure that the chosen angle distribution corresponds to the chosen position of hot side, so that it does not emit phonon outside the system. Available distributions are illustrated below:
Available phonon angle distributions at the phonon source.
Thus, to create the horizontal thermal gradient, side walls should be rearranged, distribution changed and cold/hot side positions changed accordingly. For example, as follows (these lines are commented in the anisotroopy_study.py file):
Note that we changed the angle parameter in the Source object. Below are the schemes of these two systems and resulting thermal gradients:
Schemes and gradients in systems with vertical and horizontal gradients.
Likewise, the gradient can be set in any other direction as long as the hot and cold sides are different. More than one wall can serve as a cold or a hot side. Essentially, hot side means that phonons will be diffusely scattered from that wall (thermalized). Conversely, cold side means that phonons will be absorbed by that wall and simulation will be over for these phonons.
Note that while it is possible to send the phonons through the structure in any direction, the thermal conductivity calculation will along the y direction