Addressed changes proposed by reviewers - 120422

This commit is contained in:
ssun30 2022-12-08 13:36:19 -05:00 committed by Ray Speth
parent b1c2148236
commit 0351f3b0f8
5 changed files with 13 additions and 13 deletions

View File

@ -1,3 +1,3 @@
function output = cantera_root()
output = '/home/ssnit/anaconda3/envs/ct-matlab-test';
output = '';
end

View File

@ -39,14 +39,14 @@ function F = PFR_Solver(x, soln_vector, gas, mdot, A_in, dAdx, k)
%---density, temperature and mass fractions variations along a plug flow---
%-------------------------reactor------------------------------------------
%--------------------------------------------------------------------------
F(1) = ((1-R/Cp)*((rho*vx)^2)*(1/A)*(dAdx)...
+ rho*R*sum(MW.*w.*(h-MW_mix*Cp*T./MW))/(vx*Cp) )...
/ (P*(1+vx^2/(Cp*T)) - rho*vx^2);
F(1) = ((1 - R / Cp) * ((rho * vx)^2) * (1/A) * (dAdx)...
+ rho * R * sum(MW.*w.*(h - MW_mix * Cp * T./MW)) / (vx * Cp) )...
/ (P * (1 + vx^2 / (Cp * T)) - rho * vx^2);
F(2) = (vx*vx/(rho*Cp))*F(1) + vx*vx*(1/A)*(dAdx)/Cp...
- (1/(vx*rho*Cp))*sum(h.*w.*MW);
F(2) = (vx * vx / (rho * Cp)) * F(1) + vx * vx * (1 / A) * (dAdx) / Cp...
- (1 / (vx * rho * Cp)) * sum(h.*w.*MW);
F(3:nsp+2) = w(1:nsp).*MW(1:nsp)./(rho*vx);
F(3:nsp + 2) = w(1:nsp).*MW(1:nsp)./(rho * vx);
F = F';

View File

@ -1,4 +1,4 @@
function dydt = conhp(t, y, gas, mw) %#ok<INUSL>
function dydt = conhp(t, y, gas, mw)
% CONHP - ODE system for a constant-pressure, adiabatic reactor.
%
% Function CONHP evaluates the system of ordinary differential equations

View File

@ -1,4 +1,4 @@
function dydt = conuv(t, y, gas, mw) %#ok<INUSL>
function dydt = conuv(t, y, gas, mw)
% CONUV ODE system for a constant-volume, adiabatic reactor.
%
% Function CONUV evaluates the system of ordinary differential

View File

@ -43,7 +43,7 @@ w
efficiency = (turbine_work - pump_work)/heat_added;
disp(sprintf('efficiency = %d', efficiency));
function w = pump(fluid, pfinal, eta)
function work = pump(fluid, pfinal, eta)
% PUMP - Adiabatically pump a fluid to pressure pfinal, using a pump
% with isentropic efficiency eta.
@ -56,11 +56,11 @@ function w = pump(fluid, pfinal, eta)
actual_work = isentropic_work / eta;
h1 = h0 + actual_work;
fluid.HP = {h1, pfinal};
w = actual_work;
work = actual_work;
end
function w = expand(fluid, pfinal, eta)
function work = expand(fluid, pfinal, eta)
% EXPAND - Adiabatically expand a fluid to pressure pfinal, using a
% turbine with isentropic efficiency eta.
@ -73,5 +73,5 @@ function w = expand(fluid, pfinal, eta)
actual_work = isentropic_work * eta;
h1 = h0 - actual_work;
fluid.HP = {h1, pfinal};
w = actual_work;
work = actual_work;
end