Advertisement
shamzed

Untitled

Jan 27th, 2023
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. function [H_l, flow_rate, diameter] = myfunc(L, D1, roughness, viscosity, Q1)
  2.  
  3. % H_l = zeros(1, length(L));
  4. % flow_rate = zeros(1, length(L));
  5. % diameter = zeros(1, length(L));
  6. H_l = 1.07 * (((Q1^2)*L)/(9.81*(D1^5))) * (log((roughness /3.7) + (4.62*((viscosity*D1)/Q1)^0.9)))^(-2);
  7. flow_rate = -0.965 * (((9.81 * H_l * D1^5) / L)^0.5) * log((roughness/3.7) + (((3.17 * L * viscosity ^ 2)/(9.81 * H_l * D1^3))^0.5));
  8. diameter = 0.66 * ((exp(1.25)*((L * Q1^2)/(9.81 * H_l))^4.75) + ((viscosity * Q1^9.4)*(L/(9.81 * H_l))^5.2))^0.04;
  9. end
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement