📄 e271.m
字号:
%-----------------------------------------------------------------------
% Example 2.7.1: Chemical Absorption Process
%-----------------------------------------------------------------------
% Initialize
clc % clear command window
clear % clear variables
n = 5; % number of stages
a = 0.72; % slope
b = 0.0; % intercept
K = 1.63; % gas to liquid ratio
xf = 0.01; % liquid feed concentration
yf = 0.06; % gas feed concentration
delta = a*K; % stripping factor
A = zeros (n,n);
c = zeros (n,1);
% Compute A and c
fprintf ('Example 2.7.1: Chemical Absorption Process\n');
for i = 1 : n
A(i,i) = -(1 + delta);
if i < n
A(i,i+1) = 1;
A(i+1,i) = delta;
end
end
c(1) = K*(b - yf);
c(n) = -xf;
show ('A',A)
show ('c',c)
% Find liquid concentrations
show ('K(A)',condnum(A,0))
x = gauss (A,c);
show ('x',x)
y = a*x + b;
show ('y',y)
show ('||r(x)||',residual(A,c,x))
%-----------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -