Created
September 1, 2016 18:36
-
-
Save supernullset/41835f0b5a8892d44ca164da14a85bf8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* TODO: Implement Dose Sum | |
- This will involve keeping track of calculations across a whole | |
profile. Which means I need some sort of global state which is | |
held in the profile instance. | |
``` | |
22830 !**************** | |
22840 Dose_sum:Dos=Dos+EXP(FNConc(Rho(N),Typ(N))) | |
22850 Con=Con+EXP(-Rho(N)) | |
22860 RETURN | |
22870 !**************** | |
22880 subend | |
Typ is an array allocated to 239 spaces for holding INTEGERS. It comes | |
from the ARRAYS COM block. | |
So point by point the type is held on to and the dose sum depends on | |
the type at point | |
type_at_n is assigned in Sls on BASIC LINE 21360 | |
Type is passed through into Sls | |
!!## Were setting up the layer types here based on user inputs into Type$ matrix/array/variable | |
990 CASE 49,80,112 ## "1", "P", "p" | |
1000 Type=80 | |
1010 Type$(Layer)=CHR$(Type) | |
1020 CASE 50,78,110 ## "2", "N", "n" | |
1030 Type=78 ## "N" | |
1040 Type$(Layer)=CHR$(Type) | |
1050 CASE 51 ## "3" | |
1060 Type=76 ## "L" | |
1070 Type$(Layer)="P" | |
1080 CASE 52 ## "4" | |
1090 Type=74 ## "J" | |
1100 Type$(Layer)="N" | |
1110 CASE ELSE | |
1120 Type=Tcs(0,Layer) | |
1130 Type$(Layer)=CHR$(Type) | |
1140 END SELECT | |
!!## END layer setup | |
Type is set on a layer by layer basis TO **INTEGER VALUE** | |
global dos = float() | |
global con = float() | |
def dose_sum(rho_at_n, type_at_n): | |
dos += e ** (FNConc(rho_at_n, type_at_n)) | |
con += e ** (-rho_at_n) # resistivity at index N | |
``` | |
``` | |
24770 !**************** | |
24780 DEF FNConc(R,INTEGER T) # Takes Resisitivity and integer type? | |
24790 Rho=EXP(R) | |
24800 SELECT T | |
24810 CASE 78,110 !n-Si | |
24820 X=.4343*R | |
24830 Mu=163+26*X | |
24840 IF R>-6.9 THEN Mu=10^((3.1122+X*(3.3347+X*(1.261+X*.15701)))/(1+X*(1.0463+X*(.39941+X*.049746)))) | |
24850 CASE 76,108 !p-Ge | |
24860 Mu=2020/(1+.125/Rho^.66) | |
24870 CASE 74,106 !n-Ge | |
24880 Mu=4300/(1+.095/Rho^.72) | |
24890 CASE ELSE !p-Si, oxides, metals, etc | |
24900 Mu=482.8/(1+.1322/Rho^.811) | |
24910 IF Rho>.1 THEN 24940 | |
24920 Mu=Mu+52.4*EXP(-Rho/.00409) | |
24930 END SELECT | |
24940 RETURN 43.28-R-LOG(ABS(Mu)) | |
24950 fnend | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment