sub_G01_collision1.f90
直接用途
sub_G01_collision1 执行电子-中性粒子 MCC 碰撞,并可能更新电子和离子粒子数。
参数表
参数 |
方向 |
shape/范围 |
含义与局部约定 |
|---|---|---|---|
|
in/out |
scalar or caller-provided array |
integer, number of electron particles. |
|
in/out |
scalar or caller-provided array |
integer, number of ion particles. |
|
in |
scalar or caller-provided array |
integer, maximum number of electron particles. |
|
in |
scalar or caller-provided array |
integer, maximum number of ion particles. |
|
in/out |
|
real (1:6,1:npmax1), electron particle array. |
|
in/out |
|
real (1:6,1:npmax2), ion particle array. |
|
in |
scalar or caller-provided array |
时间步长。 |
|
in |
scalar or caller-provided array |
基本电荷或电荷单位换算因子。 |
|
in |
scalar or caller-provided array |
第一类粒子质量。 |
|
in |
scalar or caller-provided array |
第二类粒子质量。 |
|
in |
scalar or caller-provided array |
截面表最大点数。 |
|
in |
scalar or caller-provided array |
碰撞类型数。 |
|
in |
|
截面表;第一行通常为能量,第二行为截面值。 |
|
in |
|
碰撞类型编号数组。 |
|
in |
scalar or caller-provided array |
中性粒子热速度。 |
|
in |
|
漂移速度向量。 |
|
in |
scalar or caller-provided array |
激发能量阈值。 |
|
in |
scalar or caller-provided array |
电离能量阈值。 |
|
in |
|
本地 active cell 下界索引。 |
|
in |
|
本地 active cell 上界索引。 |
|
in |
scalar or caller-provided array |
背景密度或中性粒子密度场,按粒子位置插值得到局部密度。 |
|
in/out |
scalar or caller-provided array |
源项数组。 |
|
in |
scalar or caller-provided array |
计算/查表能量下界。 |
|
in |
scalar or caller-provided array |
计算/查表能量上界。 |
|
in |
scalar or caller-provided array |
电子伏特换算因子。 |
|
in |
scalar or caller-provided array |
粒子权重。 |
|
in/out |
scalar or caller-provided array |
null-collision 最大频率,可输入缓存值并由例程更新。 |
局部假设
碰撞例程假定粒子数组 par(1:6,...) 中 1:3 是位置、4:6 是速度。随机数来自 Fortran random_number;能量、截面、密度和时间步单位必须由调用方保持自洽。这里不替调用方设置随机种子。
实现逻辑
实现先计算或复用 nu_max,再用 null-collision 概率抽取候选粒子;每个候选粒子按截面权重选择碰撞类型并更新速度或粒子数组。
调用注意
本页只说明该例程本身的调用边界和实现事实;完整接口声明和源码级 API 仍以英文侧的 generated API 为准。
Direct Purpose
sub_G01_collision1 electron-neutral collision process based on Vahedi’s MCC algorithm.
Parameter Table
Parameter |
Direction |
Shape/range |
Meaning and local convention |
|---|---|---|---|
|
in/out |
scalar or caller-provided array |
integer, number of electron particles. |
|
in/out |
scalar or caller-provided array |
integer, number of ion particles. |
|
in |
scalar or caller-provided array |
integer, maximum number of electron particles. |
|
in |
scalar or caller-provided array |
integer, maximum number of ion particles. |
|
in/out |
|
real (1:6,1:npmax1), electron particle array. |
|
in/out |
|
real (1:6,1:npmax2), ion particle array. |
|
in |
scalar or caller-provided array |
real, simulation time step. |
|
in |
scalar or caller-provided array |
real, unit charge. |
|
in |
scalar or caller-provided array |
real, electron mass. |
|
in |
scalar or caller-provided array |
real, neutral particle mass. |
|
in |
scalar or caller-provided array |
integer, maximum number of energy grid points. |
|
in |
scalar or caller-provided array |
integer, number of collision types. |
|
in |
|
real (1:2,1:Nmax,1:Ntype), cross-section tables. |
|
in |
|
integer (1:Ntype), collision type identifiers. |
|
in |
scalar or caller-provided array |
real, thermal velocity of ions. |
|
in |
|
real (1:3), drifting velocity. |
|
in |
scalar or caller-provided array |
real, excitation energy threshold. |
|
in |
scalar or caller-provided array |
real, ionization energy threshold. |
|
in |
|
integer (1:3), cell-center lower indices in x,y,z. |
|
in |
|
integer (1:3), cell-center upper indices in x,y,z. |
|
in |
scalar or caller-provided array |
real, neutral density defined on grid points. |
|
in/out |
scalar or caller-provided array |
real, ionization source term on grid points. |
|
in |
scalar or caller-provided array |
real, minimum energy (eV) for nu_prime evaluation. |
|
in |
scalar or caller-provided array |
real, maximum energy (eV) for nu_prime evaluation. |
|
in |
scalar or caller-provided array |
real, electron volt conversion factor. |
|
in |
scalar or caller-provided array |
real, particle weight. |
|
in/out |
scalar or caller-provided array |
real, maximum collision frequency |
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
Electron-neutral collision process based on Vahedi’s MCC algorithm.
Functions
-
subroutine sub_g01_collision1(np1, np2, npmax1, npmax2, par1, par2, dt, e, m1, m2, nmax, ntype, cross_section, collision_type, vti, vd, energy_excitation, energy_ionization, il, iu, den, s, energy_min, energy_max, ev, wei, nu_max)
This subroutine implements a Monte Carlo collision (MCC) model for electron-neutral interactions following the classic algorithm proposed by V. Vahedi (CPC 87, 1995, 179-198). Elastic scattering, excitation, and ionization processes are handled using the null-collision method. The maximum collision frequency
nu_maxis computed only once and reused in subsequent calls. Particle collisions are sampled statistically, and ionization events generate new electron and ion particles while accumulating the ionization source termSon the grid.- Author
Lihuan XIE (2025/12/18)
- Parameters:
np1 – [inout] integer, number of electron particles.
np2 – [inout] integer, number of ion particles.
npmax1 – [in] integer, maximum number of electron particles.
npmax2 – [in] integer, maximum number of ion particles.
par1 – [inout] real (1:6,1:npmax1), electron particle array.
par2 – [inout] real (1:6,1:npmax2), ion particle array.
dt – [in] real, simulation time step.
e – [in] real, unit charge.
m1 – [in] real, electron mass.
m2 – [in] real, neutral particle mass.
Nmax – [in] integer, maximum number of energy grid points.
Ntype – [in] integer, number of collision types.
cross_section – [in] real (1:2,1:Nmax,1:Ntype), cross-section tables.
collision_type – [in] integer (1:Ntype), collision type identifiers.
vti – [in] real, thermal velocity of ions.
vd – [in] real (1:3), drifting velocity.
energy_excitation – [in] real, excitation energy threshold.
energy_ionization – [in] real, ionization energy threshold.
il – [in] integer (1:3), cell-center lower indices in x,y,z.
iu – [in] integer (1:3), cell-center upper indices in x,y,z.
den – [in] real, neutral density defined on grid points.
S – [inout] real, ionization source term on grid points.
energy_min – [in] real, minimum energy (eV) for nu_prime evaluation.
energy_max – [in] real, maximum energy (eV) for nu_prime evaluation.
eV – [in] real, electron volt conversion factor.
wei – [in] real, particle weight.
nu_max – [inout] real, maximum collision frequency
nu_prime.