use metrology::{C, KEV};
use plasmoid::aneutronic::Q_DT;
use plasmoid::fusion::{M_D, M_T};
fn main() {
let per_reaction = Q_DT * 1e3 * KEV; let (laser, yield_nif) = (2.08e6, 8.6e6);
let reactions = yield_nif / per_reaction;
println!("NIF: target gain {:.2}, {reactions:.2e} D–T reactions (one neutron each)", yield_nif / laser);
assert!((yield_nif / laser - 4.13).abs() < 0.01 && (reactions / 3.05e18 - 1.0).abs() < 0.01);
let burned = 69.26e6 / per_reaction * (M_D + M_T) * KEV / (C * C); println!("JET: {:.1} MW for 5.2 s burned {:.3} mg of D–T (published 0.21 mg)", 69.26 / 5.2, burned * 1e6);
assert!((burned * 1e6 - 0.205).abs() < 0.002);
}
#[test]
fn yields_match_the_published_shots() {
main();
}