12 TN4222_HEPTANE_MU, TN4222_HEPTANE_RHO, TN4222_HEPTANE_SIGMA, TN4222_RHO_AIR,
13 smd_impinging_tn4222, smd_lefebvre, tn4222_property_factor, tn4222_transfer_model,
16ETH = dict(rho_liq=789.0, mu_liq=1.2e-3, sigma=0.0223, rho_gas=2.2)
20 tn = tn4222_property_factor(
"tn4087", **ETH)
21 by_hand = ((0.0223 * 1.2e-3 / 789.0) / (TN4222_HEPTANE_SIGMA * TN4222_HEPTANE_MU / TN4222_HEPTANE_RHO)) ** 0.25 \
22 * (2.2 / TN4222_RHO_AIR) ** -0.25
23 assert tn == pytest.approx(by_hand, rel=1e-12)
24 dj = tn4222_property_factor(
"dombrowski_johns", **ETH)
25 by_hand = ((0.0223 ** 2 / (2.2 * 789.0)) / (TN4222_HEPTANE_SIGMA ** 2 / (TN4222_RHO_AIR * TN4222_HEPTANE_RHO))) ** (1 / 6)
26 assert dj == pytest.approx(by_hand, rel=1e-12)
27 assert tn4222_property_factor(
"none", **ETH) == 1.0
29 ref = dict(rho_liq=TN4222_HEPTANE_RHO, mu_liq=TN4222_HEPTANE_MU, sigma=TN4222_HEPTANE_SIGMA,
30 rho_gas=TN4222_RHO_AIR)
31 for t
in spray.TN4222_PROPERTY_TRANSFERS:
32 assert tn4222_property_factor(t, **ref) == pytest.approx(1.0, rel=1e-12)
38 assert tn4222_transfer_model(smd) ==
"tn4087"
39 assert tn4222_transfer_model(SMDConfig(smd_property_scaling=
False)) ==
"none"
40 assert tn4222_transfer_model(SMDConfig(smd_property_transfer=
"dombrowski_johns")) ==
"dombrowski_johns"
41 a = smd_impinging_tn4222(1.5e-3, 30.0, **{k: ETH[k]
for k
in (
"rho_liq",
"mu_liq",
"sigma",
"rho_gas")})
42 b = smd_impinging_tn4222(1.5e-3, 30.0, **ETH, transfer=
"tn4087")
43 c = smd_impinging_tn4222(1.5e-3, 30.0, **ETH, transfer=
"dombrowski_johns")
44 assert a == b
and c == pytest.approx(a / tn4222_property_factor(
"tn4087", **ETH)
45 * tn4222_property_factor(
"dombrowski_johns", **ETH), rel=1e-12)
48@pytest.mark.parametrize("bad", [dict(v_jet=0.0), dict(d_jet=-1e-3), dict(rho_gas=float(
"nan")),