CTwoQuarter.cpp

Go to the documentation of this file.
00001 #include "CTwoQuarter.h"
00002 
00003 CTwoQuarter::CTwoQuarter()
00004 {}
00005 CTwoQuarter::~CTwoQuarter()
00006 {}
00007 
00008 void CTwoQuarter::CalcResponse(double freq, double distance)
00009 {
00010         double sigma1 = 1./(rho1*1e11);
00011         double sigma2 = 1./(rho2*1e11);
00012         double omega = 2 * PI * freq;
00013         double x = distance * 100;
00014         double h = height * 100;
00015         dcomp U11, U21;
00016         dcomp U1n, U2n;
00017         dcomp U1,U2;
00018         dcomp k1,k2;
00019         double d1 = sqrt(1./(2 * PI * sigma1 * omega));
00020         double d2 = sqrt(1./(2 * PI * sigma2 * omega));
00021         double p1 = d1/ sqrt(2.);
00022         double p2 = d2/sqrt(2.);
00023         double h1 = h / p1;
00024         double h2 = h / p2;
00025         int nmax = 20;
00026         U1 = 0;
00027         U2 = 0;
00028         for (int n = 1; n < nmax; n++)
00029         {
00030                 k1 = sqrt(pow(n*PI,2) + I * pow(h1,2));
00031                 k2 = sqrt(pow(n*PI,2) + I * pow(h2,2));
00032                 U1n = pow(1.*n,2) * exp(-k1*abs(x)/h)/(pow(k1*k2,2)*(1. + pow(h2/h1,2)* k1/k2));
00033                 U2n = pow(1.*n,2) * exp(-k2*abs(x)/h)/(pow(k1*k2,2)*(1. + pow(h1/h2,2)* k2/k1));
00034                 U1 += U1n;
00035                 U2 += U2n;
00036         }
00037         Z1 = omega*h/pow(h1,2)*(-sqrt(I)*h1*(1.+I*tanh(h1/sqrt(2.))*tan(h1/sqrt(2.)))
00038                 /(tanh(h1/sqrt(2.))+I*tan(h1/sqrt(2.)))
00039                 +2*pow(PI,2)*I*(pow(h1,2)-pow(h2,2))*U1);
00040         Z2 = omega*h/pow(h2,2)*(-sqrt(I)*h2*(1.+I*tanh(h2/sqrt(2.))*tan(h2/sqrt(2.)))
00041                 /(tanh(h2/sqrt(2.))+I*tan(h2/sqrt(2.)))
00042                 +2*pow(PI,2)*I*(pow(h2,2)-pow(h1,2))*U2);
00043                 
00044 }

Generated on Tue Aug 4 16:04:06 2009 for GPLIB++ by  doxygen 1.5.8