[GENERAL INFORMATION] Function Name=Exchange Brief Description=Exchange reaction AB + CD -> AC + BD Function Source=N/A Function Type=User-Defined Function Form=Equations Number Of Parameters=9 Number Of Independent Variables=2 Number Of Dependent Variables=1 Analytical Derivatives for User-Defined=Off [FITTING PARAMETERS] Naming Method=User-Defined Names=N,K,DH,AB0,CDsyr,CD0,BD0,hd,V0 Meanings= Initial Values=1(V),100(V),--(V),--(F),--(F),0(F),0(F),-0.1(V),1.3187(F) Lower Bounds=--,--,-- Upper Bounds=--,--,-- Number Of Significant Digits=6,6,6,6,6,6,6,6,6 [FORMULA] double ABi,At,Ap,Fi,F,C0t,C0p,Ct,Cp,ACt,ACp,B0,B0t,B0p,Bt,Bp,p,s,yt,yp; ABi=N*AB0; At=1.0/(1.0/ABi+XMt/N/CDsyr); Fi=exp(-injV/V0/1E3); F=At/ABi; Ap=At/Fi; B0=ABi+N*BD0; Bt=F*B0; Bp=Bt/Fi; C0t=F*CD0; C0p=C0t/Fi; Ct=At*XMt/N+C0t; Cp=CDsyr*(1.0-Ap/AB0)+C0p; ACt=At*Ct/(Bt+Ct); ACp=Ap*Cp/(Bp+Cp); p=abs(K-1.0); for ( ; p>0.0 ; ) { s=(K-1.0)/abs(K-1.0); yt=At+Ct+(At-Bt)/K; yp=Ap+Cp+(Ap-Bp)/K; ACt=0.5*K/(K-1.0)*(yt-s*sqrt(yt*yt-4.0*(K-1)/K*At*Ct)); ACp=0.5*K/(K-1.0)*(yp-s*sqrt(yp*yp-4.0*(K-1)/K*Ap*Cp)); p=-1.0; }; NDH=(V0*DH*(ACt-Fi*ACp)+hd)/injV/CDsyr*1E3; [CONSTRAINTS] [CONSTANTS] [Parameters Initialization] [INITIALIZATIONS] [AFTER FITTING] /*Scripts to be executed after fitting, a good place for generating results.*/ %W=%H; //rewrite fit.p to include new variables %Z=%H![fit.p].text$; %B=%[%Z,@1]; %B=%B\r\n%[%Z,@2]; %B=%B\r\n\i(\g(c))\+(2)/DoF = $(nlsf.chisqr,*4); S=DH/(temp_%Q+273.15)+1.987*ln(K); G=-1.987*(temp_%Q+273.15)*ln(K); Ge=1.987*(temp_%Q+273.15)/K*nlsf.e2; Se=sqrt((nlsf.e3)^2+Ge^2)/(temp_%Q+273.15); TS=-(temp_%Q+273.15)*S; TSe=(temp_%Q+273.15)*Se; %Z=""; %Z=%Z\r\nTemp =\t $(temp_%Q) \+(o)C; %Z=%Z\r\n[AB]\-(0) =\t $(nlsf.p4,*4) \(177) $(nlsf.e4,*4) mM; %Z=%Z\r\n[CD]\-(Syr) =\t $(nlsf.p5,*4) \(177) $(nlsf.e5,*4) mM; %Z=%Z\r\n[CD]\-(0,cell) =\t $(nlsf.p6,*4) \(177) $(nlsf.e6,*4) mM; %Z=%Z\r\n[BD]\-(0,cell) =\t $(nlsf.p7,*4) \(177) $(nlsf.e7,*4) mM; %Z=%Z\r\n\i(N) =\t $(nlsf.p1,*4) \(177) $(nlsf.e1,*4); %Z=%Z\r\n\i(K) =\t $(nlsf.p2,*4) \(177) $(nlsf.e2,*4); %Z=%Z\r\n\g(D)\i(H) =\t $(nlsf.p3,*4) \(177) $(nlsf.e3,*4) cal mol\+(-1); %Z=%Z\r\n\g(D)\i(G)\+(o) =\t $($(G),*4) \(177) $($(Ge),*4) cal mol\+(-1); %Z=%Z\r\n\i(-)\i(T)\g(D)\i(S)\+(o) =\t $($(TS),*4) \(177) $($(TSe),*4) cal mol\+(-1); %Z=%Z\r\n\g(D)\i(S)\+(o) =\t $($(S),*4) \(177) $($(Se),*4) cal mol\+(-1) K\+(-1); %Z=%Z\r\n\i(h\-(dil)) =\t $(nlsf.p8,*4) \(177) $(nlsf.e8,*4) cal mol\+(-1); label -s -sa -n fit.p %B%Z; SaveRedirection=type.Redirection(16,3); // SDB 1/7/99 REPORT_TO_OUTPUTLOG type.BeginResults(); /// RKM 12/10/98 v6.0141 REPORT_TO_OUTPUTLOG type -a %B; type -a Chisqr/DoF\t$(nlsf.chisqr,*4); type -a N\t$(nlsf.p1,*4)\t$(nlsf.e1,*4); type -a K\t$(nlsf.p2,*4)\t$(nlsf.e2,*4); type -a G\t$($(G),*4)\t$($(Ge),*4); type -a H\t$(nlsf.p3,*4)\t$(nlsf.e3,*4); type -a -TS\t$($(TS),*4)\t$($(TSe),*4); type -a S\t$($(S),*4)\t$($(Se),*4); type -a HD\t$(nlsf.p8,*4)\t$(nlsf.e8,*4); type.EndResults(); type.Redirection=SaveRedirection; // restore previous redirection. delete -v SaveRedirection; win -a %W; queue {legend;} [ON PARAM CHANGE] [INDEPENDENT VARIABLES] injV= XMt= [DEPENDENT VARIABLES] NDH= [CONTROLS] General Linear Constraints=Off Initialization Scripts=Off Scripts After Fitting=On Number Of Duplicates=N/A Duplicate Offset=N/A Duplicate Unit=N/A Generate Curves After Fitting=Yes Curve Point Spacing=Same X as Fitting Data Generate Peaks After Fitting=No Generate Peaks During Fitting=No Generate Peaks with Baseline=No Paste Parameters to Plot After Fitting=Yes Paste Parameters to Notes Window After Fitting=Yes Generate Residuals After Fitting=No Keep Parameters=Yes Enable Parameters Initialization=N/A Compile On Param Change Script=0 [COMPILE FUNCTION] Compile=1 Compile Parameters Initialization=1 On Param Change Scripts Enabled=N/A