sub_G01_load_cross_section.f90
直接用途
sub_G01_load_cross_section 从文本文件载入能量-碰撞截面表,供 MCC 碰撞例程查询。
参数表
参数 |
方向 |
shape/范围 |
含义与局部约定 |
|---|---|---|---|
|
in |
scalar or caller-provided array |
截面表最大点数。 |
|
out |
|
截面表;第一行通常为能量,第二行为截面值。 |
|
in |
scalar or caller-provided array |
截面数据文件路径。 |
局部假设
碰撞例程假定粒子数组 par(1:6,...) 中 1:3 是位置、4:6 是速度。随机数来自 Fortran random_number;能量、截面、密度和时间步单位必须由调用方保持自洽。这里不替调用方设置随机种子。
实现逻辑
实现先计算或复用 nu_max,再用 null-collision 概率抽取候选粒子;每个候选粒子按截面权重选择碰撞类型并更新速度或粒子数组。
调用注意
本页只说明该例程本身的调用边界和实现事实;完整接口声明和源码级 API 仍以英文侧的 generated API 为准。
Direct Purpose
sub_G01_load_cross_section load tabulated electron collision cross-section data.
Parameter Table
Parameter |
Direction |
Shape/range |
Meaning and local convention |
|---|---|---|---|
|
in |
scalar or caller-provided array |
Maximum number of table rows to load. |
|
out |
|
Table |
|
in |
scalar or caller-provided array |
Path to the cross-section data file. |
Local Assumptions
Collision routines assume par(1:6,...) stores position in 1:3 and velocity in 4:6. Random numbers come from Fortran random_number. Units of energy, cross section, density, and time step must be kept self-consistent by the caller. These routines do not seed the RNG.
Implementation Notes
The implementation computes or reuses nu_max, samples candidate particles with a null-collision probability, then selects collision type by cross-section weights and updates velocity or particle arrays.
Generated API
Load tabulated electron collision cross-section data.
Reads a two-column table from path into cross_section. The first column is electron energy in eV and the second column is the cross section, normally in square meters. The table is expected to use uniform energy spacing. If fewer than Nmax lines are present, the remaining energy entries are extrapolated and the last cross-section value is held constant.
- Author
Lihuan XIE (2025/12/18)
- param Nmax:
[in] Maximum number of table rows to load.
- param cross_section:
[out] Table
(1:2,1:Nmax). Row 1 stores energies and row 2 stores the corresponding cross sections.- param path:
[in] Path to the cross-section data file.
Functions
-
subroutine sub_g01_load_cross_section(nmax, cross_section, path)