38 th, d, t, w, spot = (35.0
if inner
else 48.0), 1.6e-3, 19.05e-3, 7.62e-3, 2.54e-3
39 ch = channel_for_ring(r_exit=0.03, z_exit=-0.7e-3, d=d, theta_deg=th, is_inner=inner,
40 plate_thickness=t, passage_ld=5.0, width=w, floor=
"spot", spot_length=spot)
41 near, far = ch[
"spot"]
42 along = (far[0] - near[0], far[1] - near[1])
43 k = -1.0
if inner
else 1.0
44 into = (k * math.sin(math.radians(th)), -math.cos(math.radians(th)))
45 assert math.hypot(*along) == pytest.approx(spot, rel=1e-12)
46 assert along[0] * into[0] + along[1] * into[1] == pytest.approx(0.0, abs=1e-15)
47 assert 0.5 * (near[0] + far[0]) == pytest.approx(ch[
"end"][0], rel=1e-12)
48 assert ch[
"length"] == pytest.approx(5.0 * d, rel=1e-12)
50 floor = [p
for p
in ch[
"section"]
if abs(p[1] - near[1]) < 1e-15]
51 assert max(p[0]
for p
in floor) -
min(p[0]
for p
in floor) == pytest.approx(w, rel=1e-12)
53 a = w * (t + near[1]) + abs(far[0] - near[0]) * (t + 0.5 * (near[1] + far[1]))
54 assert ch[
"flow_area"] == pytest.approx(a, rel=1e-12)
55 assert ch[
"breakthrough"].startswith(
"square")
86 cfg = load_config(str(CFG))
87 ch =
_lay(cfg)[
"passages"][
"O"][
"channel"]
88 net = _ring_manifold_for(cfg,
"oxidizer", 1140.0, 1.8e-4, 24, cfg.injector.geometry.oxidizer.d_jet)
89 assert ch[
"flow_area"] == pytest.approx(0.18357 * IN ** 2, rel=2e-3)
90 assert net.A_ch == ch[
"flow_area"]
and net.D_h == ch[
"hydraulic_diameter"]