---
description: Silicon nanowire at 300 K
---

# Nanowire

The example input file `examples/nanowire.py`, located in the [examples](https://github.com/anufrievroman/freepaths/tree/master/examples) folder, shows thermal transport simulation in a simple nanowire at room temperature. Let's run this input file as:

```
freepaths nanowire.py
```

After the simulation, we can see the output files in the Results folder. For example, phonon paths in such a structure showing mostly diffusive behavior:

<figure><img src="https://664157142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rdk0xqy0YirGWqTjhkv%2Fuploads%2Fk9x4pmHX3aIWdxkTWQVu%2Fpaths.jpg?alt=media&#x26;token=2ee72a34-3b8b-469e-872a-a223d6148d5d" alt=""><figcaption><p>Example of phonon paths in the structure.</p></figcaption></figure>

Also, the algorithm calculates the thermal profiles, heat flux, and the thermal conductivity at different time intervals. From the profile plots, we can see how the temperature profiles converge after about 6th timeframe, as the system is reaching the state:

<figure><img src="https://664157142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rdk0xqy0YirGWqTjhkv%2Fuploads%2FlhbbQizwKfQ3dox8ycsY%2Fimage.png?alt=media&#x26;token=b5d45e07-05f7-4e24-b8b7-af28af9158e0" alt="" width="563"><figcaption><p>Temperature profiles at different time intervals.</p></figcaption></figure>

Likewise, the heat flux converges to the flat line in the last few time frames:

<figure><img src="https://664157142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rdk0xqy0YirGWqTjhkv%2Fuploads%2Femnj0DCVBtJQZmNYHs1H%2Fimage.png?alt=media&#x26;token=0fd4ce98-c72f-40ec-adb6-8eded6a1dfcf" alt="" width="563"><figcaption><p>Heat flux profiles converge to the flat line in the steady state.</p></figcaption></figure>

This can be used to estimate the [thermal conductivity](../theory/themal-conductivity-calculation) of the structure via the Fourier law. The  plot of thermal conductivity shows the convergence and the averaging in the steady state interval:

<figure><img src="https://664157142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7rdk0xqy0YirGWqTjhkv%2Fuploads%2FLfTirJxUhmchFUmowFR4%2Fimage.png?alt=media&#x26;token=a996c08f-8f25-4f2a-a806-213aa29a7487" alt="" width="563"><figcaption><p>Thermal conductivity convergance and averaging over the steady state period.</p></figcaption></figure>

For a simple nanowire, the [material and effective](../../theory/themal-conductivity-calculation#effective-vs-material-thermal-conductivity) thermal conductivities are identical and equal to about 54 W/m·K, which is consistent with experimental observations.

Now, we can try another approach to the [thermal conductivity calculation](../../theory/themal-conductivity-calculation#mean-free-path-approach). We take the same input file but reduce the number of phonons to 30 and run it with `-s` flag:

```
freepaths -s nanowire.py
```

The program calculates [the integral over the phonon branches](../../theory/themal-conductivity-calculation#mean-free-path-approach), and we obtain a similar value of the thermal conductivity of about 51 W/m·K.

## Tips for thermal conductivity calculations

* The software can currently only calculate the thermal conductivity in the y direction. Also, make sure that the phonons are generated at the edge of the simulation domain.
* The software does not give correct results if pillars are present in the simulation.
* Because the calculation relies on the pixel grid to calculate the profiles, make sure that pixels are small enough and maps look good (some discontinuities in the pixels adjacent to holes are expected and correct).
* Simulate enough phonons (> 5000) to get valid results.
* Ensure that [time parameters](../../getting-started/config-file-creation-guide#simulation-time-parameters) are set correctly.
