USML
|
Wavefront propagator for the WaveQ3D model.
Implemented using a third order Adams-Bashforth algorithm which estimates the new position and direction from the previous three iterations.
where:
The actual work of computing these derivatives and the effects of the ocean environment is done by the wave_front class. The wave_front entries are stored in a circular queue so that environmental parameters computations and wavefront derivatives can be reused by subsequent time steps.
enum spreading_type |
wave_queue | ( | ocean_model & | ocean, |
const seq_vector & | freq, | ||
const wposition1 & | pos, | ||
const seq_vector & | de, | ||
const seq_vector & | az, | ||
double | time_step, | ||
const wposition * | targets = NULL , |
||
spreading_type | type = HYBRID_GAUSSIAN |
||
) |
Initialize a propagation scenario.
ocean | Reference to the environmental parameters. |
freq | Frequencies over which to compute propagation (Hz). |
pos | Location of the wavefront source in spherical earth coordinates. |
de | Initial depression/elevation angles at the source location (degrees, positive is up). Requires a minimum of 3 angles if eigenrays are being computed. |
az | Initial azimuthal angle at the source location (degrees, clockwise from true north). Requires a minimum of 3 angles if eigenrays are being computed. Ray fans that wrap around all azimuths should include rays for both 0 and 360 degrees. |
time_step | Propagation step size (seconds). |
targets | List of acoustic targets. |
type | Type of spreading model to use: CLASSIC_RAY or HYBRID_GAUSSIAN. |
|
virtual |
Destroy all temporary memory.
bool addProplossListener | ( | proplossListener * | pListener | ) |
Add a proplossListener to the _proplossListenerVec vector.
|
private |
Used by detect_eigenrays() to compute eigneray parameters and add a new eigenray entry to the current target.
Used by detect_eigenrays() to compute eigenray parameters and add a new eigenray entry to the current target.
Inverts the 3-D Taylor series to find offsets in time, source D/E, and source AZ that minimize the distance to the target.
where:
This routine uses these offsets and a Taylor series for direction to compute the target D/E and AZ. It avoids extrapolating source and target angles too far into shadow zone by limiting the D/E and AZ offsets to the width of one beam.
Intensity is computed using either a classic ray theory or a hybrid Gaussian beam summation across the wavefront. Attenuation is incorporated into the ray intensity using an interpolation in time along the CPA ray. Phase is copied from the CPA as are the counts for surface, bottom, and caustics.
There is an interesting degenerate case that happens for targets near the source location. The CPA calculation from detect_eigenrays() creates non-physical eigenrays around the point at which the 2nd wavefront transitions from occurring before surface reflection to including just after it. This routines examines the offsets in time and ensonified area to eliminate these non-physical eigenrays.
t1 | Row number of the current target. |
t2 | Column number of the current target. |
de | D/E angle index number. Can not equal a value at the edge of the ray fan. |
az | AZ angle index number. Can not equal a value at the edge of the ray fan. |
distance2 | Distance squared to each of the 27 neighboring points. The first index is time, the second is D/E and the third is AZ. Warning: this array is modified during the computation. |
In order to speed up the code, it required splitting the code to run faster. This then only checks the _az_boundary condition once per function call.
In order to speed up the code, it required splitting the code to run faster. This then only checks the _az_boundary condition once per function call.
void close_netcdf | ( | ) |
Close netCDF wavefront log.
|
staticprivate |
Find relative offsets and true distances in time, D/E, and AZ.
Find relative offsets and true distances in time, D/E, and azimuth.
Uses the analytic solution for the inverse of a symmetric 3x3 matrix to solve
H x = g x = inv(H) g
where
This implementation reverts to a simplier calculation using just the diagonals of the Hessian if the inverse can not be computed.
Compute distances from offsets, for each coordinate, by assuming that the other two offsets are zero.
d(n)^2 = - g(n) x(n) - 0.5*H(n,n) x(n)^2
The DE distance calculations can be unstable if the target is far from CPA. This routine deals with this by computing the DE distance from the time and AZ distances.
d(DE)^2 = d(total)^2 - d(time)^2 - d(AZ)^2
distance2 | Distance squared to each of the 27 neighboring points. The first index is time, the second is D/E and the third is AZ. |
delta | Axis step size in each dimension. The first index is time, the second is D/E and the third is AZ. |
offset | Distance to the current target in ray coordinate units. The first index is time offset, the second is launch angle D/E offset, and the third is launch angle AZ offset. Maximum limited to +/- 1 beam. (output) |
distance | Distance to the current target in world coordinate units (meters). Give the distance the same sign as the relative offset. (output) |
unstable | True if full inverse is expected to be unstable. May be updated by this routine if target is far outside of ray fan. (input/output) |
|
inline |
Return current element in the wavefront.
|
private |
Detects and processes all of the logic necessary to determine points along the wavefronts that have folded over and mark them as caustics.
Detects and processes the caustics along the next wavefront.
This logic determines if any two points have crossed over each other when going from current wavefront to the next.
|
private |
Detect and process wavefront closest point of approach (CPA) with target.
Requires a minimum of three rays in the D/E and AZ directions. Targets beyond the edge of the wavefront are matched to the next ray inside the fan.
|
private |
Detect and process boundary reflections and caustics.
Loops through all of the "next" wavefront elements to see if any are on the wrong side of a boundary.
Relies on detect_reflections_surface() and detect_reflections_bottom() to do the actual work of detecting and processing reflections. These routines work recursively with their opposite so that multiple reflections can take place in a single time step. This is critical in very shallow water where the reflected position may already be beyond the opposing boundary.
At the end of this process, the wave_front::find_edges() routine is used to break the wavefront down into ray families. A ray family is defined by a set of rays that have the same surface, bottom, or caustic count.
|
private |
Detect and process reflection for a single (DE,AZ) combination.
The attenuation and phase of reflection loss are added to the values currently being stored in the next wave element. Works recursively with detect_reflections_surface() so that multiple reflections can take place in a single time step.
de | D/E angle index number. |
az | AZ angle index number. |
|
private |
Detect and process surface reflection for a single (DE,AZ) combination.
Detect and process reflection for a single (DE,AZ) combination.
The attenuation and phase of reflection loss are added to the values currently being stored in the next wave element. Works recursively with detect_reflections_bottom() so that multiple reflections can take place in a single time step.
de | D/E angle index number. |
az | AZ angle index number. |
|
inline |
getIntensityThreshold
void init_netcdf | ( | const char * | filename, |
const char * | long_name = NULL |
||
) |
Initialize recording to netCDF wavefront log.
Opens the file and records initial conditions. The file structure is illustrated by the netCDF sample below:
netcdf sample_test { dimensions: frequency = 1 ; source_de = 25 ; source_az = 9 ; travel_time = UNLIMITED ; // (### currently) variables: double frequency(frequency) ; frequency:units = "hertz" ; double source_de(source_de) ; source_de:units = "degrees" ; source_de:positive = "up" ; double source_az(source_az) ; source_az:units = "degrees_true" ; source_az:positive = "clockwise" ; double travel_time(travel_time) ; travel_time:units = "seconds" ; double latitude(travel_time, source_de, source_az) ; latitude:units = "degrees_north" ; double longitude(travel_time, source_de, source_az) ; longitude:units = "degrees_east" ; double altitude(travel_time, source_de, source_az) ; altitude:units = "meters" ; altitude:positive = "up" ; short surface(travel_time, source_de, source_az) ; surface:units = "count" ; short bottom(travel_time, source_de, source_az) ; bottom:units = "count" ; short caustic(travel_time, source_de, source_az) ; caustic:units = "count" ;
// global attributes: :Conventions = "COARDS" ;
data: frequency = 2000 ; source_de = 0, 1, 2, ... source_az = -1, 0, 1 ; travel_time = 0, 0.1, 0.2, ... latitude = 45, 45, 45, ... longitude = -45, -45, -45, ... altitude = -75, -75, -75, ... }
filename | Name of the file to write to disk. |
long_name | Optional global attribute for identifying data-set. |
|
private |
Initialize wavefronts at the start of propagation using a 3rd order Runge-Kutta algorithm.
The Runge-Kutta algorithm is much more computationally expensive than the Adams-Bashforth algorithm used during propagation. But Runge-Kutta is self starting, only happens at initialization, and it avoids introducing the start-up errors that would be present with cheaper methods.
Assumes that all of the elements of the _curr wavefront have been initialized prior to this initialization. When this method is complete, the wavefront elements for _past, _prev, _and _next will all have valid position, direction, and closest point of approach data. However, the _next element will not have been checked for interface collisions or eigenray collisions with targets.
|
private |
Used by detect_eigenrays() to discover if the current ray is the closest point of approach (CPA) to the current target.
Used by detect_eigenrays() to discover if the current ray is the closest point of approach to the current target.
Computes the distance to each of the 27 neighboring wavefront points for later use in the calculation of eigenray interpolation products.
Exits early if the central ray is on the edge of a ray family. Exits early if the distance to any of the surrounding points is smaller than the distance to the central point, unless that point is on the edge of the ray family, to which the search continues. Ties are awarded to the higher time, higher D/E, and higher AZ. Extrapolates outside of ray families by not testing to see if points on the edge of the family are closer to the target than the central ray.
Assumes that the wavefront has three rays in the D/E and AZ directions. Also assumes that the calling routine does not search the rays on the edges of the wavefront. This ensures that each of the tested rays has valid rays to either side of it.
t1 | Row number of the current target. |
t2 | Column number of the current target. |
de | D/E angle index number. |
az | AZ angle index number. |
center | Reference to the center of the distance2 cube. |
distance2 | Distance squared to each of the 27 neighboring points. The first index is time, the second is D/E and the third is AZ (output). |
In order to speed up the code, it required splitting the code to run faster. This then only checks the _az_boundary condition once per function call.
|
staticprivate |
Computes the Taylor series coefficients used to compute eigenrays.
Computes the Taylor coefficients used to compute eigenrays.
The vector Taylor series uses the first derivative (gradient) and second derivative (Hessian) to estimate eigenray products as a function of time, D/E, and AZ from the closest point of approach (CPA).
value | Value to interpolate around the CPA. |
delta | Axis step size in each dimension. The first index is time, the second is D/E and the third is AZ. |
center | Value at the center of the grid (output). |
gradient | First derivative in 3 dimensions (output). |
hessian | Second derivative in 3 dimensions (output). |
diagonal_only | Zeros out Hessian cross terms when true. |
|
inline |
Return next element in the wavefront.
bool notifyProplossListeners | ( | unsigned | targetRow, |
unsigned | targetCol, | ||
eigenray | pEigenray | ||
) |
For each proplossListener in the _proplossListenerVec vector call the addEigenray method to provide eigenrays.
|
inline |
Number of AZ angles in the ray fan.
|
inline |
Number of D/E angles in the ray fan.
|
inline |
Return past element in the wavefront.
|
inline |
Return previous element in the wavefront.
bool removeProplossListener | ( | proplossListener * | pListener | ) |
Remove a proplossListener from the _proplossListenerVec vector.
void save_netcdf | ( | ) |
Write current record to netCDF wavefront log.
Records travel time, latitude, longtiude, altitude for the current wavefront.
void set_bottom_reverb | ( | reverb_model * | model | ) |
Register a bottom reverberation model.
void set_surface_reverb | ( | reverb_model * | model | ) |
Register a surface reverberation model.
|
inline |
setIntensityThreshold
dThreshold | The new value of the intensity threshold in dB. |
|
inline |
Initial azimuthal angle at the source location.
az | Index of the element to access. |
|
inline |
Initial depression/elevation angle at the source location.
de | Index of the element to access. |
|
inline |
Location of the wavefront source in spherical earth coordinates.
void step | ( | ) |
Marches to the next integration step in the acoustic propagation.
Uses the third order Adams-Bashforth algorithm to estimate the position and direction of each point on the next wavefront from the previous three iterations. Automatically rotates the queue and updates the environmental parameters on the new wavefront.
Accumulated non-spreading losses are computed by combining the individual values in the next wavefront with prior losses in the current wavefront.
If targets have been specified, this function calls detect_eigenrays() at the end of each step to search for wavefront collisions with those targets.
At the end of each step, the next iteration may extend beyond one of the boundaries. This allows the eigenray calculation to accurately portray targets near the interface. Reflections are computed at the beginning of the next iteration to ensure that the next wave elements are alway inside of the water column.
|
inline |
Elapsed time for the current element in the wavefront.
|
friend |
|
friend |
|
friend |
|
private |
Create an Azimuthal boundary loop condition upon initialization.
This condition will prevent the production of multiple eigenrays for instances where the first azimuthal angle is equivalent to the last azimuthal angle in the AZ vector that is passed.
|
private |
|
private |
Treat all targets that are slightly away from directly above the source as special cases.
|
private |
Frequencies over which to compute propagation loss (Hz).
Defined as a pointer to support virtual methods in seq_vector class.
|
private |
The value of the intensity threshold in dB Any eigenray intensity values that are weaker than this threshold are not sent the proplossListner(s); Defaults to -300 dB.
|
private |
|
private |
|
private |
|
private |
The netCDF file used to record the wavefront log.
Reset to NULL when not initialized.
|
private |
|
private |
|
private |
|
private |
Current record number in netDCF file.
|
private |
|
private |
The netCDF variables used to record the wavefront log.
|
private |
|
private |
Reference to the environmental parameters.
Assumes that the storage for this data is managed by calling routine.
|
private |
Circular queue of wavefront elements needed by the third order Adams-Bashforth algorithm.
|
private |
|
private |
Vector containing the references of objects that will be used to update classes that require eigenrays as they are built.
These classes must implement addEigenray method.
|
private |
Reference to the reflection loss model component.
|
private |
Initial azimuthal angle (AZ) at the source location (degrees, clockwise from true north).
Defined as a pointer to support virtual methods in seq_vector class.
|
private |
Initial depression/elevation angle (D/E) at the source location (degrees, positive is up).
Defined as a pointer to support virtual methods in seq_vector class.
|
private |
Location of the wavefront source in spherical earth coordinates.
|
private |
Reference to the spreading loss model component.
Supports either classic ray theory or Hybrid Gaussian Beams.
|
private |
List of acoustic targets.
|
private |
Intermediate term: sin of colatitude for targets.
By caching this value here, we avoid re-calculating it each time the that wave_front::compute_target_distance() needs to compute the distance squared from each target to each point on the wavefront.
|
private |
Time for current entry in the wave_front circular queue (seconds).
|
private |
Propagation step size (seconds).