-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateLayers.cpp
More file actions
executable file
·103 lines (85 loc) · 4.76 KB
/
Copy pathcreateLayers.cpp
File metadata and controls
executable file
·103 lines (85 loc) · 4.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#include "BPPE.h"
#include "Structure.h"
#include "createLayers.h"
#include "physicalConstants.h"
//double sampleLayerThickness = 1.4e-6;
int numLayersInSample = 1;
void generateLayers(MaterialDB& theMaterialDB, Structure& theStructure)
{
generatePlasmaTestMaterialsAndStructure(theMaterialDB, theStructure);
}
void generateLayerTestMaterialsAndStructure(MaterialDB &theMaterialDB, Structure &theStructure)
{
Material vacuum("Vacuum", n0_Vacuum, 0.0, 0.0, 0.0);
theMaterialDB.addMaterial(vacuum);
Material mat1("dieMat1", n0_Material1, n2_Material1, chi2_Material1, chi3_Material1);
theMaterialDB.addMaterial(mat1);
Material mat2("dieMat2", n0_Material2, n2_Material2, chi2_Material2, chi3_Material2);
theMaterialDB.addMaterial(mat2);
double aLayerThickness = 10*microns;
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), LHSsourceLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), aLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), RHSbufferLayerThickness, zStepMaterial1);
}
void generateApp1MaterialsAndStructure(MaterialDB &theMaterialDB, Structure &theStructure)
{
Material vacuum("Vacuum", n0_Vacuum, 0.0, 0.0, 0.0);
theMaterialDB.addMaterial(vacuum);
Material mat1("dieMat1", n0_Material1, n2_Material1, chi2_Material1, chi3_Material1);
theMaterialDB.addMaterial(mat1);
Material mat2("dieMat2", n0_Material2, n2_Material2, chi2_Material2, chi3_Material2);
theMaterialDB.addMaterial(mat2);
Material mat3("linMieMat3", n0_Material2, 0.0, 0.0, 0.0);
theMaterialDB.addMaterial(mat3);
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), LHSsourceLayerThickness, zStepMaterial1);
for (int i = 0; i < (numLayersInSample/2); i++)
{
//theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat1"), sampleLayerThickness, zStepMaterial1);
//theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), sampleLayerThickness, zStepMaterial1);
}
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), RHSbufferLayerThickness, zStepMaterial1);
}
void generateDefectMaterialsAndStructure(MaterialDB& theMaterialDB, Structure& theStructure)
{
Material vacuum("Vacuum", n0_Vacuum, 0.0, 0.0, 0.0);
theMaterialDB.addMaterial(vacuum);
Material mat1("dieMat1", n0_Material1, n2_Material1, chi2_Material1, chi3_Material1);
theMaterialDB.addMaterial(mat1);
Material mat2("dieMat2", n0_Material2, n2_Material2, chi2_Material2, chi3_Material2);
theMaterialDB.addMaterial(mat2);
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), LHSsourceLayerThickness, zStepMaterial1);
for (int i = 0; i < (numLayersInSample / 4); i++)
{
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat1"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), sampleLayerThickness, zStepMaterial1);
}
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat1"), sampleLayerThickness + sampleLayerThickness/3.0, zStepMaterial1);
for (int i = 0; i < (numLayersInSample / 4); i++)
{
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat2"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("dieMat1"), sampleLayerThickness, zStepMaterial1);
}
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), RHSbufferLayerThickness, zStepMaterial1);
}
void generatePlasmaTestMaterialsAndStructure(MaterialDB& theMaterialDB, Structure& theStructure)
{
double U_Ar = 15.759; // Ionization potential of Argon [eV]
cout << sampleLayerThickness << endl;
Material vacuum("Vacuum", 1.0, 0.0, 0.0, 0.0);
theMaterialDB.addMaterial(vacuum);
Material argon("Argon", n0_Argon, n2_Argon, chi2_Argon, chi3_Argon);
//argon.setAsPlasmaMaterial(2, mpi_sigmaK, mpi_k);
argon.setAsPlasmaMaterial(1, U_Ar);
theMaterialDB.addMaterial(argon);
Material plasmaMat("PlasmaMat", 1.0, 0.0, 0.0, 0.0);
//plasmaMat.setAsPlasmaMaterial(2, mpi_sigmaK, mpi_k);
plasmaMat.setAsPlasmaMaterial(1, U_Ar);
theMaterialDB.addMaterial(plasmaMat);
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), LHSsourceLayerThickness, zStepMaterial1);
//theStructure.addLayer(theMaterialDB.getMaterialByName("Argon"), sampleLayerThickness, zStepMaterial1);
//theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("PlasmaMat"), sampleLayerThickness, zStepMaterial1);
theStructure.addLayer(theMaterialDB.getMaterialByName("Vacuum"), RHSbufferLayerThickness, zStepMaterial1);
}