Getting started with openPSTD v1.0
- Install openPSTD v1.0:
- openPSTD runs as a plug-in for Blender
- Now run Blender and from the [File] menu select [User Preferences] or press [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 archive downloaded at step 1.2
- Now enable the openPSTD add-on by ticking the checkbox on the right
- Every subsequent time to start Blender, you need to activate the openPSTD add-on by search for 'openPSTD' in the [Addons] section and ticking the checkbox
Drawing your first geometry in openPSTD v1.0
Creating the first subdomain
- 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
- Now click the [Delete...] item from the [Object] menu (If you do not see the [Object] menu either in the upper menu bar or in the lower menu bar, move your mouse pointer to the 3D view area and press [Tab] to switch from the Edit to the Object mode).
- 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 area.
- 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)
- openPSTD v1.0 only supports 2D scenes.
- 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 at the right part of your screen, and select [Metric]
- 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. This plane is your first subdomain.
Modifying the first subdomain
- Change the dimensions of your plane using the [Dimensions] part of the [Transform] toolbar
- Edit the selected planar mesh by entering the Edit mode
- Alternatively click the [Tab] button to switch between Object mode and Edit mode
- Now, you can change the dimensions of your by changing the position of the edges as follows:
- Enter Edge select mode by clicking the appropriate button on the lower toolbar
- Select the rightmost edge by clicking it with the *right* mouse button
- Move the selected edge by *left* clicking the red arrow and typing 8 into the X field that appears on the left
Adding more subdomains
You can model your geometry by creating more subdomains as follows:
- Select the leftmost edge and press the [E] button ad press  [-] [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]  [Enter]
- Now select the two bottom edges by selecting the first and pressing [Shift] while selecting the second
- Move them down by by *left* clicking the green arrow and typing [-5] into the [Y] field that appears on the left
Multiple subdomains connected to one edge
So far, a geometry has been constructed out of subdomains, with all edges connected to two adjacent subdomains. It is important that the number of grid cells per subdomain (this number can be computed by the length of the subdomain size divided by the grid spacing value) is larger than the Window size (an explanation on this number can be found in openPSTD v1.0 settings). For this reason, a separate subdomain cannot be made above a thin object as a noise barrier (this incorrect geometry shown below). The geometry of the thin noise barrier can be constructed out of 4 subdomains. In the figure below, the upper left subdomain is wider than the lower left subdomain. A geometry as this can be obtained as follows:
- Create a geometry with two subdomains on top of each other.
- In the Edit mode, press the [Face select] icon on the toolbar below the 3D view area.
- Then, click the *right* mouse button when the mouse pointer is on the upper subdomain. Thereafter click [Y] and [Enter].
- Now, click [Edge select] on the lower toolbar and select the right edge of the upper subdomain.
- Enlarge it by clicking with the *left* mouse button on the horizontal red arrow.
- Enter 1 in the x-vector menu of the left toolbar en press [Enter]. You will see that the upper subdomain now is wider than the lower subdomain.
So far, the outer edges of our domain are assigned a default absorption coefficient, see openPSTD v1.0 settings for an explanation. The absorption coefficient can be changed as follows:
- Navigate the mouse pointer to the center of the screen and press [Tab] to switch from the Object mode to the Edit mode (if you were not yet in the Edit mode).
- Now, navigate to a boundary of your geometry and select it by clicking it with the *right* mouse button.
- The [Shift] button may be used to select multiple sections.
- At the right of your screen in the openPSTD settings (somewhere in the middle), click on the Absorption button.
- Enter the desired absorption value (a number between 0 and 1).
- All non-reflecting boundaries should get an absorption value of 1.00.
- If a surface needs to be modelled as a locally reacting surface, see openPSTD v1.0 overview, tick the local checkerbox in the openPSTD settings.
Sources and Receivers
Prior to adding sources and receiver to your geometry, it is important to move the geometry such that the location of the source and receivers relative to the geometry is clear. For this reason, you can move your geometry such that the lower left corner of the geometry coincides with the origin.
- Select the lower left edge of your geometry. In the [Transform] menu, select the global dimensions of the edge by pressing [Global] below the Median coordinates of the edge. Write down the x-value.
- Select the left bottom edge of your geometry. From the [Transform] menu, write down the y-value.
- Now, switch to the Object mode and move the whole geometry with adding the x-value and y-value above to the Location of the Plane in the [Transform] menu. The lower left corner of your geometry now coincides with the origin.
To add a source or receiver:
- Be sure to be in the Object mode to have the ability to add additional objects.
- Press [Shift] + [A] and add a speaker object to the scene.
- Note how the newly created object is positioned at where the cursor is located
- Alternatively, select [Speaker] from the [Add] menu.
- The location of the speaker can be set by using the [Location] part of the [Transform] toolbar.
- Add an Empty object by using the same menu and define the location by altering the [Location] part of the [Transform] toolbar
- Any subtype of the Empty object would suffice
- Blender does not have a dedicated object to designate as a listener, therefore Empty objects are used in openPSTD
The number of speakers and receivers to be added is not restricted. A short explanation on the implemented sources and receivers can be found in openPSTD v1.0 overview.
Prior to starting the simulation, please take care that the details of the computation are according to your wishes. These details can be found in the openPSTD settings menu in the part of your screen. Explanation on the settings can be found at openPSTD v1.0 settings.
Run a simulation
- To run a simulation, press the [Simulate with openPSTD] button in the openPSTD settings area.
- Make sure the plane is selected before pressing the button. To ensure this, you need to be in the Object mode and the Plane scene needs to be selected from [Scene] in the upper right part of your window.
- Notice how the light gray area in the bottom area starts to grow over time. This represents the number of discrete time steps for which a simulation result has been processed.
- 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.
A simulation will stop when the total number of discrete time steps according to the predefined Render time has been reached. Alternatively, a simulation can be stopped by pressing the stop the current openPSTD visualisation button.
Saving an exporting results
The drawn geometry can be saved as a .blend file by [File] and [Save]. By saving as a .blend file, all data, including calculated results, are saved. Is this true Thomas?
Results from openPSTD v1.0 can be exported in two ways: 1) exporting the computed impulse responses at the predefined receiver positions, 2) exporting the recorded 2D movie.
1. Exporting impulse responses
- Select an Empty object designated as a receiver from [Scene] in the upper right part of your window
- Notice how a depiction of the Impulse Response is drawn at the timeline area
- Use the rightmost button below that area to export the impulse response
- Now, the file type can be chosen in the lower left part of your window. Select the .bin file for post processing in e.g. Python or Matlab. In Matlab, you can load the .bin file as
- A = fopen('mybinfile.bin');
- p = fread(A,inf,'float64');
2. Exporting the recorded 2D movie Thomas, kan je dit beschrijven? …
When you have exported your data and want to alter something in your settings or geometry, press the Clear simulation data button in the openPSTD settings menu.