Reference no: EM132399689
Assignment
Scenario
HighTollTunnels Inc. is planning to make a tunnel in Sydney that will connect a remote part of Sydney with the CBD. Currently, these points are connected via a highway. Your goal is to generate a map of the change in pollution levels between these two cases - the first case being a tunnel that has two ventilation facilities, and the second case being the pollution generated by cars travelling on an existing road network.
Question 3
Write a function EPAPlume() which calculates the concentration of a contaminant being emitted from a point source at locations x, y and z relative to the ventilation facility which is located at x_s and y_s . The function should take the following inputs in this order:
1. x , an array of positions in 'metres relative to an arbitrary origin with the positive x direction pointing East,
2. y, an array of positions in metres relative to an arbitrary origin with the positive y direction pointing North.
3. z, an array of positions in metres relative to the base of the ventilation facility, of the same size as x and y,
4. the Pasquill stability class as a single upper case character,
S. the source rate of Contaminants at the ventilation facility outlet in micrograms per second,
6. the environmental wind speed in m/s,
7. the direction that the wind is going towards in degrees clockwise from North,
8. the height of the ventilation facility in metres,
9. x_s , the location of the ventilation facility in the x direction,
10. y_s , the location of the ventilation facility in the y direction,
11. the exit gas velocity in m/s,
12. the diameter of the outlet chimney in m,
13. the ambient temperature of the environment in degrees Celsius, and
14. the outlet air temperature in degrees Celsius.
Question 4
Write a function EPAMap () which creates a map of the concentration of a contaminant that is being emitted from a point source location. This function should use the pcolor() function to produce this map, and then save this as a PNG image with the filename filename .png and also return two objects; firstly the figure handle and then the concentration array. In the sample code given to you, the figure handle is f and is being returned already. The figure must have appropriate axis labels, correct axis bounds (in latitude/longitude coordinates), a colorbar with an appropriate label, and should use the colormap hot.Your function should take the following inputs in this order;
1. the minimum latitude to be plotted,
2. the maximum latitude to be plotted,
3. the minimum longitude to be plotted,
4. the maximum longitude to be plotted,
5. the number of points plotted in the latitudinal direction,
6, the number of points plotted in the longitudinal direction,
7. the elevation at which to display the map in m,
8. the Pasquill stability class as a single upper case character,
9. the source rate of contaminants at the ventilation facility outlet in micrograms per second,
10. the environmental wind speed in mis,
11. the direction that the wind is going towards in degrees clockwise from North,
12. the height of the ventilation facility in m,
13. the latitude of the ventilation facility,
14. the longitude of the ventilation facility,
15. the exit gas velocity.in mis,
16. the diameter of the outlet chimney in m,
17. the ambient temperature of the environment in degrees Celsius,
18. the outlet air temperature in degrees Celsius, and
19. filename
Question 5
Write a function RoadSegmentDispersion() that calculates the dispersion of pollutants emitted from cars moving down a straight road at a set of points described by x and y You should approximate this line source of emissions by a series of closely spaced point sources, each emitting pollutants from the middle of their respective small section of the straight road. The function should take the following arguments in this order:
1. the x location of the start of the road in m,
2. the x location of the end of the road ire m,
3. the y location of the start of the road in m,
4. the y location of the end of the road in m,
5. the number of small road sections used tip discretise this line,
6. the x locations of the points at which the concentration should be calcuPateci in m,
7. the y locations of the points at which the concentration should be ca[cuiated in m,
8. the height at which the dispersion values should be calcurated in m,
9. the number of vehicles per second,
10. the vehicle emission rate in micrograms per metre per vehicle,
11. the Pasquill stability class as a single upper case character,
12. the environmental wind speed in m/s.,
13. the direction that the wind is going towards in degrees clockwise from North,
14. the ambient temperature of the environment in degrees Celsius, and
15. the vehicle exhaust temperature in degrees Celsius.
Question 6
Write a function RoadNetworkMap() that creates a map of the concentration of a contaminant that is dispersing after being emitted from a steady stream of cars after passing through a series of straight road segments. You should assume that cars move at the same rate (in vehicles per second a long the whole route. This function should use the pcolor () function to produce this map, and should save this as a PNG image with the filename fi leriarne. ping and also return two objects; firstly the figure handle and then the concentration of the pollutants in space as an array. In the sample code given to you, the figure handle is f and is being returned already. The figure must have appropriate axis labels, correct axis bounds (in latitude/longitude coordinates) a colorbar Sri an z ppropriate label, and should use the col ormap hot . Your function should take the forlowing inputs in this order:
1. the minimum latitude to be plotted,
2. the maximum latitude to be plotted,
3. the minimum longitude to be plottedr
4. the maximum longitude to be plotted,
5. the number of grid points in the latitudinal direction,
6. the number of grid points in the longitudinal direction,
7. the elevation at which to display the map in metres,
8. the number of vehicles per second;
9. the vehicle emission rate in micrograms per metre per vehicle,
10. the Pasquill stability class as a single upper case character
11. the erwironmenta I wind speed in rrhirs,.
12. the direction that the wind is going towards in degrees clockwise from North,
13. alDarray (vector) of the latitudes of the rid coordinates of the roads.,
14. a 1D array (vector) of the longitudes of the end coordinates of the roads,
15. the number of small road sections used to ctiscretise these lines,
16. the ambient temperature of the e aviron mem in degrees Celsius,
17. the extlausi to in degrees Celsius, and
18. fliename
Question 7
Write a function Scenariocomparison() that compares the two scenarios (before construction of the tunnel and afterwards). For the case of the tunnel, the function should assume that there will be two ventilation facilities, which are located at the entrance and exit portals. This function should create and save one figure with two subplots, one on the left and one on the right, and also return three objects; Firstly the figure handle, then the concentration displayed on the left plot as an array, then the concentration displayed on the right plot as an array. In the sample code given to your the figure handle is f and is being returned already. Each of the subplots in the figure must have appropriate axis labels, correct axis bounds (in latitude/longitude coordinates) and a colorbar with an appropriate label.
The subplot on the left of the figure should display the difference between the contaminant levels produced by road traffic and the equivalent contaminant levels produced by the tunnelling project. Use the redblue colormap (which is available in the Scaffold but to use offline you will need to download it), such that if there is more pollution from the tunnelling project, this is shown in red, and no change is shown in white.
The subplot on the right should show a Filled contour using the contour f() function which depicts the pollution levels after the tunnel is built. Use the jet colorrnap where the lower limit of the colorbar should be 0 anti the middle of the colorbar is the NEPM limit for that contaminant. Your function should take the following inputs in this order;
1. the minimum latitude to be plotted,
2. the maximum latitude to be plotted,
3. the minimum longitude to be plotted.
4. the maximum longitude to be plotted,
5. the number of grid points in the latitudinal direction,
6. the number of grid points in the longitudinal direction,
7. the elevation at which to display the map in metres,
8. the number of vehicles per second,
9. the vehicle emission rate in micrograms per metre per vehicle.
10. the cross sectional area of the tunnel,
11. the wind speed in the tunnel including the piston effect in m/s,
12. the ambient COncentrati on of the ciontamin6rit outside of the tunnel. in micrograms per cubic-metre,
13. the Posquill stability class a a single upper case character,
14. the environmental wind speed in m/s,
15. the direction that the wind is going towards in degrees cloclwise from North,
16. a 1D array (vector) of the heights of the two ventilation. facilities in metres,
17. a 1D array (vector) of the latitudes of the two ventilation facilities,
18. a 1D array (vector) of the longitudes of the two ventilation facilites,
19. a 1D array (vector) of the latitude f the end coordinates of the roads,
20. a 1D array (vector) ofthe longitudes of the end coordinates of the roads,
21. the number of small road sections used to discretise these lines.
22. a 1D array (vector) of the eN it gas velocity in m/s of the two ventilation facilities,
23. a 1D array (vector) of the diameter of the outlet chimney in in of the two ventilation facilities?
24. the ambient to tempperature of the environment in degrees Celsius,
25. the exhaust tempperature in degrees Celsius,
26. the relevanat NEMP limit in micrograms per cubic metre. and
27. filename.