33
Capstone Spring 2009 – Team 5

Using CUDA for Solar Thermal Plant Computation

Embed Size (px)

DESCRIPTION

Using CUDA for Solar Thermal Plant Computation. Capstone Spring 2009 – Team 5. Using CUDA for Solar Thermal Plant Computation. Solar Thermal Plants Background Problem Energy Solution Algorithm Polygon Clipping Why CUDA? Progress. Our Team. Claus Nilsson Sahithi Chalasani - PowerPoint PPT Presentation

Citation preview

Page 1: Using CUDA for Solar Thermal Plant Computation

Capstone Spring 2009 – Team 5

Page 2: Using CUDA for Solar Thermal Plant Computation

Using CUDA for Solar Thermal Plant Computation.

Solar Thermal Plants Background Problem Energy Solution Algorithm Polygon Clipping Why CUDA? Progress

Page 3: Using CUDA for Solar Thermal Plant Computation

Our Team. Claus Nilsson Sahithi Chalasani Pranav Mantini Arun Kumar

Subramanian

Page 4: Using CUDA for Solar Thermal Plant Computation

Instructor:Dr.Bun yue

Mentor:Dr.Michel Izygon

Mr. Peter Armstrong

Page 5: Using CUDA for Solar Thermal Plant Computation

SOLAR THERMAL PLANTSolar Thermal power plants are used to

generate electricity from the energy of the sun.

Page 6: Using CUDA for Solar Thermal Plant Computation

Background Structure

1. Central receiver A type of solar furnace. Receives the sunlight

redirected by Heliostats.

2. Heliostat A type of mirror. redirects sunlight towards

the central receiver.

Page 7: Using CUDA for Solar Thermal Plant Computation

Background. Field

Generally huge Heliostats are placed in

a radial stagger formation.

For the purpose of computation the field is broken into grids containing cells.

Page 8: Using CUDA for Solar Thermal Plant Computation

Shading and Blocking. Shading and Blocking.

• The sunlight being received by one heliostat can be blocked by the adjacent heliostats, causing shading and blocking.

• A field of heliostats suffers loss in efficiency caused by shading and blocking.

• For our purpose we assume that shading and blocking occurs only within a cell.

Page 9: Using CUDA for Solar Thermal Plant Computation

Shading.

• Shading is the loss of illumination on a given mirror due to the interception of the incident sunlight by a neighbouring mirror. [3]

Page 10: Using CUDA for Solar Thermal Plant Computation

SHADING

Page 11: Using CUDA for Solar Thermal Plant Computation

Blocking.

Blocking is the loss of illumination on the central receiver due to the interception of reflected sunlight by another neighbouring mirror. [3]

Page 12: Using CUDA for Solar Thermal Plant Computation
Page 13: Using CUDA for Solar Thermal Plant Computation

Energy. The energy generated by a heliostat depends on many factors, one of them being the area of the heliostats.

The energy generated from a solar thermal plant is directly proportional to the amount of sunlight reflected on to the central receiver.

Page 14: Using CUDA for Solar Thermal Plant Computation

Energy• The amount of sunlight reflected onto the

central receiver depends on the total area of the heliostats that is neither shaded nor blocked.

• To optimize the energy generated from a solar thermal plant, the total area of the heliostats that is shaded and blocked should be calculated.

Page 15: Using CUDA for Solar Thermal Plant Computation

Algorithm. An algorithm was designed by Mr. Peter

Armstrong of Tietronix Software, Inc., to calculate the shading and blocking among the heliostats.[4]

This algorithm makes use of Vector Mathematics, including vector projection and a polygon clipping algorithm.

Page 16: Using CUDA for Solar Thermal Plant Computation

Algorithm.

The algorithm calculates the co-ordinates of the heliostats for a given configuration of the grid at a certain location of the sun.

These co-ordinates are used to find the interactions of the heliostats.

The algorithm uses vector projections to find, if one heliostat shades or blocks another heliostat.

Page 17: Using CUDA for Solar Thermal Plant Computation

Algorithm.If a heliostat shades or blocks another

heliostat, a polygon clipping algorithm is used to find the vertices of the unshaded region of the representative heliostat.

This algorithm is applied for all the neighboring heliostats and the area is added to the running total of the area calculated.

Page 18: Using CUDA for Solar Thermal Plant Computation

Polygon Clipping.The area of the representative Heliostat that

is shaded or blocked does not contribute towards the power generated.

This area should be subtracted using a polygon clipper.

The Original program designed by Tietronix Software, Inc. makes call to a general polygon clipping(gpc) library.

Page 19: Using CUDA for Solar Thermal Plant Computation

Polygon ClippingThis gpc is a huge library designed at The

University of Manchester.

It has about 2500 lines of code.

Most of the processing time for calculating the co-ordinates is taken by the gpc.

Page 20: Using CUDA for Solar Thermal Plant Computation

Problem. Solar thermal fields in general have considerably

large number of heliostats.

This computation algorithm takes significant amount of time to calculate shading and blocking for thousands of heliostat.

The objective is to decrease this computation time.

Page 21: Using CUDA for Solar Thermal Plant Computation

Solution. To increase the efficiency of this computation

algorithm, Tietronix Software, Inc. has proposed to create an application that computes the shading and blocking among the heliostats simultaneously.

For this purpose, CUDA(Compute Unified Device Architecture), a parallel computing architecture was chosen.

Page 22: Using CUDA for Solar Thermal Plant Computation

DesignAs CUDA is extension to language c, the

whole computation algorithm and the polygon clipping algorithm was first implemented in C and then later converted to CUDA.

Page 23: Using CUDA for Solar Thermal Plant Computation

Polygon Clipping IssueThe gpc library used for the original

computation could not be used for our purpose.

As, the gpc library are located on the host, a call to the function on the host from the device is lot more time consuming.

A polygon clipping algorithm that is more specific to the computation algorithm has to be designed.

Page 24: Using CUDA for Solar Thermal Plant Computation

Polygon ClippingThe polygon clipping algorithm used for our design is a paper, Efficient clipping of arbitrary polygons proposed by GUNTHER GREINER and KAI HORMANN.

This algorithm is chosen because, it is relatively more efficient than Sutherland Hodgman algorithm which is more commonly used.

The data structures used for the polygons are very simple.

Page 25: Using CUDA for Solar Thermal Plant Computation

Polygon ClippingA doubly linked list is used in the algorithm

to represent the polygons.The clipping algorithm involves the

calculation of all the intersection points and the choosing among these points to create the desired polygon.

Page 26: Using CUDA for Solar Thermal Plant Computation

CUDA What is CUDA

◦ Scalable programming model and◦ Software environment for parallel computing [2]

◦ Extension to the C programming language

Page 27: Using CUDA for Solar Thermal Plant Computation

CUDA What CUDA does

Allows utilization of GPU Allows parallel execution of code Manages threads automatically

CUDA Requires One or more Nvidia GPUs (Graphics Processing Unit) Nvidia’s CUDA API

Page 28: Using CUDA for Solar Thermal Plant Computation

CUDA Example

Source: “Parallel Processing With CUDA” by Tom R. Halfhill [1]

GPU

Page 29: Using CUDA for Solar Thermal Plant Computation

CUDA

Page 30: Using CUDA for Solar Thermal Plant Computation

CUDAChallenges with CUDA

No communication from device to hostNo dynamic memory allocation on device during

runOnly Single Precision on our devices

Page 31: Using CUDA for Solar Thermal Plant Computation

References[1] Tom R. Halfhill. Parallel Processing With CUDA.

Microprocessor, 01/28/08-01, www.nvidia.com/docs/IO/55972/220401_Reprint.pdf

[2] Greg Ruetsch, Brent Oster. Getting Started with CUDA. http://www.nvidia.com/content/cudazone/download/Getting_Started_w_CUDA_Training_NVISION08.pdf

Page 32: Using CUDA for Solar Thermal Plant Computation

References

[3] Lipps, F. W.; vant-Hull, L. L., Shading and blocking geometry for a solar tower concentrator with rectangular mirrors, American Society of Mechanical Engineers, Winter Annual Meeting, New York, N.Y., Nov. 17-22, 1974, 7 p. NSF-supported research.

[4] Peter Armstrong, An Algorithm For Shading And Blocking Computation Of A Field Of Heliostats Arranged In A Grid Layout.

Page 33: Using CUDA for Solar Thermal Plant Computation

Thank You!Any Questions?