⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 利用不均一分割的FDTD解析程序
💻 C
字号:
/* *                NUM_FDTD *   FDTD Analysis by Using Non-Uniform Mesh *       (Applied to Monopole Antenna) * *   Ver. 1.0unix *                    --- Sep 21, 1997 * *   Programmed by Huiling Jiang *                hjiang@arailab.dnj.ynu.ac.jp * *   Special thanks to ... *           Mr. Toshifumi MORI *           Mr. Yoshinobu TANAKA *           Mr. Kazuhiro FUJIMORI * */#include <stdio.h>#include <stdlib.h>#include <complex.h>#include "parameter.h"#include "initial.c"#include "antenna.c"#include "pulse.c"#include "calculation.c"#include "fourier.c"void initial(void);void antenna(void);double pulse(int n);void calculation(double vz);void fourier(void);main(int argc, char *argv[]){	int n;	double vz,hxn,hyn,current,voltage;	char name[20];	if ((fp=fopen("v-i.dat","wb"))==NULL){		printf("file %s can't open \n", "v-i.dat");		exit(-1);	}	initial();                     // Initialize of components	for(n=0;n<=nt;n++){		antenna();                 // Antenna's configuration		vz = pulse(n);             // Incident wave		calculation(vz);           // Calculation of E & H components		hxn = hxi[Fx][Fy-1][Fz]-hxi[Fx][Fy][Fz];		hyn = hyi[Fx][Fy][Fz]-hyi[Fx-1][Fy][Fz];		current = hxn*dx_sub+hyn*dy_sub;   		fprintf(fp,"%d\t%e\t%e\n",n,vz,current);	}	fclose(fp);	fourier();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -