Krzysztof Kłos
July 5, 2017
This is the R package which ties model of bandgap(Eg) and strain vs x (Ga) and Y(As) molar fractions in InGaAsP material. The model is based on paper:
J. Minch, S.H. Park, T. Keating, and S.L. Chuang: "Theory and Experiment if InGaAsP and AlInGaAs Long Wavelength Strained Quantum-Well Lasers" from Journal of Quantum Electronics vol 35, NO. 5, May 1999
The model allows to transform Eg, Strain into molar fractions x(Ga), and y(As) and back:
The intention behind this was to exercise good coding practices in R:
- creating R packages
- documenting with Roxygen2 package
- writing unit tests with TestThat package
- using Rcpp for speed of C++
- using Boost C++ library
- writing R markdown documents
- continous integration principle with GitHub and Travis(Linux only)
Type the commands below in R or RStudio:
install.packages("devtools")
devtools::install_github("krzyklo/ingaasp2rcpp")
The package location on GitHub: https://github.com/krzyklo/ingaasp2rcpp.
InGaAsP calculator as simple web application written in Shiny - web application framework for R:
https://krzyklo.shinyapps.io/ingaasp/
The figures below shows digitized data (circles) and InGaAsP calculator results (lines) for
The plot above shows the relation between bandgap Eg and strain of various InGaAsP composition variants.
It was created by fixing x or y molar fractions, and then vary the other molar fraction between 0 and 1.
For example, InP material used as substrate have x=0 and y=0, and is located at 1.35 eV and 0 strain. InP location is at crossing point of two ternaries: magenta (
Adding Ga to InP would increase tensile strain (+ sign) of resulting (
The black data series is
The 0 strain molar fractions for
x<-round(ingaasp2rcpp::PQ_X_YStrain(1,0),digits=3)
round(PQ_Eg_XY(x,1),digits = 2)
## [1] 0.73
In the plot above two types of x and y relation are shown. Firstly, for the cases where strain was fixed, and Eg was varied. The second, where Eg was fixed, and strain varied. Plot of X, and Y molar fractions as function of Eg, and strain is less straightforward to generate, as not all combinations of Eg and strain values have physical meaning (x and y values smaller than 1), and root finding technique need to be employed (bisection). An example of unphysical result is Eg=0.7eV, and 0 strain. This pair is leading to y composition larger than 1.
round(modPQ_XY_EgStrain(0.7,0),3)
## X Y
## [1,] 0.505 1.076
Constant strain lead to linear dependence between x and y molar fractions. In the plot 0% strain is shown with blue color, whereas -0.5% and 0.5% strain with red and orange respectively.
The naming convention used in this package is that all functions exported for user are starting with PQ or modPQ prefix, with a few exceptions. PQ functions are not vectorized, user should work with modPQ functions which are vectorized. After prefix, there is underscore and return variable(s), followed by second underscore with input arguments.
For example modPQ_X_EgStrain
means that function will return x (Ga molar fraction), and take bandgap Eg and Strain in absolute units as input arguments.
After installation please type library(help="ingaasp2rcpp")
to see all the objects from the package with brief description.
Below is the list of functions, and their arguments:
lsf.str("package:ingaasp2rcpp")
## Eg2PL_f1 : function (Eg)
## func4root : function (x)
## LatticeConst : function (eps_xy)
## modPQ_EgStrain : function (x, y)
## modPQ_Eg_XY : function (x, y)
## modPQ_eps_xy_f1 : function (x, y)
## modPQ_PL2Eg : function (PL)
## modPQ_X_EgStrain : function (Eg, Strain)
## modPQ_XY_EgStrain : function (Eg, Strain)
## modPQ_Y_EgStrain : function (x, Strain)
## PL2Eg_f1 : function (PL)
## PQ_Eg_unstrained : function (x, y)
## PQ_Eg_XY : function (x, y)
## PQ_eps_xy_f1 : function (x, y)
## PQ_X_EgStrain : function (Eg, eps_xy)
## PQ_X_YStrain : function (y, strain)
## PQ_Y_XStrain : function (x, eps_xy)
Calculate what target composition have InGaAsP layer with given PL and target, eg. PL=1200nm, strain=0%:
modPQ_XY_EgStrain(modPQ_PL2Eg(1200),0)
## X Y
## [1,] 0.2006707 0.4366245
Calculate composition of the outcome of growth eg. PL=1220nm, strain=500 ppm:
modPQ_XY_EgStrain(modPQ_PL2Eg(1220),500/1e6)
## X Y
## [1,] 0.2210441 0.4650469
Then growth model is used to modify reagents flow, to obtain outcome closer to target.