1
Fork 0
internship/data/processing/nandasena.py

27 lines
584 B
Python

import numpy as np
def u_nandasena(b, c, C_d, C_l, rho_s, rho_w=1e3, theta=0, g=9.81, **_):
return np.sqrt(
(2 * (rho_s/rho_w - 1) * g * c * np.cos(np.radians(theta)))
/ C_l
)
const = {
"a": 4,
"b": 2.5,
"c": 2,
"C_d": 1.95,
"C_l": 0.178,
"theta": 0,
"rho_s": 2.7e3,
}
u = u_nandasena(**const)
u_ola = 14.5
print(f"Nandasena: u={u:5.2f}m/s")
print(f"Olaflow: u={u_ola:5.2f}m/s")
print(f"Gap: du={abs(u_ola - u):5.2f}m/s")
print(f"Gap: du={abs(u_ola - u)/u:5.2%}")
print(f"Gap: du={abs(u_ola - u)/u_ola:5.2%}")