Radiation transport, shielding analysis, dosimetry, and uncertainty tools in MoonBit.
moon version --all
moon update
moon check --target all --deny-warn
moon test --target native --deny-warnmoon add Zjfzjf666/radiation@0.2.2let source = @lib.cobalt_60_pencil_source()
let layers = @lib.lead_concrete_wall(5.0, 20.0)
let options = @lib.TransportOptions::defaults(source, layers)
options.histories = 10000
options.batches = 20
let result = @lib.run_transport(options)
let report = @lib.audit_transport(result)moon run src/main --target nativesrc/lib/
├── types, database, prng, physics, mc 基础数据、材料数据、随机数与传统 MC API
├── geometry, geometry_shapes, spectrum 平板层、几何相交、源项和能谱
├── advanced_physics, transport 截面分解、Compton 与扩展输运核心
├── statistics, validation, audit 统计量、输入校验与质量审计
├── mesh, scoring, field_dose, engineering 计分、能量平衡、剂量和设计分析
├── energy_analysis, sensitivity 能量响应、敏感性和参数扫描
├── variance_reduction, sampling_tools 抽样与方差缩减辅助
├── reporting, result_analysis, event_statistics 结果、事件和报告后处理
├── production_types, numerical_methods 生产数据模型与数值算法
├── source_library, detector_response 源项调度、谱响应、ROI 与死时间
├── job_orchestration, workload_planning 分片、检查点、重复实验与资源规划
├── field_analysis, field_metrics 三维网格投影、梯度、阈值和体积统计
├── calibration_pipeline, quality_validation 校准诊断、验证用例与质量门禁
├── reporting_extended, data_exports CSV、Markdown 和运行清单导出
├── presets, workflows, material_tools 可复现预设与工程工作流
└── compatibility, uncertainty_models 旧 API 适配与不确定度模型
src/main/ CLI 演示程序| 场景 | 工具链 | 历史数 | 终端透射 | SEM | 墙钟时间 | 处理速率 |
|---|---|---|---|---|---|---|
| CLI native,5 cm Pb + 20 cm concrete,Co-60 | moon 0.1.20260819 / moonc v0.10.9 | 5,000 | 1.6000% | 0.1422% | 4,435.02 ms | 1,127.39 histories/s |
moon fmt --check
moon check --deny-warn
moon test --target native --deny-warnmoon version --all
moonc -v # CI 拒绝低于 v0.10.9 的编译器
moon update
moon check --target all --deny-warn
moon build --target all --deny-warn
moon test --target all --deny-warn
moon fmt --check
moon infoInstall
Download zipRadiation transport, shielding analysis, dosimetry, and uncertainty tools in MoonBit.