GithubHelp home page GithubHelp logo

tgolubev / drift-diffusion_models-cpp_matlab Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 6.0 28.06 MB

Solving the 1D, 2D, and 3D semiconductor Poisson-Drift-Diffusion equations with various approaches in C++ and Matlab

License: MIT License

MATLAB 55.25% M 0.22% QMake 0.40% Makefile 4.84% C++ 39.00% C 0.28%

drift-diffusion_models-cpp_matlab's Introduction

Drift-Diffusion_models

Here are 1D, 2D, and 3D models which solve the semiconductor Poisson-Drift-Diffusion equations using finite-differences. These models can be used to model most semiconductor devices. The "Two-charge-carriers" versions of the models currently solve for a solar cell under illumination. The "Single-charge-carrier" versions solve for the current-voltage curve of a material which only has holes as the free carrier and is under a varying applied voltage in the dark. All of the models can be modified to solve other systems (i.e. through changing the boundary conditions, adding recombination rates, and modifying the generation rate).

The equations are solved using the self-consistent iterative approach called the Gummel method. In order to ensure numerical stability for the continuity equations, Scharfetter Gummel discretization as well as linear mixing of old and new solutions is used. The 1D/Drift-Diffusion/Single-charge-carrier/src folder also contains an implementation using Slotboom variables, which is an alternative way to achieve stability without using Scharfetter Gummel discretization.


Requirements for C++ implementations: 1D version: A C++11 compiler. A make file for the g++ compiler is included as well as a .pro file which can be used for compiling through the IDE QT Creator. Also the input files: "parameters.inp" and "gen_rate.inp" (for the 2 carrier versions) need to be located in the same directory as the source code.

2D and 3D versions: In addition to a C++11 compiler and input files, the linear algebra library Eigen is needed. The library is composed of only header files, so no linking is necessary. One just needs to specify the directory of the library files in the include. Eigen can be downloaded at: http://eigen.tuxfamily.org/index.php?title=Main_Page Also include the openmp compiler flag to allow for Eigen to parallelize the matrix solving.


The Matlab implementations only require Matlab.


If you use this code in a scientific publication, I would appreciate citations to the following paper:

T. Golubev, D. Liu, R. Lunt, P. Duxbury. Understanding the impact of C60 at the interface of perovskite solar cells via drift-diffusion modeling. AIP Advances 9, 035026 (2019) https://aip.scitation.org/doi/full/10.1063/1.5068690

drift-diffusion_models-cpp_matlab's People

Contributors

tgolubev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drift-diffusion_models-cpp_matlab's Issues

Variable definition clarifications

I was hoping to get an update on a few variables which I didn't quite understand. I'm trying to understand the DD model, and the implementation of it, and this has been one of the most helpful codes so far, so I'm hoping to clarify what little I need from here itself.

In file SG_2carriers.m:

Lines 54 and 55: What exactly are p and n?
Line 66: Why increase tolerance for first 1st convergence?
Lines 95-96: I understand V is potential, I think; but what is bV?
Lines 100-102: What are Cp, Cn, and CV?
Lines 134-135: What are bn and bp? I can see they're related to electrons and holes, but I don't know how.

For now, this is as far into the code as I've gone. Any help with this would be greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.