Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
NOT ENOUGH INPUT ARGUMENTS
조회 수: 1 (최근 30일)
이전 댓글 표시
function Gamma=NRTL(DATA,Optimized)
% DATA contained experimental x-data and temperature
% each x(i) corresponds to each component
% Optimized in the values of variables (Aij) from Optimization method,
% for first iteration of Optimization method, Optimzed is set randomly
NT=length(DATA.x); % determining number of experimental data
T=DATA.T; % determining temperature
R=1.98721; % Gas constant cal/mol K
id=1:NT; % index
A=Optimized; % Binary interaction parameters Aij (cal/mol)
% from Optimization script
A(id,id)=0; % Aii=0;
Tau=exp(-A./(R*T)); % Binary interaction parameters
alpha=rand(NT,NT); % Alpha interaction parameter
alpha(id,id)=0; % for Alpha ii=0
G=exp(-alpha.*Tau); % Binary interaction parameters, Gji
for i=id
% Activity coefficients
lnG(i)=sum(Tau(i,id).*G(id,i).*x(i))./sum(G(i,id).*x(i))+sum((G(i,id).*x(i)).*(Tau(i,id)-sum(Tau(i,id).*G(i,id).*x(i))./sum(G(i,id).*x(i)))./sum(G(i,id).*x(i)));
% Activity coefficients
Gam(i)=exp(lnG(i));
end
Gamma=Gam;
end
댓글 수: 1
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!