Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/twistedpair.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                               twistedpair.cpp
00003                              -----------------
00004     begin                : Dec 19 2006
00005     copyright            : (C) 2006 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 "twistedpair.h"
00019 
00020 
00021 TwistedPair::TwistedPair()
00022 {
00023   Description = QObject::tr("twisted pair transmission line");
00024 
00025   Arcs.append(new Arc(-25,-36, 18, 38,16*230, 16*68,QPen(Qt::darkBlue,1)));
00026   Arcs.append(new Arc(-25, -2, 18, 38, 16*62, 16*68,QPen(Qt::darkBlue,1)));
00027 
00028   Arcs.append(new Arc(-17,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
00029   Arcs.append(new Arc(-17, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
00030 
00031   Arcs.append(new Arc( -9,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
00032   Arcs.append(new Arc( -9, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
00033 
00034   Arcs.append(new Arc( -1,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
00035   Arcs.append(new Arc( -1, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
00036 
00037   Arcs.append(new Arc(  7,-36, 18, 38,16*242, 16*68,QPen(Qt::darkBlue,1)));
00038   Arcs.append(new Arc(  7, -2, 18, 38, 16*50, 16*68,QPen(Qt::darkBlue,1)));
00039 
00040   Arcs.append(new Arc(-40,-10, 20, 33, 16*32, 16*58,QPen(Qt::darkBlue,2)));
00041   Arcs.append(new Arc(-40,-23, 20, 33,16*270, 16*58,QPen(Qt::darkBlue,2)));
00042   Arcs.append(new Arc( 20,-10, 20, 33, 16*90, 16*58,QPen(Qt::darkBlue,2)));
00043   Arcs.append(new Arc( 20,-23, 20, 33,16*212, 16*58,QPen(Qt::darkBlue,2)));
00044 
00045   Ports.append(new Port(-30,-10));
00046   Ports.append(new Port( 30,-10));
00047   Ports.append(new Port( 30, 10));
00048   Ports.append(new Port(-30, 10));
00049 
00050   x1 = -30; y1 =-12;
00051   x2 =  30; y2 = 12;
00052 
00053   tx = x1+4;
00054   ty = y2+4;
00055   Model = "TWIST";
00056   Name  = "Line";
00057 
00058   Props.append(new Property("d", "0.5 mm", true,
00059     QObject::tr("diameter of conductor")));
00060   Props.append(new Property("D", "0.8 mm", true,
00061     QObject::tr("diameter of wire (conductor and insulator)")));
00062   Props.append(new Property("L", "1.5", true,
00063     QObject::tr("physical length of the line")));
00064   Props.append(new Property("T", "100", false,
00065     QObject::tr("twists per length in 1/m")));
00066   Props.append(new Property("er", "4", false,
00067     QObject::tr("dielectric constant of insulator")));
00068   Props.append(new Property("mur", "1", false,
00069     QObject::tr("relative permeability of conductor")));
00070   Props.append(new Property("rho", "0.022e-6", false,
00071     QObject::tr("specific resistance of conductor")));
00072   Props.append(new Property("tand", "4e-4", false,
00073     QObject::tr("loss tangent")));
00074   Props.append(new Property("Temp", "26.85", false,
00075     QObject::tr("simulation temperature in degree Celsius")));
00076 }
00077 
00078 TwistedPair::~TwistedPair()
00079 {
00080 }
00081 
00082 Component* TwistedPair::newOne()
00083 {
00084   return new TwistedPair();
00085 }
00086 
00087 Element* TwistedPair::info(QString& Name, char* &BitmapFile, bool getNewOne)
00088 {
00089   Name = QObject::tr("Twisted-Pair");
00090   BitmapFile = (char *) "twistedpair";
00091 
00092   if(getNewOne)  return new TwistedPair();
00093   return 0;
00094 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines