Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 noise_iv.cpp 00003 -------------- 00004 begin : Sat Aug 20 2005 00005 copyright : (C) 2005 by Michael Margraf 00006 email : michael.margraf@alumni.tu-berlin.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "noise_iv.h" 00019 00020 00021 Noise_iv::Noise_iv() 00022 { 00023 Description = QObject::tr("correlated current sources"); 00024 00025 // left noise source 00026 Arcs.append(new Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); 00027 Lines.append(new Line(-30, 30,-30, 12,QPen(Qt::darkBlue,2))); 00028 Lines.append(new Line(-30,-30,-30,-12,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-30, 7,-30, -7,QPen(Qt::darkBlue,3))); 00030 Lines.append(new Line(-30, -6,-34, 0,QPen(Qt::darkBlue,3))); 00031 Lines.append(new Line(-30, -6,-26, 0,QPen(Qt::darkBlue,3))); 00032 00033 Lines.append(new Line(-29, 12,-42, -1,QPen(Qt::darkBlue,2))); 00034 Lines.append(new Line(-24, 10,-27, 7,QPen(Qt::darkBlue,2))); 00035 Lines.append(new Line(-37, -3,-40, -6,QPen(Qt::darkBlue,2))); 00036 Lines.append(new Line(-20, 7,-25, 2,QPen(Qt::darkBlue,2))); 00037 Lines.append(new Line(-34, -7,-37,-10,QPen(Qt::darkBlue,2))); 00038 Lines.append(new Line(-18, 1,-31,-12,QPen(Qt::darkBlue,2))); 00039 00040 // right noise source 00041 Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); 00042 Lines.append(new Line( 30, 30, 30, 12,QPen(Qt::darkBlue,2))); 00043 Lines.append(new Line( 30,-30, 30,-12,QPen(Qt::darkBlue,2))); 00044 00045 Lines.append(new Line( 31, 12, 18, -1,QPen(Qt::darkBlue,2))); 00046 Lines.append(new Line( 36, 10, 20, -6,QPen(Qt::darkBlue,2))); 00047 Lines.append(new Line( 40, 7, 23,-10,QPen(Qt::darkBlue,2))); 00048 Lines.append(new Line( 42, 2, 28,-12,QPen(Qt::darkBlue,2))); 00049 00050 Lines.append(new Line(-18, 0, 18, 0,QPen(Qt::darkBlue,3))); 00051 00052 Ports.append(new Port(-30,-30)); 00053 Ports.append(new Port( 30,-30)); 00054 Ports.append(new Port( 30, 30)); 00055 Ports.append(new Port(-30, 30)); 00056 00057 x1 = -44; y1 = -30; 00058 x2 = 44; y2 = 30; 00059 00060 tx = x1+4; 00061 ty = y2+4; 00062 Model = "IVnoise"; 00063 Name = "SRC"; 00064 00065 Props.append(new Property("i1", "1e-6", true, 00066 QObject::tr("current power spectral density of source 1"))); 00067 Props.append(new Property("v2", "1e-6", true, 00068 QObject::tr("voltage power spectral density of source 2"))); 00069 Props.append(new Property("C", "0.5", true, 00070 QObject::tr("normalized correlation coefficient"))); 00071 Props.append(new Property("e", "0", false, 00072 QObject::tr("frequency exponent"))); 00073 Props.append(new Property("c", "1", false, 00074 QObject::tr("frequency coefficient"))); 00075 Props.append(new Property("a", "0", false, 00076 QObject::tr("additive frequency term"))); 00077 } 00078 00079 Noise_iv::~Noise_iv() 00080 { 00081 } 00082 00083 Component* Noise_iv::newOne() 00084 { 00085 return new Noise_iv(); 00086 } 00087 00088 Element* Noise_iv::info(QString& Name, char* &BitmapFile, bool getNewOne) 00089 { 00090 Name = QObject::tr("Correlated Noise Sources"); 00091 BitmapFile = (char *) "noise_iv"; 00092 00093 if(getNewOne) return new Noise_iv(); 00094 return 0; 00095 }