CPML Wave-Packet Tests Overview
目的
本页是 tests/005_maxwell 下 CPML wave-packet reference 测试的轻量总览。各 case 页面已经分别说明
算例流程、图像和结果,本页只保留共享方法、误差定义、参考结果和入口链接,避免重复展示每个 case 的图。
这些测试使用有限宽度电磁波包,而不是连续源,比较 compact CPML 区域和足够长的 reference 区域在 probe 处的场量差异。它们主要验证 CPML 边界反射,而不是 FDTD stencil 本身;FDTD stencil 的局部公式验证见 005_maxwell 测试总览 中的 single-step、MMS 和稳定性测试。
Case 入口
Case 页面 |
坐标/模式 |
检查方向 |
主要看点 |
|---|---|---|---|
2D |
|
|
|
2D |
|
|
|
3D Cartesian plane wave |
|
六方向 probe error; |
|
3D cylindrical |
|
|
r=0 是柱坐标轴线,所以 2D TMz 测试不单独测 r_minus。3D cylindrical 测试当前只覆盖
z 向 CPML;它的初始场先在更长的 reference 域里用 TM01 软源激发,等波包离开源区后再截取
compact 窗口作为 compact/reference 的共同初始场。
误差定义
每个测试都记录一个位于波包后方的 probe,并计算
late_gate 是开始统计晚期反射误差的时间步;它跳过主波通过 probe 和靠近边界时的直接响应,
只看此后可能由 CPML 反射回来的残余场。late reflection error 是 late gate 之后
Error_dB 的最大值。它是 probe 点场幅值误差,不是全局反射能量系数;final interior energy
另按内部总能量相对初始能量计算。
参考结果
测试 |
参数 |
late reflection error |
final interior energy |
|---|---|---|---|
2D RZ TEz |
|
|
约 |
2D RZ TMz |
|
|
约 |
3D Cartesian |
|
|
|
3D Cartesian |
|
|
约 |
3D cylindrical |
|
|
|
运行命令
从仓库根目录进入对应目录运行:
cd tests/005_maxwell/case_cpml_2d_rz_tez_wavepacket_ref
./run.sh 12 output_lambda12mm_npml12_weak_ephi_gif 12 3 0.02 3.5 0.012 all 136 36 450 260 200 10
cd ../case_cpml_2d_rz_tmz_wavepacket_ref
./run.sh 18 output_lambda18mm_npml12 12 3 0.02 3.5 0.012 all 136 36 450 260 200 0
cd ../case_cpml_3d_cartesian_wavepacket_ref
./run.sh 12 output_lambda12mm_npml12 12 3 0.02 3.5 0.012
./run.sh 12 output_lambda12mm_npml24 24 3 0.02 3.5 0.012
cd ../case_cpml_3d_cylindrical_wavepacket_ref
./run.sh 18 output_lambda18mm_npml12_gif 12 3 0.02 3.5 0.012 all 18 136 36 450 260 200 10
文档中保留 PNG/GIF 作为参考图;*.dat、*.log、*.o、*.mod 和 *.out 是可再生
产物,不需要随文档保存。
Purpose
This page is a lightweight overview of the CPML wave-packet reference tests
under tests/005_maxwell. The individual case pages now explain their own
workflow, figures, and results, so this page keeps only the shared method,
error definition, reference results, and entry links.
These tests launch finite-width electromagnetic packets rather than continuous sources, then compare a compact CPML domain against a much longer reference domain at a probe behind the outgoing packet. They test CPML boundary reflection, not the FDTD stencil itself; for local stencil checks, see the single-step, MMS, and stability tests from the 005_maxwell overview.
Case Entry Points
Case page |
Geometry/mode |
Directions |
Main reading |
|---|---|---|---|
2D |
|
|
|
2D |
|
|
|
3D Cartesian plane wave |
both sides of |
six-direction probe error; |
|
3D cylindrical |
|
|
The 2D TMz case does not test r_minus because r=0 is the cylindrical
axis. The 3D cylindrical case currently tests only z-side CPML. Its initial
field is prepared by exciting a TM01 source in a longer reference domain
and then cutting out the compact window after the packet has left the source
region.
Error Definition
The tests record a probe behind the outgoing packet and compute
late_gate is the first time step used for the late-reflection metric. It
skips the direct probe response from the outgoing packet and the early
boundary transient, so the metric focuses on residual fields that can return
from the CPML. late reflection error is the maximum Error_dB after
the late gate. It is a field-amplitude error at one probe, not a global
reflected-energy coefficient. final interior energy is reported
separately from the interior total energy relative to its initial value.
Reference Results
Test |
Parameters |
late reflection error |
final interior energy |
|---|---|---|---|
2D RZ TEz |
|
|
about |
2D RZ TMz |
|
|
about |
3D Cartesian |
|
|
|
3D Cartesian |
|
|
about |
3D cylindrical |
|
|
|
Run Commands
From the repository root:
cd tests/005_maxwell/case_cpml_2d_rz_tez_wavepacket_ref
./run.sh 12 output_lambda12mm_npml12_weak_ephi_gif 12 3 0.02 3.5 0.012 all 136 36 450 260 200 10
cd ../case_cpml_2d_rz_tmz_wavepacket_ref
./run.sh 18 output_lambda18mm_npml12 12 3 0.02 3.5 0.012 all 136 36 450 260 200 0
cd ../case_cpml_3d_cartesian_wavepacket_ref
./run.sh 12 output_lambda12mm_npml12 12 3 0.02 3.5 0.012
./run.sh 12 output_lambda12mm_npml24 24 3 0.02 3.5 0.012
cd ../case_cpml_3d_cylindrical_wavepacket_ref
./run.sh 18 output_lambda18mm_npml12_gif 12 3 0.02 3.5 0.012 all 18 136 36 450 260 200 10
The documentation keeps PNG/GIF reference figures. *.dat, *.log,
*.o, *.mod, and *.out files are reproducible run artifacts and
are not meant to be kept with the documentation.