E01_Maxwell_2Drz
模块定位
E01_Maxwell_2Drz 是轴对称 2D (r,z) FDTD 内核。它把完整柱坐标 Maxwell 方程在
\(\partial/\partial\phi=0\) 条件下拆成两个互不耦合的子系统:TMz Er, Hphi, Ez 和 TEz Ephi, Hr, Hz。
推荐路径
初学公式和轴线处理:先看 2D RZ notes。
准备调用 routine:先看 FDTD Usage Cookbook,再进入下表的具体 subroutine。
使用吸收边界:先看 CPML Cookbook,再看
mod_E01_cpml_*和sub_E01_cpml_*页面。验证改动:运行
tests/005_maxwell中的 single-step、m=0 equivalence、MMS 和 CPML wave-packet 测试。
最小调用顺序
每个时间步通常先用整步电场更新半步磁场,再用半步磁场更新下一整步电场。若只求解一个分量组,
只调用对应的一对 H / E routine。
! Ephi / Hr / Hz field set
call sub_E01_fdtd_2d_rz_tez_H(..., Ephi, Hr, Hz, dt, dr, dz, mu)
call fill_H_boundaries_or_ghosts(...)
call sub_E01_fdtd_2d_rz_tez_E(..., Ephi, Hr, Hz, dt, dr, dz, ep)
! Er / Ha(Hphi) / Ez field set
call sub_E01_fdtd_2d_rz_tmz_H(..., Ha, Er, Ez, dt, dr, dz, mu)
call fill_H_boundaries_or_ghosts(...)
call sub_E01_fdtd_2d_rz_tmz_E(..., Ha, Er, Ez, dt, dr, dz, ep)
下表同时列出 module wrapper 和可直接调用的 subroutine 页面。module 行说明 include/use 关系,sub 行说明实际执行的场分量更新。
文件 |
角色 |
|---|---|
2D RZ Yee 网格、TEz/TMz 拆分、轴线闭合和更新公式说明。 |
|
FDTD TEz 分量组 module wrapper,include |
|
FDTD TEz 分量组电场更新核;用 |
|
FDTD TEz 分量组磁场更新核;用 |
|
FDTD TMz 分量组 module wrapper,include |
|
FDTD TMz 分量组电场更新核;用 |
|
FDTD TMz 分量组磁场更新核;用 |
|
CPML TEz 分量组 module wrapper,include 对应 |
|
CPML 电场更新核;对 |
|
CPML 磁场更新核;对 |
|
CPML TMz 分量组 module wrapper,include 对应 |
|
CPML 电场更新核;对 |
|
CPML 磁场更新核;对 |
调用注意
更新区间 il:iu、kl:ku 应避开未准备好的 ghost cells。轴线 i=0 有专门闭合逻辑;
调用方应保持场数组范围、边界填充和 CPML memory variables 与更新核使用的位置一致。
Module Role
E01_Maxwell_2Drz contains axisymmetric 2D (r,z) FDTD kernels. Under
\(\partial/\partial\phi=0\), the full cylindrical Maxwell equations split
into two decoupled subsystems: TMz Er, Hphi, Ez and TEz Ephi, Hr, Hz.
Recommended Path
To learn the formulas and axis handling, start with 2D RZ notes.
To integrate routines, read FDTD Usage Cookbook and then open the specific subroutine page from the table below.
To use absorbing boundaries, read CPML Cookbook and then the
mod_E01_cpml_*andsub_E01_cpml_*pages.To validate changes, run the
tests/005_maxwellsingle-step, m=0 equivalence, MMS, and CPML wave-packet tests.
Minimal Call Order
A time step usually advances half-step magnetic fields from integer-time
electric fields, then advances the next integer-time electric fields from
half-step magnetic fields. If you solve only one field set, call only its
matching H / E routine pair.
! Ephi / Hr / Hz field set
call sub_E01_fdtd_2d_rz_tez_H(..., Ephi, Hr, Hz, dt, dr, dz, mu)
call fill_H_boundaries_or_ghosts(...)
call sub_E01_fdtd_2d_rz_tez_E(..., Ephi, Hr, Hz, dt, dr, dz, ep)
! Er / Ha(Hphi) / Ez field set
call sub_E01_fdtd_2d_rz_tmz_H(..., Ha, Er, Ez, dt, dr, dz, mu)
call fill_H_boundaries_or_ghosts(...)
call sub_E01_fdtd_2d_rz_tmz_E(..., Ha, Er, Ez, dt, dr, dz, ep)
The table lists both module wrappers and directly callable subroutine pages. Module rows describe include/use relations; subroutine rows describe the actual field-component update performed by each kernel.
File |
Role |
|---|---|
Notes for the 2D RZ Yee grid, TEz/TMz split, axis closure, and update formulas. |
|
FDTD TEz component group module wrapper including |
|
FDTD TEz component group electric-field kernel; updates |
|
FDTD TEz component group magnetic-field kernel; updates |
|
FDTD TMz component group module wrapper including |
|
FDTD TMz component group electric-field kernel; updates |
|
FDTD TMz component group magnetic-field kernel; updates |
|
CPML TEz component group module wrapper including the corresponding |
|
CPML electric-field kernel; adds split-field memory corrections to |
|
CPML magnetic-field kernel; adds split-field memory corrections to |
|
CPML TMz component group module wrapper including the corresponding |
|
CPML electric-field kernel; adds split-field memory corrections to |
|
CPML magnetic-field kernel; adds split-field memory corrections to |
Calling Notes
Update ranges il:iu and kl:ku should avoid ghost cells that have not
been prepared. The axis i=0 has dedicated closure logic; callers should
keep field-array bounds, boundary fill, and CPML memory variables consistent
with the locations used by the kernels.