/* pcowg.c */ #include "ofd_datalib.h" int main(void) { const int nx = 40; // X•űŒüŒ‹ť” const int ny = 25; // Y•űŒüŒ‹ť” const int mx = 30; // X•űŒü“ą”g˜H’ˇ‚ł const int my = 12; // Y•űŒü“ą”g˜H”ԍ† const double er = 11.56; // —U“d—Ś const double a = 0.58e-6; // ŽüŠú const double r = 0.18 * a; // ”źŒa const double d = 0.05e-6; // ƒZƒ‹ƒTƒCƒY const double margin = 2 * a; // XY•űŒü—]”’ // initialize ofd_init(); // title ofd_title("ƒtƒHƒgƒjƒbƒNŒ‹ť“ą”g˜H(2D)"); // mesh const double x0 = -margin; const double x1 = (nx * a) + margin; ofd_xsection(2, x0, x1); ofd_xdivision(1, NINT(x1 - x0, d)); const double y0 = -margin; const double y1 = (ny * a) + margin; ofd_ysection(2, y0, y1); ofd_ydivision(1, NINT(y1 - y0, d)); const double z0 = -d; const double z1 = -z0; ofd_zsection(2, z0, z1); ofd_zdivision(1, 2); // material ofd_material(er, 0, 1, 0, ""); // geometry for (int i = 0; i < nx; i++) { for (int j = 0; j < ny; j++) { const double x = (i + 0.5) * a; const double y = (j + 0.5) * a; if ((i < mx) && (j == my)) { ; // X•űŒü“ą”g˜H } else if ((i == mx) && (j > my)) { ; // Y•űŒü“ą”g˜H } else if ((i == mx - 1) && (j == my + 1)) { ; // ƒR[ƒi[ˆ— } else { ofd_geometry(2, 13, x - r, x + r, y - r, y + r, z0, z1); } } } // incidence const double xc = (mx + 0.5) * a; const double yc = (my + 0.5) * a; const double xf = 8 * a; ofd_feed('Z', xf, yc, -0.5 * d, 1, 0, 50); ofd_feed('Z', xf, yc, +0.5 * d, 1, 0, 50); // point const double lp = 8 * a; ofd_point('Z', xc - lp, yc, 0, "+X"); ofd_point('Z', xc, yc + lp, 0, ""); // frequency const double f0 = 150e12; const double f1 = 240e12; ofd_frequency1(f0, f1, 200); ofd_frequency2(f0, f1, 9); // solver ofd_solver(20000, 200, 1e-3); ofd_pbc(0, 0, 1); // iteration ofd_plotiter(1); // S-parameter ofd_plotspara(2, -25, +5, 6); ofd_freqdiv(9); // near-2d ofd_plotnear2d("E", 'Z', 0); ofd_near2ddim(1, 0); //ofd_near2ddb(1); //ofd_near2dscale(-30, 0); ofd_near2dcontour(1); ofd_near2dobj(1); // output ofd_outdata("pcowg.ofd"); return 0; }