[Fsem-commits] SF.net SVN: fsem: [124] fsem
Status: Beta
Brought to you by:
fabiandortu
|
From: <fab...@us...> - 2007-03-22 17:08:47
|
Revision: 124
http://fsem.svn.sourceforge.net/fsem/?rev=124&view=rev
Author: fabiandortu
Date: 2007-03-22 10:08:33 -0700 (Thu, 22 Mar 2007)
Log Message:
-----------
Surface recombination velocity is implemented for DDSG.
Seems to work correctly.
Use it as follow:
ModUsrRecSurfSRHDDSG = 1;
ParMatxyzVN0 = (y*GloScaY>-0.1*ConvN2M)?SurfRecVel:0; // m/s Ele. recombination velocity at top surface
ParMatxyzVP0 = (y*GloScaY>-0.1*ConvN2M)?SurfRecVel:0; // m/s Hol. recombination velocity at top surface
Modified Paths:
--------------
fsem/assemble/fsem_PreAssemble_DDSG.edp
fsem/equations/fsem_Eq_DDSG.edp
fsem/equations/fsem_Eq_DDSG_Scaling.edp
fsem/models/fsem_Mod_ComputeSemi.edp
fsem/models/fsem_Mod_FlagsSemi.edp
fsem/models/fsem_Mod_MatParSemiDefault.edp
fsem/models/modules/Semi/fsem_ModRecSRH_DDSG.edp
Modified: fsem/assemble/fsem_PreAssemble_DDSG.edp
===================================================================
--- fsem/assemble/fsem_PreAssemble_DDSG.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/assemble/fsem_PreAssemble_DDSG.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -13,6 +13,14 @@
*
*****************************************************************************/
+/*
+ * Note for cleaning the code in the future:
+ * This assembling function is rather complicated because:
+ * - 2 formalisms (choice of potential, bandgap and affinity constant): only 2nd formalism is used today
+ * - 2 resolutions (linearize carrier equation or nonlinear carrier equation): only linearized eq is used today
+ * - steady periodic: I think it shoud be moved in a specific assembly file.
+ */
+
int GloFlagHelperGloEqTypePrevious = 9999999; // equation that has been solved at the previous assembling
// This helper variable is needed to know when to calculate the electric field.
// There is no need to compute it for each equetion (potential, electron and hole)
@@ -143,7 +151,7 @@
ComputeNP();
- if (ModUsrEleNonlinear) {
+ if (ModUsrEleNonlinear) { // OBSOLETE (used in the past: when the electron equation is solved using Newton's method, there is no linear term in the equation).
ModUsrRecAugerDDSGSAVE = ModUsrRecAugerDDSG;
ModUsrRecSRHDDSGSAVE = ModUsrRecSRHDDSG;
ModUsrRecSRHDDSG = 0;
@@ -159,6 +167,7 @@
ModUsrRecSRHDDSG = ModUsrRecSRHDDSGSAVE;
} else {
ComputeRecVol();
+ ComputeRecSurf();
}
ComputeAbsCoef();
@@ -207,7 +216,8 @@
if (ModUsrSecFormalism)
{
ModDDSGITAURecEle2(); // defines GloVarDiffCOEFf and GloVarDiffCOEFa
-
+ ModDDSGITAURecSurfEle2(); // defines GloVarDiffCOEFfs and GloVarDiffCOEFas
+
// cout << "<<<<<<<<<<<<<<<<<<<<AUGER AND SP " << ModUsrDDSGSteadyPeriodic << " and " << ModUsrRecAuger <<endl;
if(ModUsrDDSGSteadyPeriodic)
@@ -223,7 +233,8 @@
}
//ModDDSGAugerAddGamman2H0v2(); //adds coeff a an Auger contribution due to first harmonic (not used because of instability)
- ModDDSGAugerAddGamman2H0v2(); //adds coeff f an Auger contribution due to first, second and third harmonic (it is well f and not a because instalbility was noticed when including this part in a )
+ ModDDSGAugerAddGamman2H0v2(); //adds coeff f an Auger contribution due to first,
+ //second and third harmonic (it is well f and not a because instalbility was noticed when including this part in a )
ModDDSGRecVolAugEleH0(); //adds coeff f an Auger contribution due to first harmonic
@@ -262,11 +273,12 @@
}
- }
- }
+ } // endif ModUsrDDSGSteadyPeriodic
+ } // endif ModUsrSecFormalism
else
{
ModDDSGITAURecEle(); // defines GloVarDiffCOEFf and GloVarDiffCOEFa
+ // surface recombinations are not implemented for first formalism.
}
}
@@ -276,6 +288,8 @@
}
ShowMinMax(tab5 + "COEFFf", GloVarDiffCOEFf[], 1, "tbd");
ShowMinMax(tab5 + "COEFFa", GloVarDiffCOEFa[], 1, "tbd");
+ ShowMinMax(tab5 + "COEFFfs", GloVarDiffCOEFf[], 1, "tbd");
+ ShowMinMax(tab5 + "COEFFas", GloVarDiffCOEFa[], 1, "tbd");
if(fsemVERBOSITY>2){
cout << endl;
@@ -326,7 +340,7 @@
ComputeNP();
- if (ModUsrHolNonlinear) {
+ if (ModUsrHolNonlinear) { // OBSOLETE (used in the past: when the hole equation is solved using Newton's method, there is no linear term in the equation).
ModUsrRecAugerDDSGSAVE = ModUsrRecAugerDDSG;
ModUsrRecSRHDDSGSAVE = ModUsrRecSRHDDSG;
ModUsrRecSRHDDSG = 0;
@@ -342,6 +356,7 @@
ModUsrRecSRHDDSG = ModUsrRecSRHDDSGSAVE;
} else {
ComputeRecVol();
+ ComputeRecSurf();
}
ComputeAbsCoef();
ComputeGenVol();
@@ -384,6 +399,7 @@
if (ModUsrSecFormalism)
{
ModDDSGITAURecHol2(); // defines GloVarDiffCOEFf and GloVarDiffCOEFa
+ ModDDSGITAURecSurfHol2(); // defines GloVarDiffCOEFfs and GloVarDiffCOEFas
if(ModUsrDDSGSteadyPeriodic)
@@ -419,7 +435,8 @@
}
// ModDDSGSRHAddGammap2H0(); //adds coeff a an Auger contribution due to first harmonic (not used because instability)
- ModDDSGSRHAddGammap2H0v2(); //adds coeff f an SRH contribution due to first, second and third harmonics (it is well f and not a because instalbility was noticed when including this part in a)
+ ModDDSGSRHAddGammap2H0v2(); //adds coeff f an SRH contribution due to first, second
+ // and third harmonics (it is well f and not a because instalbility was noticed when including this part in a)
ModDDSGRecVolSRHHolH0(); //adds coeff f an SRH contribution due to first, second and third harmonics
if(fsemVERBOSITY>2){
ShowMinMax(tab5 + "COEFFf", GloVarDiffCOEFf[], 1, "tbd");
@@ -428,12 +445,13 @@
}
- }
- }
+ } // endif on ModUsrDDSGSteadyPeriodic
+ } //endif on ModUsrSecFormalism
else
{
ModDDSGITAURecHol(); // defines GloVarDiffCOEFf and GloVarDiffCOEFa
+ // surface recombinations not implemenented in first formalism
}
}
@@ -445,6 +463,8 @@
ShowMinMax(tab5 + "COEFFf", GloVarDiffCOEFf[], 1, "tbd");
ShowMinMax(tab5 + "COEFFa", GloVarDiffCOEFa[], 1, "tbd");
+ ShowMinMax(tab5 + "COEFFfs", GloVarDiffCOEFfs[], 1, "tbd");
+ ShowMinMax(tab5 + "COEFFas", GloVarDiffCOEFas[], 1, "tbd");
if(fsemVERBOSITY>2){
Modified: fsem/equations/fsem_Eq_DDSG.edp
===================================================================
--- fsem/equations/fsem_Eq_DDSG.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/equations/fsem_Eq_DDSG.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -34,9 +34,11 @@
macro CoefDDSGCarrAdimcx(COEFc) ( ( COEFc ) / GloScaDDSGCarrCx ) // Stifness matrix coef (Effective Diffusivity)
macro CoefDDSGCarrAdimcy(COEFc) ( ( COEFc ) / GloScaDDSGCarrCy ) // Stifness matrix coef (Effective Diffusivity)
-macro CoefDDSGCarrAdima(COEFa) ( ( COEFa ) / GloScaDDSGCarrA ) // Mass matrix coef (Linear Recomb)
+macro CoefDDSGCarrAdima(COEFa) ( ( COEFa ) / GloScaDDSGCarrA3 ) // Mass matrix coef (Volume Linear Recomb)
+macro CoefDDSGCarrAdimas(COEFas) ( ( COEFas ) / GloScaDDSGCarrA2 ) // Mass matrix coef (Surface Linear Recomb)
-macro CoefDDSGCarrAdimF(COEFf) ( ( COEFf ) / GloScaDDSGCarrR3 ) // RHS recombination
+macro CoefDDSGCarrAdimF(COEFf) ( ( COEFf ) / GloScaDDSGCarrR3 ) // Volume RHS recombination
+macro CoefDDSGCarrAdimFs(COEFfs) ( ( COEFfs ) / GloScaDDSGCarrR2 ) // Surface RHS recombination
/***************************************************************************
@@ -61,14 +63,16 @@
func real AssembleDDSGCarrMatKcMa()
{
- // The equation for the electron and hole diffusion in a Helmoltz equation (KcMa)
+ // The equation for the electron and hole diffusion is a Helmoltz equation (KcMa)
+ // when the equation is linearized.
if(fsemVERBOSITY>3) {cout << tab4 << "AssembleDDSGCarrMatKcMa ..." << endl;}
varf CarrKcMa(uh, vh) =
int2d(GloMesh)( ( + CoefDDSGCarrAdimcx(GloVarDiffCOEFc) * ( dx(uh)*dx(vh) )
+ CoefDDSGCarrAdimcy(GloVarDiffCOEFc) * ( dy(uh)*dy(vh) )/*K(c)*/
+ CoefDDSGCarrAdima(GloVarDiffCOEFa) * uh * vh ) /*M(a)*/
- * UsrJac );
+ * UsrJac )
+ + int1d(GloMesh)( CoefDDSGCarrAdimas(GloVarDiffCOEFas) * uh * vh * UsrJac);
//FixedCarrContact;
GloMatL = CarrKcMa(GloVhP1, GloVhP1);
@@ -77,7 +81,8 @@
func real AssembleDDSGCarrMatKc()
{
- // The equation for the electron and hole diffusion in a Poisson equation (Kc)
+ // The equation for the electron and hole diffusion is a Poisson equation (Kc)
+ // when the equation is solved with Newton's method.
if(fsemVERBOSITY>3) {cout << tab4 << "AssembleDDSGCarrMatKc ..." << endl;}
varf CarrKc(uh, vh) =
@@ -113,7 +118,9 @@
if(fsemVERBOSITY>3) {cout << tab4 << "AssembleDDSGCarrVecFf ..." << endl;}
varf CarrFf(uh, vh) = int2d(GloMesh)( vh * CoefDDSGCarrAdimF(GloVarDiffCOEFf)
- * UsrJac );
+ * UsrJac )
+ +int1d(GloMesh)( vh * CoefDDSGCarrAdimFs(GloVarDiffCOEFfs)
+ * UsrJac);
//FixedCarrContact;
GloMeshFieldReset(GloVecR);
@@ -143,6 +150,8 @@
func real AssembleDDSGCarrMatJacKcMdf()
{
+ // Used when the carrier equations are solved with Newton's method
+ // but NOT used when the carrier equations were linearized.
if(fsemVERBOSITY>3) {cout << tab4 << "AssembleDDSGCarrMatJacKcMdf ..." << endl;}
varf CarrJacKcMdf(uh, vh) =
Modified: fsem/equations/fsem_Eq_DDSG_Scaling.edp
===================================================================
--- fsem/equations/fsem_Eq_DDSG_Scaling.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/equations/fsem_Eq_DDSG_Scaling.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -13,11 +13,13 @@
// electron and hole diffusion equation
-real GloScaDDSGCarrN; // carrier conc. [m-3]
-real GloScaDDSGCarrCx; // diffusion coef [m2 s-1]
+real GloScaDDSGCarrN; // slotboom variable [adim]
+real GloScaDDSGCarrCx; // slotboom diffusion (or mobility) coef [m-1 s-1]
real GloScaDDSGCarrCy;
-real GloScaDDSGCarrA; // linear recombination [s-1]
+real GloScaDDSGCarrA3; // linear recombination in volume (=3d) [m-3 s-1]
+real GloScaDDSGCarrA2; // linear recombination in volume (=2d) [m-2 s-1]
real GloScaDDSGCarrR3; // gen/rec in volume (=3d) [m-3 s-1]
+real GloScaDDSGCarrR2; // gen/rec in volume (=2d) [m-2 s-1]
func int ComputeScalingDDSG(real C0, real Mu0, real Vth0) {
@@ -35,8 +37,10 @@
GloScaDDSGCarrN = 1 ;
GloScaDDSGCarrCx =Mu0 * Vth0 * C0 ;//
GloScaDDSGCarrCy =Mu0 * Vth0 * C0;//
- GloScaDDSGCarrA = Mu0 * Vth0 * C0 / (GloScaX * GloScaX);
+ GloScaDDSGCarrA3 = Mu0 * Vth0 * C0 / (GloScaX * GloScaX);
+ GloScaDDSGCarrA2 = Mu0 * Vth0 * C0 / (GloScaX);
GloScaDDSGCarrR3 = Mu0 * Vth0 * C0 / (GloScaX * GloScaX);
+ GloScaDDSGCarrR2 = Mu0 * Vth0 * C0 / (GloScaX);
cout << "GloScaDDSGPotV = " << GloScaDDSGPotV << endl;
cout << "GloScaDDSGPotCx = " << GloScaDDSGPotCx << endl;
@@ -47,8 +51,10 @@
cout << "GloScaDDSGCarrN = " << GloScaDDSGCarrN << endl;
cout << "GloScaDDSGCarrCx = " << GloScaDDSGCarrCx << endl;
cout << "GloScaDDSGCarrCy = " << GloScaDDSGCarrCy << endl;
- cout << "GloScaDDSGCarrA = " << GloScaDDSGCarrA << endl;
+ cout << "GloScaDDSGCarrA3 = " << GloScaDDSGCarrA3 << endl;
+ cout << "GloScaDDSGCarrA2 = " << GloScaDDSGCarrA2 << endl;
cout << "GloScaDDSGCarrR3 = " << GloScaDDSGCarrR3 << endl;
+ cout << "GloScaDDSGCarrR2 = " << GloScaDDSGCarrR2 << endl;
Modified: fsem/models/fsem_Mod_ComputeSemi.edp
===================================================================
--- fsem/models/fsem_Mod_ComputeSemi.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/models/fsem_Mod_ComputeSemi.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -509,9 +509,9 @@
cout << tab5 << "(ModUsrRecSRHDDSG)" << endl;
}
ModDDSGRecVolSRHConcDep();
- ShowMinMax(tab5 + " GloVarSemiGenRecSRH(DDSG)", GloVarSemiGenRecSRH[], ConvM2C^(3), "cm^(3) s^(-1)");
- ShowMinMax(tab5 + " GloVarSemidGenRecSRHdELE(DDSG)", GloVarSemidGenRecSRHdELE[], ConvM2C^(3) , "cm^(3) s^(-1)");
- ShowMinMax(tab5 + " GloVarSemidGenRecSRHdHOL(DDSG)", GloVarSemidGenRecSRHdHOL[], ConvM2C^(3) , "cm^(3) s^(-1)");
+ ShowMinMax(tab5 + " GloVarSemiGenRecSRH(DDSG)", GloVarSemiGenRecSRH[], ConvM2C^(3), "cm^(3) s^(-1) !!!");
+ ShowMinMax(tab5 + " GloVarSemidGenRecSRHdELE(DDSG)", GloVarSemidGenRecSRHdELE[], ConvM2C^(3) , "cm^(6) s^(-1) !!!");
+ ShowMinMax(tab5 + " GloVarSemidGenRecSRHdHOL(DDSG)", GloVarSemidGenRecSRHdHOL[], ConvM2C^(3) , "cm^(6) s^(-1) !!!");
GloVarSemiGenRecTOT[] += GloVarSemiGenRecSRH[];
GloVarSemidGenRecTOTdELE[] += GloVarSemidGenRecSRHdELE[];
GloVarSemidGenRecTOTdHOL[] += GloVarSemidGenRecSRHdHOL[];
@@ -582,6 +582,8 @@
GloMeshFieldReset(GloVarSemiSURFRECVEL);
GloVarSemiSURFRECVEL[]=0;
+ GloMeshFieldReset(GloVarSemiGenRecSurfTOT);
+ GloVarSemiGenRecSurfTOT[]=0;
if(ModUsrRecSurfVelCST) {
if(fsemVERBOSITY>4) {cout << tab5 << "(ModUsrRecSurfVelCST)" << endl;}
@@ -591,7 +593,19 @@
ShowMinMax(tab5 + " GloVarSemiGenRecSurfTOT", GloVarSemiGenRecSurfTOT[], ConvM2C^(-2), "cm-2 s-1");
}
- return 0.0;
+ if(ModUsrRecSurfSRHDDSG) {
+ if(fsemVERBOSITY>4) {
+ cout << tab5 << "(ModUsrRecSurfSRHDDSG)" << endl;
+ }
+ ModDDSGRecSurfSRHConcDep();
+ ShowMinMax(tab5 + " GloVarSemiGenRecSurfSRH(DDSG)", GloVarSemiGenRecSurfSRH[], ConvM2C^(3), "cm^(4) s^(-1) !!!");
+ ShowMinMax(tab5 + " GloVarSemidGenRecSurfSRHdELE(DDSG)", GloVarSemidGenRecSurfSRHdELE[], ConvM2C^(3) , "cm^(7) s^(-1) !!!");
+ ShowMinMax(tab5 + " GloVarSemidGenRecSurfSRHdHOL(DDSG)", GloVarSemidGenRecSurfSRHdHOL[], ConvM2C^(3) , "cm^(7) s^(-1) !!!");
+ GloVarSemiGenRecSurfTOT[] += GloVarSemiGenRecSurfSRH[];
+ //GloVarSemidGenRecSurfTOTdELE[] += GloVarSemidGenRecSurfSRHdELE[];
+ //GloVarSemidGenRecSurfTOTdHOL[] += GloVarSemidGenRecSurfSRHdHOL[];
+ }
+ return 0.0;
}
Modified: fsem/models/fsem_Mod_FlagsSemi.edp
===================================================================
--- fsem/models/fsem_Mod_FlagsSemi.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/models/fsem_Mod_FlagsSemi.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -181,6 +181,11 @@
SRH "gen/rec" for drift diffusion calculation
& 0|1
*/
+int ModUsrRecSurfSRHDDSG=0;
+/*TeXDoc
+ SRH surface "gen/rec" for drift diffusion calculation
+ & 0|1
+ */
int ModUsrRecSRHH1DDSG=0;
/*TeXDoc
SRH "gen/rec" for first harmonic of steady-periodic drift diffusion calculation
Modified: fsem/models/fsem_Mod_MatParSemiDefault.edp
===================================================================
--- fsem/models/fsem_Mod_MatParSemiDefault.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/models/fsem_Mod_MatParSemiDefault.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -130,12 +130,12 @@
P. C. Dhanasekaran Solid-State Elec. 25(8) 719 (1982)
& [s]
*/
-real ParMatSiVN0 = 10;
+real ParMatSiVN0 = 0.0;
/*TeXDoc
Conc. dep. SRH rec. velocity for electrons
& [m/s]
*/
-real ParMatSiVP0 = 10;
+real ParMatSiVP0 = 0.0;
/*TexDoc
Conc. dep. SRH rec. velocity for holes
& [m/s]
@@ -153,7 +153,7 @@
P. C. Dhanasekaran Solid-State Elec. 25(8) 719 (1982)
& [m$^{-3}$]
*/
-real ParMatSiSREC = 1e2 * ConvC2M;
+real ParMatSiSREC = 0.0;
/*TeXDoc
Surface recombination velocity
& [m s$^{-1}$]
Modified: fsem/models/modules/Semi/fsem_ModRecSRH_DDSG.edp
===================================================================
--- fsem/models/modules/Semi/fsem_ModRecSRH_DDSG.edp 2007-03-22 15:20:02 UTC (rev 123)
+++ fsem/models/modules/Semi/fsem_ModRecSRH_DDSG.edp 2007-03-22 17:08:33 UTC (rev 124)
@@ -64,10 +64,10 @@
GloMeshFieldInterpol(ParMatxyzNSRH);
GloMeshFieldInterpol(ParMatxyzPSRH);
- CppModDDSGRecVolSRHConcDep(GloVarSemiGenRecSurfSRH[], /* OUTPUTS */
- GloVarSemidGenRecSurfSRHdELE[], GloVarSemidGenRecSurfSRHdHOL[],
- GloVarSemiELE[], GloVarSemiHOL[], GloVarSemiNIE[], GloVarSemiDOPTOT[],
- ParMatxyzVN0[], ParMatxyzVP0[], ParMatxyzNSRH[], ParMatxyzPSRH[]); /* INPUTS */
+ CppModDDSGRecSurfSRHConcDep(GloVarSemiGenRecSurfSRH[], /* OUTPUTS */
+ GloVarSemidGenRecSurfSRHdELE[], GloVarSemidGenRecSurfSRHdHOL[],
+ GloVarSemiELE[], GloVarSemiHOL[], GloVarSemiNIE[], GloVarSemiDOPTOT[],
+ ParMatxyzVN0[], ParMatxyzVP0[], ParMatxyzNSRH[], ParMatxyzPSRH[]); /* INPUTS */
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|