The value of the exponent in the equation U(z) = U_10 x (z/10)^0.31 might need to be revisited as most sources seem to use a considerably lower value (close to 0.1) instead.
The exponent in the calculation of free convection should be placed outside of the max bracket for consistency:
f_free = 2.7 x max(0,delta_thetha_v)^(1/3)
The value of the exponent in the equation U(z) = U_10 x (z/10)^0.31 might need to be revisited as most sources seem to use a considerably lower value (close to 0.1) instead.
The exponent in the calculation of free convection should be placed outside of the max bracket for consistency: f_free = 2.7 x max(0,delta_thetha_v)^(1/3)