00001 // SuperMix version 1.0 C++ source file 00002 // 00003 // Copyright (c) 1999 California Institute of Technology. 00004 // All rights reserved. 00005 // 00006 // Redistribution and use in source and binary forms for noncommercial 00007 // purposes are permitted provided that the above copyright notice and 00008 // this paragraph are duplicated in all such forms and that any 00009 // documentation and other materials related to such distribution and 00010 // use acknowledge that the software was developed by California 00011 // Institute of Technology. Redistribution and/or use in source or 00012 // binary forms is not permitted for any commercial purpose. Use of 00013 // this software does not include a permitted use of the Institute's 00014 // name or trademark for any purpose. 00015 // 00016 // DISCLAIMER: 00017 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT 00018 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR 00019 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET 00020 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 00021 // LICENSED PRODUCT, HOWEVER USED. IN NO EVENT SHALL CALTECH/JPL BE 00022 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO 00023 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC 00024 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF 00025 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN 00026 // FACT SHALL KNOW OF THE POSSIBILITY. THE USER BEARS ALL RISK 00027 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED 00028 // MATERIALS. 00029 // 00030 // 00031 // Classes for surface impedance calculations 00032 // 00033 // J. Zmuidzinas 9/18/97 00034 // 00035 // 11/15/99: combined super_film and super_film_interp into one class 00036 // 8/25/99: added parameter Zterm to local_film and layer_list classes 00037 // 7/6/99: changed super_film_interp to use interpolator and adaptive 00038 // 1/12/98: added ideal_film (a perfectly conducting film) 00039 // 1/11/99: added several constructors and extended super_film_interp 00040 // 6/16/98: moved normal_film copy constructor from .cc file to .h 00041 // 00042 00043 #ifndef SURFACEZ_H 00044 #define SURFACEZ_H 1 00045 00046 #include "SIScmplx.h" 00047 #include "parameter.h" 00048 #include "interpolate.h" 00049 00050 /**************************************************************\ 00051 * * 00052 * class surfimp * 00053 * * 00054 * An abstract base class for any film that can calculate its * 00055 * surface impedance. Provides an interface for use in * 00056 * transmission line calculations that need a surface impedance * 00057 * and a layer thickness (e.g. microstrips) * 00058 * * 00059 \**************************************************************/ 00060 00061 class surfimp { 00062 public: 00063 00064 parameter Thick; // the layer thickness 00065 00066 // Return the total thickness of the film 00067 // defualt behavior: returns Thick; warns and returns 0.0 if Thick < 0 00068 virtual double thickness(); 00069 00070 // Return the surface impedance of the film at the specified frequency 00071 // and temperature: 00072 virtual complex Zsurf(double freq, double Temp) = 0; 00073 00074 // Virtual destructor is necessary to ensure proper subclass destruction. 00075 virtual ~surfimp() { } 00076 }; 00077 00078 00079 /**************************************************************\ 00080 * * 00081 * class ideal_film * 00082 * * 00083 * An concrete class that represents the surface impedance of * 00084 * a perfectly conducting material (zero impedance) * 00085 * * 00086 \**************************************************************/ 00087 00088 class ideal_film : public surfimp { 00089 public: 00090 complex Zsurf(double, double) { return complex(0.0); } 00091 }; 00092 00093 00094 /**************************************************************\ 00095 * * 00096 * class local_film * 00097 * * 00098 * An abstract class derived from surfimp representing a film * 00099 * with the following characteristics: * 00100 * (i) the film is homogeneous and isotropic * 00101 * (ii) the conductivity at any point is independent of the * 00102 * thickness of the layer and is uniform throughout. * 00103 * * 00104 * Derived classes will have to implement sigma(), and may * 00105 * redefine thickness() if desired, or use the default provided * 00106 * * 00107 \**************************************************************/ 00108 // We treat local conductors (J = sigma x E) in a special way. 00109 // This is because we want to be able to calculate multilayer stacks 00110 // of metal films (for instance a thin Nb layer on NbTiN) by 00111 // calculating the contribution of each layer independently. 00112 // Not all conductors are local - e.g. good normal metals at low 00113 // temperatures have mean free paths greater than the classical skin 00114 // depth. These cannot be used in our multilayer algorithm, which assumes 00115 // local conductors only. 00116 // 00117 // Since the layer thickness and (local) conductivity are enough to 00118 // calculate the surface impedance of the one layer by itself, 00119 // each primitive layer can be derived from local_film, which 00120 // inherits class surfimp and implements Zsurf() here using its sigma() 00121 // and thichkness(). 00122 00123 class local_film : public surfimp { 00124 public: 00125 // The "back" side of the film must be terminated with some effective 00126 // impedance. A standard choice would be the free-space impedance. 00127 // For thick films, this parameter is irrelevant. For thin films, 00128 // this parameter simulates the possibility of power loss due to 00129 // radiation from the back side of the metal film into free space 00130 // (or a dielectric). The difficulty is that the amount of radiation 00131 // will depend in detail on the shape and size of the conductor. 00132 // If this parameter turns out to be important in your application, 00133 // it is advisable to perform a full EM simulation of your structure, 00134 // using a planar solver such as Sonnet's em or HP Momentum. 00135 // 00136 parameter Zterm ; // nominally set to ZVacuum at construction 00137 00138 local_film() ; // constructor needs to set value of Zterm 00139 00140 // Complex conductivity sigma depends on the physics. This function must 00141 // be defined in classes derived from local_film 00142 virtual complex sigma(double freq, double Temp) = 0; 00143 00144 // Surface impedance is calculated using thickness() and sigma() 00145 complex Zsurf(double freq, double Temp) ; // define now 00146 00147 // Virtual destructor is necessary to ensure proper subclass destruction. 00148 virtual ~local_film() { } 00149 }; 00150 00151 00152 /**************************************************************\ 00153 * * 00154 * class normal_film * 00155 * * 00156 \**************************************************************/ 00157 // A normal_film (normal metal film) is a local_film that 00158 // is calculated using the supplied resistivity parameter rho. 00159 // Since it is a parameter, it may shadow a function that 00160 // computes a temperature-dependent value. 00161 00162 class normal_film : public local_film { 00163 public: 00164 parameter rho ; // resistivity (resistance x length) 00165 00166 // if rho is left at the default value of 0.0, then 00167 // sigma() will be infinite... use ideal_film for a perfect metal 00168 00169 complex sigma(double, double) { return complex(1./rho, 0.); } 00170 00171 // Virtual destructor is necessary to ensure proper subclass destruction. 00172 virtual ~normal_film() { } 00173 }; 00174 00175 00176 /**************************************************************\ 00177 * * 00178 * class super_film * 00179 * * 00180 \**************************************************************/ 00181 // A super_film (superconducting film) is a local_film that 00182 // is calculated using the Mattis-Bardeen theory in the local limit. 00183 // This is a concrete class. 00184 00185 class super_film : public local_film { 00186 public: 00187 00188 // physical superconductor parameters: 00189 parameter Vgap ; // 2 x gap energy of superconductor (voltage) 00190 parameter Tc ; // Critical temperature 00191 parameter rho_normal ; // normal-state resistivity (resistance x length) 00192 00193 // control whether to interpolate (the default) or to calculate directly 00194 super_film & interpolate() { interp_flag = true; return *this; } 00195 super_film & no_interpolate() { interp_flag = false; return *this; } 00196 00197 // interpolator limits 00198 parameter tol; // desired fractional accuracy (default is 1.0e-6) 00199 parameter maxpts; // maximum number of interpolation points (default is 1000) 00200 00201 // return the superconducting conductance 00202 virtual complex sigma(double freq, double Temp) ; // use Mattis-Bardeen 00203 00204 // Constructor and destructor 00205 super_film(); 00206 virtual ~super_film() { } 00207 00208 private: 00209 static const double TOL_MAX ; // worst tolerance we'll accept (0.01) 00210 static const double TOL_MIN ; // best tolerance we'll accept (1.0e-8) 00211 static const double TOL_DEFAULT ; // the default value set for tol (1.0e-6) 00212 00213 static const int DEFAULT_MAXPTS ; // what we use if parameter not set (1000) 00214 static const int START_NPTS ; // number of points we start with 00215 // before checking tolerance (25) 00216 00217 // we keep a copy of the values of the parameters 00218 // used in the interpolation table so that we know if they've changed 00219 double Vgap_save ; // 2 x gap energy of superconductor (voltage) 00220 double Tc_save ; // Critical temperature 00221 double Temp_save ; // temperature interpolation table used 00222 00223 // We also need to keep track of the current interpolation table's parameters 00224 double fmin ; // frequency lower limit 00225 double fmax ; // upper limit 00226 double tol_save ; // tolerance target used for interpolation 00227 00228 // This object does the interpolation 00229 interpolator<complex> sigma_tab; 00230 00231 // functions to build interpolation 00232 bool table_init() ; // initially build table; returns true if an error occurred 00233 bool table_extend() ; // extend table to include desired frequency 00234 00235 // some helper data and functions 00236 double freq_calc; // the frequency in the call to sigma() 00237 double Temp_calc; // the temperature in the call to sigma() 00238 bool interp_flag; // true if interpolating to get sigma 00239 bool initialized ; // true if interpolation has been built 00240 bool sanity_check() const; 00241 complex llsig(double lf) const; 00242 00243 }; 00244 00245 00246 /**************************************************************\ 00247 * * 00248 * class layerListNode * 00249 * * 00250 \**************************************************************/ 00251 class layerListNode 00252 { 00253 public: 00254 layerListNode *next; 00255 local_film *layer; 00256 }; 00257 00258 /**************************************************************\ 00259 * * 00260 * class layerList * 00261 * * 00262 * layerList holds a list of metal film layers * 00263 * and calculates the surface impedance of the multilayer * 00264 * * 00265 \**************************************************************/ 00266 class layerList : public surfimp 00267 { 00268 private: 00269 // The head points to the metal layer furthest from the current- 00270 // carrying surface. 00271 layerListNode *head; 00272 00273 public: 00274 00275 parameter Zterm ; // backside termination, initialized to ZVacuum in constructor 00276 00277 // Default constructor creates the empty list. 00278 layerList(); 00279 00280 // Copy constructor creates a complete new copy of the list l. 00281 layerList(const layerList & l); 00282 00283 // The destructor must free each node of the list. 00284 ~layerList(); 00285 00286 // Return TRUE if the list is empty. 00287 int isEmpty(); 00288 00289 // Add a metal film layer 00290 void addlayer(local_film &lay); 00291 00292 // Remove a metal film layer 00293 local_film * remove() ; 00294 00295 // We must overload the = operator because we use dynamic memory 00296 layerList& operator=(const layerList&); 00297 00298 // Return head of list 00299 layerListNode *gethead() {return head; } 00300 00301 double thickness() ; // define this now 00302 complex Zsurf(double freq, double Temp) ; // define this now 00303 00304 }; 00305 00306 // 00307 // Additional work to be done: 00308 // 00309 // - implement anomalous_film class - use nonlocal calculation for surface 00310 // impedance of a normal metal film. 00311 00312 #endif /* SURFACEZ_H */ 00313 00314 00315 00316
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7