/* InvF_EBG.c / OpenMOM / ch.11 */ #include #include "omm_datalib.h" int main(void) { const double fstart = 5.5e9; const double fstop = 6.5e9; const int fdiv = 50; const double L6 = 50e-3; const double W = 0.03 * L6; const double LV = 0.04 * L6; const double DBS = 0.02 * L6; const double dfeed = 0.392 * L6; const double Spatch = 0.246 * L6; const double rvia = 0.024 * L6; const double delta = 0.03 * L6; double d = 2e-3; const int N = 6; // even const double LH = 0.04 * L6; char title[BUFSIZ], fout[BUFSIZ]; sprintf(title, "InvF-EBG N=%d LH=%.2fL6", N, LH / L6); strcpy(fout, "InvF_EBG.omm"); // initialize omm_init(); // title omm_title(title); // geometry // EBG const double x0 = - (N * Spatch + (N - 1) * delta) / 2 + Spatch / 2; const double y0 = - (N * Spatch + (N - 1) * delta) / 2 + Spatch / 2; const int divpatch = NINT(Spatch, d); for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { const double x = x0 + i * (Spatch + delta); const double y = y0 + j * (Spatch + delta); // patch omm_geometry_zrect(LV, x - Spatch / 2, x + Spatch / 2, y - Spatch / 2, y + Spatch / 2, divpatch, divpatch); omm_radius(0.2 * d); // via omm_geometry_zline(0, LV, x, y, NINT(LV, d)); omm_radius(rvia); } } // InvF : fine mesh d /= 4; // feed @ -X const int nfeed = NINT(LV, d); omm_geometry_zline(0, d, - dfeed / 2, 0, 1); omm_feed(1, 0); //omm_radius(0.3 * W); // InvF : -X and +X for (int ix = -1; ix <= 1; ix += 2) { const double x1 = ix * (dfeed / 2 + W / 2 + DBS + W); const double x2 = ix * (dfeed / 2 + W / 2 + DBS); const double x3 = ix * (dfeed / 2); const double x4 = ix * (dfeed / 2 - LH); omm_geometry_yrect(0, LV, 0, x1, x2, nfeed, NINT(x1 - x2, d)); omm_geometry_yrect(0, LV, LV + W, x1, x2, NINT(W, d), NINT(x1 - x2, d)); omm_geometry_yrect(0, LV, LV + W, x2, x3, NINT(W, d), NINT(x2 - x3, d)); omm_geometry_yrect(0, LV, LV + W, x3, x4, NINT(W, d), NINT(x3 - x4, d)); if (nfeed > 1) { omm_geometry_zline(d, LV, x3, 0, nfeed - 1); } } // InvF : -Y and +Y for (int iy = -1; iy <= 1; iy += 2) { const double y1 = iy * (dfeed / 2 + W / 2 + DBS + W); const double y2 = iy * (dfeed / 2 + W / 2 + DBS); const double y3 = iy * (dfeed / 2); const double y4 = iy * (dfeed / 2 - LH); omm_geometry_xrect(0, y1, y2, LV, 0, NINT(y1 - y2, d), nfeed ); omm_geometry_xrect(0, y1, y2, LV, LV + W, NINT(y1 - y2, d), NINT(W, d)); omm_geometry_xrect(0, y2, y3, LV, LV + W, NINT(y2 - y3, d), NINT(W, d)); omm_geometry_xrect(0, y3, y4, LV, LV + W, NINT(y3 - y4, d), NINT(W, d)); if (nfeed > 1) { omm_geometry_zline(d, LV, 0, y3, nfeed - 1); } } // radius omm_radiusall(1, 0.3 * d); // ground omm_ground(); // frequency omm_frequency(fstart, fstop, fdiv); // frequency char. omm_plotzin(1, 0, 0, 0); omm_plotyin(1, 0, 0, 0); omm_plotref(1, 0, 0, 0); // far1d field /* omm_plotfar1d('Y', 180, 0); omm_far1dstyle(0); omm_far1dcomponent(1, 0, 0); omm_far1ddb(1); omm_far1dscale(-15, +10, 5); */ // output omm_outdata(fout); return 0; }