Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

NOT ENOUGH INPUT ARGUMENTS

1 vue (au cours des 30 derniers jours)
GAGANDEEP KAUR
GAGANDEEP KAUR le 28 Fév 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaire
Alex Mcaulley
Alex Mcaulley le 28 Fév 2020
How are you calling this function?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by