GSP

Performs general signal processing for aeroacoustic analysis.

Syntax

GSP(“name”) {parameters}

Qualifier

User-given name

Parameters

name (string)
User-given name of the command. The instance of a given command is referenced using this parameter.
type (enum)
Surface or probe, specifying the type of signal processing to perform.
resultFile (string)
Required data file, .h3d file for type=surface, .csv file for type=probe.
resultsName (string)
Name of the output contour image and title
probeName (string)
Name of the output probe image and title
outGspFname (string)
Output file name (extension .gsph5) for writing when type=surface.
partName (list)
Specified surface name list to perform the processing when type=surface.
{“surface_1”,”surface_2”}
useCellData (boolean)
Specification of cell or point data. useCellData is default.
dataArrayName (list)
Data to be processed within the GSP algorithm. A list of comma separated variables can be set to process 1 or more quantities, format: {“pressure”, “velocity_magnitude”}
Note, for type=probe, only “pressure” is supported, resulting SPL in decibels.
timeRange (array)
Two element array specifying the minimum and maximum input time range, format: [min, max].
bandType (enum)
Band type to specify the frequency agglomeration; narrow_band (type=probe only) single_band, octave, 1_over_3_octave, 1_over_8_octave (type=probe only), 1_over_12_octave.
scale (enum)
Scale, or weighting factor used to weight the SPL output, default dB. scale= “” (dB weight), scale=A (dBA weight), or type=C (dBC weight).
frequencyRange (array)
Two element array specifying the minimum and maximum output frequency range, format: [min, max]. When bandType=single_band, the min and max are used to compute the bounds of the frequency. When bandType= octave, 1_over_3_octave, 1_over_12_octave, octave bands between the min and max frequency will be selected, including the overlapping bands above and below min, max frequency.
surfaceMapType (enum)
Type of surface map to compute; surfaceMapType=0 gives hydrodynamic dB map, surfaceMapType=1 gives band filtered animation, surfaceMapType=2 gives both outputs.
exportData (enum)
Type of display file to export, exportData=0 does not generate output display files, setting exportData=1 gives .png files, exportData=2 gives a .mp4 file of the animated results.
exportStride (integer)
Number of frames to increment when storing images or animation, providing the stride (increment) between frames of the output, used when exportData= 1|2.
exportDataFilename (string)
Used when exportData= 1 | 2, providing the output file name of the image or animation to be stored. Do not include extension in the file name, will be automatically provided.
exportResultType (enum)
Type of results to output for display; exportResultType=0 gives hydrodynamic dB map (SPL vs. Frequency), exportResultType =1 gives input signal (Pressure vs. Time), exportResultType=2 gives band filtered animation (Filtered pressure vs. Time).
exportFrameRate (integer)
Number of frames per second to output to the .mp4 file when the exportData=2.
fftnperseg (integer)
Number of segments (in frequency blocks) to consider for each window in the Fast Fourier Transformation Used for both type=surface and type=probe. Utilize fftnperseg=default to allow the number of available blocks to dictate the overlap size.
fftoverlap (integer)
Number of segments (in frequency blocks) to overlap between each window in the Fast Fourier Transformation. Used for both type=surface and type=probe. Utilize fftnoverlap=default to allow the number of available blocks to dictate the overlap size.
fftwindow (enum)
Window type used for Fast Fourier Transformation, accepts hanning, hamming, blackman.
colormap_name (enum)
Colormap name to use for displaying the scalar function values. Options: Cool to Warm, Cool to Warm (Extended), Black-Body Radiation, X Ray, Inferno, Black, Blue, and White, Blue Orange, Viridis, Gray and Red, Linear Green, Cold and Hot, Blue – Green – Orange, Rainbow Desaturated, Yellow – Gray – Blue, Rainbow Uniform, Rainbow, Rainbow Legacy.
view (string)
View to capture the image from. Note, only a single view is supported for GSP command, type=surface.
background_color (string)
Sets the background color of the contour map.
Options: white (default) | red | blue | green | black | magenta | gray | yellow | light blue | purple
legend_min (real)
Minimum value in legend
legend_max (real)
Maximum value in legend
legend_orientation (enum)
Specify orientation of the legend
Options: horizontal, vertical
legend_location (enum)
Location of the legend on the image
Options: top_left, top_center, top_right, bottom_left, bottom_center, bottom_right, center_left, center_right
legend_use_local (enum)
Boolean to control the local legend range. If active, will set for local entity range.
plot_xlim (array)
Minimum and maximum values used to specify the limits of the x-axis, when type=probe
plot_ylim (array)
Minimum and maximum values used to specify the limits of the y-axis, when type=probe
plot_lineColors (array)
Array containing user specified strings of color names to associate with each line in the plot, when type=probe
plot_minorGrid (boolean)
Activate to include minor grid lines within the resulting plot image, when type=probe
plot_minorGridLineColor (string)
Specifies the color of the grid lines when plot_minorGrid is active
plot_minorGridLineWidth
Specifies the width of the minor grid lines when plot_minorGrid is active
plot_minorGridLineStyle
Specifies the character of the minor grid lines when plot_minorGrid is active, e.g. “:” or “|”

Example

The following example is given to demonstrate the use of the GSP command to compute the band filtered animation from the input file windshield.h3d, utilizing the full input time record from time=0.2991 – 1.1 sec. The frequency range of 1000 – 2000 Hz is set to restrict the filtering algorithm to report only those frequencies. The command will result in a BAFA written to ws_pass.mp4 with frames written at every 10 steps, using the “Cool to Warm (Extended)” colormap, viewed from the “front”.
GSP("BAFA Windshield Surface"){
type = surface
resultFile = "windshield.h3d" 
outGspFname = "windshield_out_pass.gsph5"
partName = {"Glasses_windshield_pass"}
resultsName = "Glasses_windshield_pass"
useCellData = true
dataArrayName = {“pressure”}
timeRange = [0.2991, 1.1]
bandType = "single_band"
scale = ""
frequencyRange = [1000, 2000.0] 
surfaceMapType = 2
exportData = 2 
exportStride = 10 
exportDataFilename = "ws_pass"
exportResultType = 2
exportFrameRate = 10
background_color = "white"
colormap_name = "Cool to Warm (Extended)"
view = "front"
legend_use_local = on
legend_location = top_center
legend_orientation = horizontal
}
The following example is given to demonstrate the use of the GSP command to compute the hydrodynamic map from the input file windshield.h3d, utilizing the full input time record from time=0.2991 – 1.1 sec. The command will result in a hydrodynamic map written to ws_pass_dB.mp4 containing the sound pressure level (dB) for each of the full octave band center frequencies, using the “Blue Orange” colormap, viewed from the “front”, with user specified legend bounds.

GSP("dB Map Windshield Surface"){
type = surface
resultFile = " windshield.h3d" 
outGspFname = "windshield_out_pass.gsph5"
partName = "Glasses_windshield_pass"
resultsName = "Glasses_windshield_pass"
useCellData = true
dataArrayName = [“pressure”]
timeRange = [0.2991, 1.1]
bandType = "octave"
scale = ""
frequencyRange = [20.0, 11251.486] 
surfaceMapType = 2
exportData = 2 
exportStride = 1 
exportDataFilename = "ws_pass_dB"
exportResultType = 2
fftnperseg = 4096
fftnoverlap = default
fftwindow = hann
background_color = "white"
colormap_name = "Blue Orange"
view = "front"
legend_use_local = off
legend_min = 60
legend_max = 120
legend_location = top_center 
legend_orientation = horizontal
}
The following example is given to demonstrate the use of the GSP command to compute the SPL (dBA) of a probe file containing the time-dependent pressure for two monitoring probes (Probe 21(2) and Probe 23(4), utilizing a subset of the input time record from time=0.0 – 1.0 sec. The command will result in a single image for the narrowband SPL in dBA written to probe_case_out.png along with the overall sound pressure level for the full frequency range written to a .csv file.
GSP("Probe Example"){
type = probe
resultFile = "Probe/Probe_1.csv"
probeNames = {"Probe_21(2)","Probe_23(4)"}
resultsName = "Probe_1.csv"
outputType = spl
timeRange = [0.0, 1.0]
bandType = "narrowband"
scale = "A"
frequencyRange = [20.0, 47064.862] 
exportData = 1 
exportDataFilename = "probe_case_out"
exportResultType = 0
fftnperseg = 4096
fftnoverlap = default
fftwindow = hann
plot_xlim = [10, 50000]
plot_ylim = [0, 110]
plot_lineColors = {"red","black"}
plot_minorGrid = on 
plot_minorGridLineColor = black
plot_minorGridLineWidth = 2.0
plot_minorGridLineStyle = ":"
}