📄 cstr.m
字号:
function varargout = cstr(x)%% %% [F] = cstr(x) returns the function value in F% [F,Jac] = cstr(x) returns the function value in F and % the Jacobian in Jac%% Matthias Heinkenschloss% Department of Computational and Applied Mathematics% Rice University% March 9, 2004%% Problem parametersV = 10;Fa = 3.0;F = 3.0;Fh = 0.1;R = 8.3144;E = 50000;CAo = 5.0;cp = 6.0;cp_h = 6.0;k0 = 1.e9;Ta = 300;Th = 375;Vh = 1;rho = 600;rho_h = 600;deltaH = 20000;eps = 0.144;UA = rho*cp/eps;% return the function value reac_rate = k0*exp(-E/(R*x(3))) * x(1);varargout{1} = [ Fa*(CAo-x(1))/V - reac_rate; -F*x(2)/V + reac_rate; Fa*(Ta-x(3))/V - reac_rate * deltaH/(rho*cp) ... + (x(4)-x(3))*UA/(rho*cp*V); Fh*(Th-x(4))/Vh - (x(4)-x(3))*UA/(rho_h*cp_h*Vh)];if( nargout > 1 ) % return the Jacobian as the second argument error('Jacobian is not yet implemented')end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -