use xsteam for matlab
조회 수: 24 (최근 30일)
이전 댓글 표시

I would like to run this code with the following input please read problem statement above
%% Input
T2 = 100; % oC Input Turbine exit temperature T2=T3
p2 = XSteam('psat_T', T2);
T1 = 400; % oC Input is Turbien inlet temperatre T1
%% Required:
% Simulate the effect of boiler pressure on Rankine Cycle
%% Solution
for i = 1:10
p1 = i*50; %bar
h1 = XSteam('h_pT',p1,T1); %kJ/kg pressure in bar, T in C, h in J/kg
s1 = XSteam('S_pT',p1,T1);
s2 = s1; %isentropic turbine
h2 = XSteam('h_ps',p2,s2); % kJ/kg Input Turbine exit is saturated vapor
x2 = XSteam('x_ps',p2,s2);
p3 = p2; % state 3 is saturated liquid)
T3 = T2;
s3 = XSteam('SL_T', T3);
h3 = XSteam('hL_T', T3); %kJ/kg
s4 = s3; % pump is assumed insentropic
p4 = p1;
h4 = XSteam('h_ps', p4, s4); %kJ/kg
wturbine = (h1-h2); %kJ/kg
wpump = (h4-h3); %kJ/kg
wnet = wturbine-wpump; %kJ/kg
qadded = (h1-h4); %kJ/kg
etathermal = wnet/qadded; % calculate efficiency [-]
formatSpec = 'P_Boiler %5.1f MPa, x2 %5.2f, wnet %7.1f[kJ/kg], qadded
%7.1f[kJ/kg], eta %5.2f\n';
fprintf(formatSpec, p1/10, x2, wnet, qadded, etathermal)
end
댓글 수: 1
Steven Lord
2022년 9월 3일
You have not stated what difficulty you're experiencing when running that code, nor have you asked a question about it. Please explain what type of help you're looking for with this question.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Thermal Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!