!**************************************************************************** ! FDTD (Finite Difference Time Domain) method ! by TAKUICHI HIRANO ! 言語: FORTRAN90 ! コンパイル環境: Compaq Visual Fortran ! 参考文献: 宇野亨, 「FDTD法による電磁界およびアンテナ解析」, コロナ社, 1998 !**************************************************************************** !**************************************************************************** ! メインルーチン !**************************************************************************** program main use fdtd implicit none integer :: i,j open(1,file='test.txt') call init ! 初期化 call modeling ! 物体のモデリング call test_modeling ! モデリングの確認 time=0.0d0 do i=1,ntime_start call renew end do do i=1,(ntime_end-ntime_start),ntime_step do j=1,ntime_step call renew ! 電磁界の更新処理 end do call output ! ファイルに出力 print *,'TIME STEP=',ntime_start+i pause end do close(1) end program !---------------------------------------------------------------------------- ! 更新処理 !---------------------------------------------------------------------------- subroutine renew use fdtd implicit none call electric_field ! 電界を更新 call electric_boundary_condition ! セルがずれるための補正境界条件 !call ecur_source ! 電流源による励振 !call directional_point_source ! 方向性点波源による励振 call plane_wave_source ! 平面波による励振 time=time+dt/2.0d0 call magnetic_field ! 磁界を更新 call magnetic_boundary_condition ! セルがずれるための補正境界条件 !call mcur_source ! 磁流源による励振 call absorbing_boundary_condition ! 吸収境界条件 time=time+dt/2.0d0 return end subroutine ! ! End of file !