287 simulationType (
"transistor"),
294 coulombCarriers (false),
295 coulombGaussianSigma (0.0),
305 outputIdsOnDelete (false),
308 outputChkTrapPotential (false),
309 outputPotential (false),
312 imageDefects (false),
316 iterationsPrint (10),
317 iterationsReal (1000),
318 outputPrecision (15),
322 electronPercentage (0.01),
323 holePercentage (0.00),
325 defectPercentage (0.00),
326 trapPercentage (0.00),
327 trapPotential (0.10),
328 gaussianStdev (0.00),
329 seedPercentage (1.0),
333 excitonBinding (0.00),
334 temperatureKelvin (300.0),
341 generationRate (0.001),
342 balanceCharges (false),
355 openclThreshold (256),
358 boltzmannConstant (1.3806504e-23),
359 dielectricConstant (3.5),
360 elementaryCharge (1.60217646e-19),
361 permittivitySpace (8.854187817e-12),
363 electrostaticCutoff (50),
364 electrostaticPrefactor (0),
368 simulationStart (QDateTime::currentDateTime()),
371 sourceMetropolis (false),
372 sourceCoulomb (false),
373 recombinationRate (0.00),
374 recombinationRange (0),
375 outputIdsOnEncounter (false),
376 sourceScaleArea (65536),
397 if (!(QStringList()<<
"transistor"<<
"solarcell").contains(par.
simulationType))
399 qFatal(
"langmuir: simulation.type(%s) must be transistor or solarcell",qPrintable(par.
simulationType));
405 qFatal(
"langmuir: grid.x(%d) >= 1",par.
gridX);
409 qFatal(
"langmuir: grid.y(%d) >= 1",par.
gridY);
413 qFatal(
"langmuir: grid.z(%d) >= 1",par.
gridZ);
438 qFatal(
"langmuir: hole.pecentage(%f) < 0 || > 1.0",par.
holePercentage);
448 qFatal(
"langmuir: trap.pecentage(%f) < 0 || > 1.0",par.
trapPercentage);
453 qFatal(
"langmuir: seed.pecentage(%f) < 0 || > 1.0",par.
seedPercentage);
463 qFatal(
"langmuir: source.rate(%f) < 0 || > 1.0",par.
sourceRate);
470 qFatal(
"langmuir: e.source.l.rate(%f) < 0 || > 1.0", par.
eSourceLRate);
478 qFatal(
"langmuir: e.source.r.rate(%f) < 0 || > 1.0", par.
eSourceRRate);
486 qFatal(
"langmuir: h.source.l.rate(%f) < 0 || > 1.0", par.
hSourceLRate);
494 qFatal(
"langmuir: h.source.r.rate(%f) < 0 || > 1.0", par.
hSourceRRate);
502 qFatal(
"langmuir: x.source.rate(%f) < 0 || > 1.0", par.
generationRate);
508 qFatal(
"langmuir: drain.rate(%f) < 0 || > 1.0",par.
drainRate);
515 qFatal(
"langmuir: e.drain.l.rate(%f) < 0 || > 1.0", par.
eDrainLRate);
523 qFatal(
"langmuir: e.drain.r.rate(%f) < 0 || > 1.0", par.
eDrainRRate);
531 qFatal(
"langmuir: h.drain.l.rate(%f) < 0 || > 1.0", par.
hDrainLRate);
539 qFatal(
"langmuir: h.drain.r.rate(%f) < 0 || > 1.0", par.
hDrainRRate);
545 qFatal(
"langmuir: seed.charges(%f) < 0 || > 1.0",par.
seedCharges);
551 qFatal(
"langmuir: gaussian.stdev < 0.0");
555 qFatal(
"langmuir: temperature.kelvin < 0.0");
560 qFatal(
"langmuir: defects.charge != 0 && coulomb.carriers = false");
565 qFatal(
"langmuir: hopping.range(%d) < 0 || > 2",par.
hoppingRange);
572 qFatal(
"langmuir: source.metropolis = false, yet source.coulomb = true");
583 qFatal(
"langmuir: recombination.rate(%f) > 0, yet simulation.type != solarcell",par.
recombinationRate);
588 qFatal(
"langmuir: recombination.rate(%f) > 0, yet electron.percentage = %.5f and hole.percentage = %.5f",
594 qFatal(
"langmuir: output.ids.on.encounter == true, yet simulation.type != solarcell");
599 qFatal(
"langmuir: output.ids.on.encounter == true, yet electron.percentage = %.5f and hole.percentage = %.5f",
605 qFatal(
"langmuir: output.xyz > 0, yet output.xyz.e && output.xyz.h && output.xyz.d && output.xyz.t are all false");
611 qFatal(
"langmuir: output.xyz.mode must be 0 or 1");
616 qFatal(
"langmuir: opencl.threshold must be >= 0");
621 qFatal(
"langmuir: opencl.device.id must be >= 0");
626 qFatal(
"langmuir: balance.charges == true, yet simulation.type != solarcell");
633 qFatal(
"langmuir: coulomb.gaussian.sigma > 0, yet the simulation is not 3D");
638 qDebug(
"langmuir: 3 * coulomb.gaussian.sigma <= qMin(grid.x, grid.y, grid.z)");
644 qFatal(
"langmuir: output.ids.on.encouter is deprecated");
650 #endif // PARAMETERS_H
qreal recombinationRate
the rate at which holes and electrons can combine when they sit upon one another
Definition: parameters.h:271
qreal slopeZ
slope of potential along z direction when there are multiple layers (as if there were a gate electrod...
Definition: parameters.h:262
bool outputXyzH
output holes in trajectory file (ignored if outputXyz is off)
Definition: parameters.h:79
void checkSimulationParameters(SimulationParameters &par)
check the parameters, making sure they are valid
Definition: parameters.h:393
bool outputChkTrapPotential
output trap potentials in checkpoint files
Definition: parameters.h:100
bool outputIdsOnEncounter
output carrier lifetime and pathlength when holes and electrons encounter one another ...
Definition: parameters.h:277
qreal drainRate
the rate at which all drains accept charges (default, used when eDrainL, etc. are < 0) ...
Definition: parameters.h:190
qint32 iterationsPrint
if Langmuir, how often to output; if LangmuirView, how many steps between rendering ...
Definition: parameters.h:118
qint32 gridY
the number of sites along the device width, at least one
Definition: parameters.h:58
qreal eSourceRRate
the rate at which the right electron source injects charges (overrides default)
Definition: parameters.h:175
qint32 workSize
the size of OpenCL 1DRange kernel work groups
Definition: parameters.h:217
qreal permittivitySpace
physical constant, the permittivity of free spece
Definition: parameters.h:235
qreal electronPercentage
the percent of the grid that is reserved for electrons, between 0 and 1
Definition: parameters.h:133
qreal eDrainRRate
the rate at which the right electron drain accepts charges (overrides default)
Definition: parameters.h:196
qreal eDrainLRate
the rate at which the left electron drain accepts charges (overrides default)
Definition: parameters.h:193
qreal boltzmannConstant
physical constant, the boltzmann constant
Definition: parameters.h:226
qreal temperatureKelvin
the temperature used in the boltzmann factor
Definition: parameters.h:166
qint32 iterationsReal
number of simulation steps after equilibration
Definition: parameters.h:121
qint32 openclDeviceID
the device to choose if there are multiple
Definition: parameters.h:223
QList< qreal > trapPotentials
a list of current traps site IDs
Definition: parameters.h:29
bool okCL
if true, OpenCL can be used on this platform
Definition: parameters.h:250
QList< qint32 > defects
a list of current defects site IDs
Definition: parameters.h:23
bool coulombCarriers
turn on Coulomb interactions between ChargeAgents
Definition: parameters.h:64
qreal hDrainLRate
the rate at which the left hole drain accepts charges (overrides default)
Definition: parameters.h:199
qint32 gridX
the number of sites along the device length, at least one
Definition: parameters.h:61
qint32 gridZ
the number of sites per layer, at least one
Definition: parameters.h:55
qreal electrostaticPrefactor
a compilation of physical constants
Definition: parameters.h:244
qreal trapPercentage
the percent of the grid that is reserved for traps, between 0 and 1
Definition: parameters.h:145
qint32 outputXyzMode
output mode for xyz file (if 0, particle count varies; if 1, particle count is constant using "phanto...
Definition: parameters.h:88
qint32 workX
the x size of OpenCL 3DRange kernel work groups - only needed if using SimulationParameters::outputCo...
Definition: parameters.h:208
qint32 outputStepChk
output a checkpoint file every this * iterationsPrint
Definition: parameters.h:97
QList< qint32 > traps
a list of current traps site IDs
Definition: parameters.h:26
bool outputIsOn
if false, produce no output (useful for LangmuirView)
Definition: parameters.h:106
qreal sourceScaleArea
for SimulationParameters::simulationType == "solarcell", multiply SimulationParameters::sourceRate by...
Definition: parameters.h:280
bool imageDefects
output images of defects
Definition: parameters.h:109
qreal gridFactor
size constant, the size associated with grid sites (~1nm)
Definition: parameters.h:238
bool outputXyzT
output traps in trajectory file (ignored if outputXyz is off)
Definition: parameters.h:85
qint32 outputCoulomb
output coulomb energy for the entire grid (if n < 0, only at the end; if n == 0, never; if n > 0...
Definition: parameters.h:94
qint32 workY
the y size of OpenCL 3DRange kernel work groups - only needed if using SimulationParameters::outputCo...
Definition: parameters.h:211
qint32 workZ
the z size of OpenCL 3DRange kernel work groups - only needed if using SimulationParameters::outputCo...
Definition: parameters.h:214
qreal hSourceLRate
the rate at which the left hole source injects charges (overrides default)
Definition: parameters.h:178
QDateTime simulationStart
the time this simulation started
Definition: parameters.h:256
qint32 recombinationRange
the number of sites to consider when performing recombinations (0 means same-site, 1 means one-site away and same-site)
Definition: parameters.h:274
bool outputPotential
output grid potential at the start of the simulation, includes the trap potential ...
Definition: parameters.h:103
qreal voltageLeft
the potential on the left side of the grid, used in setting up an electric field
Definition: parameters.h:160
qreal dielectricConstant
physical constant, the dielectic constant
Definition: parameters.h:229
bool outputXyzE
output electrons in trajectory file (ignored if outputXyz is off)
Definition: parameters.h:76
qint32 electrostaticCutoff
the cut off for Coulomb interations
Definition: parameters.h:241
QString outputStub
the stub to use when naming output files
Definition: parameters.h:130
qreal sourceRate
the rate at which all sources inject charges
Definition: parameters.h:169
qreal defectPercentage
the percent of the grid that is reserved for electrons, between 0 and 1
Definition: parameters.h:142
qreal excitonBinding
the energy change (eV) when a hole/electron pair goes from the same site to adjacent sites ...
Definition: parameters.h:163
A struct to temporarily store site IDs.
Definition: parameters.h:14
qint32 outputWidth
width of columns in output, ignored in certain files, like trajectory files
Definition: parameters.h:127
qreal gaussianStdev
the standard deviation of trap sites
Definition: parameters.h:151
quint32 currentStep
the current step of the simulation
Definition: parameters.h:253
qreal hSourceRRate
the rate at which the right hole source injects charges (overrides default)
Definition: parameters.h:181
A struct to store all simulation options.
Definition: parameters.h:46
qreal seedPercentage
the percent of the traps to be placed and grown upon to form islands
Definition: parameters.h:154
bool sourceMetropolis
if true, use an energy change (source potential and site) and metropolis criterion to calculate injec...
Definition: parameters.h:265
qreal generationRate
the rate at which the exciton source injects charges (overrides default)
Definition: parameters.h:184
qreal holePercentage
the percent of the grid that is reserved for holes, between 0 and 1
Definition: parameters.h:136
qreal coulombGaussianSigma
multiply Coulomb terms by erf[r/(sigma sqrt[2])]; nothing happens if its zero
Definition: parameters.h:67
qint32 imageCarriers
output images of carriers (if n < 0, only at the end; if n == 0, never; if n > 0, every n * iteration...
Definition: parameters.h:115
qreal elementaryCharge
physical constant, the elementary charge
Definition: parameters.h:232
QList< quint64 > fluxInfo
a list of flux attempt, success values
Definition: parameters.h:32
quint64 randomSeed
seed the random number generator, if negative, uses the current time (making seperate runs random) ...
Definition: parameters.h:52
qint32 defectsCharge
the charge of defect sites
Definition: parameters.h:70
bool imageTraps
output images of defects
Definition: parameters.h:112
qint32 outputXyz
output trajectory file (if n < 0, only at the end; if n == 0, never; if n > 0, every n * iterations...
Definition: parameters.h:73
qreal hDrainRRate
the rate at which the right hole drain accepts charges (overrides default)
Definition: parameters.h:202
qint32 outputPrecision
number of significant figures used for doubles in output
Definition: parameters.h:124
qreal seedCharges
if true, place charges randomly before the simulation starts
Definition: parameters.h:139
bool balanceCharges
if true, try to keep the number of charges in the simulation balanced
Definition: parameters.h:187
bool outputXyzD
output defects in trajectory file (ignored if outputXyz is off)
Definition: parameters.h:82
qint32 openclThreshold
the minimum number of charges that must be present to use OpenCL
Definition: parameters.h:220
qint32 hoppingRange
the number of sites away from a given site used when calculating neighboring sites ...
Definition: parameters.h:259
QString simulationType
tells Langmuir how to set up the sources and drains
Definition: parameters.h:49
qint32 maxThreads
max threads allowed for QThreadPool - if its <= 0 then the QThread::idealThreadCount is used; note th...
Definition: parameters.h:283
bool outputIdsOnDelete
output carrier lifetime and pathlength when they are deleted
Definition: parameters.h:91
qreal voltageRight
the potential on the right side of the grid, used in setting up an electric field ...
Definition: parameters.h:157
bool sourceCoulomb
if true, use the Coulomb + Image interaction when calcualting energy change for injection ...
Definition: parameters.h:268
SimulationParameters()
Definition: parameters.h:285
qreal inverseKT
a compilation of physical constants
Definition: parameters.h:247
bool useOpenCL
if true, try to use OpenCL to speed up Coulomb interaction calculations
Definition: parameters.h:205
void setCalculatedValues(SimulationParameters &par)
sets parameters that depend upon other parameters
Definition: parameters.h:384
qreal eSourceLRate
the rate at which the left electron source injects charges (overrides default)
Definition: parameters.h:172
QList< qint32 > holes
a list of current holes site IDs
Definition: parameters.h:20
QList< qint32 > electrons
a list of current electron site IDs
Definition: parameters.h:17
qreal trapPotential
the potential of traps
Definition: parameters.h:148