> For the complete documentation index, see [llms.txt](https://anufrievroman.gitbook.io/freepaths/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anufrievroman.gitbook.io/freepaths/basic-tutorials/thin-layers.md).

# Thin layers

This example shows how to add layers in a specific material to your structure and can be reproduced with `examples/layers.py` input file. The structure contains an array of layers (or "interfaces") defined in the input file as:

```
INTERFACES = []
period = 20e-9 # modify this value to change the distance between two interfaces
start_x = -WIDTH / 2 + period
end_x = WIDTH / 2 - period
INTERFACE_ROUGHNESS = 1.5e-9  # roughness of the interfaces

x = start_x
while x <= end_x:
    INTERFACES.append(VerticalPlane(position_x=x, inner_material='Ge', outer_material=MEDIA, depth=THICKNESS)) # add the material of the layers here
    x += period
```

Here, the `INTERFACE` list is filled with the `VerticalPlane` objects. This will create a structure that looks like the figure below, where the thin layers are indicated by the black lines:\\

<figure><img src="/files/Su3azd9pXApyXm1jSuNw" alt="" width="333"><figcaption></figcaption></figure>

If we increase the number of phonons to several thousand, we can see some interesting curves. For example, the transmission factor as a function of the incident angles. Each curve corresponds to one frequency, and each color corresponds to one mode.\\

<figure><img src="/files/OYEvx7Ysw3zFO1Q9H9Bk" alt="" width="375"><figcaption></figcaption></figure>

To better observe the influence of frequency on transmission, this curve shows the phonon incident angle as a function of its frequency, with the transmission factor represented as a color map.

<figure><img src="/files/rN3pCTiyiWthbEdrDEXv" alt="" width="375"><figcaption></figcaption></figure>

The file `information.txt` also contains various statistical insights, like the average transmission:

```
95% of particles reached the cold side

8.62% - scattering on side walls (99.88% - diffuse, 0.12% - specular)
1.60% - scattering on top and bottom walls (90.00% - diffuse, 10.00% - specular)
0.78% - rethermalization at the hot side
71.27% - internal scattering processes
18.33% - scattering on interfaces (24.08% - diffuse, 75.92% - specular)
67.81% - transmission through interfaces (24.72% - diffuse, 75.28% - specular)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://anufrievroman.gitbook.io/freepaths/basic-tutorials/thin-layers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
