Skip to content

Commit 886551c

Browse files
authored
Enhancement steady transport test (#85)
General: - Updated changelog to prepare for release of v1.0.0-rc.2 - Updated changelog to note all changes in this commit - Updated Doxygen docs - Updated .gitignore file to ignore packages directory created by MS Visual studio and files generated during testing - Updated KMC_Lattice to v2.1.0-beta.1 - Fixed error in parameters_default.txt where the exciton hopping and annihilation rate prefactors had the incorrect units - Updated README with additional information about the steady transport test feature and the DOS and DOOS data files it produces - Updated README with more information about the custom site energy import feature - Updated README with the current release status for the KMC_Lattice submodule, v2.1 - Updated Travis CI tests to run for 30 minutes without timing out instead of 20 minutes main: - Updated main to output equilibration energy and transport energy calculated both with and without including Coulomb potential - Added output of current density when running a steady transport test - Corrected bug where status output and logfile reset was only being performed when checking the error status - Removed output of the Fermi energy - Added output of the density of states and density of occupied states data calculated with and without Coulomb potential adjustments OSC_Sim class: - Added include statements for all features used to help document dependencies - Added new functions getSteadyEquilibrationEnergy_Coulomb and getSteadyTransportEnergy_Coulomb - Added several new private variables for calculating the steady transport test energies with Coulomb interactions - Fixed typo in documentation for the getSteadyTransportEnergy function - Refactored executePolaronHop function to make code more interpretable - Updated executePolaronHop function to calculate the absolute transport energy including the HOMO energy values - Updated executePolaronHop function to calculate the transport energy both with and without including the Coulomb potential - Updated executePolaronHop function to properly calculate the transport energy when polarons hop between donor and acceptor sites - Updated generateSteadyPolarons function to be able to create polarons on both donor and acceptor sites - Updated generateSteadyPolarons function to fill up the DOS accounting for changes to the site energies due to the Coulomb potential - Fixed bug in getPolaronIt function that can happen when comparing the value of an iterator to a different container iterator - Refactored getChargeExtractionMap function to replace usage of stringstream with addition of substrings - Fixed bug in getSteadyEquilibrationEnergy function that can cause rounding error due to integer math when double math is desired instead - Updated updateSteadyData function to calculate the absolute equilibration energy including the position of the HOMO and account for donor and acceptor site occupation and included separate calculation of the equilibration energy including the Coulomb potential - Added new getSteadyCurrentDensity function to output the average current density at steady state - Updated executePolaronHop to add to the transport energy calculation for every hop event and only after the equilibration phase is complete - Updated executePolaronHop transport energy calculation to correctly calculate the carrier velocity for each time step by also including hops moving against the electric field direction - Updated generateSteadyPolarons to give status output about how many polarons are created in the lattice for the steady transport test - Added new functions OSC_Sim::getSteadyDOOS, OSC_Sim::getSteadyDOOS_Coulomb, OSC_Sim::getSteadyDOS, and OSC_Sim::getSteadyDOS_Coulomb for getting density of states data - Removed getSteadyFermiEnergy function - Updated getSteadyTransportEnergy and getSteadyTransportEnergy_Coulomb functions to allow calculation when the sum of weight is negative - Updated outputStatus function to give the status of the steady state charge transport test - Updated updateSteadyData function to output a command line message when the equilibration phase completes - Updated updateSteadyData function to periodically sample the DOOS and DOS - Added updateSteadyDOS function that uses the input energy of a given site to update the input density of states data - Updated class to store the site type internally as a char instead of short to save memory - Added several private member variables OSC_Sim used by the steady transport test to calculate the DOOS and DOS: Steady_hops_per_DOS_sample, Steady_hops_per_DOOS_sample, and DOS_bin_size - Updated generateSteadyPolarons function to prevent comparison between singed and unsigned integers - Updated executePolaronHop function to calculate the transport energy using the displacement as weights instead of the velocity and corrected the displacement for hops across the periodic boundary - Updated generateSteadyPolarons to remove unnecessary check comparing the number of polarons to be created and the number of sites (N_polarons scales with lattice size and should never be greater than the number of sites) - Added new exportEnergies overloaded function that allows the user to output the absolute site energies for electrons or holes Parameters class: - Updated checkParameters function to lower the limit for the smallest internal potential that one can use to allow very low field simulations - Added member variable Enable_steady_data_output that is set to true by default tests: - Updated SteadyTransportTests to test for the absolute energies including the position of the HOMO energy and added new tests comparing the energies with and without Coulomb interactions - Adjusted SteadyTranportTests threshold for energy tests without disorder - Updated SteadyTransportTest to reduce the test lattice size to decrease computing time needed to create the initial polarons, but increased the number of polarons so that there are still enough polarons in the lattice to get good statistics - Updated all test cases to output a simple status message to the command line at the beginning of each test case - Updated SteadyTransportTests to check that phase restriction disabling increases the number of available sites for creating the initial polarons in donor-acceptor blends - Updated SteadyTransportTests to remove checks of the Fermi energy - Updated SteadyTransportTests very low field test to make it more accurate and a little bit faster by decreasing the internal potential, lattice size, and Coulomb cutoff radius - Added new test to SteadyTransportTests to check the peak position of the DOS and DOOS from the very low field test - Added new test to SteadyTransportTests to check the transport energy during medium electric field test condition - Updated all tests to route command line output to a test_log.txt file instead of cluttering the command line making it easier to see the test results - Updated SteadyTransportTests peak position finding algorithm by specifying the data type instead of using auto to prevent compiler error on GCC - Updated SteadyTransportTests medium field test by increasing the disorder to make it easier to distinguish the equilibration and transport energies - Updated ExcitonDynamicsTests transient range for checking the equilibration energy of the excitons to get a more accurate estimate - Updated SteadyTransportTests by adding a new test to check the relative position of the transport energy and donor HOMO during the medium field test -Updated SteadyTransportTest by adding a test to check the absolute position of the transport energy following the medium field test and shortening the number of iterations in the medium field test - Updated SteadyTransportTests by adding a new test for transport in a random donor-acceptor blend and checking the expected shift in the transport energy -Added tests of the new exportEnergies function checking the absolute value of the exported electron and hole site energies - Updated LoggingTests by adjusting simulation parameters to promote additional mechanisms including RISC and exciton recombination - Updated SteadyTransportTests by adding a test showing that the simulation works with phase restriction enabled, and adjusting the mobility test to increase the test accuracy, adding a new test for the current density, and adding new tests for DOS and DOOS data with Coulomb potential - Updated ToFTests by adding a test of the hole extraction map output - Updated SteadyTransportTests by adding tests for transport and equilibration energies with Coulomb potential when the steady transport test has not been run - Updated SteadyTransportTests by reducing the number of test iterations for the mobility test to reduce test time
1 parent 71d90c0 commit 886551c

File tree

71 files changed

+1695
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1695
-751
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@
3333
.vs*
3434
x64*
3535
*.sln
36+
packages*
37+
test/energies.txt
38+
test/log.txt
39+
test/parameters_misspell*
40+
test/status.txt
41+
test/test_log.txt

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ before_install:
4343

4444
script:
4545
- make -j10 $TARGET
46-
- travis_wait ./test/Excimontec_tests.exe
46+
- travis_wait 30 ./test/Excimontec_tests.exe
4747
- if [[ "$TARGET" = test_coverage ]]; then coveralls --include src --exclude "googletest/*" --gcov-options '\-lp'; fi
4848
- if [[ "$TARGET" = test ]]; then make -j10 && mpiexec -n 4 ./Excimontec.exe parameters_default.txt; fi

CHANGELOG.md

+75-5
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
--------------------------------------------------------------------------------------------------------------------------------
88

9-
## [Unreleased]
9+
## [v1.0.0-rc.2]- 2019-02-09 - Steady State Charge Transport Test Update
1010

1111
### Added
12-
- .gitignore - Numerous ignore statements to ignore files generated during build operations and from Microsoft Visual Studio
12+
- .gitignore - Numerous ignore statements to ignore files generated during build and test operations and from Microsoft Visual Studio
1313
- CHANGELOG.md - Notes about all changes in this release
1414
- docs - KMC_Lattice documentation
15+
- docs - Documentation of new functions in the OSC_Sim class
1516
- Exciton - Project name (Excimontec) to header guards
17+
- main.cpp - Output of equilibration energy and transport energy both with and without including the Coulomb potential when running a steady transport test
18+
- main.cpp - Output the current density when running a steady transport test
19+
- main.cpp - Output the density of states and density of occupied states data calculated with and without Coulomb potential adjustments
1620
- OSC_Sim - Project name (Excimontec) to header guards
1721
- OSC_Sim - Public function and member variable documentation
1822
- OSC_Sim (getSiteEnergy) - Checking of the input coordinates validity and generating error if invalid
1923
- OSC_Sim (getSiteType) - Checking of the input coordinates validity and generating error if invalid
24+
- OSC_Sim - include statements for all used components to better document class dependencies
25+
- OSC_Sim (getSteadyCurrentDensity) - New function that returns the average current density from the steady state transport test
26+
- OSC_Sim (getSteadyEquilibrationEnergy_Coulomb) - New function to return the equilibration energy calculated including the Coulomb potential
27+
- OSC_Sim (getSteadyTransportEnergy_Coulomb) - New function to return the transport energy calculated including the Coulomb potential
28+
- OSC_Sim (Steady_equilibration_energy_sum_Coulomb) - New private member variable for calculating the equilibration energy including the Coulomb potential
29+
- OSC_Sim (Transport_energy_weighted_sum_Coulomb) - New private member variable for storing the data used to calculate the transport energy including the Coulomb potential
30+
- OSC_Sim (Steady_hops_per_DOS_sample) - New private member variable for calculating the DOS during the steady transport test
31+
- OSC_Sim (Steady_hops_per_DOOS_sample) - New private member variable for calculating the DOOS during the steady transport test
32+
- OSC_Sim (DOS_bin_size) - New private member variable for calculating the DOOS and DOS during the steady transport test
33+
- OSC_Sim (executePolaronHop) - Calculation of the transport energy including the Coulomb potential
34+
- OSC_Sim (exportEnergies) - New overloaded function allowing the user to output the absolute site energies for electrons or holes
35+
- OSC_Sim (generateSteadyPolarons) - Simpler creation of polarons on random sites when energetic disorder is disabled
36+
- OSC_Sim (generateSteadyPolarons) - Status output about how many polarons are created in the lattice for the steady transport test
37+
- OSC_Sim (generateSteadyPolarons) - Allow creation of polarons on acceptor sites
38+
- OSC_Sim (getSteadyDOOS) - New function for getting density of occupied states data
39+
- OSC_Sim (getSteadyDOOS_Coulomb) - New function for getting density of occupied states data
40+
- OSC_Sim (getSteadyDOS) - New function for getting density of states data
41+
- OSC_Sim (getSteadyDOS_Coulomb) - New function for getting density of states data
42+
- OSC_Sim (getSteadyTransportEnergy) - Function now allows calculation when the sum of weights is negative
43+
- OSC_Sim (getSteadyTransportEnergy_Coulomb) - Function now allows calculation when the sum of weights is negative
44+
- OSC_Sim (outputStatus) - Status output for the steady state charge transport test
45+
- OSC_Sim (updateSteadyData) - Calculation of the equilibration energy including the Coulomb potential
46+
- OSC_Sim (updateSteadyData) - Periodic sampling of the DOOS and DOS
47+
- OSC_Sim (updateSteadyDOS) - New function that uses the input energy of a given site to update the input density of states data
2048
- Parameters - Project name (Excimontec) to header guards
2149
- Parameters - Public function and member variable documentation
50+
- Parameters (Enable_steady_data_output) - New member variable that is set to true by default but could be used in the future to disable DOS data output
2251
- Polaron - Project name (Excimontec) to header guards
2352
- Polaron - Public function and member variable documentation
2453
- README.md - Build instructions link for Windows users
54+
- README.md - Information about new DOS and DOOS data files generated during the steady transport test
55+
- README.md - Examples about what the custom site energies import feature can be used for.
56+
- test.cpp - Added a simple command line status message at the beginning of all test cases
57+
- test.cpp (SteadyTransportTests) - Tests checking the output of the transport and equilibration energies when the steady transport test has not been run
58+
- test.cpp (SteadyTransportTests) - Tests comparing the energies calculated with and without Coulomb interactions and relative positions of the equilibration and transport energies
59+
- test.cpp - (SteadyTransportTests) - Test to check that phase restriction disabling increases the number of available sites for creating the initial polarons in donor-acceptor blends
60+
- test.cpp - (SteadyTransportTests) - Tests to check the peak position of the DOS and DOOS data from the very low field test
61+
- test.cpp (SteadyTransportTests) - Tests to check the transport energy calculated during a medium electric field test condition
62+
- test.cpp (SteadyTransportTests) - Test to check the relative position of the transport energy and the donor HOMO during the medium electric field test
63+
- test.cpp (SteadyTransportTests) - Test to check the absolute position of the transport energy
64+
- test.cpp (SteadyTransportTests) - Test for transport in a random donor-acceptor blend and check for the relative change in transport energy position relative to the neat donor architecture
65+
- test.cpp (SteadyTransportTests) - Test checking that the simulation works when phase restriction in enabled with a random blend
66+
- test.cpp (SteadyTransportTests) - Test checking the magnitude of the current density
67+
- test.cpp (ToFTests) - Test checking the hole extraction map output
2568

2669
### Changed
27-
- KMC_Lattice - KMC_Lattice submodule to latest version (v2.0.0-rc.2)
70+
- KMC_Lattice - KMC_Lattice submodule to v2.1.0-beta.1
2871
- Many files - Copyright statement years to 2017-2019
2972
- docs - Updated docs using Doxygen v1.8.15
3073
- Doxyfile - Project version number to v1.0.0
@@ -34,29 +77,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3477
- Exciton - Revised documentation for public functions and member variables
3578
- main.cpp - Version string to v1.0.0-rc.2 in preparation for next release
3679
- OSC_Sim - Functions to use new object event class nesting format
80+
- OSC_Sim (Site_OSC) - Store the site type internally as a char instead of short to save memory
3781
- OSC_Sim (generateExciton) - Moved definition of default tag value to the header file function declaration statement
3882
- OSC_Sim (generateExciton) - Implemented the new Exciton constructor where one must specify the spin state
3983
- OSC_Sim - Nested derived Site class (Site_OSC) into the OSC_Sim class as a private class
4084
- OSC_Sim (calculateDOSCorrelation) - Scope of the two functions from public to private
85+
- OSC_Sim (executePolaronHop) - Refactored function and using temporary local variables to make code more readable
86+
- OSC_Sim (executePolaronHop) - Calculation of the transport energy to absolute value that includes the HOMO energy and accounts for donor and acceptor site occupation
87+
- OSC_Sim (executePolaronHop) - Calculation of the transport energy is only performed after the equilibration phase is complete
88+
- OSC_Sim (executePolaronHop) - Calculation of the transport energy is is done using the displacement as the weights instead of the velocity
89+
- OSC_Sim (getChargeExtractionMap) - Refactored code replacing usage of stringstream with addition of substrings
90+
- OSC_Sim (updateSteadyData) - Calculation of equilibration energy to absolute value that includes the HOMO energy and accounts for donor and acceptor site occupation
91+
- Parameters (checkParameters) - Lower the limit for the smallest internal potential that one can during a steady transport simulation to allow very low field simulations
4192
- parameters_default.txt - Default morphology file format to not include the compression specifier suffix
4293
- Polaron - Nested derived Polaron event classes into the Polaron class
4394
- README.md - Replaced version badges with text links
95+
- README.md - Updated description of steady transport test feature
96+
- README.md - Updated current release status info for KMC_Lattice to v2.1
97+
- test.cpp - All tests to route command line output to a test_log.txt file instead of cluttering the command line making it easier to see the test results
98+
- test.cpp (EnergiesImportTests) - Tests of the new exportEnergies function checking the absolute value of the exported electron and hole site energies
99+
- test.cpp (ExcitonDynamicsTests) - Increased the range of the transient to get a more accurate assessment of the equilibrium energy position
100+
- test.cpp (LoggingTests) - Adjusted parameters to promote additional mechanisms to occur including RISC and exciton recombination
101+
- test.cpp (SteadyTransportTests) - Test of the energy values to compare to absolute energy values including the HOMO energy
102+
- test.cpp (SteadyTransportTests) - Very low field test to make it more accurate and a little bit faster by decreasing the internal potential, lattice size, and Coulomb cutoff radius
103+
- test.cpp (SteadyTransportTests) - Medium field test by reducing the number of iterations to make the test faster
104+
- test.cpp (SteadyTransportTests) - Adjusted parameters of the no disorder mobility test to decrease the test time
44105

45106
### Removed
46107
- docs - Markdown files from the generated documentation
47-
- test.cpp - Corrected several spelling errors in the test comments
108+
- main.cpp - Output of the Fermi energy during the steady state charge transport test
109+
- OSC_Sim (Steady_Fermi_energy) - private member variable that is no longer used
110+
- OSC_Sim (getSteadyFermiEnergy) - Fermi energy is no longer calculated and DOOS and DOS data is output instead
111+
- test.cpp (SteadyTransportTests) - Tests of the Fermi energy
48112

49113
### Fixed
50114
- CHANGELOG.md - Several spelling mistakes in previous release sections
51115
- main.cpp - Spelling mistake in the results output of steady transport test
52116
- main.cpp - Label error in the results output of the time-of-flight charge transport test, current should have been current density
117+
- main.cpp - Bug bug where status output and logfile reset was only being performed when checking the error status
53118
- OSC_Sim (calculateCoulomb) - Specified input parameter namespaces to avoid Doxygen confusion between the header declaration and source file definition
54119
- OSC_Sim (createExciton) - Specified input parameter namespaces to avoid Doxygen confusion between the header declaration and source file definition
55120
- OSC_Sim (calculatePolaronEvents) - Spelling mistake in error message
56121
- OSC_Sim (reassignSiteEnergies) - Spelling mistake in error message
122+
- OSC_Sim (executePolaronHop) - Transport energy calculation to correctly account for hops across the periodic boundary when calculating the displacement
123+
- OSC_Sim (getSteadyTransportEnergy) - Spelling mistake in the function documentation
124+
- OSC_Sim (getPolaronIt) - Bug that could occur when comparing a list iterator to an iterator from a different list
125+
- OSC_Sim (getSteadyEquilibrationEnergy) - Bug that could cause rounding error due to integer division
57126
- Parameters (checkParameters) - Spelling mistakes in error messages
58127
- Parameters (importParameters) - Spelling mistakes in error messages
59-
- test.cpp - Fixed spelling mistakes in the test comments
128+
- parameters_default.txt - Incorrect units for the exciton hopping and annihilation rate prefactors
129+
- test.cpp - Spelling mistakes in the test comments
60130

61131
## [v1.0.0-rc.1]- 2018-12-11 - Interfacial Energy Shift, Site Energy Import, and Steady State Transport Test Update
62132

KMC_Lattice

Submodule KMC_Lattice updated 85 files

README.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ If you would like to contribute to the development of this project, please see t
2020
- Adjustable periodic boundary conditions in all three directions allow users to perform 1D, 2D, or 3D simulations.
2121
- Choose between several film architectures, including a neat film, bilayer film, or random blend film.
2222
- Import bulk heterojunction morphologies generated by [Ising_OPV](https://github.com/MikeHeiber/Ising_OPV) v3.2 and v4.
23-
- Donor and acceptor materials can take on an uncorrelated Gaussian DOS, a correlated Gaussian DOS with different correlation functions, or an uncorrelated exponential DOS model.
23+
- Donor and acceptor materials can take on an uncorrelated Gaussian density of states, a correlated Gaussian density of states with different correlation functions, or an uncorrelated exponential density of states model.
2424
- Site energies at the donor-acceptor interface or in mixed regions can be modified using an interfacial energy shift model to generate an energy cascade.
25-
- Custom site energies can also be imported from a text file.
25+
- Custom site energies can also be imported from a text file to allow more exotic DOS distributions or implement the electrostatic potential due to fixed ionic dopants.
2626
- Dynamics test simulations can be performed to generate exciton and charge carrier density transients that can be used to model exciton dissociation, charge carrier separation, and charge carrier recombination kinetics.
2727
- Time-of-flight charge transport simulations of electrons or holes can be performed on neat, random blend, or bulk heterojunction blend films.
28-
- Steady state charge transport simulations of electrons or holes can be performed on neat, random blend, or bulk heterojunction blends films with 3D periodic boundaries to estimate quasi-equilibrium properties including the steady state mobility, transport energy, and equilibration energy under different test conditions.
28+
- Steady state charge transport simulations of holes can be performed on neat, random blend, or bulk heterojunction blends films with 3D periodic boundaries to estimate quasi-equilibrium properties including the steady state mobility, transport energy, and equilibration energy under different test conditions. Output of density of states and density of occupied states data can also be used to calculate the Fermi energy. The Fermi energy and transport energy can then be used to calculate the Seebeck coefficient to investigate thermoelectric properties.
2929
- Exciton diffusion simulations can be performed on any film architecture.
3030
- Internal quantum efficiency simulations can be performed on bilayer, random blend, or bulk heterojunction blend films.
3131
- Simulate complex exciton dynamics with events for intersystem crossing between singlet and triplet states as well as exciton-exciton and exciton-polaron annihilation events.
@@ -35,7 +35,7 @@ If you would like to contribute to the development of this project, please see t
3535

3636
## Current Status
3737

38-
The current release, [Excimontec v1.0.0-rc.2](https://github.com/MikeHeiber/Excimontec/releases), is built with [KMC_Lattice v2.0.0-rc.2](https://github.com/MikeHeiber/KMC_Lattice/releases) and allows the user to perform several simulation tests relevant for OPV and OLED devices.
38+
The current release, [Excimontec v1.0.0-rc.2](https://github.com/MikeHeiber/Excimontec/releases), is built with [KMC_Lattice v2.1](https://github.com/MikeHeiber/KMC_Lattice/releases) and allows the user to perform several simulation tests relevant for OPV and OLED devices.
3939
All features that are to be included in v1.0 are now implemented and have undergone significant testing.
4040
However, there may still be bugs that need to be fixed, so please report any bugs or submit feature requests in the [Issues](https://github.com/MikeHeiber/Excimontec/issues) section.
4141
Please see the [Changelog](CHANGELOG.md) for a detailed listing of previous and upcoming changes.
@@ -140,6 +140,10 @@ Excimontec will create a number of different output files depending which test i
140140
- ToF_results.txt -- When performing a time-of-flight charge transport test, the resulting quantitative results are put into this parsable delimited results file.
141141
- Charge_extraction_map#.txt -- When performing a time-of-flight or IQE test, the x-y locations where charges are extracted from the lattice are saving into this map file.
142142
- DOS_correlation_data#.txt -- When a correlated density of states model is enabled, data showing the statistical correlation of site energies vs. distance is output into this file.
143+
- DOS_data.txt - When performing a steady state charge transport test, the density of states distribution is calculated and output to this file.
144+
- DOS_Coulomb_data.txt - When performing a steady state charge transport test, the density of states distribution, where the site energies include the Coulomb potential from the polarons, is calculated and output to this file.
145+
- DOOS_data.txt - When performing a steady state charge transport test, the density of occupied states distribution is calculated and output to this file.
146+
- DOOS_Coulomb_data.txt - When performing a steady state charge transport test, the density of occupied states distribution, where the site energies include the Coulomb potential from the polarons, is calculated and output to this file.
143147

144148
#### Data Analysis
145149

0 commit comments

Comments
 (0)