Aaaaaa
Aaaaaa
m 1 of 3
% Then, setting the force balance equation = 0 (static condition) and using
% the main line pressure :
A_a = F_max/p_m;
disp(['The actuator area is: ', num2str(A_a)])
% As the actuator is required to move the nominal load at constant velocity, the
static
% force equilibrium equation can be applied as well.
p_a = F_nom/A_a;
10/15/24 6:25 PM /Users/eleonoradisi.../newtry_lab1_AS.m 2 of 3
%% TASK 3 : Define the value of Darcy coefficient, solving the Colebrook formula with
an iterative method
% Now, the friction pressure head losses (deltap_pipe) can be determined as follow :
deltap_pipe = rho * g * h_f;
fprintf("Friction head losses in the pipe : %.2e Pa\n", deltap_pipe);
%% TASK 5: Estimate the concentrated head losses in the direction control valve
deltap_DCV = K_dcv*rho*(v_p^2/2);
fprintf("The concentrated head loss in the Direction Control Valve : %.2d Pa",
deltap_DCV);
deltap_BR_one = K_br*rho*(v_p^2)/2;
deltap_BR = 2*K_br*rho*(v_p^2)/2;
fprintf("Concentrated head loss in all bend radii: %.2d Pa\n", deltap_BR);
deltap_EX = K_ex*rho*(v_p^2)/2;
fprintf("Concentrated head loss at the exit: %.2d Pa\n", deltap_EX);
%% TASK 9 : Define the concentrate head loss in the flow control valve
deltap_FCV = p_m-p_a-deltap_BR-deltap_pipe-deltap_DCV-deltap_NRV-deltap_EX;
fprintf("Concentrated head loss in the flow control valve: %.2d Pa\n", deltap_FCV);
%% TASK 10 : Define the rquired area ratio of the flow control valve
eqn1 = @(A_t) ((2.3 * rho * 0.5 * (Q^2)) / ((1 + (A_t / A_p)^1.8) * (A_t^2))) -
deltap_FCV;
A_t0 = A_p;
options = optimoptions('fsolve', 'Display', 'off'); % Using optimoptions for newer
MATLAB versions
A_t = fsolve(eqn1, A_t0, options);
AR = A_t / A_p;
fprintf("Task 10: Required aspect ratio of the flow control valve: %.2f\n", AR);