/* R_GAA.c / OpenMOM / ch.14 */ #include #include "omm_datalib.h" static void rhombus(double x0, double y0, double z0, double lx, double ly, int div) { omm_geometry_wire(1, x0 - lx / 2, x0, y0, y0 + ly / 2, z0, z0, div); omm_geometry_wire(1, x0 + lx / 2, x0, y0, y0 + ly / 2, z0, z0, div); omm_geometry_wire(1, x0 - lx / 2, x0, y0, y0 - ly / 2, z0, z0, div); omm_geometry_wire(1, x0 + lx / 2, x0, y0, y0 - ly / 2, z0, z0, div); } int main(void) { const double fstart = 5e9; const double fstop = 9e9; const int fdiv = 80; const int N = 11; // odd const double Lx = 25e-3; const double Ly = 50e-3; const double r1 = 0.7e-3; const double r2 = 0.2e-3; const double H = 2.5e-3; const double R0 = 50; const double a = 60; const double d = 2.5e-3; // Šî–{—v‘f’· const double dtor = atan(1) / 45; // initialize omm_init(); // title omm_title("Rhombic Grid Array Antenna"); // geometry // ground omm_ground(); // feed const double x0 = - (N / 2.0) * Lx; omm_geometry_zline(0, H, x0, 0, NINT(H, d)); omm_feed(1, 0); omm_radius(r1); // feed omm_geometry_yline(- Ly / 2, + Ly / 2, H, x0, NINT(Ly, d)); omm_radius(r1); // load omm_geometry_yline(- Ly / 2, + Ly / 2, H, -x0, NINT(Ly, d)); omm_radius(r1); // load omm_geometry_zline(0, H, -x0, 0, NINT(H, d)); omm_load(1, R0); omm_radius(r1); // rhombic const double ly = Lx * tan(dtor * (90 - a)); const int div1 = NINT((Lx / 2) / cos(dtor * (90 - a)), d); for (int i = 0; i < N; i += 2) { const double x = x0 + (i + 0.5) * Lx; for (int side = -1; side <= 1; side += 2) { const double y = side * (Ly / 2); rhombus(x, y, H, Lx, ly, div1); } } int div2 = NINT(2 * Ly, d); div2 = ((div2 + 3) / 4 + 1) * 4; for (int i = 1; i < N; i += 2) { const double x = x0 + (i + 0.5) * Lx; omm_geometry_yline(- Ly, + Ly, H, x - Lx / 2, div2); omm_geometry_yline(- Ly, + Ly, H, x + Lx / 2, div2); // omm_geometry_wire(1, x - Lx / 2, x, + Ly, + Ly + ly / 2, H, H, div1); omm_geometry_wire(1, x + Lx / 2, x, + Ly, + Ly + ly / 2, H, H, div1); // omm_geometry_wire(1, x - Lx / 2, x, - Ly, - Ly - ly / 2, H, H, div1); omm_geometry_wire(1, x + Lx / 2, x, - Ly, - Ly - ly / 2, H, H, div1); // rhombus(x, 0, H, Lx, ly, div1); } // radius omm_radiusall(1, r2); // frequency omm_frequency(fstart, fstop, fdiv); // frequency char. //omm_plotsmith(); omm_plotzin(1, 0, 0, 0); omm_plotyin(1, 0, 0, 0); omm_plotref(1, 0, 0, 0); omm_freqdiv(4); // far1d field omm_plotfar1d('Y', 360, 0); //omm_far1dstyle(0); //omm_far1dcomponent(1, 0, 0); //omm_far1ddb(1); omm_far1dscale(-10, +25, 7); // output omm_outdata("R_GAA.omm"); return 0; }