/* CurlAntenna.c / OpenMOM / ch.18.1 */ #include #include #include "omm_datalib.h" int main(void) { const double pi = 4 * atan(1); const double fstart = 11.85e9; const double fstop = 11.85e9; const int fdiv = 0; const int N = 0; // =0/7 const double asp = 0.18e-3; // m/rad const double pst = 6.0 * pi; // rad const double pend = 26.12; // rad const double h = 3.6e-3; const double a = 0.3e-3; const double d = 1e-3; // Šî–{—v‘f’· const double srad = 20e-3; const double tilt = 30; // deg const double dtor = pi / 180; char title[BUFSIZ], fout[BUFSIZ]; if (N == 0) { strcpy(title, "Curl Antenna (int)"); strcpy(fout, "CurlAntenna.omm"); } else { sprintf(title, "Curl Antenna Array (int) Na=%d tilt=%gdeg", 3 * N * (N + 1), tilt); sprintf(fout, "CurlAntenna_Na%d_%gdeg.omm", 3 * N * (N + 1), tilt); } // initialize omm_init(); // title omm_title(title); // geometry // ground omm_ground(); const double rst = asp * pst; const int div = NINT(rst * (pend - pst), d); if (N == 0) { // feed omm_geometry_zline(0, d, 0, 0, 1); omm_feed(1, 0); omm_geometry_zline(d, h, 0, 0, NINT(h - d, d)); // curl omm_geometry_xline(0, rst, 0, h, NINT(rst, d)); omm_geometry_wire(2, rst, asp * pend, pst / dtor, pend / dtor, h, h, div); } else { for (int n = 1; n <= N; n++) { const int na = 6 * n; const double r = n * srad; for (int ia = 0; ia < na; ia++) { const double x0 = r * cos(2 * pi * ia / na); const double y0 = r * sin(2 * pi * ia / na); // feed omm_geometry_zline(0, d, x0, y0, 1); omm_feed(1, 0); omm_geometry_zline(d, h, x0, y0, NINT(h - d, d)); // helix const double f = (fstart + fstop) / 2; const double lambda = 2.99792458e8 / f; const double angle0 = -360 * (x0 / lambda) * sin(tilt * dtor); // deg omm_geometry_wire(2, 0, rst, angle0 + pst / dtor, angle0 + pst / dtor, 0, 0, NINT(rst, d)); omm_offset(x0, y0, h); omm_geometry_wire(2, rst, asp * pend, angle0 + pst / dtor, angle0 + pend / dtor, 0, 0, div); omm_offset(x0, y0, h); } } } // radius omm_radiusall(1, a); // not draw node //omm_geom3dnode(0, 0, 0); // frequency omm_frequency(fstart, fstop, fdiv); // current distribution //omm_plotcurrent(1, 0); // frequency char. //omm_plotsmith(); //omm_plotzin(1, 0, 0, 0); //omm_plotyin(1, 0, 0, 0); //omm_plotref(1, 0, 0, 0); //omm_freqdiv(10); // far1d field omm_plotfar1d('Y', 360, 0); omm_far1dcomponent(0, 1, 1); //omm_far1dscale(-10, +35, 9); // window size omm_window3d(400, 400, 12, 60, 30); // output omm_outdata(fout); return 0; }