Published
Edited
Feb 18, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d_1 = 2.7 * centi // m
Insert cell
p_1 = 4 * pow(10, 5) // Pa
Insert cell
y_1 = 0 // m
Insert cell
d_2 = 1.7 * centi // m
Insert cell
v_1 = 1.4 // m/s
Insert cell
h = 4.1 // m
Insert cell
y_2 = y_1 + h // m
Insert cell
Insert cell
g = 9.81 // m/s²
Insert cell
rho = 997 // kg/m³
Insert cell
Insert cell
Insert cell
A_1 = pi * pow(d_1 / 2, 2) // m²
Insert cell
A_2 = pi * pow(d_2 / 2, 2) // m²
Insert cell
v_2 = v_1 * (A_1 / A_2) // m/s
Insert cell
Insert cell
Insert cell
Insert cell
p_2 = solve(`p_1 - p_2 = (0.5 * rho * (v_2^2 - v_1^2)) + rho * g * (y_2 - y_1)`, 'p_2', {
g,
rho,
p_1,
v_1,
v_2,
y_1,
y_2
}) // Pa
Insert cell
p_2 / ten(5) // 10^5 Pa
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more