rizer.transport.cpp_interop#
Marshalling helpers for the C++ _plasma1d collision-model boundary.
Functions#
|
Unpack a per-species momentum-transfer model list into the flat arrays. |
Module Contents#
- rizer.transport.cpp_interop.unpack_momentum_transfer_models(mtcf: list[rizer.transport.collision_frequency.MomentumTransferCollisionFrequencyModel], n_species: int) tuple[list, list, numpy.ndarray, numpy.ndarray]#
Unpack a per-species momentum-transfer model list into the flat arrays.
The C++
CollisionModelpybind11 binding expects these flat arrays.- Parameters:
mtcf (
listofMomentumTransferCollisionFrequencyModel) – Per-species models, in species-index order (as built byget_momentum_transfer_collision_frequency_model()/get_momentum_transfer_collision_frequencies_list()).n_species (
int) – Number of species (len(mtcf)).
- Returns:
(xsec_energy_J, xsec_sigma_m2, radius_m, ion_Z): the first two are per-species lists of 1D arrays (orNonewhere not applicable), the last two are(n_species,)arrays (radius NaN / Z 0 where not applicable).- Return type:
tupleoflist,list,numpy.ndarray,numpy.ndarray
Notes
Shared by
rizer.models.nrp.isomass_2T_volume_reactor_cpp.build_reactor0d()andrizer.models.nrp.plasma_channel_2T1D.PlasmaChannelso both native solvers build the identical C++ collision model from the samemtcf.