Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON PLEASE :) thank you!! Use triangulation to locate a pollutant source In LAB 10.25, you developed functions for using three points and two

image text in transcribedimage text in transcribedimage text in transcribedIN PYTHON PLEASE :) thank you!!

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 O 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 ~ DT This means we can invoke some unknown constant K vDx that satisfies di- KVti, d2-K Vt2, and d3-K Vt3. 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(t95). What if it doesn't? Is there one unique value of K that works? The answer is yes! Consider the following algorithm: 1. Given times t1, t2, t3 and the points (x1y\). (X2y2), and (x3y3): 2. Guess K 3. Find the point (x.y) the correct distance from both (xtyj) and (x2y2) and closest to (x3y3). 4. Compute the apparent distance d'3 from (x.y) to (x3.y3). 5. Compute z 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.y) (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) import numpy as np 2 def a d1, d2, x1, yl, x2, y2 numerator-dl**2-d2**2((xl**2+yl**2)-(x2**2+y2**2)) denominator-2 (y2-yl) return numerator/denominator 4 6 7def b( xl, yl, x2, y2) 8 return -(x2-x1)/(y2-yl) 9 1 def solve_xy (x1, yl, x2, y2, d1, d2 ): bb-b(x1,yl,x2,y2) aa-a (dl,d2,x1, yl,x2,y2) 12 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 O 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 ~ DT This means we can invoke some unknown constant K vDx that satisfies di- KVti, d2-K Vt2, and d3-K Vt3. 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(t95). What if it doesn't? Is there one unique value of K that works? The answer is yes! Consider the following algorithm: 1. Given times t1, t2, t3 and the points (x1y\). (X2y2), and (x3y3): 2. Guess K 3. Find the point (x.y) the correct distance from both (xtyj) and (x2y2) and closest to (x3y3). 4. Compute the apparent distance d'3 from (x.y) to (x3.y3). 5. Compute z 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.y) (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) import numpy as np 2 def a d1, d2, x1, yl, x2, y2 numerator-dl**2-d2**2((xl**2+yl**2)-(x2**2+y2**2)) denominator-2 (y2-yl) return numerator/denominator 4 6 7def b( xl, yl, x2, y2) 8 return -(x2-x1)/(y2-yl) 9 1 def solve_xy (x1, yl, x2, y2, d1, d2 ): bb-b(x1,yl,x2,y2) aa-a (dl,d2,x1, yl,x2,y2) 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions