2 atlc - arbitrary transmission line calculator, for the analysis of
3 transmission lines are directional couplers.
5 Copyright (C) 2002. Dr. David Kirkby, PhD (G8WRB).
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either package_version 2
10 of the License, or (at your option) any later package_version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22 Dr. David Kirkby, e-mail drkirkby at ntlworld.com
27 /* dualcoax attempts to find the properties of a coaxial cable with two
28 concentric dielectrics between the inner and outer conductors, and so
29 can be used as a useful test for atlc */
45 #define MU_0 4*M_PI*1e-7
46 #define EPSILON_0 8.854187817e-12 /* Data taken from NPL */
49 int main (int argc, char **argv)
51 double velocity, velocity_factor, r0, r1, r2, er1, er2, c, l, zo;
55 fprintf(stderr,"Find properties of a coaxial cable with two different concentric dielectrics.\n\n");
56 fprintf(stderr,"Usage: dualcoax D1 D2 D3 Er1 Er2\n");
57 fprintf(stderr,"dualcoax %s: arguments are:\n",PACKAGE_VERSION);
58 fprintf(stderr," D1 is the diameter of the inner conductor\n");
59 fprintf(stderr," D2 is the outer diameter of the inner dielectic\n");
60 fprintf(stderr," D3 is the inner diameter of the outer conductor\n");
61 fprintf(stderr," Er1 is the permittivity of the inner dielectric\n");
62 fprintf(stderr," Er2 is the permittivity of the outer dielectric\n");
71 fprintf(stderr,"Sorry, the diameter of the inner conductor (d0) must be\n");
72 fprintf(stderr,"less than the outer diameter of the inner dielectic (d1)\n");
76 fprintf(stderr,"Sorry, the diameter of the inner dielectric (d1) must be\n");
77 fprintf(stderr,"less than the inner diameter of the outer conductor (d2)\n");
81 fprintf(stderr,"Sorry, the permittivity of the inner dielectric Er1 must be >=1");
85 fprintf(stderr,"Sorry, the permittivity of the outer dielectric Er2 must be >=1");
88 c=2*M_PI*er1*er2*EPSILON_0/(er1*log(r2/r1)+er2*log(r1/r0));
89 l=MU_0*log(r2/r0)/(2*M_PI);
91 velocity_factor=(er1*er2*log(r2/r1))/(er1*log(r2/r1)+er2*log(r1/r0));
92 velocity=1.0/(velocity_factor*sqrt(MU_0 * EPSILON_0));
93 printf("Zo = %8.3f Ohms C= %8.3f pF/m L= %8.3f nH/m v= %g m/s v_f= %8.3f\n", zo,c*1e12,l*1e9, velocity, velocity_factor);