![]() |
Regression tests for the waveq3d package.
| |
static const double | time_step = 0.100 |
static const double | f0 = 2000 |
static const double | src_lat = 45.0 |
static const double | src_lng = -45.0 |
static const double | c0 = 1500.0 |
static const double | bot_depth = 1e5 |
BOOST_AUTO_TEST_CASE (eigenray_basic) | |
Tests the basic features of the eigenray model for a simple target. | |
BOOST_AUTO_TEST_CASE (eigenray_concave) | |
Tests the model's ability to accurately estimate geometric terms for the direct path and surface reflected eigenrays on a spherical earth. | |
BOOST_AUTO_TEST_CASE (eigenray_tl_az) | |
Scenario is the exact same as eigenray_basic, except that the number of targets is increased. | |
BOOST_AUTO_TEST_CASE (eigenray_branch_pt) | |
When acoustic targets are along the boundaries of the wavefront, the algorithm for producing eigenrays treats the azimuthal degrees of zero and 360 as separate angles. | |
| |
static const double | time_step = 0.100 |
static const double | f0 = 2000 |
static const double | bot_depth = 1e5 |
BOOST_AUTO_TEST_CASE (proploss_basic) | |
This test demonstrates that the basic functions of the spreading loss model are working correctly. | |
BOOST_AUTO_TEST_CASE (proploss_freq) | |
This test demonstrates that the frequency based accuracy of the model. | |
BOOST_AUTO_TEST_CASE (proploss_lloyds_range) | |
Compares modeled propagation loss as a function of range to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean. | |
BOOST_AUTO_TEST_CASE (proploss_lloyds_range_freq) | |
Compares modeled propagation loss as a function of range and frequency to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean. | |
BOOST_AUTO_TEST_CASE (proploss_lloyds_depth) | |
Compares modeled propagation loss as a function of depth to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean. | |
BOOST_AUTO_TEST_CASE (proploss_limits) | |
This test demonstrates ability to adjust source position if it is within 0.1 meters of being above the ocean surface or below the ocean bottom. | |
| |
static const double | time_step = 0.1 |
static const seq_log | freq (10e3, 10e3, 1) |
BOOST_AUTO_TEST_CASE (refraction_isovelocity) | |
In this test, an isovelocity ocean (1500 m/s) is used to verify the accuracy of those terms the ray equations that do not depend on the gradient of the sound speed. | |
BOOST_AUTO_TEST_CASE (refraction_great_circle) | |
In this test, an ocean with a small amount of downward refraction is used to verify the model's ability to follow great circle routes along the earth's surface. | |
BOOST_AUTO_TEST_CASE (refraction_linear) | |
Evaluates the model's ray refraction accuracy using a comparison to the analytic solution for a linear profile. | |
BOOST_AUTO_TEST_CASE (refraction_n2_linear) | |
Evaluates the model's ray refraction accuracy using a comparison to the analytic solution for a profile where the square of the index of refraction is linear. | |
BOOST_AUTO_TEST_CASE (refraction_catenary) | |
Evaluates the model's ray refraction accuracy using a comparison to the a deep sound channel with a hyperbolic cosine profile. | |
BOOST_AUTO_TEST_CASE (refraction_munk_range) | |
Compares modeled ray paths to an analytic solution for the Munk profile. | |
BOOST_AUTO_TEST_CASE (refraction_pedersen_range) | |
Compares modeled ray paths to an analytic solution for the Pedersen profile. | |
BOOST_AUTO_TEST_CASE (surface_duct_test) | |
Tests the ability to produce appropriate wavefile data for a surface ducting environment. | |
| |
BOOST_AUTO_TEST_CASE (reflect_slope_test) | |
Monitor callbacks from reflection model. | |
BOOST_AUTO_TEST_CASE (reflect_grid_test) | |
Reflect rays off of the ETOPO1 bottom near the Malta escarpment. | |
BOOST_AUTO_TEST_CASE (reflect_interp_spd_acc_test) |
BOOST_AUTO_TEST_CASE | ( | surface_duct_test | ) |
Tests the ability to produce appropriate wavefile data for a surface ducting environment.
BOOST_AUTO_TEST_CASE | ( | refraction_pedersen_range | ) |
Compares modeled ray paths to an analytic solution for the Pedersen profile.
The profile_pedersen model creates an idealized representation of a deep sound (SOFAR) channel.
Ocean: N^2 Linear Profile: c0=1550, g0=1.2 The profile_model::flat_earth() option turned on. Position: 1000 meters deep at 45:00N 45:00W D/E Angles: 20 to 50 degrees (avoids surface reflection) AZ Angles: 0 degrees (north) Time Step: 100 msec
In this test, rays are launched from a deep source, they pass through one vertex, and then return to the axis. The range required to complete one cycle is compared to an analytic solution computed using the pedersen_range_compute.m routine.
The profile and source depth parameters were chosen to force the creation of a caustic for launch angles > 44 deg. As Pedersen notes, this profile is not physically realistic at depths greater than 61 meters. But it has been used by many authors, including those listed in the references, to stress propagation loss models at the edge of a shadow zone.
BOOST_AUTO_TEST_CASE | ( | refraction_munk_range | ) |
Compares modeled ray paths to an analytic solution for the Munk profile.
The profile_munk model creates an idealized representation of a deep sound (SOFAR) channel.
Ocean: Munk Profile: z1=1300, B=1300, c1=1500, e=7.37e-3 The profile_model::flat_earth() option turned on. Position: 1300 meters deep at 45:00N 45:00W D/E Angles: -14 to 14 degrees (avoids surface reflection) AZ Angles: 0 degrees (north) Time Step: 100 msec
In this test, rays are launched from the deep sound channel axis, pass through two vertices, and then return to the axis (heading in it's original direction). The process is then repeated for a second cycle. The range required to complete each cycle is compared to an analytic solution computed using the munk_range_compute.m routine. Additionally, the logic to detect upper and lower verticies is checked. At the end of each cycle, the upper and lower verticies should both have increased by one. A boost failure is issued if this check fails.
Munk derives a power series expression for the cycle range in his 1974 paper. But, it appears that the number of terms in the expansion are too small to model the range accurately enough for this test. Jensen, Kuperman, et. al. use this scenario to look for false caustics in the ray trace plot, with an emphasis toward looking problems in the cubic spline interpolators. The parameters for this test were selected to match Figure 3.19 in Jensen, Kuperman, et. al. which are actually defined in the KRAKEN Normal Mode Program documentation.
BOOST_AUTO_TEST_CASE | ( | refraction_catenary | ) |
Evaluates the model's ray refraction accuracy using a comparison to the a deep sound channel with a hyperbolic cosine profile.
Match conditions of the test and output table format to those in the Reilly/Goodrich report.
Ocean: Catenary: c1 = 1500 m/s, g1 = 1500 m/s The profile_model::flat_earth() option turned on. Position: 1000 meters deep at 00:00N 00:00W D/E Angles: -3 degrees (down) AZ Angles: 90 degrees (east) Time Step: 100 msec
This test is designed to isolate the effects of the radial component of the sound speed gradient.
where:
An exception is thrown if the modeled position is not within 2 meters of the analytic result. Note that this threshold is much different than the linear case where the maximum error is significantly less than 1 millimeter. The catenary error oscillates between positive and negative and grows with increasing range. For a -3 degree launch angle, the error has grown to +/- 2 meters by the time the ray reach a range of 100,000 meters. The maximum error shrinks to about 1.9 millimeters if a step size of 10 milliseconds is used. It appears that the larger step size undersamples the sound velocity profile field.
BOOST_AUTO_TEST_CASE | ( | refraction_n2_linear | ) |
Evaluates the model's ray refraction accuracy using a comparison to the analytic solution for a profile where the square of the index of refraction is linear.
Match conditions of the test and output table format to those in the Reilly/Goodrich report. These are also the specific conditions used by Jensen, Kupperman, et. al. in their formulation of the analytic ray tracing solution for the N^2 linear profile.
Ocean: N^2 Linear: c0 = 1550 m/s, g0 = 1.2 1/sec The profile_model::flat_earth() option turned on. Position: 1000 meters deep at 00:00N 00:00W D/E Angles: 50 degrees (up) AZ Angles: 90 degrees (east) Time Step: 100 msec
In Cartesian coordinates, the analytic solution for this profile is defined by the equation:
where:
An exception is thrown if the modeled position is not within 200 millimeters of the analytic result. Note that this threshold is much different than the linear case where the maximum error is significantly less than 1 millimeter. The maximum error shrinks to about 14 millimeters if a step size of 10 milliseconds is used. It appears that the larger step size undersamples the sound velocity profile field.
BOOST_AUTO_TEST_CASE | ( | refraction_linear | ) |
Evaluates the model's ray refraction accuracy using a comparison to the analytic solution for a linear profile.
Match conditions of the test and output table format to those in the Reilly/Goodrich report.
Ocean: Linear: c0 = 1500 m/s, g0 = 1.6e-2 m/s/m The profile_model::flat_earth() option turned on. Position: 1000 meters deep at 00:00N 00:00W D/E Angles: 0 degrees (horizontal) AZ Angles: 90 degrees (east) Time Step: 100 msec
In Cartesian coordinates, the analytic solution for this profile is defined by the equation:
An exception is thrown if the modeled position is not within 1 millimeter of the analytic result.
BOOST_AUTO_TEST_CASE | ( | refraction_great_circle | ) |
In this test, an ocean with a small amount of downward refraction is used to verify the model's ability to follow great circle routes along the earth's surface.
Great circle routes, the shortest distance between two points along the Earth's surface, are frequently used in aviation and other long distance navigation problems. The amount downward refraction needed to test this feature is computed in terms of a "flat Earth" correction given by
where
Four horizontal rays are launched from 45N 45W, at a depth of 1000 meters, with azimuths of 0, 30, 60, and 90 degrees, for 1000 seconds, with a time step of 100 milliseconds. The accuracy of the greate circle routes is computed by converting the latitude, longitude, and altitude of each ray back into a great circle azimuth at the point of origin
where
The maximum deviation of any modeled ray from the analytic result is required to be less than 1 millimeter and 0.001 degree. If this result is true, we'll conclude that the model accurately follows great circle routes. A BOOST error is thrown if this condition fails.
BOOST_AUTO_TEST_CASE | ( | refraction_isovelocity | ) |
In this test, an isovelocity ocean (1500 m/s) is used to verify the accuracy of those terms the ray equations that do not depend on the gradient of the sound speed.
The factors of "r" in these equations are all on the order of the radius of Earth, which is over six million meters. Prior to conducting this test, it was unclear if double precision numbers would be accurate enough to compute small differences in positions that included such large numbers.
Four horizontal rays were launched from 45N 45W, at a depth of 1000 meters, with azimuths of 0, 30, 60, and 90 degrees, and a time step of 100 milliseconds. In this scenario, the depth of each ray appears to curve toward the ocean surface and strike it 75 seconds later, at a range of around 110 km. But, in reality, the rays are actually traveling in a straight line; the earth's surface is curving down to meet it.
The accuracy of the ray path locations were computed by converting the latitude, longitude, and altitude of each ray back into geocentric (Cartesian) coordinates and then measuring the distance from the analytic form of straight line, as a function of time, in the geocentric system. The equations for this comparison are *
where
The difference between the altitude predicted by the model and the analytic solution were also computed using
The maximum deviation of any modeled ray from the analytic result is required to be less than 1 millimeter. If this result is true, we'll conclude that double precision numbers are accurate enough to compute ray paths in spherical Earth coordinates. A BOOST error is thrown if this condition fails.
BOOST_AUTO_TEST_CASE | ( | reflect_interp_spd_acc_test | ) |
BOOST_AUTO_TEST_CASE | ( | reflect_grid_test | ) |
Reflect rays off of the ETOPO1 bottom near the Malta escarpment.
Ray path starts from 35:59N 16:00E, D/E=-20 deg AZ=270 deg. A run for 90 seconds should propagate up the slope, turn around and head back down the slope. Because of slope features in the latitude direction, the ray does not stay in the east-west plane.
When the gcc -ffast-math compiler option is turned off, these results are expected to be accurate to at least 0.09 percent. With fast-math turned on, the accuracy of the lat/long drops to 5e-5 percent, and about 6 meters are lost on the accuracy in depth.
BOOST_AUTO_TEST_CASE | ( | proploss_limits | ) |
This test demonstrates ability to adjust source position if it is within 0.1 meters of being above the ocean surface or below the ocean bottom.
The boundary reflection logic does not perform correctly if the wavefront starts on the wrong side of either boundary.
BOOST_AUTO_TEST_CASE | ( | proploss_lloyds_depth | ) |
Compares modeled propagation loss as a function of depth to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean.
This forces the model to deal with target points near the surface where the up-going and down-going wavefronts must be extrapolated from two ray families that have different numbers of surface bounces.
The analytic result is the same as that for proploss_lloyds_range().
Targets near the surface must be extrapolated from the wavefronts below them. Because the Gaussian profile rolls off at edge of a ray family, it is important to test the impact of that phenomena on propagation loss at the interface.
This test computes three statistics to measure the difference between the model and the analytic solution.
An automatic error is thrown if abs(bias) > 0.5 dB, dev > 4 db, or detcoef < 80%.
BOOST_AUTO_TEST_CASE | ( | proploss_lloyds_range_freq | ) |
Compares modeled propagation loss as a function of range and frequency to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean.
The Lloyd's analytic analytic result is:
where:
This test computes three statistics to measure the difference between the model and the analytic solution.
At 1000 Hz, an automatic error is thrown if abs(bias) > 1 dB, dev > 4 dB, or detcoef < 90%. Extremely low and high freq can have a greater deviations.
BOOST_AUTO_TEST_CASE | ( | proploss_lloyds_range | ) |
Compares modeled propagation loss as a function of range to the Lloyd's mirror analytic expression for surface reflection in an isovelocity ocean.
The Lloyd's analytic analytic result is:
where:
This test computes three statistics to measure the difference between the model and the analytic solution.
An automatic error is thrown if abs(bias) > 0.5 dB, dev > 4 db, or detcoef < 80%.
BOOST_AUTO_TEST_CASE | ( | proploss_freq | ) |
This test demonstrates that the frequency based accuracy of the model.
BOOST_AUTO_TEST_CASE | ( | proploss_basic | ) |
This test demonstrates that the basic functions of the spreading loss model are working correctly.
It computes propagation loss in a spherical spreading in an isovelocity ocean with no boundary interaction.
BOOST errors are automatically generated if the modeled eigenrays deviate from the 20*log10(R) model by more than 0.2 dB.
The eigenrays for all targets are written to the proploss_basic.csv spreadsheet file. A comparison of the model vs. theory is printed to standard output.
BOOST_AUTO_TEST_CASE | ( | eigenray_branch_pt | ) |
When acoustic targets are along the boundaries of the wavefront, the algorithm for producing eigenrays treats the azimuthal degrees of zero and 360 as separate angles.
This essentially produces two eigenrays of exactly half of the true eigenray. This test leverages the work already provided in eigenray_basic and extends to include both AZ and DE branch point targets.
A new algorithm was introduced to detect the branch points in the AZ dimension and only produce one eigenray at the correct strength. Similarly for acoustic targets that were directly above/below the source, logic was added to produce a single eigenray that would be the sum of all eigenrays that would have been previously produced.
A BOOST_CHECK_EQUAL is used to verify that only three eigenrays are produced for each target. The user is then provided with netcdf and csv files that can then be used to verify the correct transmission loss has been produced for each eigenray to each target.
BOOST_AUTO_TEST_CASE | ( | eigenray_tl_az | ) |
Scenario is the exact same as eigenray_basic, except that the number of targets is increased.
This allows us to verify the TL accuracy of the hybrid gaussian model.
When using the gaussian form of TL calculations, we expect to to see an oscillatory TL plot around the source in azimuthal spread. This oscillation is inherent to the gaussians as most of the acoustic energy lies in between two rays.
Netcdf and csv files are to be compared against one another to show the transmission loss sensativity to the azimuthal dimension, support matlab code is provided.
BOOST_AUTO_TEST_CASE | ( | eigenray_concave | ) |
Tests the model's ability to accurately estimate geometric terms for the direct path and surface reflected eigenrays on a spherical earth.
The concave shape of the earth's surface causes the analytic solution for the surface reflected path to have up to three roots at long ranges. This test compares results for a single target at 1.2 deg to those analystic solutions computed externally in a spreadsheet.
When the model is run with these parameters, the travel times are accurate to within 0.02 msec, the source D/E angles are accurate to within 0.05 degrees, and the target D/E angles are accurate to within 0.1 degrees. But note that, if the spacing between launch angles is too small, Surface 3 occurs between the same two rays as the Direct Path. There is a fundamental limitation of the model's eigenray searching logic that only allows one ray path to be found between any two launch angles. In this test, a wider launch angle spacing would cause the model to fail to find the Surface 3 path.
BOOST_AUTO_TEST_CASE | ( | eigenray_basic | ) |
Tests the basic features of the eigenray model for a simple target.
This test models direct-path, surface-reflected, and bottom reflected paths to a single point in a flat bottomed isovelocity ocean on a round earth. This test limits the D/E ray fan from -60 to 60 so that extrapolation of ray paths outside of the fan can also be tested. (Note that it is the bottom bounce path that requires rays outside of this range.)
With a time step of 100 msec and an angular D/E spacing of 5.0 deg, the interpolated results are expected to match the analytic values within 2 msec and 0.01 deg.
When the wave_queue::compute_offsets() fallback calculation of offset(n) = -gradient(n) / hessian(n,n) is limited to 1/2 of the beamwidth, the extrapolated bottom bounce path has large errors in D/E angle. But if this clipping is not included, then the eigenray_extra_test/eigenray_lloyds test will generate significant errors in D/E. But the travel time on the extrapolated bottom bounce path remains accurate to within 20 msec. Developers whould be aware of these limitations when attempting to use targets outside of the rayfan.
This test also looks at the accuracy of the propagation loss (PL) values for this scenario. This requires enough rays in the azimuthal (AZ) direction to fill-in all AZ components of the Gaussian beams. An azimuthal ray fan from -4.0 to 4.0 degrees in 1 deg increments meets this requirement. This configuration produces propagation loss values within 0.1 dB of the 20*log10(R) theoretical value (where R is the distance traveled). The exception to this PL accuracy level is the bottom bounce case. This is because "out of beam" effects are expected to yield significantly weaker PL values than predicted by 20*log10(R).
This test writes multi-path eigenrays in CSV format to eigenray_basic.csv and in netCDF format to eigenray_basic.nc. It also records the wavefronts to eigenray_basic_wave.nc so that a ray trace can be plotted in Matlab.
BOOST_AUTO_TEST_CASE | ( | reflect_slope_test | ) |
Monitor callbacks from reflection model.
Initialize counter. Record a collision of a single ray with a reverberation surface. Bottom and surface reflection in a flat bottomed isovelocity ocean. Constructs a geometry in which the changes in latitude and travel time between bounces can be calculated analytically. The following equations predict the path of a downwardly steered ray, given a = latitude change between the surface and the bottom.
where:
Selecting to make the latitude change exactly 0.1 degrees yields the following test values.
Uses a 100 millisecond time step so that the time and location of the collision can be compared to the analytic values without breaking into the guts of the reflection model. Modified version of the reflect_flat_test() in which the bottom has a 1 degree up-slope in the latitude direction. This change should create a 2 degree increase in grazing angle for each reflection that hits the bottom.
const double bot_depth = 1e5 [static] |
const double bot_depth = 1e5 [static] |
const double c0 = 1500.0 [static] |
const double f0 = 2000 [static] |
const double f0 = 2000 [static] |
const double src_lat = 45.0 [static] |
const double src_lng = -45.0 [static] |
const double time_step = 0.1 [static] |
const double time_step = 0.100 [static] |
const double time_step = 0.100 [static] |