目录 / 文档-技术白皮书 / 39-EFT.WP.Plasma.Confinement v1.0
I. 目标与覆盖(I10-/I20-/S50-/S60-/S70-/S80-/M10-/SimStack)
- 覆盖层:I10-PC(几何/线圈/边界/度量绑定)、I20-PC/S30-(平衡耦合)、S50-(波/色散/沉积/到达时)、S60-(导引中心/新古典)、S70-(输运闭式与通量面平均)、S80-(Edge/SOL 与鞘层)、M10-(计量链/同化)、SimStack.Plasma(仿真栈)。
- 强制口径(两式等价,须显式路径/测度并记录 delta_form):
- 常量外提:T_arr = ( 1 / c_ref ) * ( ∫ n_eff d ell )
- 一般口径:T_arr = ( ∫ ( n_eff / c_ref ) d ell )
- 发布硬门:check_dim=pass、功率闭合(P_in = P_ref + P_rad + P_wall + ∫ P_dep dV)、拓扑一致(q(ψ)/LCFS/X)、稳定性门(δW_min>0 ∧ Δ'≤0 ∧ {D_S,D_M}>0)、到达时两口径一致。
II. 命名空间与版本
- 命名空间:
- pc.i10.binding(几何/线圈→场/度量)
- pc.i20.equilibrium(边界构建/GS 平衡)
- pc.s50.waves(色散/射线/沉积/到达时)
- pc.s60.gc_nc(导引中心/新古典)
- pc.s70.transport(QL/表格闭式与通量面平均)
- pc.s80.edge(沿场 1D/鞘层/脱离)
- pc.m10.metrology(计量/观测算子/同化)
- pc.simstack.plasma(仿真栈 API)
- 版本策略:api_version: "1.0"(semver);所有响应附 {api_version, impl_version, checksum}。
III. 公共数据结构(最小集合)
types:
Geometry:
fields: {S_wall:str, ports:str, divertor:str}
CoilSpec:
fields: {centerlines:str, cross_sections:str, I_coil_kA:list[float]}
Metrics:
fields: {coords:str, Vprime:str, g_ab:str}
Equilibrium:
fields: {psi:str, q:str, metrics:Metrics}
Stability:
fields: {deltaW_min_J:float, DeltaPrime:float, DS:str, DM:str}
Waves:
fields: {n_eff_tbl:str, rays_json:str, alpha_abs_tbl:str, P_dep:str}
GCNC:
fields: {D_nc:str, chi_nc:str, J_bs:str}
Transport:
fields: {D:str, chi:str, fluxes:str} # Γ/Q/Π_ψ
EdgeSOL:
fields: {s_grid:str, profiles_1D:str, qt_gate:float, R:float, Lz_tbl:str}
Diagnostics:
fields: {H_blocks:list[str], windows:str, AF:str, PF:str, dt_sync_s:float}
ArrivalRecord:
fields:
{form:enum["n_over_c","one_over_c_times_n"], gamma:"explicit", measure:"d_ell",
c_ref:float, Tarr_s:float, u_Tarr_s:float, delta_form:str}
QAGates:
fields: {check_dim:str, power_closure:str, topology:str, stability:str, Tarr_dual:str}
IV. I10-PC|几何/线圈绑定(函数原型)
pc.i10.binding:
- id: "bind_geometry_coils"
proto: "bind_geometry_coils(geom:Geometry, coils:CoilSpec, options:any) -> {B_field:str, psi_bc:str, metrics:Metrics}"
qa: ["check_dim", "divB_gate", "topology_gate"]
- id: "export_binding"
proto: "export_binding(binding:any, format:'yaml|json') -> path"
V. I20-/S30-|平衡耦合(函数原型)
pc.i20.equilibrium:
- id: "build_boundary"
proto: "build_boundary(binding:any) -> psi_bc:str"
- id: "solve_gs"
proto: "solve_gs(psi_bc:str, p_of_psi:any, F_of_psi:any, options:any) -> Equilibrium"
notes: ["要求 p'(psi)/F'(psi) 光滑与单调", "记录自由/固定边界模式"]
VI. S50-|波/色散/到达时(函数原型)
pc.s50.waves:
- id: "compute_dispersion"
proto: "compute_dispersion(eq:Equilibrium, medium:any, bands:any) -> {n_eff_tbl:str, detD_meta:any}"
- id: "trace_rays"
proto: "trace_rays(eq:Equilibrium, n_eff_tbl:str, launch:any) -> rays_json:str"
- id: "absorb_deposit"
proto: "absorb_deposit(eq:Equilibrium, rays_json:str, medium:any) -> {alpha_abs_tbl:str, P_dep:str}"
- id: "arrival_time"
proto: "arrival_time(rays_json:str, n_eff_tbl:str, arrival:ArrivalRecord) -> {Tarr_s:float, u_Tarr_s:float}"
VII. S60-|导引中心/新古典(函数原型)
pc.s60.gc_nc:
- id: "integrate_gc"
proto: "integrate_gc(eq:Equilibrium, metrics:Metrics, particles:any, options:any) -> {mu_J_check:bool, orbits:str}"
- id: "neoclassical_coeffs"
proto: "neoclassical_coeffs(eq:Equilibrium, metrics:Metrics, collisionality:any) -> GCNC"
VIII. S70-|输运闭式与通量平均(函数原型)
pc.s70.transport:
- id: "ql_closure"
proto: "ql_closure(eq:Equilibrium, spectra:any, scales:any) -> {D:str, chi:str}"
- id: "tabulated_closure"
proto: "tabulated_closure(table:str, inputs:any) -> {D:str, chi:str, V_pinch:str, C_TE:str}"
- id: "flux_surface_average"
proto: "flux_surface_average(eq:Equilibrium, D:str, chi:str, sources:any) -> {fluxes:str, energy_closure:bool}"
IX. S80-|Edge/SOL 与鞘层(函数原型)
pc.s80.edge:
- id: "solve_edge_1d"
proto: "solve_edge_1d(geom:Geometry, eq:Equilibrium, sources:any, sheath:any) -> EdgeSOL"
- id: "detachment_scan"
proto: "detachment_scan(edge:EdgeSOL, Pin:list[float], R:list[float], geom:list[any]) -> {qt_curve:str, window:str}"
X. M10-|计量链与同化(函数原型)
pc.m10.metrology:
- id: "build_observation"
proto: "build_observation(diag:Diagnostics, eq:Equilibrium) -> y_obs:str"
- id: "assimilate"
proto: "assimilate(H_blocks:list[str], R:str, B:str, y_obs:str, x_b:any, options:any) -> {x_a:any, cost:float, qa:QAGates}"
XI. SimStack.Plasma|仿真栈(函数原型)
pc.simstack.plasma:
- id: "build"
proto: "build(geom:Geometry, coils:CoilSpec, options:any) -> sim_handle"
- id: "forward"
proto: "forward(sim_handle:any, theta:map, grid:any) -> {i10, eq, stab, waves, gc_nc, transport, edge, synth}"
- id: "invert"
proto: "invert(sim_handle:any, data:any, priors:any, sampler:'EnKF|4DVar') -> {posterior:any, logZ:float, summary:any}"
- id: "ppc"
proto: "ppc(sim_handle:any, posterior:any) -> {residuals:any, gates:QAGates}"
- id: "export"
proto: "export(sim_handle:any, format:'cards|json') -> artifacts:list[str]"
XII. QA 门与检查函数
qa:
- id: "check_dim" ; proto: "check_dim(obj:any) -> enum['pass','fail']"
- id: "divB_gate" ; proto: "divB_gate(B:str) -> {residual:float, pass:bool}"
- id: "power_closure" ; proto: "power_closure(Pin,Pref,Prad,Pwall,Pdep) -> {diff_W:float, pass:bool}"
- id: "topology_gate" ; proto: "topology_gate(eq:Equilibrium, imaging:any) -> {lcfs_ok:bool, xpoints_ok:bool}"
- id: "stability_gate" ; proto: "stability_gate(stab:Stability) -> {deltaW_min_ok:bool, DeltaPrime_ok:bool, DS_ok:bool, DM_ok:bool}"
- id: "arrival_dual_gate" ; proto: "arrival_dual_gate(T1:float, T2:float, u_Tarr:float) -> {pass:bool}"
XIII. 错误码(统一)
errors:
E_BAD_UNITS: "单位或量纲不一致"
E_DIVB_FAIL: "∇·B 残差超门"
E_TOPOLOGY_FAIL: "拓扑一致性失败(LCFS/X/分离器)"
E_FORCE_BALANCE: "力平衡残差超阈"
E_POWER_CLOSURE: "功率闭合失败"
E_STABILITY_FAIL: "稳定性门未通过(δW/Δ'/D_S/D_M)"
E_ARRIVAL_MISMATCH: "两口径 T_arr 不一致"
E_TABLE_OOB: "闭式表格越界/插值未带限"
E_ASSIM_OPS: "观测算子/协方差版本或维度不一致"
E_QA_FAIL: "QA 门未通过"
XIV. 请求/响应示例(最小)
request:
api_version: "1.0"
op: "waves_deposit_arrival"
payload:
eq: "/eq/psi_q.nc"
medium: {ne_m3:6.0e19, Te_eV:3500, B_T:5.3}
launch: {mode:"X", freq_GHz:170, angles:{pol:..., tor:...}}
arrival:
form: "n_over_c"
gamma: "explicit"
measure: "d_ell"
c_ref: 299792458.0
u_Tarr_s: 9.0e-08
response:
api_version: "1.0"
result:
n_eff_tbl: "/waves/n_eff.tbl"
rays_json: "/waves/rays.json"
alpha_abs: "/waves/alpha.tbl"
P_dep_Wm3: "/waves/Pdep.nc"
Tarr_s: 3.08e-06
qa_gates: {check_dim:"pass", power_closure:"pass", Tarr_dual:"pass"}
checksum: "sha256:..."
XV. 合规模板(到达时/绑定/波—输运链)
arrival:
form: "n_over_c" # 或 "one_over_c_times_n"
gamma: "explicit"
measure: "d_ell"
c_ref: 299792458.0
Tarr_s: 3.10e-06
u_Tarr_s: 9.0e-08
delta_form: "n_over_c"
i10_binding:
geometry: {S_wall:"/cad/wall.step", ports:"/cad/ports.step", divertor:"/cad/div.step"}
coils: {centerlines:"/cad/coils.centerlines.json", cross_sections:"/cad/coils.cs.json", I_coil_kA:[...]}
B_field: "/fields/B_vacuum.nc"
metrics: {coords:"/eq/coords_boozer.nc", Vprime:"/eq/Vprime.nc", g_ab:"/eq/metric.nc"}
waves_to_transport_chain:
dispersion: {n_eff_tbl:"/waves/n_eff.tbl", bands:{ω1:..., ω2:...}}
rays: "/waves/rays.json"
absorption: "/waves/alpha.tbl"
P_dep: "/waves/Pdep.nc"
ql_closure: {table:"/closures/ql_mix.tbl", outputs:["/trans/D.nc","/trans/chi.nc"]}
fluxes: "/trans/fluxes.nc"
XVI. 端到端执行顺序(伪代码)
# 1) 绑定与平衡
bind = bind_geometry_coils(geom, coils, opt)
eq = solve_gs(bind.psi_bc, p_of_psi, F_of_psi, opt)
# 2) 波/沉积/到达时
n_eff = compute_dispersion(eq, medium, bands)
rays = trace_rays(eq, n_eff, launch)
Pdep = absorb_deposit(eq, rays, medium)
Tarr = arrival_time(rays, n_eff, arrival)
# 3) 导引中心/新古典与输运
gc = integrate_gc(eq, bind.metrics, particles, opt)
nc = neoclassical_coeffs(eq, bind.metrics, coll)
ql = ql_closure(eq, spectra, scales)
flux = flux_surface_average(eq, ql.D, ql.chi, sources)
# 4) Edge/SOL 与同化
edge = solve_edge_1d(geom, eq, sources, sheath)
yobs = build_observation(diag, eq)
xa = assimilate(H_blocks, R, B, yobs, xb, opt)
# 5) QA 与导出
assert power_closure(Pin, Pref, Prad, Pwall, Pdep).pass
assert arrival_dual_gate(Tarr1, Tarr2, arrival.u_Tarr_s).pass
export_cards(...)
XVII. 约束与发布门限(Plasma 硬门)
;check_dim=pass。版本一致;观测算子/协方差不越界且带限全部通过;表格/插值功率闭合、拓扑一致、稳定性门、到达时一致min(Re(•)) 类量纲/正性检查通过;版权与许可(CC BY 4.0)
版权声明:除另有说明外,《能量丝理论》(含文本、图表、插图、符号与公式)的著作权由作者(“屠广林”先生)享有。
许可方式:本作品采用 Creative Commons 署名 4.0 国际许可协议(CC BY 4.0)进行许可;在注明作者与来源的前提下,允许为商业或非商业目的进行复制、转载、节选、改编与再分发。
署名格式(建议):作者:“屠广林”;作品:《能量丝理论》;来源:energyfilament.org;许可证:CC BY 4.0。
首次发布: 2025-11-11|当前版本:v5.1
协议链接:https://creativecommons.org/licenses/by/4.0/