% input parameters
U = 400;
rho = 998.1;
mu = 0.001003;
L = 0.38;
target_yplus = 150;
growth_rate = 1.2;
Re = rho*U*L/mu
if Re<1e9
C_f = (2*log10(Re)-0.65)^(-2.3)
end
tau_w = C_f*0.5*rho*U^2
u_star = sqrt(tau_w/rho)
y = (target_yplus*mu)/(rho*u_star)
输入参数包括:流速、流体密度、动力粘度、特征长度、目标Y+值、网格增长率
输出结果: y 为 wall spacing