calculate_response#
- class waveresponse.calculate_response(rao, wave, heading, heading_degrees=False, reshape='rao_squared', coord_freq=None, coord_dirs=None)[source]#
Calculate response spectrum.
The response spectrum is calculated according to:
S_x(w, theta) = H(w, theta) * H*(w, theta) * S_w(w, theta)
where S_x(w, theta) denotes the response spectrum, H(w, theta) denotes the RAO, H*(w, theta) denotes the RAO conjugate, and S_w(w, theta) denotes the wave spectrum (expressed in the RAO’s reference frame).
The frequency and direction coordinates are dictatated by the wave spectrum. I.e., the RAO (or the magnitude-squared verison of it) is interpolated to match the grid coordinates of the wave spectrum.
- Parameters:
rao (RAO) – Response amplitude operator (RAO).
wave (WaveSpectrum or WaveBinSpectrum) – 2-D wave spectrum.
heading (float) – Heading of vessel relative to wave spectrum coordinate system.
heading_degrees (bool) – Whether the heading is given in ‘degrees’. If
False, ‘radians’ is assumed.reshape ({'rao', 'rao_squared'}, default 'rao_squared') – Determines whether to reshape the RAO or the magnitude-squared version of the RAO before pairing with the wave spectrum. Linear interpolation is performed to match the frequency and direction coordinates of the wave spectrum.
coord_freq (str, optional) – Deprecated; use reshape instead. Frequency coordinates for interpolation. Should be ‘wave’ or ‘rao’. Determines if it is the wave spectrum or the RAO that should dictate which frequencies to use in response calculation. The other object will be interpolated to match these frequencies.
coord_dirs (str, optional) – Deprecated; use reshape instead. Direction coordinates for interpolation. Should be ‘wave’ or ‘rao’. Determines if it is the wave spectrum or the RAO that should dictate which directions to use in response calculation. The other object will be interpolated to match these directions.
- Returns:
Response spectrum.
- Return type: