Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use triangulation to locate a pollutant source In LAB 10.25, you developed functions for using three points and two distances to calculate the location of
Use triangulation to locate a pollutant source In LAB 10.25, you developed functions for using three points and two distances to calculate the location of an unknown point. Now, let's suppose that the unknown point is actually a point source for some pollutant X, and at time 0 it releases a burst of X. Assume no wind, and that X diffuses freely from its release point. Suppose that we have measurement devices at the three points 1, 2, and 3 that track the concentration of X as a function of time, and that the concentration of X is detected to peak at times tj, t2, and t3, at each point, respectively. Can we determine the location of the evil point source? Let's make the assumption that the time intervals scale with the square of the distance divided by the diffusivity of X, ti~ D This means we can invoke some unknown constant KDx that satisfies di-Kvti. d2 - Kvt2, and ds -Kvt3. Can we estimate K uniquely knowing this? Consider that if we choose a value for K, all three distances are set, and we get the two solutions points that correspond to that value of K. We can then measure the distance to point 3 for each solution point, and see if it matches K (t5). What if it doesn't? Is there one unique value of K that works? 0.5 The answer is yes! Consider the following algorithm: 1. Given times t, t2, t3 and the points (xy) (x2y2), and (x3.y3): 2. Guess K. 3. Find the point (x.y) the correct distance from both (xjy,) and (x2y2) and closest to (x3.y3) 4. Compute the apparent distance d'3 from (x.y) to (x3y3). 5. Compute zK/ 6. If z is 1, stop; otherwise let K be K/z, and go to 3. The value of K this converges to, if squared, gives an estimate for the diffusivity Dx Part 1 Objective To the following code, add your implementation of the algorithm listed above. Then, given the following coordinates and times of observed peak concentration, print the coordinates of the evil point source in the format (x,) (including the parentheses) where x and y are floats with three digits following the decimal. Coordinates (x.y) of observation Time of peak concentration 300 400 500 (-8.0,5.0) 1import numpy as np 2 def a( dl, d2, x1, yl, x2, y2): 3 numerator d1**2-d2**2 ((xl**2+y1**2)-(x2**2+y2**2)) denominator-2x (y2-yl) return numerator/denominator 4 5 6 7def bx1, yl, x2, y2 ): 8 return -(x2-x1)/(y2-yl) 9 10 def solve_xyx1, yl, x2, y2, d1, d2 ): bb-b (xl,yl,x2,y2) 12 aa-a (di,d2,x1,yl,x2,y2) rad-4* (bb* (aa-y1)-x1)**2 - 4* (1+bb**2) (x1**2-d1**2+ (yl-aa) 13 14 15 16 pre-2* (x1-bb* (aa-yl)) den 2* (1+bb**2) xp- (pre+np.sqrt(rad))/den xm (pre-np.sqrt (rad))/den 17 18 19 20 return xm, ym, xp, yp When your result converges to a set of coordinates for the evil point source and a value for K, this seems to show that we can use triangulation to estimate diffusivity. Of course, there are major simplifying assumptions here, most notably no wind and a very rough scaling estimate linking time to distance. Nevertheless, knowing the location of a third detector and the time of peak concentration gives us a good estimate, and we can locate the evil point source. Part 2 Objective Create a plot with the components described in the following sentences. Plot the three points at which the measurements are taken and the location of the evil point source. Make each a unique color, and label each point on the plot. Finally, draw a black, solid line from each measurement point to the evil point source. Use triangulation to locate a pollutant source In LAB 10.25, you developed functions for using three points and two distances to calculate the location of an unknown point. Now, let's suppose that the unknown point is actually a point source for some pollutant X, and at time 0 it releases a burst of X. Assume no wind, and that X diffuses freely from its release point. Suppose that we have measurement devices at the three points 1, 2, and 3 that track the concentration of X as a function of time, and that the concentration of X is detected to peak at times tj, t2, and t3, at each point, respectively. Can we determine the location of the evil point source? Let's make the assumption that the time intervals scale with the square of the distance divided by the diffusivity of X, ti~ D This means we can invoke some unknown constant KDx that satisfies di-Kvti. d2 - Kvt2, and ds -Kvt3. Can we estimate K uniquely knowing this? Consider that if we choose a value for K, all three distances are set, and we get the two solutions points that correspond to that value of K. We can then measure the distance to point 3 for each solution point, and see if it matches K (t5). What if it doesn't? Is there one unique value of K that works? 0.5 The answer is yes! Consider the following algorithm: 1. Given times t, t2, t3 and the points (xy) (x2y2), and (x3.y3): 2. Guess K. 3. Find the point (x.y) the correct distance from both (xjy,) and (x2y2) and closest to (x3.y3) 4. Compute the apparent distance d'3 from (x.y) to (x3y3). 5. Compute zK/ 6. If z is 1, stop; otherwise let K be K/z, and go to 3. The value of K this converges to, if squared, gives an estimate for the diffusivity Dx Part 1 Objective To the following code, add your implementation of the algorithm listed above. Then, given the following coordinates and times of observed peak concentration, print the coordinates of the evil point source in the format (x,) (including the parentheses) where x and y are floats with three digits following the decimal. Coordinates (x.y) of observation Time of peak concentration 300 400 500 (-8.0,5.0) 1import numpy as np 2 def a( dl, d2, x1, yl, x2, y2): 3 numerator d1**2-d2**2 ((xl**2+y1**2)-(x2**2+y2**2)) denominator-2x (y2-yl) return numerator/denominator 4 5 6 7def bx1, yl, x2, y2 ): 8 return -(x2-x1)/(y2-yl) 9 10 def solve_xyx1, yl, x2, y2, d1, d2 ): bb-b (xl,yl,x2,y2) 12 aa-a (di,d2,x1,yl,x2,y2) rad-4* (bb* (aa-y1)-x1)**2 - 4* (1+bb**2) (x1**2-d1**2+ (yl-aa) 13 14 15 16 pre-2* (x1-bb* (aa-yl)) den 2* (1+bb**2) xp- (pre+np.sqrt(rad))/den xm (pre-np.sqrt (rad))/den 17 18 19 20 return xm, ym, xp, yp When your result converges to a set of coordinates for the evil point source and a value for K, this seems to show that we can use triangulation to estimate diffusivity. Of course, there are major simplifying assumptions here, most notably no wind and a very rough scaling estimate linking time to distance. Nevertheless, knowing the location of a third detector and the time of peak concentration gives us a good estimate, and we can locate the evil point source. Part 2 Objective Create a plot with the components described in the following sentences. Plot the three points at which the measurements are taken and the location of the evil point source. Make each a unique color, and label each point on the plot. Finally, draw a black, solid line from each measurement point to the evil point source
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started