Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [H_l, flow_rate, diameter] = myfunc(L, D1, roughness, viscosity, Q1)
- % H_l = zeros(1, length(L));
- % flow_rate = zeros(1, length(L));
- % diameter = zeros(1, length(L));
- H_l = 1.07 * (((Q1^2)*L)/(9.81*(D1^5))) * (log((roughness /3.7) + (4.62*((viscosity*D1)/Q1)^0.9)))^(-2);
- 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));
- 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;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement