# Document settings

**This page should be checked for errors since v1.1**

The settings described here correspond to the settings in a PSTD document from openPSTD v2.0.

## Contents |

## General settings

### Grid spacing | Max freq

The **Grid spacing** in metres corresponds to the spacing of the grid points, and is equal in horizontal and vertical direction. The **Grid spacing** determines the maximum resolved frequency in openPSTD, i.e. **Max freq** as follows

with Δ the **Grid spacing** in metres and *c* the adiabatic speed of sound. When changing **Grid spacing**, **Max freq** automatically changes according to the above equation, and vice versa.

### Window size | Patch error

To compute the spatial derivative of the acoustic variables within a subdomain of the drawn geometry, three subdomains are needed, see openPSTD v1.0 overview. The values of the outer subdomains are windowed by a Gaussian window, see Hornikx *et al.* 2012. The window length applied to the outer subdomains is equal to **Window size**. This number determines the minimum number of grid points of the subdomains. The window affects the accuracy of the calculation, with the accuracy increasing with the window length. The error introduced by the window is called the **Patch error** ε in dB, and is defined as:

with *p* the pressure value at a certain receiver position at a frequency corresponding to 2.5 points per wavelength and *p*_{ana} the analytical pressure value at this frequency. An ε value of 50 dB corresponds to a level difference error of 0.03 dB. Note that the accuracy of openPSTD calculations is not only affected by the window error, but also by the initial source function, the time iteration scheme and the PML layer, see Hornikx *et al.* 2016. As the error is determined by the maximum error, increasing the window length does not imply that the error is reduced per se. **Patch error** automatically changes by increasing the **Window size**, and vice versa.

### Render time

The simulation length of a calculation in openPSTD is denoted by **Render time** in s. The calculation is terminated after this time. A calculation can also be stopped manually before this time by pressing **Stop the current openPSTD simulation**.

### Absorption

When an edge of the constructed geometry is selected, see Getting started with OpenPSTD how to do this, the acoustic absorption coefficient can be assigned to this edge by setting the **Absorption** to a value between 0 and 1. When an edge is selected, the actual value of the absorption coefficient of this edge is written in parenthesis behind the **Absorption** setting. In openPSTD v1.0 overview, it is explained how reflections from boundaries are computed in openPSTD.

## Advanced settings

### Pressure level visualisation scale

The **Pressure level visualisation scale** in dB sets the dynamic range of the relative sound pressure level in the 2D visual animation. This dynamic range is visible in the drawing section of Blender.

### Number of PML cells | Attenuation of PML cels

The **Number of PML cells** sets the number of grid points in the boundary media that are affected by the perfectly matched layer (PML). The **Attenuation of PML cells** corresponds to the number α in

with σ the PML damping coefficient, *x-x*_{PML} the position of the grid point in the PML layer and D the thickness of the PML layer, see Hornikx *et al.* 2010. The default value of **Attenuation of PML cells** is 20000. A larger number of PML cells reduces the error introduced by the PML.

### Density

The **Density** in kg/m^{3} is the density of the propagation medium in the drawn subdomains. In openPSTD, the density is constant throughout the propagation medium.

### Sound speed

The adiabatic speed of sound of the propagation medium is denoted by **Sound speed** in m/s. Like the density, the adiabatic speed of sound is constant throughout the propagation medium in openPSTD.

### CFL number RK-scheme

The stability of the Fourier PSTD method is determined by the stability criteria arising from the used Runge-Kutta method, and is controlled by the **CFL number RK-scheme**. The default value of this number for the 2D calculations in openPSTD is 0.5. The sample frequency of the time-domain calculations thereby becomes