function Rtot = U_R2L2_model_numeric(params, constants )
%------------------- LineshapeKin Simulation -----------------------------
% Function for numeric solving of equilibrium thermodynamic equations
%
% 5/12/09
% Evgenii Kovrigin
% Medical College of Wisconsin
%
% U-R2L2 model developed in 
% /Users/kovrigin/Documents/Workspace/Data/Data.XV/EKM16.Analysis_of_multis
% tep_kinetic_mechanisms/Equilibria/LRIM_U_R2L2.mn



%--- this is what I need for K-matrix
Leq=params(1);


%-- these are constants 
K_a_A=constants(1);
K_a_B=constants(2);
Ltot=constants(3);



%-- equation

Rtot = ((8*K_a_B*Ltot - 8*K_a_B*Leq + 1)^(1/2) - 1)/(4*K_a_B) + ((8*K_a_B*Ltot - 8*K_a_B*Leq + 1)^(1/2) - 1)^2/(8*K_a_B) + ((8*K_a_B*Ltot - 8*K_a_B*Leq + 1)^(1/2) - 1)/(4*K_a_A*K_a_B*Leq);
