/* tunnel.c 直線トンネル make EEM-RTM data */ #include #include "rtm_datalib.h" int main(void) { int i; double xp[4], yp[4], zp[4]; double a1, a2; const double pi = 4 * atan(1); // データ const double l = 150; // トンネルの長さ[m] const double r = 3.0; // 断面の半径[m] const double h = 2.0; // 側壁の高さ[m] const double h_tx = 4.5; // 送信アンテナの道路面からの高さ[m] const double h_rx = 1.5; // 受信アンテナの道路面からの高さ[m] const int rdiv = 18; // 断面の半円の分割数 // ==== initialize ==== rtm_init(); // ==== data ==== // (2) title rtm_title("直線トンネル"); // (3) frequency rtm_freq(2.5e9); // (4) material rtm_material(5.0, 0.1, 0, ""); // 壁(材質番号=2) rtm_material(10.0, 0.2, 0, ""); // 床(材質番号=3) // (5/6) geometry // 床 rtm_plane_rect(0, -r, l, +r, 0, 3); // 側壁 rtm_pillar_wall(0, -r, l, -r, 0, h, 2); rtm_pillar_wall(0, +r, l, +r, 0, h, 2); // 天井(半円) xp[0] = 0; xp[1] = 0; xp[2] = l; xp[3] = l; for (i = 0; i < rdiv; i++) { a1 = pi * i / rdiv; a2 = pi * (i + 1) / rdiv; yp[0] = r * cos(a1); yp[1] = r * cos(a2); yp[2] = r * cos(a2); yp[3] = r * cos(a1); zp[0] = h + r * sin(a1); zp[1] = h + r * sin(a2); zp[2] = h + r * sin(a2); zp[3] = h + r * sin(a1); rtm_plane(xp, yp, zp, 2); } // (8) TX rtm_antenna_iso(1); // 無指向性アンテナ、垂直偏波 rtm_tx(0, 0, h_tx, 1, 0); // (9) Rx0 //rtm_rx0(0, 0, 0); // (10) Rx1 xp[0] = 0; xp[1] = l; yp[0] = 0; yp[1] = 0; zp[0] = h_rx; zp[1] = h_rx; rtm_rx1(xp, yp, zp, 1000); // (11) Rx2 xp[0] = 0; xp[1] = 0; xp[2] = l; xp[3] = l; yp[0] = -r; yp[1] = +r; yp[2] = +r; yp[3] = -r; zp[0] = h_rx; zp[1] = h_rx; zp[2] = h_rx; zp[3] = h_rx; rtm_rx2(xp, yp, zp, 50, 500); // (12) solver rtm_solver(5, 360, 0, 0, 0, 0, 1, 0.0, 300); // (13) misc rtm_misc(500, 50); // ==== output ==== rtm_outdat("tunnel.rtm"); return 0; }