# Difference between revisions of "OpenPSTD v1.0 overview"

(→User Interface) |
(→Geometry, medium and boundaries) |
||

Line 13: | Line 13: | ||

A geometry in openPSTD must be constructed out of a subsequent arrangement of rectangles (subdomains). The interface, at which the boundaries of two adjacent subdomains coincide, does not necessarily have to match the full length of both subdomain boundaries. Hence, subdomains can have multiple neighbors at a domain boundary and hence local refinement does not necessarily propagate throughout the entire topology. The density and speed of sound of the propagation medium can be defined in the openPSTD settings. A restriction of the method is the minimum dimension of the subdomains, which is equal to the '''Grid spacing''' multiplied by the '''Window size''' (see [[openPSTD v1.0 settings]]). Once the geometry has been constructed, the acoustic absorption coefficient at the edges needs to be defined. The defined absorption coefficient corresponds to a real valued normalized surface impedance according to | A geometry in openPSTD must be constructed out of a subsequent arrangement of rectangles (subdomains). The interface, at which the boundaries of two adjacent subdomains coincide, does not necessarily have to match the full length of both subdomain boundaries. Hence, subdomains can have multiple neighbors at a domain boundary and hence local refinement does not necessarily propagate throughout the entire topology. The density and speed of sound of the propagation medium can be defined in the openPSTD settings. A restriction of the method is the minimum dimension of the subdomains, which is equal to the '''Grid spacing''' multiplied by the '''Window size''' (see [[openPSTD v1.0 settings]]). Once the geometry has been constructed, the acoustic absorption coefficient at the edges needs to be defined. The defined absorption coefficient corresponds to a real valued normalized surface impedance according to | ||

− | :<math> Z = | + | :<math> Z = - \frac{\sqrt{1-\alpha}+1}{\sqrt{1-\alpha}-1}</math> |

The absorption coefficients are frequency independent. The default setting in openPSTD is that boundary reflection are independent on the angle of incidence. A locally reacting boundary can also be chosen, see [[openPSTD v1.0 settings]]. The reflection coefficient then becomes, in approximation (see [http://www.sciencedirect.com/science/article/pii/S036013231200323X van Renterghem ''et al.'' 2013]). | The absorption coefficients are frequency independent. The default setting in openPSTD is that boundary reflection are independent on the angle of incidence. A locally reacting boundary can also be chosen, see [[openPSTD v1.0 settings]]. The reflection coefficient then becomes, in approximation (see [http://www.sciencedirect.com/science/article/pii/S036013231200323X van Renterghem ''et al.'' 2013]). |

## Revision as of 17:47, 30 August 2014

## Contents |

## What can you model with openPSTD v1.0?

openPSTD v1.0 provides a visual user interface that enables to compute sound propagation in a 2D geometry. With openPSTD v1.0, the 2D geometry, bounded by edges that (partly) absorb the sound waves, can be drawn in Blender. Sources of sound and receiver positions can freely be chosen within the geometry. Sound propagation is computed in openPSTD v1.0 by numerically solving the linearised Euler equations, i.e. the partial differential equations that describe sound propagation in fluid flow in the time domain. The outcome of openPSTD v1.0 is a visualisation of sound propagation, by a 2D animation and by the impulse responses at the position(s) of the receiver(s). As openPSTD is an open source software, we highly encourage contributions to the code as to this wiki.

## User Interface

to be added soon…
**Thomas, kan je dit beschrijven?**

**Thomas, kan je instructies geven hoe een berekening remote kan worden uitgevoerd op Python?**

## Geometry, medium and boundaries

A geometry in openPSTD must be constructed out of a subsequent arrangement of rectangles (subdomains). The interface, at which the boundaries of two adjacent subdomains coincide, does not necessarily have to match the full length of both subdomain boundaries. Hence, subdomains can have multiple neighbors at a domain boundary and hence local refinement does not necessarily propagate throughout the entire topology. The density and speed of sound of the propagation medium can be defined in the openPSTD settings. A restriction of the method is the minimum dimension of the subdomains, which is equal to the **Grid spacing** multiplied by the **Window size** (see openPSTD v1.0 settings). Once the geometry has been constructed, the acoustic absorption coefficient at the edges needs to be defined. The defined absorption coefficient corresponds to a real valued normalized surface impedance according to

The absorption coefficients are frequency independent. The default setting in openPSTD is that boundary reflection are independent on the angle of incidence. A locally reacting boundary can also be chosen, see openPSTD v1.0 settings. The reflection coefficient then becomes, in approximation (see van Renterghem *et al.* 2013).

with θ the angle of sound incidence relative to the normal to the interface.

## Source and receivers

The location of source(s) and receiver(s) can be chosen freely in the constructed geometry, see Getting started with openPSTD v1.0. Source(s) are modelled by initial pressures distributions with the following spatial Gaussian shape:

with , Δ the grid spacing in metres, *c* the adiabatic speed of sound, the 2D coordinate vector and the source position. The centre(s) of the Gaussian shape(s) thus corresponds to the defined centre(s) of the sources. Although receiver positions might not correspond to a position in the mesh, spectral interpolation allows to compute the response of the source(s) in the constructed geometry at an arbitrary location in the space.

## Mesh

In openPSTD v1.0, the geometry is discretised by an orthogonal equidistant grid, with **Grid spacing** in metres equal to the spacing of the grid points. Pressure grid positions are staggered by a half grid spacing with acoustic velocity grid positions, and the velocity position are located at the edges of a subdomain: horizontal velocity components are located at a vertical edge and vertical velocity components are located at an horizontal edge. When a geometry is drawn, a grid is created. If a dimension of a drawn subdomain does not correspond to an integer multiple of the **Grid spacing**, the subdomain is extended such that its size (in the respective direction) becomes an integer multiple of the **Grid spacing**.

.

## Solver

Wave propagation in the openPSTD software is implemented according to the extended Fourier PSTD method as presented in Hornikx *et al.* 2010. With this numerical method, the linearized Euler equations (LEE) are solved, which allow a detailed computation of sound propagation in moving inhomogeneous media and return the linear acoustic equations for a non-moving homogeneous propagation medium. In PSTD, the spatial derivatives arising in the LEE are computed in the wavenumber domain. This implies that a spatial Fourier transform is applied to the acoustic variables, and after an operation in the wavenumber domain, an inverse Fourier transform returns the derivatives. This way of computing spatial derivatives leads to an accurate solution requiring only 2 spatial points per wavelength.
In openPSTD v1.0, the total domain is decomposed into subdomains. The advantage of this decomposition is a higher geometrical flexibility, a lower computational complexity, it promotes object orienting programming and a parallel computational architecture.
The computation of the horizontal spatial derivatives in a subdomain at the pressure positions is schematically depicted in the accompanied Figure. Three subdomains are needed to compute these derivatives. Prior to computing the derivatives, the variable values are multiplied by a window function. The accuracy of this technique is reported in Hornikx *et al.* 2012, and increases with an increasing length of the decay of the single sided windows.
Behind every edge, a boundary subdomain is included in openPSTD v1.0. This subdomain is not visible in the graphical interface in Blender. The waves propagate in the boundary subdomains and are absorbed by a perfectly matched layer (PML), see Hornikx *et al.* 2010.

## Results

Computed results can be accessed in two ways. First, the 2D pressure field can be viewed as a function of time. This offers the possibility to interpret sound propagation in a qualitative way. The second possibility is to export the computed impulse responses at the receiver positions for further post processing. The broad band impulse responses can then be processed to frequency domain results and octave band values can be obtained.