function mturbine = StodolaEq(P3,T3,P)
P4 = P(6); R = P(9); Mmwater = P(8); % Parameters

rho3 = P3*Mmwater/(R*T3); % Calculating density

%% Constant volumetric flow
%q3s = 0.248764940239044; % Flow coefficient
%mturbine = q3s*rho3; % Computing mass flow

%% Stodola Equation
Kt = 4.087147284389394e-04; % Stodola coefficient
PR = P3/P4; % Pressure ratio
mturbine = Kt*sqrt(rho3*P3*(1-(1/PR)^2)); % Stodola equation for mturbine
end

