# Other equations

### Motion equations

The vector of phonon motion is given by:

$$
x = sin(\theta)·abs(cos(\phi)) \y = cos(\theta)·abs(cos(\phi))\\\z = sin(\phi)
$$

where θ is the angle between the projection to *x-y* plane and *y*-axis, and φ is the angle to the horizontal plane. Thus, the phonon moves step-by-step with the speed *v* in the assigned direction according to the following equations:

$$
\Delta x = sin(\theta)·abs(cos(\phi))·v·dt
\\
\Delta y = cos(\theta)·abs(cos(\phi))·v·dt
\\
\Delta z = sin(\phi)·v·dt
$$

where *dt* is the duration of one time step.

### Angles to the walls

At each collision with walls, we calculate the angle between the phonon motion vector and the normal vectors to the walls of different kinds:

**Horizontal wall**

$$
\alpha = arccos(cos(\phi)·cos(\theta))
$$

**Vertical wall**

$$
\alpha = arccos(cos(\phi)·sin(abs(\theta)))
$$

**Inclined wall of the triangle**

For triangle facing up

$$
\alpha = arccos(cos(\phi)·cos(\pi/2-|\theta|+\beta))
$$

For triangle facing down

$$
\alpha = arccos(cos(\phi)·cos(\pi/2-|\theta|-\beta))
$$

where β is the half-angle of the tip of the triangle.

**Wall of the circular hole**

$$
\alpha = arccos(cos(\phi)·cos(\theta+sign(y-y\_0)·\theta\_{tangent}))
$$

where

$$
\theta\_{tangent} = arctan((x-x\_0)/(y-y\_0))
$$

is the normal to the surface of the circle, with *x0* and *y0* as circle center coordinates.

### Specular scattering probability

Then, specular scattering probability, determined by Soffer's equation:

$$
p = exp(-16 \pi ^2 \sigma^2 cos^2(\alpha) / \lambda ^2)
$$

where *p* is the specularity probability (number between zero and one), σ is the surface roughness, α is the angle to the surface, and λ is the phonon wavelength.
