Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 etr_sim.cpp 00003 ------------ 00004 begin : Wed Dec 04 2013 00005 copyright : (C) 2013 by Richard Crozier 00006 email : richard.crozier@yahoo.co.uk 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 #include "etr_sim.h" 00018 #include "main.h" 00019 00020 00021 ETR_Sim::ETR_Sim() 00022 { 00023 Description = QObject::tr("externally driven transient simulation"); 00024 00025 QString s = Description; 00026 int a = 17; 00027 s[a] = '\n'; 00028 00029 Texts.append(new Text(0, 0, s.left(a), Qt::darkBlue, QucsSettings.largeFontSize)); 00030 if (a != -1) 00031 Texts.append(new Text(0, 0, s.mid(a+1), Qt::darkBlue, QucsSettings.largeFontSize)); 00032 00033 x1 = -10; y1 = -9; 00034 x2 = x1+130; y2 = y1+59; 00035 00036 tx = 0; 00037 ty = y2+1; 00038 Model = ".ETR"; 00039 Name = "ETR"; 00040 00041 Props.append(new Property("IntegrationMethod", "Trapezoidal", false, 00042 QObject::tr("integration method")+ 00043 " [Euler, Trapezoidal, Gear, AdamsMoulton]")); 00044 Props.append(new Property("Order", "2", false, 00045 QObject::tr("order of integration method")+" (1-6)")); 00046 Props.append(new Property("InitialStep", "1 ns", false, 00047 QObject::tr("initial step size in seconds"))); 00048 Props.append(new Property("MinStep", "1e-16", false, 00049 QObject::tr("minimum step size in seconds"))); 00050 Props.append(new Property("MaxIter", "150", false, 00051 QObject::tr("maximum number of iterations until error"))); 00052 Props.append(new Property("reltol", "0.001", false, 00053 QObject::tr("relative tolerance for convergence"))); 00054 Props.append(new Property("abstol", "1 pA", false, 00055 QObject::tr("absolute tolerance for currents"))); 00056 Props.append(new Property("vntol", "1 uV", false, 00057 QObject::tr("absolute tolerance for voltages"))); 00058 Props.append(new Property("Temp", "26.85", false, 00059 QObject::tr("simulation temperature in degree Celsius"))); 00060 Props.append(new Property("LTEreltol", "1e-3", false, 00061 QObject::tr("relative tolerance of local truncation error"))); 00062 Props.append(new Property("LTEabstol", "1e-6", false, 00063 QObject::tr("absolute tolerance of local truncation error"))); 00064 Props.append(new Property("LTEfactor", "1", false, 00065 QObject::tr("overestimation of local truncation error"))); 00066 Props.append(new Property("Solver", "CroutLU", false, 00067 QObject::tr("method for solving the circuit matrix")+ 00068 " [CroutLU, DoolittleLU, HouseholderQR, HouseholderLQ, GolubSVD]")); 00069 Props.append(new Property("relaxTSR", "no", false, 00070 QObject::tr("relax time step raster")+" [no, yes]")); 00071 Props.append(new Property("initialDC", "yes", false, 00072 QObject::tr("perform an initial DC analysis")+" [yes, no]")); 00073 Props.append(new Property("MaxStep", "0", false, 00074 QObject::tr("maximum step size in seconds"))); 00075 } 00076 00077 ETR_Sim::~ETR_Sim() 00078 { 00079 } 00080 00081 Component* ETR_Sim::newOne() 00082 { 00083 return new ETR_Sim(); 00084 } 00085 00086 Element* ETR_Sim::info(QString& Name, char* &BitmapFile, bool getNewOne) 00087 { 00088 Name = QObject::tr("External transient simulation"); 00089 BitmapFile = (char *) "etran"; 00090 00091 if(getNewOne) return new ETR_Sim(); 00092 return 0; 00093 } 00094