ガウシアン型の平面波を誘電体円柱にぶつけてみたときの様子
ガウシアン型の平面波を誘電体円柱にぶつけてみたときの様子。
開発環境:VsualC++2008Expressedition
計算スキーム:FDTD
アニメーション:OPENGL
波源:平面波 ガウシアン
境界条件:PML
ガウシアン型平面波の生成
VsualC++ OPENGL FDTD の詳細は今後に行います
int main( int argc, char **argv ){
//平面波の初期値
double d = -30.0 * dx ;
t0 = 20.0*dt;
double phy0 = PI/2.0+PI;
for(i=0; i<2*L+Nx; i++){
for(j=0; j<2*L+Nx; j++){
Ez[i][j] = Plane_GaussianPulse( t+ (dx*double(i)*cos(phy0)+dy*double(j)*sin(phy0))/c - d/c ,t0 );
}
}
t = dt/2;
for(i=0; i<2*L+Nx; i++){
for(j=0; j<2*L+Nx; j++){
Hx[i][j] = -sin(phy0) * Plane_GaussianPulse( t+ (dx*double(i)*cos(phy0)+dy*(double(j)+0.5)*sin(phy0))/c - d/c ,t0 ) / (120.0*PI) ;
Hy[i][j] = cos(phy0) * Plane_GaussianPulse( t+ (dx*(double(i)+0.5)*cos(phy0)+dy*double(j)*sin(phy0))/c - d/c ,t0 ) / (120.0*PI) ;
}
}
}
double Plane_GaussianPulse(double t ,double t0){
double alpha = pow(4.0/t0,2);
return exp(-alpha*pow(t-t0,2));
}




