Difference between revisions of "OpenPSTD v1.0 settings"

From OpenPSTD
Jump to: navigation, search
(Bake openPSTD simulation)
 
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The settings described here correspond to the buttons of the openPSTD v1.0 add-on.
+
The settings described here correspond to the buttons of the openPSTD v1.0 (with additional features for the v1.1 version) add-on in Blender.  
  
 
== General settings ==
 
== General settings ==
  
 
===Grid spacing | Max freq===
 
===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 v1.0, i.e. '''Max freq''' <math>f_{max}</math> as follows
+
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''' <math>f_{max}</math> as follows
  
 
:<math> f_{max}=  \frac{c}{2\Delta} </math>
 
:<math> f_{max}=  \frac{c}{2\Delta} </math>
Line 17: Line 17:
 
</math>
 
</math>
  
with ''p'' the pressure value at a certain receiver position at a frequency corresponding to 2.5 points per wavelength and <math> p_{ana}</math> the analytical pressure value at this frequency. An &epsilon; value of 50 dB corresponds to a level difference error of 0.03 dB. Note that the accuracy of openPSTD v1.0 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 [http://www.sciencedirect.com/science/article/pii/S0021999112001568 Hornikx ''et al.'' 2012]. 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.
+
with ''p'' the pressure value at a certain receiver position at a frequency corresponding to 2.5 points per wavelength and ''p''<sub>ana</sub> the analytical pressure value at this frequency. An &epsilon; 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 [http://www.sciencedirect.com/science/article/pii/S0010465516300443 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===
 
===Render time===
The simulation length of a calculation in openPSTD v1.0 is denoted by '''Render time''' in s. The calculation is terminated after this time. A calculation can also be stopped manually before this 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===
 
===Absorption===
When an edge of the constructed configuration is selected, see [[Getting started with openPSTD v1.0]] 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 v1.0.
+
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.
  
 
===Local===
 
===Local===
Line 31: Line 31:
  
 
===Pressure level visualisation scale===
 
===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.
+
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===
 
===Number of PML cells | Attenuation of PML cels===
Line 38: Line 38:
 
:<math> \sigma(x) = \alpha\left( \frac{x-x_{PML}}{D} \right)^4</math>
 
:<math> \sigma(x) = \alpha\left( \frac{x-x_{PML}}{D} \right)^4</math>
  
with &sigma; the PML damping coefficient, <math>x-x_{PML}</math> the position of the grid point in the PML layer and D the thickness of the PML layer, see [http://scitation.aip.org/content/asa/journal/jasa/128/4/10.1121/1.3474234 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.
+
with &sigma; the PML damping coefficient, ''x-x''<sub>PML</sub> the position of the grid point in the PML layer and D the thickness of the PML layer, see [http://scitation.aip.org/content/asa/journal/jasa/128/4/10.1121/1.3474234 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===
 
===Density===
The '''Density''' in &kg/m^3; is the density of the propagation medium.
+
The '''Density''' in kg/m<sup>3</sup> is the density of the propagation medium in the drawn subdomains. In openPSTD, the density is constant throughout the propagation medium.
  
 
===Sound speed===
 
===Sound speed===
The adiabatic speed of sound of the propagation medium is denoted by '''Sound speed''' in m/s.
+
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===
 
===CFL number RK-scheme===
The stability of the calculation is controlled by the '''CFL number RK-scheme'''. The default value of this number for the 2D calculations in openPSTD v1.0 is 0.5.
+
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
 +
:<math> f_{s}=  CFL \frac{c}{2 \Delta x} </math>
 +
 
 +
===Enable GPU Acceleration===
 +
OpenPSTD v1.1 features GPU acceleration using CUDA or OpenCL. If the '''Enable GPU Acceleration''' box is checked, the openPSTD kernel will attempt to import PyCUDA. If this fails, it will attempt to import PyOpenCL. If neither is available, the simulation will not complete. GPU acceleration requires additional Python modules and a Python 2.7 path to be set in the config file. For more information, refer to section '''[[Getting started with OpenPSTD#Installing openPSTD v1.0|Enabling GPU Acceleration]]'''.
 +
 
 +
===Use 32 bit===
 +
If '''Enable GPU Acceleration''' is active, '''Use 32 bit''' can be selected to use 32-bit floats in the GPU computations. Not all GPUs and GPU drivers support 64-bit computation, so this option may be required. Enabling this option will greatly speed up computation at the expense of a very slight loss of accuracy.
  
 
===Save every nth===
 
===Save every nth===
'''Save every nth''' sets the interval of discrete time steps used for the visualisation of the 2D results in openPSTD v1.0.
+
'''Save every nth''' sets the interval of discrete time steps used for the visualisation of the 2D results in openPSTD.
  
 
===Visualization subsampling===
 
===Visualization subsampling===
'''Visualization subsampling''' sets the interval of discrete spatial steps used for the visualisation of the 2D results in openPSTD v1.0.
+
'''Visualization subsampling''' sets the interval of discrete spatial steps used for the visualisation of the 2D results in openPSTD.
  
 
===Run simulation===
 
===Run simulation===
The simulation in openPSTD v1.0 is initiated by pressing the '''simulate with openPSTD''' button. Before a new run, current results can be cleared by pressing '''Clear simulation data'''. During a simulation, the simulation can be termined before the '''Render time''' has expired by '''Stop the current openPSTD simulation'''.
+
The simulation in openPSTD is initiated by pressing the '''simulate with openPSTD''' button. Before a new run, current results can be cleared by pressing '''Clear simulation data'''. During a simulation, the simulation can be termined before the '''Render time''' has expired by '''Stop the current openPSTD simulation'''.
  
 
===Bake openPSTD simulation===
 
===Bake openPSTD simulation===
This
+
The computed time dependent 2D sound field can be exported as a movie. The '''Bake openPSTD simulation''' command turns the calculations into a movie.
  
 
'''<< [[openPSTD v1.0 overview]]'''
 
'''<< [[openPSTD v1.0 overview]]'''
  
'''>> [[Getting started with openPSTD v1.0]]'''
+
'''>> [[Getting started with OpenPSTD v1.1]]'''

Latest revision as of 15:11, 28 April 2016

The settings described here correspond to the buttons of the openPSTD v1.0 (with additional features for the v1.1 version) add-on in Blender.

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 f_{max} as follows

 f_{max}=  \frac{c}{2\Delta}

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:

 
\epsilon = -20\log_{10}\left(\frac{|p|-|p_{ana}|}{|p_{ana}|} \right)

with p the pressure value at a certain receiver position at a frequency corresponding to 2.5 points per wavelength and pana 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.

Local

The setting Local relates to the absorption coefficient. It the Local box is ticked, the boundary is in approximation treated as a locally reacting boundary. When a reflection free boundary is aimed for, this box should not be ticked.

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

 \sigma(x) = \alpha\left( \frac{x-x_{PML}}{D} \right)^4

with σ the PML damping coefficient, x-xPML 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/m3 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

 f_{s}=  CFL \frac{c}{2 \Delta x}

Enable GPU Acceleration

OpenPSTD v1.1 features GPU acceleration using CUDA or OpenCL. If the Enable GPU Acceleration box is checked, the openPSTD kernel will attempt to import PyCUDA. If this fails, it will attempt to import PyOpenCL. If neither is available, the simulation will not complete. GPU acceleration requires additional Python modules and a Python 2.7 path to be set in the config file. For more information, refer to section Enabling GPU Acceleration.

Use 32 bit

If Enable GPU Acceleration is active, Use 32 bit can be selected to use 32-bit floats in the GPU computations. Not all GPUs and GPU drivers support 64-bit computation, so this option may be required. Enabling this option will greatly speed up computation at the expense of a very slight loss of accuracy.

Save every nth

Save every nth sets the interval of discrete time steps used for the visualisation of the 2D results in openPSTD.

Visualization subsampling

Visualization subsampling sets the interval of discrete spatial steps used for the visualisation of the 2D results in openPSTD.

Run simulation

The simulation in openPSTD is initiated by pressing the simulate with openPSTD button. Before a new run, current results can be cleared by pressing Clear simulation data. During a simulation, the simulation can be termined before the Render time has expired by Stop the current openPSTD simulation.

Bake openPSTD simulation

The computed time dependent 2D sound field can be exported as a movie. The Bake openPSTD simulation command turns the calculations into a movie.

<< openPSTD v1.0 overview

>> Getting started with OpenPSTD v1.1