Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_DEV_Specie.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_Specie.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Tom Russo, SNL, Electrical and Microsystems Modeling
33 //
34 // Creation Date : 07/27/2006
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.10 $
40 //
41 // Revision Date : $Date: 2014/05/01 22:27:13 $
42 //
43 // Current Owner : $Author: lcmusso $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef N_DEV_Specie_H
47 #define N_DEV_Specie_H
48 
49 #include <N_UTL_Misc.h>
50 
51 #ifdef HAVE_CMATH
52 #include <cmath>
53 #else
54 #include <math.h>
55 #endif
56 
57 #include <string>
58 #include <N_DEV_Const.h>
59 #include <vector>
60 
61 namespace Xyce {
62 namespace Device {
63 
64 class Specie
65 {
66 public:
67  Specie(std::string name, double diff_prefac, double act_energy,
68  int charge_state)
69  : Name(name),
70  DiffusionPrefactor(diff_prefac),
71  ActivationEnergy(act_energy),
72  ChargeState(charge_state),
73  carrierIndex(-1),
74  sigma(0.0),
75  hopLength(0.0),
76  thermalVelocity(0.0),
77  enhancedDiffusion(false)
78  {
79  } ;
80 
81  inline const std::string & getName() const {return (Name); };
82  inline void setName(std::string &name) {Name = name;};
83  inline int getChargeState() {return (ChargeState);};
84  inline void setChargeState(int chargestate) {ChargeState=chargestate;};
85  inline double getDiffPrefactor() {return(DiffusionPrefactor);} ;
86  inline void setDiffPrefactor(double p) {DiffusionPrefactor=p;};
87  inline double getActEnergy() {return(ActivationEnergy);};
88  inline void setActEnergy(double Energy) {ActivationEnergy=Energy;};
89  inline bool getEnhancedDiffusion() {return enhancedDiffusion;}
90  void setBCEnhancedDiffusion(int cI, double sigma, double thermalVelocity, double hopLength);
91  double getDiffusionCoefficient(double Temperature);
92  double getDiffusionCoefficient(double Temperature,
93  std::vector<double> &concs,std::vector<double> &constant_vec);
94 private:
95  std::string Name;
99  //Some species have diffusion enhanced by carrier capture
101  double sigma;
102  double hopLength;
105 
106 };
107 
108 //-----------------------------------------------------------------------------
109 // Function : Specie::getDiffusionCoefficient
110 // Purpose : Accessor
111 // Special Notes :
112 // Scope : public
113 // Creator : Tom Russo, SNL, Electrical and Microsystems Modeling
114 // Creation Date : 7/27/06
115 //-----------------------------------------------------------------------------
116 inline double Specie::getDiffusionCoefficient(double Temperature)
117 {
118  return DiffusionPrefactor*exp(-ActivationEnergy/(CONSTboltz*Temperature/CONSTQ));
119 }
120 
121 } // namespace Device
122 } // namespace Xyce
123 
124 #endif