39
Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Embed Size (px)

Citation preview

Page 1: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Using CUDA for Solar Thermal Plant Computation.

Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Page 2: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Our Team. Claus Nilsson Sahithi Chalasani Pranav Mantini Arun Kumar

Subramanian

Page 3: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Instructor:Dr.Bun yueMentor:Michel Izygon

Page 4: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Background Structure

Central receiver A type of solar furnace. Receives the sunlight

redirected by Heliostats. Heliostat

A type of mirror. redirects sunlight towards

the central receiver.

Page 5: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Background. Field

Generally huge Heliostats are placed in

a radial stagger formation.

Broken into Grids containing cells.

Each cell has one representative heliostat and about 8 to 80 neighbor(hypothetical) heliostats.

Page 6: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Background. Shading and Blocking.

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

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

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

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

Page 7: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Background.

Page 8: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Problem. Solar thermal fields in general have considerably

large number of heliostats. A computation algorithm to calculate shading and

blocking has been designed and implemented by Tietronix Software, Inc.

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

The objective is to decrease the computation time.

Page 9: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

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 10: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

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 11: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Algorithm.

origin

TOWER

Heliostat

TS=OS -C

OT - C

NNormal

Page 12: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Algorithm.

Page 13: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Algorithm.

Shadingv

Shading

Page 14: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Algorithm.

Page 15: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Polygon Clipping. Sutherland-Hodgman Algorithm:

Most used algorithm for clipping convex polygons. Uses a divide-and-conquer strategy. Window must be a convex polygon Polygon to be clipped can be convex or not

Page 16: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Example The original polygon and the clip rectangle.

Page 17: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Example After clipped by the right clip boundary.

Page 18: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Example After clipped by the right, bottom, and left clip

boundaries.

Page 20: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Why this algorithm? It is relatively simple. Relatively straightforward and is easily implemented in C. Very efficient in two important cases. i) when the polygon is completely inside the boundaries. ii) when it's completely outside.

Page 21: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA What is CUDA

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

◦ Extension to the C programming language

Page 22: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA What CUDA does

Allows utilization of GPU Allows parallel execution of code

Kernels Manages threads automatically

Exception: __syncthreads()

Page 23: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA Example

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

Page 24: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA

Scaling

Page 25: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA How does it work

Page 26: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA

Page 27: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA

Page 28: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA

Page 29: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

CUDA

Page 30: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Progress. Two Tower Demo. Full Cell. (linear) Full Cell. (Parallel) Full Grid. (linear) Full Grid. (parallel)

Page 31: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Progress. Two Tower Demo:

Successfully calculated the vertices of the neighbor and the representative heliostat.

Working on the projected vertices and polygon clipping algorithm.

Full Cell Demo: Created the eight neighbors and generated the unit

normal vector to the heliostats Working on the vertices and projected vertices.

Page 32: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Progress. Two Tower Demo.

Input: Tower height - 63.07 meters.  The coordinates of the center of each heliostat are:  2002(source) -100 0 5

2003(neighbor) -100 10 5  Heliostats - 5 meters by 5 meters square. sun azimuth - 89.9779 degrees. sun elevation - 15.0007 degrees. Date - 20 March 2008 at 07:07:27.4 UTC with the field origin located

at latitude 0, longitude 0, elevation 0.

Page 33: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress
Page 34: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Progress. Full Cell Demo.

Input: Tower height - 63.07 meters. Heliostats - 4.5 meters by 4.5 meters square. no. of rows , columns – 10 & 10 respectively. Row and column of the tower – 10 & -1 respectively. Date - 09/22/2009 11:40:06.7326 UTC-8 sun azimuth - 179.999984302 degrees. sun elevation - 55.1633384647 degrees. Site – elevation 670 latitude 34.863 longitude -116.887

Page 35: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress
Page 36: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

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 37: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

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 38: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

References [5] Polygon clipping,

http://www.cc.gatech.edu/classes/AY2003/cs4451a_fall/ClippingApplets%20Folder/Sutherland-Hodgeman/index.html

http://www.codeguru.com/cpp/misc/misc/graphics/article.php/c8965

http://www.aftermath.net/library/articles/clippoly/clippoly.pdf

http://www.cc.gatech.edu/grads/h/Hao-wei.Hsieh/Haowei.Hsieh/sec3_step.html

Page 39: Using CUDA for Solar Thermal Plant Computation. Background Problem Solution Algorithm Polygon Clipping Why CUDA? Progress

Thank You!Any Questions?