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 00042 #ifndef ANTENNA_H 00043 #define ANTENNA_H 00044 00045 00046 #include "circuit.h" 00047 #include "elements.h" 00048 #include "transformer.h" 00049 00050 // ******************************************************************** 00051 00083 class slot_antenna : public nport 00084 { 00085 public: 00087 complex_parameter Z; 00088 00093 slot_antenna(const abstract_real_parameter & p = device::Z0) 00094 : nport(3), Z(&p) 00095 { info.noise = info.active = info.source = false; } 00096 00101 slot_antenna(const abstract_complex_parameter & p) 00102 : nport(3), Z(&p) 00103 { info.noise = info.active = info.source = false; } 00104 00105 private: 00106 // The calculation is done here. 00107 virtual void recalc(); 00108 00109 }; 00110 00111 00112 // ******************************************************************** 00113 00171 class twin_slot_antenna : public nport 00172 { 00173 public: 00174 00176 nport *pA; 00177 00179 parameter Temp; 00180 00182 twin_slot_antenna(); 00183 00188 twin_slot_antenna(nport & r); 00189 00194 twin_slot_antenna & set(nport & r); 00195 00200 twin_slot_antenna & set_T(double t) 00201 { Temp = t; return *this; } 00202 00207 twin_slot_antenna & set_T(abstract_real_parameter * t) 00208 { Temp = t; return *this; } 00209 00214 int size() { return (pA) ? 5 : 0; } 00215 00216 // is an "active" noise source if its temperature is not the global T 00217 const nport::data_info & get_data_info() 00218 { info.active = (Temp != device::T); return info; } 00219 00220 private: 00221 void recalc() { recalc_S(); data.passive_noise(f, Temp); } 00222 void recalc_S(); 00223 00225 simple_nport a; 00226 00228 series_tee t1,t2; 00229 00231 circuit c; 00232 00233 }; 00234 00235 // ******************************************************************** 00236 00250 class power_divider : public nport 00251 { 00252 public: 00257 parameter Temp; 00258 00260 power_divider() : nport(3), Temp(&device::T) 00261 { 00262 info.source = false; 00263 const double s = 1.0/RmsToPeak; 00264 data.S[1][2] = data.S[2][1] = s; 00265 data.S[1][3] = data.S[3][1] = s; 00266 } 00267 00272 power_divider & set_T(double t) 00273 { Temp = t; return *this; } 00274 00279 power_divider & set_T(abstract_real_parameter * t) 00280 { Temp = t; return *this; } 00281 00282 // is an "active" noise source if its temperature is not the global T 00283 const nport::data_info & get_data_info() 00284 { info.active = (Temp != device::T); return info; } 00285 00286 private: 00287 // recalc()'s needn't do anything to the S matrix. 00288 void recalc() { data.passive_noise(f, Temp); } 00289 void recalc_S() { } 00290 }; 00291 00292 #endif /* ANTENNA_H */
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7