Getting started with OpenPSTD v1.1

From OpenPSTD
Revision as of 10:34, 21 July 2015 by Maarten (Talk | contribs)

Jump to: navigation, search

Contents

Installing openPSTD v1.0

  • Install Blender:
  • Download the OpenPSTD Blender add-on from http://openpstd.org/releases/v1.0/openPSTD.zip
  • Now run Blender and from the [File] menu select [User Preferences] or click [Ctrl]+[Alt]+[U] to bring it up.
  • Navigate to the [Addons] section and press the [Install from File...] button at the bottom of the window.
  • Using the file selection prompt that shows up select the downloaded archive openPSTD.zip.


Pre-processing your calculcation

Creating a single domain

  • Start Blender
  • In order to begin modelling the scene clear all objects that appear in the default scene
    • First deselect everything by pressing the [De(select) all] item from the [Select] menu
    • Click the same item again to select everything
    • No click the [Delete...] item from the [Object] menu
Alternatively with the mouse over the 3D view area, press [A] [A] [X] [Enter]
The Blender user interface relies heavily on keyboard shortcuts to allow for efficient modelling.
Whenever a key is pressed make sure the mouse is over the relevant area. In this case the large 3D view.
Most operations in Blender triggered by the key strokes are also available from the menu items.
  • Navigate to a viewpoint from above by selecting [Top] from the [View] menu (in the lower left corner of your screen)
Currently OpenPSTD only supports two dimensional scenes and this viewpoint is strongly recommended.
  • Create a planar mesh by activating [Plane] from the [Add] > [Mesh] menu.
Alternatively bring up the same menu by clicking [Shift] + [A]
  • Switch to metric display units by clicking on the [Scene] button, the third icon on the button strip, and selecting [Metric] (see picture below)
  • Bring up the properties panel by clicking [View] > [Properties]
  • Move your plane to the origin of the coordinate system by entering the location (x,y,z)=(1,1,0) in the [Location] part of the [Properties] toolbar
  • You can change the dimensions of your plane with the [Dimensions] part of the [Properties] toolbar
  • Another way of changing the dimensions of your rectangle is the following. Edit the selected planar mesh by switching from the Object mode to the entering Edit mode
Alternatively click the [Tab] button to switch between Object mode and Edit mode
  • Now, you can change the dimensions of your plane as follows:
    • Enter Edge select mode by clicking the appropriate button on the toolbar
    • Select the rightmost edge (for moving this edge in particular) by clicking it with the *right* mouse button
    • Move the selected edge by *left* clicking the red arrow and typing (for example) 8 into the X field that appears on the left

Creating multiple domains

You can model your geometry by creating more subdomains as follows

  • Select the leftmost edge of your rectangle and press the [E] button ad press [X] [7] [-] [Enter] to copy that edge 7 meters to the left
Notice how the extrude operation is different from the move operation
  • Now select the topleft edge
  • Extrude that selected edge 7 meters by pressing the [E] [Y] [7] [Enter]
  • Now select the two bottom edges by selecting the first and pressing [Shift] while selecting the second
  • Move them down 5 meters by pressing [E] [Y] [5] [-] [Enter]

So far, subdomains that connect have equal dimensions in (at least) one direction. This is not a restriction in openPSTD v1.0, and different subdomain dimensions can be obtained as follows:

  • In the Edit mode (press [Tab] to switch from the Object mode to the Edit mode if you are not in the Edit mode yet), press the [Face select] icon on the toolbar below the geometry screen. Then, click the *right* mouse button when the pointer is on the upper subdomain. Thereafter click [y] and [Enter].
  • Now, click [Edge select] on the lower toolbar and select the left edge of the uppermost subdomain. Enlarge it by clicking with the *left* mouse button on the horizontal arrow (the x-axis), enter -1 in the x-vector menu of the left toolbar en press [Enter]. The upper subdomain now is wider than the lower subdomain.

Assigning source(s) and receiver(s)

  • In the Object mode, press [Shift] + [A] and add an acoustic source (speaker) to the scene
Note how the newly created object is positioned where the cursor is located
  • The location of the speaker can be set by using the [Location] part of the [Properties] toolbar
  • Add a receiver by using the same menu and define the location by altering the [Location] part of the [Properties] toolbar
Blender does not have a dedicated object to designate as a receiver position, therefore Empty objects are used in OpenPSTD
A receiver can be created by any subtype of an Empty object

Assigning boundary conditions

  • You first need to activate the openPSTD v1.0 add-on
    • Press [Ctrl] + [Alt] + [U] to bring up the User Preferences window
    • Under [Addons] search for openPSTD and enable it using the checkbox on the right
  • On the buttonstrip on the right highlight the first item again
Note how an OpenPSTD section has been added by enabled the addon
The panel can be made wider by dragging the border to the left
  • The OpenPSTD add-on is now enabled
  • You can assign an acoustic absorption value to all outer boundaries of the modelled geometry. In the Edit mode, click [Edge select] on the lower toolbar and select an outer edge of your geometry.
  • In the openPSTD menu, you can change the acoustic absorption coefficient by changing the value of [Absorption]. This can either be done by pressing the (left or right) arrows, or by manually entering the value in the box and ending with [Enter].
  • To assign the same coefficient to multiple edges, multiple edges can be selected by pressing [Shift] and selecting those edges.
  • To assign locally reacting conditions to a boundary, the [Local] box should be ticked upon selecting one or multiple edges.

openPSTD v1.0 settings

OpenPSTD settings give multiple options, like density of air, sound speed in air and grid spacing, that apply to the whole geometry, i.e. are not related to a specific part of the geometry. All these settings can be adjusted prior to started a calculation with openPSTD v1.0. An important condition to enable a calculation is that the dimension of a subdomain should be larger than the product of the [Grid spacing] and [Window size].

Processing your calculation

  • To start the PSTD calculation, press the [Simulate with OpenPSTD] button
Make sure that the "Python path" under [Show advanced settings] is setup correctly for the python executable (python.exe on Windows) to be found
Make sure the planar mesh object is selected before pressing the button
Notice how after a while areas for the subdomains appear
Notice how the light gray area in the bottom area starts to grow over time. This represents the time steps for which a simulation result has been processed.
"A common error is that the mesh is not orthogonal. In that case, it might help in the Edit mode, to select [A] en press [W] and select [Remove doubles]. This operation connects geometrical coinciding points (that were not connected before)
  • Switch to textured viewport shading to have the sound pressure levels visually display in the 3D view
  • Drag around within the light grey area timeline area and notice how the visualisation of sound pressure levels updates accordingly
  • Stop the simulation by pressing the [stop the current openPSTD visualisation] or wait until the calculation terminates by reaching its maximum numbers of time samples.

Post-processing your calculation

  • A geometry with openPSTD settings and calculation results (in the form of the 2D visualisation frames and recorded responses at receiver positions, can be saved by the [File] [Save As] commands.
  • To post-process recorded impulse responses in for example Python of MATLAB. first select the Empty object designated as the receiver
Notice how a depiction of the empulse response is drawn at the timeline area
  • Use the rightmost button below that area to export the impulse response as a .bin file.
  • Another option in openPSTD v1.0 is to create an animation from the calculated results. For this purpose, press the [Bake openPSD simulation] button.
  • Then, in the [Output] menu below the [openPSTD Settings] menu, select the output folder and file name. Also, select the desired movie extension in the file format (PNG is the default extension, but this should be altered as this returns a series of images instead of a movie).
  • Finally, in the [Render] menu above the [openPSTD Settings] menu, press Animation.

Test run and results

To verify your openPSTD version has properly been installed and calculations are carried out as envisaged, calculations can be carried out for the test configuration in the figure a) below. It represents a noise barrier scene, where a wide screen is obstructing the direct propagation path between source and receiver. Figure b) below shows the time responses at the receiver position, for a standard CPU calculation, a calculation with GPU 32 bit enabled and a calculation with GPU 64 bit enabled. Figure c) shows the points per wavelength results. These are computed as:

 
EA = 20\log_{10}\left(\frac{|P_{screen}|}{|P_{screenref}|} \right):
P_{screen}
  • a) Test run configuration with ground surface and wide screen acoustically rigid.
  • b) Time responses of test run.
  • c) Points per wavelength plot of test run.


<< OpenPSTD v1.0 settings