29N, D_CELLS, STEPS, RTOL = 16, 10.0, 30, 1e-12
30AR, BO, RHO_RATIO, MU_RATIO = 29.9, 2.0, 0.1, 0.1
36H, RHO_REF, T_REF = 1.0e-4, 1000.0, 2.5e-5
40 """The same case; `phys` scales every input from cell units to SI."""
41 sl = H
if phys
else 1.0
42 sr = RHO_REF
if phys
else 1.0
43 st = T_REF
if phys
else 1.0
44 rho_l, rho_g = sr, RHO_RATIO * sr
45 mu_l = MU_CELL * sr * sl * sl / st
46 sigma = SIGMA_CELL * sr * sl**3 / (st * st)
47 g = G_CELL * sl / (st * st)
50 s.set_advection(
False)
53 s.set_pressure_geometry(np.full((N, N, N), 1.0, order=
"F"))
55 s.set_vof(np.zeros((N, N, N), order=
"F"))
56 s.set_property_model(
"rho",
"linear",
"C", [rho_l, rho_g - rho_l])
57 s.set_property_model(
"mu",
"linear",
"C", [mu_l, MU_RATIO * mu_l - mu_l])
58 s.set_surface_tension(sigma)
59 s.diagnostics.set_pressure_vcycle_precision(
"fp64")
60 s.set_pressure_pcg(
True, 800, 1e-10)
62 s.enable_vof_blocks([(c, c, c, 0.5 * D_CELLS)])
63 s.enable_vof_block_csf()
64 alpha = float(np.mean(s.get_vof()))
65 rho_av = rho_l + (rho_g - rho_l) * alpha
66 s.set_property_model(
"force_x",
"linear",
"C", [-(rho_l - rho_av) * g, -(rho_g - rho_l) * g])
67 s.set_superficial_velocity(
True,
"x", 0.0)