PythonでFDTD(3)で導出した電界と磁界に関する式をプログラムし易いように書き直すと、 となる. 時間ステップは、Courantの安定条件より算出している. 実際のコード # Python 3.13.7 # NumPy 2.4.0 # Matplotlib 3.10.8 # scipy 1.16.3 # cupy-cuda13x 13.6.0 # 2026.2.16 # ©ぐらすあー ...
一次元FDTDの最終的なコードなんだけど、cupyを使うと何故か吸収境界が正常に動作しないようで、反射が起きてしまう.とりあえずnumpyを使ったバージョンを掲載しておく. # Python 3.13.7 # NumPy 2.4.2 # Matplotlib 3.10.8 # scipy 1.17.02 # cupy-cuda13x 14.0.0 # 2026.2.17 # ©ぐらす ...
%% code for 1D FDTD (gaussian pulse hitting a lossy dielectric medium-pml boundary condition-using electric flux density) Ex_low_m1 = 0; %leftmost boundary condition Ex_low_m2 = 0; %leftmost boundary ...
infinite_space=false;%Whether to keep on shifting it to the right/left so the wave never actually stops at edges offset=0;%How far light should have traveled in that time, compared to the current grid ...
Abstract: Comparison of the two different approaches, the FDTD and VIETD algorithms, for solution of the 1D bounded nonstationary electrodynamics problem is implemented. Accuracy and stability of ...