changeset 11955:7cd79cb59a8c octave-forge

restored implicit impact ionization in secs1d_coupled_circuit_newton_reordered.m
author dvd7587
date Mon, 22 Jul 2013 08:06:50 +0000
parents 41b2c98d91a2
children d540499a8271
files extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m	Mon Jul 22 07:21:00 2013 +0000
+++ b/extra/secs1d/inst/secs1d_coupled_circuit_newton_reordered.m	Mon Jul 22 08:06:50 2013 +0000
@@ -248,7 +248,7 @@
                            (device, material, constants, 
                             algorithm, V, n, p);  
   
-  [Rn, Rp, Gn, Gp] = generation_recombination_model ...
+  [Rn, Rp, Gn, Gp, II] = generation_recombination_model ...
                            (device, material, constants, 
                             algorithm, mobilityn, mobilityp, 
                             V, n, p);
@@ -262,9 +262,10 @@
   [Jn0, Jp0] = compute_currents ...
                (device, material, constants, algorithm, 
                 un0, up0, V0, n0, p0);
-  II0 = secs1d_impact_ionization_noscale ...
-         (device, material, constants, algorithm, 
-          E0, Jn0, Jp0, V0, n0, p0, Fn0, Fp0);
+  %% time-explicit discretization for impact ionization term
+  %% II0 = secs1d_impact_ionization_noscale ...
+  %%        (device, material, constants, algorithm, 
+  %%         E0, Jn0, Jp0, V0, n0, p0, Fn0, Fp0);
 
   epsilon = material.esi * ones (Nelements, 1);
   
@@ -285,7 +286,8 @@
   res2 = A22 * n;
   res2 += bim1a_rhs (device.x, 1, 
                      (Rn  + 1/deltat) .* n - (Gn + n0 * 1/ deltat)) + ...
-          bim1a_rhs (device.x, - II0, 1);
+          bim1a_rhs (device.x, - II, 1);
+          %% bim1a_rhs (device.x, - II0, 1);
   res2([1, end]) = (n([1, end]) - n0([1, end])) .* ...
                    ([A22(1, 1); A22(end, end)]);
 
@@ -295,7 +297,8 @@
   res3  = A33 * p;
   res3 += bim1a_rhs (device.x, 1,
                      (Rp + 1/deltat) .* p - (Gp + p0 * 1/ deltat)) + ...
-          bim1a_rhs (device.x, - II0, 1);
+          bim1a_rhs (device.x, - II, 1); 
+          %% bim1a_rhs (device.x, - II0, 1);
   res3([1, end]) = (p([1, end]) - p0([1, end])) .* ...
                    ([A33(1, 1); A33(end, end)]);