Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

45
Abstract A luminescent solar concentrator is a window which concentrates optical pho- tons for the purpose of generating electricity. This window can replace existing windows, and provides an emission free, clean energy source. The project is based on the use of Geant4, a toolkit used for the simulation of particles through matter. This is used to model the emission of photons onto a luminescent solar concentrator. The objective of this model is to find an optimum design for the types of dye, concentration of dyes, and the dimensions of the win- dow. Dyes are modelled through the definition of their physical characteristics, namely their emission and absorption spectra within the host material, PMMA. Monte- carlo simulations are used to model the statistical variance based upon these two spectra. Solar panels are modelled by the use of sensitive detectors. These output individual photon trajectory information, and therefore can give information based upon optimum dye type, photon energy and angle of photon incidence; giving the maximum total incident photon energy. This report outlines the code and techniques used to implement this scientific model, and explains why some decisions were made. It explains why Geant4 was selected, and the results gained from the simulations. 1

Transcript of Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Page 1: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Abstract

A luminescent solar concentrator is a window which concentrates optical pho-tons for the purpose of generating electricity. This window can replace existingwindows, and provides an emission free, clean energy source.

The project is based on the use of Geant4, a toolkit used for the simulationof particles through matter. This is used to model the emission of photons onto aluminescent solar concentrator. The objective of this model is to find an optimumdesign for the types of dye, concentration of dyes, and the dimensions of the win-dow.

Dyes are modelled through the definition of their physical characteristics, namelytheir emission and absorption spectra within the host material, PMMA. Monte-carlo simulations are used to model the statistical variance based upon these twospectra. Solar panels are modelled by the use of sensitive detectors. These outputindividual photon trajectory information, and therefore can give information basedupon optimum dye type, photon energy and angle of photon incidence; giving themaximum total incident photon energy.

This report outlines the code and techniques used to implement this scientificmodel, and explains why some decisions were made. It explains why Geant4 wasselected, and the results gained from the simulations.

1

Page 2: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Contents1 Introduction 3

2 Geant4 52.1 Monte-Carlo Methods . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Randomisation . . . . . . . . . . . . . . . . . . . . . . 52.2 Example N06 . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Photon source 73.1 Photon Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Photon Energy Histogram . . . . . . . . . . . . . . . . . . . . . 8

4 Geometry 104.1 Solar Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5 Dyes 145.1 Absorption Length Calculations . . . . . . . . . . . . . . . . . . 155.2 Data Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6 Run 18

7 Experiment 217.1 Geometrical Gain . . . . . . . . . . . . . . . . . . . . . . . . . 217.2 Testing Dye Type . . . . . . . . . . . . . . . . . . . . . . . . . 217.3 Concentration . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

8 Results 228.1 Geometrical Gain . . . . . . . . . . . . . . . . . . . . . . . . . 228.2 Total Efficiency and Viewing Blur . . . . . . . . . . . . . . . . . 228.3 Concentration . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

9 Discussion 249.1 Geometrical Gain . . . . . . . . . . . . . . . . . . . . . . . . . 249.2 Total Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . 249.3 Concentration . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

10 Conclusion 2510.1 Optimal Design . . . . . . . . . . . . . . . . . . . . . . . . . . 2510.2 Practical Considerations . . . . . . . . . . . . . . . . . . . . . . 25

11 Model Limitations 26

12 Conclusion 27

13 Appendix 27

2

Page 3: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

1 IntroductionThe sun’s natural energy provides a way to gather clean, reliable, and a renewablesource of electrical power. The luminescent solar concentrator allows this energy to beharnessed by large buildings with a low space real estate, and with minimal aestheticmodifications.

The luminescent solar concentrator is based upon a dye which absorbs and re-emitslight at a different wavelength and in a different direction. The energy collected is de-posited by photons which reach solar panels, which are installed at the sides of thiswindow. A luminescent solar concentrator concentrates the solar energy by collectinglight over a large area and directing it to a relatively small, in area, photovoltaic panel.

Figure 1: Cross-section of a luminescent solar concentrator. Blue dashed lines indicateincoming sunlight. Red lines indicate emitted light to the photovoltaic cell to the side

The design parameters of a luminescent solar concentrator lie within the specificationsof the dye and of the LSC sheet. The type of dye, dye concentration, and alignmentthe dyes are important. Specifically, the emission and absorbance spectra of the dyeschosen. This is so that maximum energy can be absorbed from the sun’s spectra, aswell as reducing the total number of emitted photons being reabsorbed twice, and los-ing energy. The probability of re-emission is dependent on the quantum yield of thechosen dye.

A double glazed array of 2 LSC window’s, with different dyes is chosen so to max-imise total cross-over absorption bandwidth spectra. This effectively doubles the totalbandwidth of the LSC, as well as doubling the absorbing surface area presented.

The host material chosen is PMMA. This is due to its transparent nature at frequen-cies of visible light, allowing the LSC to be used as a window.

The geometrical gain of the window is an important factor to consider for the optimisa-tion of luminescent solar concentrators. A higher geometrical gain leads to a reductionin cost per Watt of energy. This is due to the increase in inexpensive total surface area,which collects more photons, rather than increasing expensive photovoltaics .

3

Page 4: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

The computer simulation built for this project models a luminescent solar concentrator.By using a model, the data can be collected, before doing physical tests with expensiveprototypes. The model provides easy methods which allows for the varying of con-centration, type of dye and number and angle of photons. Whilst outputting individualphoton trajectory information, which provides information on the ratio of photons thatreach the photovoltaic cell to the total landing on the LSC. The model is sufficientlylightweight to fire many photons and provides statistically sound results.

There are various loss mechanisms in a luminescent solar concentrator. Losses arefound through heat loss, photons being emitted at a smaller angle of incidence thanthat of the total internal reflection, and photons being reabsorbed on their path into thesolar panel.

The model was built using Geant4, a platform used for the simulation of particlesthrough matter. This was chosen due to the predefined methods of wavelength shifting,material definitions, tracking, detector response, visualisation and material interactions.

A pre-defined example, ”Example N06” was used as a starting point for this project.This example provided the basis of having a volume contained within a universe, and asuitable amount of physics lists and visualisations. This example was heavily modifiedto add wavelength shifting properties, suitable detectors, multi-photon emission, datainput, data collection, and data manipulation.

The objectives of this report was to find the optimum dye type, dye concentration andLSC dimensions before manufacturing physical products.

The results found that a double glazed LSC was most efficient. A dye concentrationof Rhodamine B was optimum at 0.44Mol/cm3, with Crystal Violet in the 2nd LSCsheet, at a concentration of 0.39Mol/cm3. The geometrical gain was found to be bestthe higher the value was. Therefore, the bigger the LSC, the more efficient this is.Leading to the conclusion that an luminescent solar concentrator would be best usedon buildings with floor to ceiling window’s

4

Page 5: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

2 Geant4Geant4 is a toolkit developed at CERN. It was selected due to it being designed specif-ically for the simulation and passage of particles through matter.[2] This thereforemeans that many of the methods required for the physics and behaviours of particles asthey travel through matter are provided.

Geant4 is particularly useful in the fact that data can be output for individual photons.This means that rather than only having an overall wattage, the behaviour of a photonat any energy and direction can be traced, and therefore analysed. This is particularlyimportant for the optimisation of a luminescent solar concentrator, so that photons withparticular energies can be tracked.

2.1 Monte-Carlo MethodsGeant4, importantly, uses monte-carlo methods. This allows for the modelling of thenon-linear and statistical nature of the absorption and re-emission of photons in thePMMA.

2.1.1 Randomisation

An initial seed[4] is input and serves as the basis for the resultant randomisation of anentire run. During the progress of a run, the initial starting position and energy of aphoton is randomised within a desired limit. This is used to model the statical nature ofindividual photons landing at a specific point on earth. This can be extended to varyingthe angles and polarisation of photons, as well as their position and energy.

The statistical nature of the absorption within a dye is also taken account here. With astatistical chance, based upon the molar extinction of when, or even if, that particularphoton will be absorbed. This is largely based upon the concentration and dye type thatis used.

The direction of the emitted photon is based randomly, whereas the energy of the pho-ton is based upon the emission spectra, with arbitrary units defining the percentagelikelihood at any given energy level.

All these different factors combine to form a totally different, but statistically similaroutput result. It was found that it required the run of 10,000 photons to get consistently,statistically similar output results.

2.2 Example N06The example N06 was used as a starting point to create the luminescent solar concen-trator. This novice example provides the basic geometry, and universe structure in the

5

Page 6: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

form of a water tank containing air bubbles. It also provided the necessary visualisa-tion, some of the physics and optical processes, and the interactivity.

Many of the features such as Cerenkov Radiation, and scintillation were removed, withnew ones added, such as wavelength shifting which allowed for the modelling of thebehaviour of dyes. [5]

6

Page 7: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

3 Photon sourceA photon source is defined in the file generalparticlesource.cc. This re-placed the particlegun.cc class, and allowed for the easy, customisable definitionof number of primary source particles in a single run. It also made it easier to defineenergy distribution histograms, and angles of incidence for these primary source parti-cles. The characteristics of this particle source are not hard-coded, rather, input withinthe marco file, sun.mac[1]

3.1 Photon OriginThe origin of the photons are defined within a macro file. The placing of photons isdecided at random, within a defined, 6x6m square surface. This is placed at 4.5m abovethe centre of the LSC. The angles of emission, location generated, direction and energycharacteristics can be randomised or defined by altering the code found in Listing 1.

Listing 1: Emission Surface Definitions

1 /gps/particle opticalphoton # Define particle tape as optical\leftarrow \rhook photon

23 /gps/pos/type Plane # Emission surface is plane4 /gps/pos/shape Square # Shape of plane is square5 /gps/pos/centre 0. 9. 0. m # Centre placed 9m above centre6 /gps/pos/rot1 1. 0. 0.7 /gps/pos/rot2 0. 0. 1. # Rotation vectors placed to be \leftarrow \rhook

parallel to LSC8 /gps/pos/halfz 3. m # Size of square to be 6x6m9 /gps/pos/halfx 3. m

10 /gps/pos/halfy 3. m1112 /gps/direction 0. -1. 0. # Direction to be normal to LSC13 /gps/ang/type planar

7

Page 8: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

3.2 Photon Energy HistogramThe input energy histogram used is based upon the spectra of energy measured of thesun at normal irradiance, nearly parallel (0.5 deg divergent cone) radiation on surfacewith a normal tracking of the sun, excluding scattered sky and reflected ground radia-tion [3]. The spectrum selected is an industry standard for the testing of solar panelsand is known as ASTMG173, based upon AM1.5.

Figure 2: ASTMG173 sun’s energy spectra, measured normal irradiance, nearly par-allel (0.5 deg divergent cone) radiation on surface with a normal tracking of the sun,excluding scattered sky and reflected ground radiation

This spectra was selected as it closely, and accurately matches the spectra of lighthitting the LSC in the simulations, due to the normal trajectory of each photon onto thewindow. It is important to accurately model the energy spectra of the sun so that anaccurate output energy data can be collected based upon the absorption and emissionspectra of the photons.

8

Page 9: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

This spectra is input manually with the macrofile shown in listing 2.

Listing 2: Photon Energy Historgram Definition

1 # Energy definitions2 /gps/ene/type User # Histogram type user defined3 /gps/hist/type energy # Link histogram to energy definitions45 /gps/hist/point 350255 0.0000 # Single point of histogram6 /gps/hist/point 353975 0.0000 # Wavelength in eV & power in\leftarrow \rhook

arbitrary units7 /gps/hist/point 357694 0.00008 /gps/hist/point 361414 0.00009 /gps/hist/point 365133 0.0000

10 /gps/hist/point 368853 0.000111 /gps/hist/point 372572 0.000612 /gps/hist/point 376292 0.004813 /gps/hist/point 380012 0.011614 /gps/hist/point 383731 0.023715 /gps/hist/point 387451 0.053816 /gps/hist/point 391170 0.064817 ...

The number of photons in this specific run can be defined through the last line, run/beamOn x,where x is the number of photons emitted.

9

Page 10: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

4 GeometryPMMA (Polymethyl methacrylate) was chosen as the base material for the lumines-cent solar concentrator. PMMA is a transparent thermoplastic, and is often used as ashatter-proof alternative to glass. In addition to this, PMMA is both cheap and easy tohandle.

Within Geant4, the geometry is divided into two important sections. Firstly, materi-als must be defined. For this model only air, and PMMA are required , defining theuniverse, and LSC respectively. The dyes are defined as a physics process within thePMMA slabs.

Materials are added through the definition of their chemical properties, where air isdefined by the addition of 2 hydrogen, and an oxygen atom, shown in listing 3, and therespective atoms for PMMA, shown in listing 4.

Listing 3: Definition of water

1 // Water2 //3 G4Element* H = new G4Element("Hydrogen", "H", z=1 , a=1.01*\leftarrow \rhook

g/mole); //Define new Geant4 element called Hydrogen and\leftarrow \rhook setting molar mass as 1.01g/mole

45 G4Material* Water = new G4Material("Water", density= 1.0*g/\leftarrow \rhook

cm3, nelements=2);6 //Define new material by its density and number of elemtns7 Water->AddElement(H, 2); //add 2 hydrogen8 Water->AddElement(O, 1); //add single oxygen atom

Listing 4: Definition of PMMA

12 G4Element* elC = new G4Element("Carbon", "C", 6., 12.01*g\leftarrow \rhook

/mole);3 G4Element* elO = new G4Element("Oxygen" ,"O" ,8.,16.00*g/\leftarrow \rhook

mole);4 G4Element* elH = new G4Element("Hydrogen","H",1., 1.0079*\leftarrow \rhook

g/mole);5 const G4int Cl_Num = 2; //25;6 G4double Energy_levels[Cl_Num] = {0.5*eV, 10.0*eV};78 G4Material* PMMA = new G4Material("PMMA",1.18*g/cm3, 3); \leftarrow \rhook

// PMMA has formula C5O2H89 PMMA->AddElement(elC, 5);

10 PMMA->AddElement(elO, 2);11 PMMA->AddElement(elH, 8);1213 //PMMA Refractive Index14 G4double PMMA_RIndex[nEnt] = {1.4893, 1.4899};

10

Page 11: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

1516 //PMMA Absorbption Length17 G4double PMMA_AbsLen[nEnt] = {1*m, 1*m};1819 G4MaterialPropertiesTable* myMPT5 = new \leftarrow \rhook

G4MaterialPropertiesTable();202122 G4MaterialPropertiesTable* PMMA_mt = new \leftarrow \rhook

G4MaterialPropertiesTable();23 myMPT5->AddProperty("RINDEX",Energy_levels,PMMA_RINDEX,\leftarrow \rhook

Cl_Num);24 //set refrective index25 myMPT5->AddProperty("ABSLENGTH",Energy_levels,PMMA_ABSL,\leftarrow \rhook

Cl_Num);//Set absorption length for all energies26 PMMA->SetMaterialPropertiesTable(myMPT5); //adds \leftarrow \rhook

properties to PMMA material

The physical characteristics of the PMMA are defined by adding the refractive indexes[6],and its absorption length properties. These properties are fixed at the levels of energiesused.

The physical volumes are created by creating a box and defining it’s dimensions, this isshown in line 8 in listing 5. This box must be filled with either air or PMMA; creatinga logical volume, which is shown in line 13. Lastly, this box must then be placed in theuniverse creating a physical volume, with the definition of its position, shown in line13. This is repeated for creating any volume.

Listing 5: Geometry definitions of universe and world in Geant4

12 expHall_x = expHall_y = expHall_z = 10.0*m;34 tank_x = 5*m;5 tank_y = 100*mm;6 tank_z = 5.0*m;78 G4Box* expHall_box = new G4Box("World",expHall_x,expHall_y,\leftarrow \rhook

expHall_z);9 //Definition of universe

10 G4LogicalVolume* expHall_log11 = new G4LogicalVolume(expHall_box,Air,"World",0,0,0);12 //Fill universe with air13 G4VPhysicalVolume* expHall_phys14 = new G4PVPlacement(0,G4ThreeVector(),expHall_log,"World"\leftarrow \rhook

,0,false,0);15 //Place universe at centre1617 // The First Luminescent Solar Concentrator18 //

11

Page 12: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

19 G4Box* waterTank_box = new G4Box("Tank",tank_x,tank_y,\leftarrow \rhook tank_z);

2021 G4LogicalVolume* waterTank_log22 = new G4LogicalVolume(waterTank_box,Water,"Tank",0,0,0);2324 G4VPhysicalVolume* waterTank_phys25 = new G4PVPlacement(0,G4ThreeVector(),waterTank_log,"Tank",26 expHall_log,false,0);

4.1 Solar PanelsThe solar panels in this project are defined as rectangles that surround the main PMMAslab. These slabs are filled with PMMA, as to not interfere with the trajectory of thephotons, but record individual photon tracks, energy deposits, and momentum.

The method chosen is a sensitive detector, as this allows for the tracking of individ-ual photons, rather than an overall energy deposit. This property is added to thesePMMA filled volumes. Upon hitting the solar panels, the photons are instantly killedand the following event is run.

Listing 6: Sensitive Detector assignment to PMMA Solar Panels and data output

1 ExN06SD* sd = new ExN06SD(SDname = "ExN06SD");2 //Definition of Sensitive Detector3 G4SDManager* SDman = G4SDManager::GetSDMpointer();4 SDman->AddNewDetector( sd ); //Register sensitive detector \leftarrow \rhook

to sensitive detector manager5 solarPanel_log->SetSensitiveDetector(sd); //Register \leftarrow \rhook

sensitive detector to solar panel’s logical volume67 for ( int i = 0 ; i < n_hit; i++){8 G4ThreeVector position = (*HC)[i]->GetPosition();//Fetch\leftarrow \rhook

position and energy data9 G4double energy = (*HC)[i]->GetEnergy();

1011 G4cout << "---- Hit # " << i << G4endl;12 G4cout << " Position " << position/cm << " [cm]"//\leftarrow \rhook

Print data for each hit inside solar panel13 G4cout << " Energy " << energy/eV << " [keV]"14 myfile.open ("/home/zceeh46/Desktop/G4/N06/output.txt",\leftarrow \rhook

ios::app);//Output to .txt file15 myfile << energy << " " << position << endl;16 panelCounter++;17 myfile << "Percentage of photons hitting solar panel: "\leftarrow \rhook

<<100-((totalPanel-panelCounter)*100/totalPanel) << "\leftarrow \rhook %"<< endl;

18 myfile.close();

12

Page 13: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

The position hit, and energy deposited of each photon is then printed to a text file calledoutput. A counter is used to store the total number of photons hitting the solar panels.This number is divided by the total input to give a total photon input to total photonshitting the solar panels as a percentage. demonstrated in line 17 of Listing 6.

A second set of sensitive detectors are placed above and below the PMMA glass. Theseare made of air, and thus do not interact with the photons on their paths. These are usedto count the total input photons, and to compare the positions of a photon at input andoutput. This is useful to determine the total number of photons diverged from theiroriginal path whilst in the LSC, and therefore determine the total visible blur.

Figure 3: Detected LED power vs drive current

13

Page 14: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

5 DyesThe dyes selected for testing were Rhodamine B and Crystal Violet. The reason forselecting these two dyes is due to their emission and absorption spectra. One dye isplaced in either plane of the double glazed solar luminescent solar concentrator. Forthese two particular dyes, the absorption spectra peaks correspond to the natural peaksof the sun’s spectra. This is demonstrated in figure 4.

The overall effect of this is an effective doubling of the total energy bandwidth pre-sented by the luminescent solar concentrator. A secondary, beneficial effect is a match-ing of the emission spectra and absorption spectra of the Rhodamine B and CrystalViolet respectively. This helps by reabsorbing photons in the Crystal Violet LSC sheetwhich have been emitted by the Rhodamine B.

Figure 4: Sun’s emission spectra with Rhodamine B absorption spectra on left, andCrystal Violet absorption spectra on right

The implementation of the dyes is done by the addition of physical properties to thePMMA material, rather than the addition of a physical dye. This allows for the reduc-tion in computational time and resources required, rather than implementing hundred’sof thousands of dyes.

Listing 7: Wavelength Shifting Code Snippet

1 #include "G4OpWLS.hh"2 private:3 G4OpWLS* theWLSProcess; //Create pointer to theWLSProcess4

14

Page 15: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

5 myMPT5->AddProperty("WLSABSLENGTH", PhotonEnergyIn1, \leftarrow \rhook PhotonAbsorb1, nEntriesEmiss1)

6 ->SetSpline(true); //Add data about photon energy, \leftarrow \rhook absorption length in cm, and total number of data \leftarrow \rhook points

78 myMPT5->AddProperty("WLSCOMPONENT", PhotonEnergyOut1, \leftarrow \rhook

PhotonEmiss1, nEntriesEmiss1)->SetSpline(true);9 //Add data about photon energy, photon emission probability, \leftarrow \rhook

and total number of data points10 myMPT5->AddConstProperty("WLSTIMECONSTANT",5*ns);11 //Set time between absorption and emission of photon

The physics process: WLSABSLENGTH maps a 1 for 1 value of energy to total lengthtravelled in the PMMA, before being absorbed. Whereas for emission, the WLSCOMPONENTphysics process is based upon chance, where arbitrary units are used to base a certainprobability that that energy will be emitted.The values used are based upon the data available in the PhotochemCAD package,version 2.1a.[7][8]

5.1 Absorption Length CalculationsThe values for absorption are given in the molar extinction, which is a measurement ofhow much a chemical absorbs light for a particular energy. This is an intrinsic propertyof the chemical.

The length that a photon of a particular energy will travel in is found with the useof the Beer-Lambert Law:

T = 10 - \sigma lc (1)

Where T = Transmission, \sigma =Molar Extinction, and c =ConcentrationThe thickness of the LSC is chosen to be 4mm, a standard size for a double glazedwindow. Therefore, the concentration required to have the highest chance of beingabsorbed at the peak molar extinction, for Rhodamine B, at wavelength=541nm is givenby:

C =1

\sigma \lambda l(2)

Where L=4mm, \sigma = 105, 100, and \lambda = 541nm.So:

C =1

105100\times 5.41\times 10 - 5 \times 0.4= 0.44Mol/cm3 (3)

This concentration is then set as the overall concentration of dye in the LSC. The valueof molar extinction is varied to give values of absorption length, and input into Geant4.

Table 1 illustrates a few examples of this.

15

Page 16: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Wavelength (nm) Molar Extinction (cm - 1/M ) Absorption Length (cm)500 28289 1.607520 49751 0.878560 40672 0.998600 0 \infty

Table 1: Wavelength and respective Absorption Length at 0.44Mol/cm3

5.2 Data InputA method was written to automatically grab data from a text file, and input this asan array for the wavelength shifting properties. This allows for the rapid changing ofdifferent dye types, by only having to change the name of the input text file.

Listing 8: getData method which returns string integer as a double

1 vector<G4double> getData(string fileName)2 {34 vector<G4double> dbl_line; //1-demensional \leftarrow \rhook

vector5 G4double dbl_temp; //temp double to \leftarrow \rhook

store value67 string line; //temporarily contains data from file89 string location = "/home/zceeh46/Desktop/G4/N06/data/";

10 location.append(fileName);11 ifstream myfile("/home/zceeh46/Desktop/G4/N06/data/\leftarrow \rhook

Rhodamine_absorption.txt");1213 if (myfile.is_open()){ //open file14 G4cout << "File Opened"<< endl;15 while(getline(myfile,line)) //extract \leftarrow \rhook

from myfile and stores in line16 {17 istringstream linestream(line); //\leftarrow \rhook

construct istringstream object18 string item;19 while(getline(linestream,item, ’ ’)) //\leftarrow \rhook

stores lines of linestream in item20 {21 stringstream ss(item);22 ss >> dbl_temp;23 dbl_line.push_back(dbl_temp);24 }25 }26 myfile.close();27 }else

16

Page 17: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

28 G4cout << "Can’t open file"<< endl;29 return dbl_line;30 }

This method is then returned into an array, and the data is sorted to separate wavelengthand molar extinction data. This method is shown in listing 9. The methods have twochecks, checking both the size of the value, assuring that it is within the expected range,but also whether it is on the left or right hand side of the table, which dictates the datatype.

Listing 9: Sorting methods

1 vector<G4double> Wavelength(vector<G4double>& dbl_line){2 vector<G4double> wavelength;3 int hi = dbl_line.size();4 for(int n = 0; n <hi; n++){ //For loop until end of file5 if( dbl_line[n] > 200 && dbl_line[n] < 1000 n % 1 =\leftarrow \rhook

1){ //if value is between 200 and 1000 then is a \leftarrow \rhook wavelength value and n is odd

6 wavelength.push_back(dbl_line[n]); //add value \leftarrow \rhook to end of vector

7 }8 }9 return wavelength;

10 }1112 vector<G4double> absorption(vector<G4double>& dbl_line){13 vector<G4double> power;14 int hi = dbl_line.size();15 for(int n = 0; n <hi; n++){16 if( dbl_line[n] < 200 || dbl_line[n] > 1000 && n % 1\leftarrow \rhook

= 0){ //if bigger than 1000 or smaller than 200 \leftarrow \rhook and n is even

17 if(dbl_line[n]>0){18 power.push_back(dbl_line[n]);19 }else{20 power.push_back(0.000000001); //if negative \leftarrow \rhook

number21 }22 }23 }24 return power;25 }

17

Page 18: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

6 RunAn entire run begins at the top, where the photons emanate from on a random point ona square plane. These photons then travel down, through the first detector unaffected,and into the PMMA block with wavelength shifting properties. Based upon the energyof the photon, the photon either passes through unhindered or is absorbed.

Figure 5: 10 emitted Photons. LSC Sheets are two shown in centre

If the photon is absorbed it is re-emitted 5ns later in a random direction. The photon,depending on the angle of incidence on the surface of the LSC will either by reflectedback into the LSC, or exit. These two events can be seen in figure 5, where one photonis guided out to the solar panel, and the other is internally reflected a few times beforeexiting and passing through the 2nd LSC sheet.

18

Page 19: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

The data output for this run is shown in listing 10. The output data shows the energydeposited at the solar panel in meV, and the location of the hit. The 2nd value is thepercentage of photons hitting the solar panel at that hit. So, in this run, shown in figure5, the 6th photon hit the solar panel.

Listing 10: Solar Panel Sensitive Detector Output

1 259277 (-5000,0.413444,1615.64)2 Total Number of Photons Hitting Solar Panel: 16$%$

A second output is given by the detectors which are placed above and below the LSC,shown in listing 11.

Listing 11: Above and Below LSC Sensitive Detectors

1 ----- Hit Number: 02 in counter: 13 out counter: 14 Percentage of particles passing unaffected: 100%56 ----- Hit Number: 17 in counter: 28 out counter: 29 Percentage of particles passing unaffected: 100%

1011 ----- Hit Number: 212 in counter: 313 out counter: 314 Percentage of particles passing unaffected: 100%1516 ----- Hit Number: 317 in counter: 418 out counter: 319 Percentage of particles passing unaffected: 75%2021 ----- Hit Number: 422 in counter: 523 out counter: 424 Percentage of particles passing unaffected: 80%2526 ----- Hit Number: 527 in counter: 628 out counter: 529 Percentage of particles passing unaffected: 84%3031 ----- Hit Number: 632 in counter: 733 out counter: 534 Percentage of particles passing unaffected: 72%3536 ----- Hit Number: 7

19

Page 20: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

37 in counter: 838 out counter: 639 Percentage of particles passing unaffected: 75%4041 ----- Hit Number: 842 in counter: 943 out counter: 744 Percentage of particles passing unaffected: 78%4546 ----- Hit Number: 947 in counter: 1048 out counter: 849 Percentage of particles passing unaffected: 80%

This is generated by listing 6 and displays the number of particles that pass throughunaffected. Here the value is 80\% because the run has 2 photons which do not passstraight through. Therefore, for this run, the view out of the LSC would be 20\% darker.

20

Page 21: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

7 Experiment

7.1 Geometrical GainFor this section the selection of dyes was kept constant, with Rhodamine B and a Crys-tal Violet sheets being used respectively. The size of the square where photons areemitted from is kept constant, but the dimensions of the windows are changed. Thethickness is kept at 4mm, but the width and length are increased. This therefore in-creases the total area of the window facing the sun, and the solar panel area is increasedby a relatively small amount. This therefore means that the gain, given by equation 4,increases.

Geometrical Gain =Area of surace

Area of solar panel(4)

The total energy deposited by all photons is then measured and plotted with respect togeometrical gain. This is repeated 3 times, and an average is taken.

7.2 Testing Dye TypeHere the dye types were varied, with the independent variable being the dye types.Mixtures of Rhodamine B + Rhodamine B, Rhodamine B + Crystal Violet, and CrystalViolet + Crystal Violet were tested.

The number of photons emitted was kept at 1,000, and an average was taken. The con-centration of each dye was selected by using equation 3, and kept constant throughout.The size of geometrical gain was also kept constant, at 150, with a constant solar paneland surface area.

7.3 ConcentrationThe concentration of the Rhodamine B + Rhodamine B selection was varied, whilstkeeping all other variables constant.

This required a redeclaration of the absorption length matrix for each run. Howeverthis was a relatively simple process, and only required a small change in the equation.

21

Page 22: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

8 Results

8.1 Geometrical GainThe Geometrical Gain was, as expected, found to increase the total energy deposited.There is a linear relationship between increasing geometrical gain and energy depositedfrom 75 to around 200 geometrical gain. After this, the increase in energy deposited isnot as large.

Figure 6: Energy deposited in eV versus Geometrical gain

8.2 Total Efficiency and Viewing BlurIt is shown in figure 7 that the most efficient combination of dyes, as expected, is Rho-damine B and Crystal Violet. The least efficient is a single plane of Rhodamine B. Ofthe double glazed arrangement and having the same dye type, Rhodamine B + Rho-damine B was slightly more efficient than the double Crystal Violet arrangement.

The inverse of these results are true for the total blur seen through the screen. The redbars show that for a single plane of Rhodamine B, the percentage of unaffected dyeswas much bigger, than the most efficient energy collecting combination, Rhodamine B+ Crystal violet. The two double selections of Rhodamine B and Crystal Violet camein the middle, with Rhodamine B

8.3 ConcentrationThe results shown in figure 8, show that the ideal concentration is at around the calcu-lated value of 44Mol/cm3, with a large increase in efficiency leading up to this point,

22

Page 23: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Figure 7: Histogram showing the efficiency of the different kinds of dye types withrespect to total spectra input. Red bars show total percentage of unaffected photons

and a gradual decline after this point.

Figure 8: Scatter graph showing the effect of varying concentration

23

Page 24: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

9 Discussion

9.1 Geometrical GainThe total output for geometrical gain increases due to the higher surface area, and there-fore the total number of photons hitting the surface increases. The fact that the totalsurface area of the solar panel only increases by a much smaller amount is irrelevantdue to the fact that it is the window surface area which collects the photon

This leads to the point of where the bigger the geometrical gain, the higher the GBP perenergy collected (/W ) ratio is. This is due to the much higher cost of the solar panelsemiconductor material, compared to the PMMA/Dye mixture.

The thickness of the windows was not changed at 4mm due to 4mm being the standardthickness of windows for safety. However, if this were to be reduced it would reduce thetotal cost of the windows, however may have an affect on the total number of photonsreaching the windows based upon the changing optimum concentration.

9.2 Total EfficiencyThe total efficiency is highest when mixing Rhodamine B and Crystal Violet. This isdue to the overlapping of peak absorption bandwidths. Rhodamine B has a peak band-width of about 60nm, between 500nm and 560nm. Whereas Crystal Violet has a peakbandwidth of about 80nm, between the wavelengths of 540nm and 620nm. Thus thetotal peak bandwidth of the LSC is essentially extended to 500-620nm, a 120nm band-width. Compared to the original 60nm, which approximately doubles the total intakeof photons.

The lowest efficiency is with a single layer of rhodamine B. This is due to the fact thatthe photon spends, overall, half the time in the LSC as it passes through only a singlesheet. The total peak bandwidth is also half the size of the double layered LSC.

This remains true for the double glazed windows, but which contains only a single dyetype. The peak bandwidth remains lower, however the amount of time, and thereforechance of a photon being absorbed in the LSC is increased.

It is also true that in the Rhodamine B + Crystal Violet arrangement the emission spec-tra of the Rhodamine B matches that of the Crystal violet. Therefore, emitted pho-tons from the Rhodamine B are reabsorbed in the Crystal Violet. In addition to this,the emitted photons are statistically less likely to be absorbed by the same dye twice,therefore allowing a photon to reach the solar panel without being absorbed again.

9.3 ConcentrationThe concentration’s optimum level was found to be at 0.44Mol/cm3. Before this, thereare not enough dyes, for there to be a significant likelihood of a dye being absorbed.

24

Page 25: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Therefore, the majority of photons pass straight on through without being absorbed.

After the optimal point, dyes began to be reabsorbed once emitted, and therefore didnot reach the solar panels, rather, being emitted at an angle greater than that of theangle of total internal reflection, and thus passing out of the LSC.

10 Conclusion

10.1 Optimal DesignThe optimal design based upon these results is found to be a double glazed window,containing first Rhodamine B and Crystal Violet. The concentration for RhodamineB should be 0.44Mol/cm3 and that of Crystal Violet is found to be 0.39 (based uponcalculations shown in equation 3).

There may well be different combinations of dyes that perform better than those cho-sen, however for the purpose of this project only the two chosen were tested for reasonsof time.

The geometrical gain, ideally, should be as high as possible. Therefore, it would berecommended that an LSC be installed in large buildings with floor to ceiling sizedwindows, to make the most return in energy for money spent. The total return onsmaller windows, found in houses for instance, would not be signficant enough to war-rant the use of LSC’s. Rather, solar panels on the roof of the buildings may be a morefeasible option.

10.2 Practical ConsiderationsFor a luminescent solar concentrator to exist it must be more cost effective than solarpanels. Therefore, the cost of the device must be lower, and the area exposed to the sunmust be greater, as to gather enough energy. This, as previously discussed, would befeasible on a large building, in which its main space real estate runs along the side ofthe building, rather than on the top.

The lifetime of these windows must also outlast that of normal windows. This wouldmean that the cost of replacing normal windows would reduce the total cost of invest-ing in luminescent solar concentrators.

It is also important that the view from within the window is not darkened or blurred sothat the outside is visible by a subject from the inside.

There are also safety implications in terms of the windows being hardened to dealwith impacts, high winds, and natural disasters. This must also be considered with thestorage and transport of electricity across the building.

25

Page 26: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

11 Model LimitationsIn real life, once a photon is absorbed, there is a chance that the photon is not remittedat all . This is known as the quantum efficiency, and its value varies with dye type.This model has no way of implementing a quantum efficiency, as there was no methodwritten within geant4 that could do this. It would be possible, with more time, to im-plement this into the model. This would enhance the overall reliability of the model,however the time taken would have meant not implementing other, vital methods.

In real life, photons are not emitted radially. Rather, in a certain direction. This is notshown in the program due to time constraints.

Finally, the effect of time degradation of the product is not taken into account, andtherefore it is not possible to see what would happen after a certain amount of time, leftin a built environment.

26

Page 27: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

12 ConclusionThe work done by this model paves the way for a physical model to be created, at nearoptimum specifications. It allows for many different combinations of variables to beignored. Fine tuning of the specifications can be done with the physical products.

In way of personal contribution, I brought together many different methods, and cre-ated methods of my own, to create this model. I provided methods to rapidly testany dye types, allowing for a quick and easy narrowing down of the huge quantity ofdifferent types to be used. The model is very realistic due to the incorporation of theASTMG173 spectra, having four solar panels on all sides, the modelling of screen blur,and the data output.

The initial objectives were met well, with optimal designs of geometrical gain, totalefficiency and concentration. If I had more time I would have been able to test moredye types, add in a quantum efficiency method, and vary the emission direction fromdyes.

27

Page 28: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

13 Appendix

Listing 12: Class which draws a circle at incidence points (absorbption/emissions andmeeting at boundaries) - ExN06CounterHit.cc

1 ////////////////////////////////////////////////2 //3 // Class Name: ExN06CounterHit4 // Created by: Geant4 Example Code5 // First Accessed: 20/10/146 // Modified by: Alex Kell7 //8 ////////////////////////////////////////////////9

10 #include "ExN06CounterHit.hh"11 #include "G4VVisManager.hh"12 #include "G4Circle.hh"13 #include "G4Colour.hh"14 #include "G4VisAttributes.hh"1516 G4Allocator<ExN06CounterHit> ExN06CounterAllocator;1718 ExN06CounterHit::ExN06CounterHit()19 {;}2021 ExN06CounterHit::˜ExN06CounterHit()22 {;}2324 G4int ExN06CounterHit::operator==(const ExN06CounterHit &\leftarrow \rhook

right) const25 {26 return (this==&right) ? 1 : 0;27 }2829 void ExN06CounterHit::Draw()30 {31 G4VVisManager* pVVisManager = G4VVisManager::\leftarrow \rhook

GetConcreteInstance();32 if(pVVisManager)33 {34 G4Circle circle(position);35 circle.SetScreenSize(10.04);36 circle.SetFillStyle(G4Circle::filled);37 G4Colour colour(0.,0.,1.); //Place circle at incidence \leftarrow \rhook

point38 G4VisAttributes attribs(colour);39 circle.SetVisAttributes(attribs);40 pVVisManager->Draw(circle);41 }42 }

28

Page 29: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

4344 void ExN06CounterHit::Print()45 {;}

Listing 13: ExN06CounterSD.cc - Process and receive data from hits class [9]

1 /////////////////////////////////////////2 //3 // Class Name: ExN06CounterSD4 // Created by: Alex Kell5 // First Accessed: 20/01/146 //7 //8 /////////////////////////////////////////9

10 #include "ExN06CounterSD.hh"11 #include "ExN06Hit.hh"12 #include "G4Step.hh"13 #include "G4Track.hh"14 #include "G4HCofThisEvent.hh"15 #include "G4TouchableHistory.hh"1617 ExN06CounterSD::ExN06CounterSD(G4String name)18 :G4VSensitiveDetector(name)19 {20 G4String HCname;21 collectionName.insert(HCname="counterCollection"); //Name \leftarrow \rhook

of Hit Counter22 HCID = -1;23 }2425 ExN06CounterSD::˜ExN06CounterSD(){;}2627 void ExN06CounterSD::Initialize(G4HCofThisEvent* HCE)28 { //Begin collection of hits data2930 counterCollection = new ExN06CounterCollection31 (SensitiveDetectorName,collectionName\leftarrow \rhook

[0]);32 if(HCID<0)33 { HCID = GetCollectionID(0); } //Set to zero if no data34 HCE->AddHitsCollection(HCID,counterCollection);35 }3637 G4bool ExN06CounterSD::ProcessHits(G4Step* aStep, \leftarrow \rhook

G4TouchableHistory*)38 { //At hit return following information39 G4StepPoint* preStep = aStep->GetPreStepPoint();40 G4TouchableHistory* touchable = (G4TouchableHistory*)(\leftarrow \rhook

preStep->GetTouchable());

29

Page 30: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

41 // Ensure counting incoming tracks only.42 if ( preStep->GetStepStatus() == fGeomBoundary ){43 ExN06CounterHit* newHit = new ExN06CounterHit();44 newHit->SetStripNo( touchable->GetReplicaNumber(0) );45 newHit->SetPosition( aStep->GetPreStepPoint()->\leftarrow \rhook

GetPosition() );//Fetch Position data46 newHit->SetMomentum( aStep->GetPreStepPoint()->\leftarrow \rhook

GetMomentum() );47 newHit->SetEnergy( aStep->GetPreStepPoint()->\leftarrow \rhook

GetTotalEnergy() );48 newHit->SetParticle( aStep->GetTrack()->GetDefinition() )\leftarrow \rhook

;49 counterCollection->insert( newHit );50 }51 return true;52 }53 void ExN06CounterSD::EndOfEvent(G4HCofThisEvent*)54 {;}55 void ExN06CounterSD::clear()56 {;}57 void ExN06CounterSD::DrawAll()58 {;}59 void ExN06CounterSD::PrintAll()60 {;}

30

Page 31: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

Listing 14: ExN06PhysicsList.cc - Contains all code for physics processes occuring tophotons. The wavelength shifting process was added her

1 /////////////////////////////////////////2 //3 // Class Name: ExN06PhysicsList4 // Created by: Geant4 ExampleN065 // First Accessed: 20/01/146 // Modified by: Alex Kell7 // Code from: WLSExample Geant48 //9 /////////////////////////////////////////

10 #include "globals.hh"11 #include "ExN06PhysicsList.hh"12 #include "ExN06PhysicsListMessenger.hh"1314 #include "G4ParticleDefinition.hh"15 #include "G4ParticleTypes.hh"16 #include "G4ParticleTable.hh"1718 #include "G4ProcessManager.hh"1920 #include "G4Cerenkov.hh"21 #include "G4Scintillation.hh"22 #include "G4OpAbsorption.hh"23 #include "G4OpRayleigh.hh"24 #include "G4OpMieHG.hh"25 #include "G4OpBoundaryProcess.hh"2627 #include "G4LossTableManager.hh"28 #include "G4EmSaturation.hh"2930 #include "G4OpWLS.hh" //optical photon wavelength shifting31 #include "WLSOpticalPhysics.hh"32 #include "G4OpticalPhoton.hh"3334 ExN06PhysicsList::ExN06PhysicsList() : G4VUserPhysicsList()35 {36 theCerenkovProcess = NULL;37 theScintillationProcess = NULL;38 theAbsorptionProcess = NULL;39 theRayleighScatteringProcess = NULL;40 theMieHGScatteringProcess = NULL;41 theBoundaryProcess = NULL;42 theWLSProcess = NULL; //addition of WLS \leftarrow \rhook

physics process4344 pMessenger = new ExN06PhysicsListMessenger(this);45 SetVerboseLevel(0);46 }

31

Page 32: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

474849 ExN06PhysicsList::˜ExN06PhysicsList() { delete pMessenger;}5051 void ExN06PhysicsList::ConstructParticle()52 {53 // In this method, static member functions should be called54 // for all particles which you want to use.55 // This ensures that objects of these particle types will \leftarrow \rhook

be56 // created in the program.5758 ConstructBosons();59 ConstructLeptons();60 ConstructMesons();61 ConstructBaryons();62 G4OpticalPhoton::OpticalPhotonDefinition();63 }646566 void ExN06PhysicsList::ConstructBosons()67 {68 // pseudo-particles69 G4Geantino::GeantinoDefinition();70 G4ChargedGeantino::ChargedGeantinoDefinition();7172 // gamma73 G4Gamma::GammaDefinition();7475 // optical photon76 G4OpticalPhoton::OpticalPhotonDefinition();77 }7879 void ExN06PhysicsList::ConstructLeptons()80 {81 // leptons82 // e+/-83 G4Electron::ElectronDefinition();84 G4Positron::PositronDefinition();85 // mu+/-86 G4MuonPlus::MuonPlusDefinition();87 G4MuonMinus::MuonMinusDefinition();88 // nu_e89 G4NeutrinoE::NeutrinoEDefinition();90 G4AntiNeutrinoE::AntiNeutrinoEDefinition();91 // nu_mu92 G4NeutrinoMu::NeutrinoMuDefinition();93 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();94 }95

32

Page 33: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

96 void ExN06PhysicsList::ConstructMesons()97 {98 // mesons99 G4PionPlus::PionPlusDefinition();

100 G4PionMinus::PionMinusDefinition();101 G4PionZero::PionZeroDefinition();102 }103104 void ExN06PhysicsList::ConstructBaryons()105 {106 // barions107 G4Proton::ProtonDefinition();108 G4AntiProton::AntiProtonDefinition();109110 G4Neutron::NeutronDefinition();111 G4AntiNeutron::AntiNeutronDefinition();112 }113114 void ExN06PhysicsList::ConstructProcess()115 {116 AddTransportation();117 ConstructGeneral();118 ConstructEM();119 ConstructOp();120 }121122 #include "G4Decay.hh"123124 void ExN06PhysicsList::ConstructGeneral()125 {126 // Add Decay Process127 G4Decay* theDecayProcess = new G4Decay();128 theParticleIterator->reset();129 while( (*theParticleIterator)() ){130 G4ParticleDefinition* particle = theParticleIterator->\leftarrow \rhook

value();131 G4ProcessManager* pmanager = particle->GetProcessManager\leftarrow \rhook

();132 if (theDecayProcess->IsApplicable(*particle)) {133 pmanager ->AddProcess(theDecayProcess);134 // set ordering for PostStepDoIt and AtRestDoIt135 pmanager ->SetProcessOrdering(theDecayProcess, \leftarrow \rhook

idxPostStep);136 pmanager ->SetProcessOrdering(theDecayProcess, \leftarrow \rhook

idxAtRest);137 }138 }139 }140 #include "G4ComptonScattering.hh"141 #include "G4GammaConversion.hh"

33

Page 34: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

142 #include "G4PhotoElectricEffect.hh"143144 #include "G4eMultipleScattering.hh"145 #include "G4MuMultipleScattering.hh"146 #include "G4hMultipleScattering.hh"147148 #include "G4eIonisation.hh"149 #include "G4eBremsstrahlung.hh"150 #include "G4eplusAnnihilation.hh"151152 #include "G4MuIonisation.hh"153 #include "G4MuBremsstrahlung.hh"154 #include "G4MuPairProduction.hh"155156 #include "G4hIonisation.hh"157158 void ExN06PhysicsList::ConstructEM()159 {160 theParticleIterator->reset();161 while( (*theParticleIterator)() ){162 G4ParticleDefinition* particle = theParticleIterator->\leftarrow \rhook

value();163 G4ProcessManager* pmanager = particle->GetProcessManager\leftarrow \rhook

();164 G4String particleName = particle->GetParticleName();165166 if (particleName == "gamma") {167 // gamma168 // Construct processes for gamma169 pmanager->AddDiscreteProcess(new G4GammaConversion());170 pmanager->AddDiscreteProcess(new G4ComptonScattering())\leftarrow \rhook

;171 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect\leftarrow \rhook

());172173 } else if (particleName == "e-") {174 //electron175 // Construct processes for electron176 pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,\leftarrow \rhook

1);177 pmanager->AddProcess(new G4eIonisation(), -1, 2, \leftarrow \rhook

2);178 pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, \leftarrow \rhook

3);179180 } else if (particleName == "e+") {181 //positron182 // Construct processes for positron183 pmanager->AddProcess(new G4eMultipleScattering(),-1, 1,\leftarrow \rhook

1);

34

Page 35: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

184 pmanager->AddProcess(new G4eIonisation(), -1, 2, \leftarrow \rhook 2);

185 pmanager->AddProcess(new G4eBremsstrahlung(), -1, 3, \leftarrow \rhook 3);

186 pmanager->AddProcess(new G4eplusAnnihilation(), 0,-1, \leftarrow \rhook 4);

187188 } else if( particleName == "mu+" ||189 particleName == "mu-" ) {190 //muon191 // Construct processes for muon192 pmanager->AddProcess(new G4MuMultipleScattering(),-1, 1,\leftarrow \rhook

1);193 pmanager->AddProcess(new G4MuIonisation(), -1, 2, \leftarrow \rhook

2);194 pmanager->AddProcess(new G4MuBremsstrahlung(), -1, 3, \leftarrow \rhook

3);195 pmanager->AddProcess(new G4MuPairProduction(), -1, 4, \leftarrow \rhook

4);196197 } else {198 if ((particle->GetPDGCharge() != 0.0) &&199 (particle->GetParticleName() != "chargedgeantino"))\leftarrow \rhook

{200 // all others charged particles except geantino201 pmanager->AddProcess(new G4hMultipleScattering()\leftarrow \rhook

,-1,1,1);202 pmanager->AddProcess(new G4hIonisation(), \leftarrow \rhook

-1,2,2);203 }204 }205 }206 }207208 void ExN06PhysicsList::ConstructOp()209 {210 theCerenkovProcess = new G4Cerenkov("Cerenkov");211 theScintillationProcess = new G4Scintillation("\leftarrow \rhook

Scintillation");212 theAbsorptionProcess = new G4OpAbsorption();213 theRayleighScatteringProcess = new G4OpRayleigh();214 theMieHGScatteringProcess = new G4OpMieHG();215 theBoundaryProcess = new G4OpBoundaryProcess();216 theWLSProcess = new G4OpWLS("OpWLS");217218 // theCerenkovProcess->DumpPhysicsTable();219 // theScintillationProcess->DumpPhysicsTable();220 // theRayleighScatteringProcess->DumpPhysicsTable();221222 SetVerbose(1);

35

Page 36: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

223224 theCerenkovProcess->SetMaxNumPhotonsPerStep(20);225 theCerenkovProcess->SetMaxBetaChangePerStep(10.0);226 theCerenkovProcess->SetTrackSecondariesFirst(true);227228 theScintillationProcess->SetScintillationYieldFactor(1.);229 theScintillationProcess->SetTrackSecondariesFirst(true);230231 // Use Birks Correction in the Scintillation process232233 G4EmSaturation* emSaturation = G4LossTableManager::Instance\leftarrow \rhook

()->EmSaturation();234 theScintillationProcess->AddSaturation(emSaturation);235236 theParticleIterator->reset();237 while( (*theParticleIterator)() ){238 G4ParticleDefinition* particle = theParticleIterator->\leftarrow \rhook

value();239 G4ProcessManager* pmanager = particle->GetProcessManager\leftarrow \rhook

();240 G4String particleName = particle->GetParticleName();241 if (theCerenkovProcess->IsApplicable(*particle)) {242 pmanager->AddProcess(theCerenkovProcess);243 pmanager->SetProcessOrdering(theCerenkovProcess,\leftarrow \rhook

idxPostStep);244 }245 if (theScintillationProcess->IsApplicable(*particle)) {246 pmanager->AddProcess(theScintillationProcess);247 pmanager->SetProcessOrderingToLast(\leftarrow \rhook

theScintillationProcess, idxAtRest);248 pmanager->SetProcessOrderingToLast(\leftarrow \rhook

theScintillationProcess, idxPostStep);249 }250 if (particleName == "opticalphoton") {251 G4cout << " AddDiscreteProcess to OpticalPhoton " << \leftarrow \rhook

G4endl;252 pmanager->AddDiscreteProcess(theAbsorptionProcess);253 pmanager->AddDiscreteProcess(\leftarrow \rhook

theRayleighScatteringProcess);254 pmanager->AddDiscreteProcess(theMieHGScatteringProcess)\leftarrow \rhook

;255 pmanager->AddDiscreteProcess(theBoundaryProcess);256 pmanager->AddDiscreteProcess(theWLSProcess);257 }258 }259 }260261 void ExN06PhysicsList::SetVerbose(G4int verbose)262 {263 theCerenkovProcess->SetVerboseLevel(verbose);

36

Page 37: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

264 theScintillationProcess->SetVerboseLevel(verbose);265 theAbsorptionProcess->SetVerboseLevel(verbose);266 theRayleighScatteringProcess->SetVerboseLevel(verbose);267 theMieHGScatteringProcess->SetVerboseLevel(verbose);268 theBoundaryProcess->SetVerboseLevel(verbose);269270 }271272 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo\leftarrow \rhook

........oooOO0OOooo......273274 void ExN06PhysicsList::SetNbOfPhotonsCerenkov(G4int MaxNumber\leftarrow \rhook

)275 {276 theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumber);277 }278279 void ExN06PhysicsList::SetCuts()280 {281 // " G4VUserPhysicsList::SetCutsWithDefault" method sets282 // the default cut value for all particle types283 //284 SetCutsWithDefault();285286 if (verboseLevel>0) DumpCutValuesTable();287 }

Listing 15: ExN06PrimaryGeneratorAction.cc - Creates photon gun at run up, ready tobe accessed for photon emission [1]

1 /////////////////////////////////////////2 //3 // Class Name: ExN06PrimaryGeneratorAction.cc4 // Created by: University of Southampton (ESA contract)5 // First Accessed: 20/01/146 // Modified by: Alex Kell7 //8 /////////////////////////////////////////9 #include "ExN06PrimaryGeneratorAction.hh"

10 #include "ExN06PrimaryGeneratorMessenger.hh"1112 #include "Randomize.hh"1314 #include "G4Event.hh"15 #include "G4GeneralParticleSource.hh"16 #include "G4ParticleTable.hh"17 #include "G4ParticleDefinition.hh"18 #include "G4SystemOfUnits.hh"1920 #include <iostream>

37

Page 38: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

21 #include <fstream>22 #include <string>2324 using namespace std;2526 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo\leftarrow \rhook

........oooOO0OOooo......2728 ExN06PrimaryGeneratorAction::ExN06PrimaryGeneratorAction()29 {30 //G4int n_particle = 1;31 particleGun = new G4GeneralParticleSource();3233 //create a messenger for this class34 gunMessenger = new ExN06PrimaryGeneratorMessenger(this);3536 //At entire program run, clear output.txt for new run \leftarrow \rhook

information37 ofstream myfile;38 myfile.open ("/home/zceeh46/Desktop/G4/N06/output.txt",ios\leftarrow \rhook

::trunc);39 myfile.close();4041 ofstream myfile1;42 myfile1.open ("/home/zceeh46/Desktop/G4/N06/inputCounter.\leftarrow \rhook

txt",ios::trunc);43 myfile1.close();44 }4546 ExN06PrimaryGeneratorAction::˜ExN06PrimaryGeneratorAction()47 {48 delete particleGun;49 delete gunMessenger;50 }5152 void ExN06PrimaryGeneratorAction::GeneratePrimaries(G4Event* \leftarrow \rhook

anEvent)53 {54 particleGun->GeneratePrimaryVertex(anEvent);55 }5657 void ExN06PrimaryGeneratorAction::SetOptPhotonPolar()58 {59 G4double angle = G4UniformRand() * 360.0*deg;60 SetOptPhotonPolar(angle);61 }6263 void ExN06PrimaryGeneratorAction::SetOptPhotonPolar(G4double \leftarrow \rhook

angle)64 {

38

Page 39: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

65 if (particleGun->GetParticleDefinition()->GetParticleName() \leftarrow \rhook != "opticalphoton")

66 {67 G4cout << "--> warning from PrimaryGeneratorAction::\leftarrow \rhook

SetOptPhotonPolar() :"68 "the particleGun is not an opticalphoton" << \leftarrow \rhook

G4endl;69 return;70 }7172 G4ThreeVector normal (1., 0., 0.);73 G4ThreeVector kphoton = particleGun->\leftarrow \rhook

GetParticleMomentumDirection();74 G4ThreeVector product = normal.cross(kphoton);75 G4double modul2 = product*product;7677 G4ThreeVector e_perpend (0., 0., 1.);78 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;79 G4ThreeVector e_paralle = e_perpend.cross(kphoton);8081 G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(\leftarrow \rhook

angle)*e_perpend;82 particleGun->SetParticlePolarization(polar);83 }

Listing 16: ExN06Run.cc - Stores and allows access to hitcount data during run [10]

1 /////////////////////////////////////////2 //3 // Class Name: ExN06Run4 // Created by: Alex Kell5 // First Accessed: 12/02/146 // With Reference To: JST CREST/7 //8 /////////////////////////////////////////9

10 #include "../include/ExN06Run.hh"11 #include "../include/G4Event.hh"12 #include "../include/G4HCofThisEvent.hh"13 #include "../include/G4SDManager.hh"1415 using namespace std;1617 ExN06Run::ExN06Run()18 {19 G4String detName[1] = {"MFDetName"}; //name of detector20 G4String primNameSum[1] = {"totalEDep"}; //Name of output2122 G4SDManager* SDMan = G4SDManager::GetSDMpointer();23 G4String fullName;

39

Page 40: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

24 size_t i,j;25 for(i=0;i<1;i++)26 {27 for(j=0;j<1;j++)28 {29 fullName = detName[i]+"/"+primNameSum[j]; //Fetch \leftarrow \rhook

detector name and output variable30 colIDSum[i][j] = SDMan->GetCollectionID(fullName); //\leftarrow \rhook

Get collection ID31 }32 }33 }3435 ExN06Run::˜ExN06Run()36 {;}3738 void ExN06Run::RecordEvent(const G4Event* evt)39 {40 G4HCofThisEvent* HCE = evt->GetHCofThisEvent(); //Get HC41 if(!HCE) return;42 numberOfEvent++; //Total number of hits within detector43 size_t i,j;44 for(i=0;i<1;i++)45 {46 for(j=0;j<1;j++)47 {48 G4THitsMap<G4double>* evtMap = (G4THitsMap<G4double\leftarrow \rhook

>*)(HCE->GetHC(colIDSum[i][j]));49 mapSum[i][j] += *evtMap; //Get pointer of stored data\leftarrow \rhook

in HC50 for(j=0;j<1;j++)51 {52 std::map<G4int,G4double*>::iterator itr = evtMap->\leftarrow \rhook

GetMap()->begin();53 for(; itr != evtMap->GetMap()->end(); itr++)54 {55 G4int key = (itr->first);56 G4double val = *(itr->second); //Hold data in val57 G4double* mapP = mapSum[i][j][key];58 if( mapP && (val>*mapP) ) continue;59 mapSum[i][j].set(key,val);60 }61 }62 }63 }64 }6566 G4double ExN06Run::GetTotal(const G4THitsMap<G4double> &map) \leftarrow \rhook

const67 {

40

Page 41: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

68 G4double tot = 0.;69 std::map<G4int,G4double*>::iterator itr = map.GetMap()->\leftarrow \rhook

begin();70 for(; itr != map.GetMap()->end(); itr++)71 { tot += *(itr->second); }72 return tot;73 }

Listing 17: ExN06SD.cc Sensitive Detector Class storing hit data of whole run

1 /////////////////////////////////////////2 //3 // Class Name: ExN06SD.cc4 // Created by: Alex Kell5 // First Accessed: 17/01/146 // With Reference To: JST CREST/7 //8 /////////////////////////////////////////9

10 #include "ExN06SD.hh"11 #include "ExN06Hit.hh"12 #include "G4Step.hh"13 #include "G4Track.hh"14 #include "G4HCofThisEvent.hh"15 #include "G4TouchableHistory.hh"1617 ExN06SD::ExN06SD(G4String name)18 :G4VSensitiveDetector(name)19 {20 G4String HCname;21 collectionName.insert(HCname="hitsCollection");2223 HCID = -1;24 }2526 ExN06SD::˜ExN06SD(){;}2728 void ExN06SD::Initialize(G4HCofThisEvent* HCE)29 {3031 hitsCollection = new ExN06HitsCollection32 (SensitiveDetectorName,collectionName\leftarrow \rhook

[0]);33 if(HCID<0)34 { HCID = GetCollectionID(0); }35 HCE->AddHitsCollection(HCID,hitsCollection);36 }3738 G4bool ExN06SD::ProcessHits(G4Step* aStep, G4TouchableHistory\leftarrow \rhook

*)

41

Page 42: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

39 {4041 G4StepPoint* preStep = aStep->GetPreStepPoint();42 G4TouchableHistory* touchable = (G4TouchableHistory*)(\leftarrow \rhook

preStep->GetTouchable());4344 // Ensure counting incoming tracks only.45 if ( preStep->GetStepStatus() == fGeomBoundary ){46 ExN06Hit* newHit = new ExN06Hit();47 newHit->SetStripNo( touchable->GetReplicaNumber(0) );48 newHit->SetPosition( aStep->GetPreStepPoint()->\leftarrow \rhook

GetPosition() );49 newHit->SetMomentum( aStep->GetPreStepPoint()->\leftarrow \rhook

GetMomentum() );50 newHit->SetEnergy( aStep->GetPreStepPoint()->\leftarrow \rhook

GetTotalEnergy() );51 newHit->SetParticle( aStep->GetTrack()->GetDefinition() )\leftarrow \rhook

;52 hitsCollection->insert( newHit );53 }54 return true;55 }5657 void ExN06SD::EndOfEvent(G4HCofThisEvent*)58 {;}5960 void ExN06SD::clear()61 {;}6263 void ExN06SD::DrawAll()64 {;}6566 void ExN06SD::PrintAll()67 {;}

Listing 18: grabData.hh Include class which provides the methods for sorting andfetching the data from text files

1 /////////////////////////////////////////2 //3 // Class Name: ExN06SD.cc4 // Created by: Alex Kell5 // First Accessed: 17/01/146 //7 /////////////////////////////////////////8 #include <iostream>9 #include <sstream>

10 #include <fstream>11 #include <vector>12 #include <string>

42

Page 43: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

13 #include "globals.hh"1415 using namespace std;1617 #ifndef grabData_h18 #define grabData_h1920 vector<G4double> getData(string fileName)21 {2223 vector<G4double> dbl_line; //1-demensional \leftarrow \rhook

vector24 G4double dbl_temp; //temp double to \leftarrow \rhook

store value2526 string line; //temporarily contains data from file2728 string location = "/home/zceeh46/Desktop/G4/N06/data/";29 location.append(fileName);30 ifstream myfile("/home/zceeh46/Desktop/G4/N06/data/\leftarrow \rhook

Rhodamine_absorption.txt");3132 if (myfile.is_open()){ //open file33 G4cout << "File Opened"<< endl;34 while(getline(myfile,line)) //extract \leftarrow \rhook

from myfile and stores in line35 {36 istringstream linestream(line); //\leftarrow \rhook

construct istringstream object37 string item;38 while(getline(linestream,item, ’ ’)) //\leftarrow \rhook

stores lines of linestream in item39 {40 stringstream ss(item);41 ss >> dbl_temp;42 dbl_line.push_back(dbl_temp);43 }44 }45 myfile.close();464748 }else{49 G4cout << "Can’t open file"<< endl;50 }51 return dbl_line;52 }5354 vector<G4double> Wavelength(vector<G4double>& dbl_line){55 vector<G4double> wavelength;56 int hi = dbl_line.size();

43

Page 44: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

57 for(int n = 0; n <hi; n++){ //For loop until end of file58 if( dbl_line[n] > 200 && dbl_line[n] < 1000 n % 1 =\leftarrow \rhook

1){ //if value is between 200 and 1000 then is a \leftarrow \rhook wavelength value and n is odd

59 wavelength.push_back(dbl_line[n]); //add value \leftarrow \rhook to end of vector

60 }61 }62 return wavelength;63 }6465 vector<G4double> absorption(vector<G4double>& dbl_line){66 vector<G4double> power;67 int hi = dbl_line.size();68 for(int n = 0; n <hi; n++){69 if( dbl_line[n] < 200 || dbl_line[n] > 1000 && n % 1\leftarrow \rhook

= 0){ //if bigger than 1000 or smaller than 200 \leftarrow \rhook and n is even

70 if(dbl_line[n]>0){71 power.push_back(dbl_line[n]);72 }else{73 power.push_back(0.000000001); //if negative \leftarrow \rhook

number74 }75 }76 }77 return power;78 }79 #endif /* grabData_h */

44

Page 45: Luminescent Solar Concentrator-Optimum Design Modelling-AKell59

References[1] First developed (2000) University of Southampton (ESA contract), maintained and

upgraded by QinetiQ and ESA, http://reat.space.qinetiq.com/gps

[2] Allison, J.; Amako, K.; Apostolakis, J.; Araujo, H.; Arce Dubois, P.; Asai, M.;Barrand, G.; Capra, R. et al. (2006). ”Geant4 developments and applications”.IEEE Transactions on Nuclear Science 53: 270. Bibcode:2006ITNS...53..270A.doi:10.1109/TNS.2006.869826

[3] Renewable Resource Data Center (RReDC) - NREL, Solar Spectral Irradi-ance: ASTM G-173, [online], 08-02-2014, Available from World Web Web:http://rredc.nrel.gov/solar/spectra/am1.5/ASTMG173/ASTMG173.html

[4] Sawilowsky, Shlomo S.; Fahoome, Gail C. (2003). Statistics via Monte Carlo Sim-ulation with Fortran. Rochester Hills, MI: JMASM.

[5] K. Amako (KEK). (2002). 9.1 Novice Example. Available:http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Examples/NoviceCodes.html Last accessed 21st March 2014.

[6] Mikhail Polyanskiy . (2008). Refractive Indexof PMMA (Acrylic Glass) [Plastics]. Available:http://http://refractiveindex.info/legacy/?group=PLASTICSmaterial=PMMA.Last accessed 21st Feb 2014.

[7] Scott Prahl. (2012). Rhodamine B. Available:http://omlc.ogi.edu/spectra/PhotochemCAD/html/009.html. Last Accessed12th March 2014

[8] Scott Prahl. (2012). Rhodamine B. Available:http://omlc.ogi.edu/spectra/PhotochemCAD/html/049.html. Last Accessed12th March 2014

[9] Makoto Asai. National Accelerator Laboratory. Scoring 2. Available:geant4.slac.stanford.edu/SLACTutorial09/Scoring2.pptx . Last Accessed:20/03/2014

[10] M Asai (SLAC). JST CREST/. Created: 17-19 Oct, 2007 @ RCNS. Avail-able: http://www-geant4.kek.jp/g4users/g4tut07/docs/SensitiveDetector.pdf. LastAccessed: 23/02/2014

45