U-2R

 

Derivation of equilibrium thermodynamic equations for U-2R system: isomerization in the binding-incompetent state of the receptor

 

image

 

image

 

image

 

 

 

 

 

Contents

 

Goals

 

1. Definitions

 

2. Basic equilibrium equations

 

3. Derivation of equations for equilibrium concentrations

 

4. Prepare equations for a numeric solution

 

5. Save results on disk for future use

 

 

 

 

 

Conclusions

 

 

 

 

 

Back to Contents

 

 

Goals

 

In this document, I am developing equilibrium thermodynamic equations to calculate concentrations of species at all points in titrations

 

 

 

Back to Contents

 

 

 

1. Definitions

 

clean up workspace

reset()


Set path to save results into:

ProjectName:="U-2R";
CurrentPath:="/Users/kovrigin_laptop/Documents/Workspace/Global_Analysis/IDAP/Mathematical_models/Equilibrium_thermodynamic_models/U-multi-path-models/nR/U-2R";

"U-2R"
"/Users/kovrigin_laptop/Documents/Workspace/Global_Analysis/IDAP/Mathematical_models/Equilibrium_thermodynamic_models/U-multi-path-models/nR/U-2R"

 

 

 

Binding and isomerization constants

 

All binding constants I am using are association constants.

These relationships serve as restraints for solve(), but not restrict these values in calculations!

 

K_A

K_A ;
assumeAlso(K_A  > 0):
assumeAlso(K_A , R_)

K_A

 

To denote "starred" species, I will use s1 for *, s2 for **, etc.

 

K_B_s_1

K_B_s_1 ;
assumeAlso(K_B_s_1  > 0):
assumeAlso(K_B_s_1 , R_):

K_B_s_1

 

K_B_s_2

K_B_s_2 ;
assumeAlso(K_B_s_2  > 0):
assumeAlso(K_B_s_2 , R_):

K_B_s_2

 

 

 

 

Total concentrations

 

 

Rtot - total concentration of the  receptor

Rtot;
assumeAlso(Rtot>0):
assumeAlso(Rtot,R_):

Rtot

 

 

Ltot - total concentration of the  ligand

Ltot;
assumeAlso(Ltot>0):
assumeAlso(Ltot,R_):

Ltot

 

 

 

 

Equilibrium concentrations

 

Req - equilibrium concentration of the binding-competent receptor form

Req;
assumeAlso(Req>0):
assumeAlso(Req<=Rtot):
assumeAlso(Req,R_):

Req

 

Equilibrium concentrations of the binding incompetent receptor isomers R* and R**

 

R_s_1eq

R_s_1eq;
assumeAlso(R_s_1eq>0):
assumeAlso(R_s_1eq<=Rtot):
assumeAlso(R_s_1eq,R_):

R_s_1eq

 

R_s_2eq

R_s_2eq;
assumeAlso(R_s_2eq>0):
assumeAlso(R_s_2eq<=Rtot):
assumeAlso(R_s_2eq,R_):

R_s_2eq

 

Leq - equilibrium concentration of a free ligand

Leq;
assumeAlso(Leq>0):
assumeAlso(Leq<Ltot):
assumeAlso(Leq,R_):

Leq

 

 

RLeq - equilibrium concentration of the receptor-ligand complex

RLeq;
assumeAlso(RLeq>0):
assumeAlso(RLeq<Rtot):
assumeAlso(RLeq<Ltot):
assumeAlso(RLeq,R_):

RLeq

 

 

 

 

 

Check what we defined

anames(Properties,User);

{K_A, K_B_s_1, K_B_s_2, Leq, Ltot, RLeq, R_s_1eq, R_s_2eq, Req, Rtot}

 

 

 

 

 

 

Back to Contents

 

 

 

 

2. Basic equilibrium equations

 

 

Mass conservation equations

eq2_1:= Rtot = Req + R_s_1eq + R_s_2eq + RLeq;
eq2_2:= Ltot = Leq + RLeq;

Rtot = RLeq + R_s_1eq + R_s_2eq + Req
Ltot = Leq + RLeq

 

 

 

Equilibrium constants

eq2_3:= K_A = RLeq / (Req*Leq);

K_A = RLeq/(Leq*Req)

eq2_4:= K_B_s_1 = R_s_1eq/Req

K_B_s_1 = R_s_1eq/Req

eq2_5:= K_B_s_2 = R_s_2eq/Req

K_B_s_2 = R_s_2eq/Req

 

 

 

 

 

 

Back to Contents

 

 

 

3. Derivation of equations for equilibrium concentrations

 

Express Leq as a function of all constants and total concentrations. If insoluble ---express Rtot=f(Leq and all constants).

 

 

Express the highest-order bound species first:

 

RL

eq2_3;
solve(%,RLeq):
%[1][1]:
eq3_1:= RLeq=%

K_A = RLeq/(Leq*Req)
RLeq = K_A*Leq*Req

 

Substitute into the mass conservation laws:

eq2_1;
% | eq3_1:
eq3_2:= %

Rtot = RLeq + R_s_1eq + R_s_2eq + Req
Rtot = R_s_1eq + R_s_2eq + Req + K_A*Leq*Req

eq2_2;
% | eq3_1:
eq3_3:= %

Ltot = Leq + RLeq
Ltot = Leq + K_A*Leq*Req

 

 

 

 

Express isomer concentrations

 

R*

eq2_4;
solve(%,R_s_1eq):
%[2][1]:
eq3_7:= R_s_1eq = %

K_B_s_1 = R_s_1eq/Req
R_s_1eq = K_B_s_1*Req

-> conservation laws

eq3_2;
% | eq3_7:
eq3_8:= %

Rtot = R_s_1eq + R_s_2eq + Req + K_A*Leq*Req
Rtot = R_s_2eq + Req + K_B_s_1*Req + K_A*Leq*Req

 

 

R**

eq2_5;
solve(%, R_s_2eq):
%[2][1]:
eq3_9:= R_s_2eq = %

K_B_s_2 = R_s_2eq/Req
R_s_2eq = K_B_s_2*Req

-> conservation laws

eq3_8;
% | eq3_9:
eq3_10:= %

Rtot = R_s_2eq + Req + K_B_s_1*Req + K_A*Leq*Req
Rtot = Req + K_B_s_1*Req + K_B_s_2*Req + K_A*Leq*Req

 

 

 

Aim to obtain  Rtot=f(Leq, constants) function

 

express Req from conservation law for ligand  (Ltot=...)

eq3_3;
solve(%,Req):
%[1][1]:
eq3_11:= Req = %

Ltot = Leq + K_A*Leq*Req
Req = -(Leq - Ltot)/(K_A*Leq)

 

substitute in the conservation law for receptor:  (Rtot=...)

eq3_10;
% | eq3_11;
temp1:=%[2];
temp2:=Simplify(%);
// test
temp1=temp2;
Simplify(%);
// Assemble a final equation
eq3_12:= Rtot =temp2

Rtot = Req + K_B_s_1*Req + K_B_s_2*Req + K_A*Leq*Req
Rtot = Ltot - Leq - (Leq - Ltot)/(K_A*Leq) - (K_B_s_1*(Leq - Ltot))/(K_A*Leq) - (K_B_s_2*(Leq - Ltot))/(K_A*Leq)
Ltot - Leq - (Leq - Ltot)/(K_A*Leq) - (K_B_s_1*(Leq - Ltot))/(K_A*Leq) - (K_B_s_2*(Leq - Ltot))/(K_A*Leq)
-((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
Ltot - Leq - (Leq - Ltot)/(K_A*Leq) - (K_B_s_1*(Leq - Ltot))/(K_A*Leq) - (K_B_s_2*(Leq - Ltot))/(K_A*Leq) = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
TRUE
Rtot = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)

 

 

 

 

Attempt to solve for Leq

 

solution3_12:=solve(eq3_12, Leq)

piecewise([2*K_A^2*Ltot*Rtot <= K_A^2*Ltot^2 + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1 and K_B_s_1 + K_B_s_2 + K_A*Rtot + 1 = (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Ltot and K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Rtot + 1 < K_A*Ltot and -(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1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 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1 < 2*K_A^2*Ltot*Rtot and -(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A) < Ltot and K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Rtot + 1 < K_A*Ltot, {}])

 

 

 

 

Extract solutions:

solution_lines:=6:
eq3_13:=  solution3_12[i,1] $ i=1..solution_lines;
nops(%)

{-(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)}, {-(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot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A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)}, {}
6

 

Extract solutions

solution1:=eq3_13[1][1];  
solution2:=eq3_13[2][1] ; 
solution3:=eq3_13[4][1]; 
solution4:=eq3_13[5][1]; 

-(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
-(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
-(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
-(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)

 

 

Analysis of solutions

 

If having a sequence of roots: Is 1st solution a combination of 2nd and 3rd?

/*
solutionA:=eq3_13[1];   // a sequence of roots

if solution2 in solutionA
then print(Unquoted,"First set of roots contains the second root.");
else print(Unquoted,"First  set of roots  DOES NOT contain the second root!");
end_if;

if solution3 in solutionA
then print(Unquoted,"First set of roots contains the third root.");
else print(Unquoted,"First  set of roots  DOES NOT contain the third root!");
end_if;
*/

 

 

 

 

 

 

 

 

Check correctness of the solution by substitution

eq3_12;
// Check the 1st solution
test1:=eq3_12 | Leq=solution1;
normal(%);
Simplify(%);
bool(%)

Rtot = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A))*(K_B_s_1/2 + K_B_s_2/2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_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E
FALSE

odd!

 

eq3_12;
// Check the 2nd solution
test1:=eq3_12 | Leq=solution2;
normal(%);
Simplify(%);
bool(%)

Rtot = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A))*(K_B_s_1/2 + K_B_s_2/2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2)/2 + (K_A*Ltot)/2 - (K_A*Rtot)/2 + 1/2))/(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)
Rtot = -((K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Ltot + K_A*Rtot + 1)*(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Ltot - K_A*Rtot + 1))/(2*K_A*(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1))
FALSE
FALSE

odd!

 

 

eq3_12;
// Check the 3rd solution
test1:=eq3_12 | Leq=solution3;
normal(%);
Simplify(%);
bool(%)

Rtot = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A))*(K_B_s_1/2 + K_B_s_2/2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_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+ K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1))
K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Rtot + 1 <> K_A*Ltot
TRUE

works...

 

 

eq3_12;
// Check the 4th solution
test1:=eq3_12 | Leq=solution4;
normal(%);
Simplify(%);
bool(%)

Rtot = -((Leq - Ltot)*(K_B_s_1 + K_B_s_2 + K_A*Leq + 1))/(K_A*Leq)
Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A))*(K_B_s_1/2 + K_B_s_2/2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K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2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1))
K_B_s_1 + K_B_s_2 + K_A*Rtot + 1 <> (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) + K_A*Ltot
TRUE

works...

 

=> two last solutions are confirmed by substitution. Proceed with these checking solutions numerically.

 

 

Test which solution is meaningful numerically

 

solution1;
% | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(%)

-(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
- 15^(1/2)/2 - 3/2
-3.436491673

meaningless

 

solution2;
% | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(%)

-(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
15^(1/2)/2 - 3/2
0.4364916731

meaningful?

 

solution3;
% | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(%)

-(K_B_s_1 + K_B_s_2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
- 21^(1/2)/2 - 3/2
-3.791287847

meaningless

 

solution4;
% | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(%)

-(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)
21^(1/2)/2 - 3/2
0.7912878475

meaningful and different from solution 2!

 

 

Re-check positive solutions by substitution and calculation:

// Solution 2
test1:=eq3_12 | Leq=solution2;
result:= % | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(result);
Simplify(result);

Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A))*(K_B_s_1/2 + K_B_s_2/2 + (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2)/2 + (K_A*Ltot)/2 - (K_A*Rtot)/2 + 1/2))/(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)
1 = -(2*(15^(1/2)/2 + 3/2)*(15^(1/2)/2 - 5/2))/(15^(1/2) - 3)
1.0 = 4.436491673
FALSE

wrong solution!!!

 

 

Re-check by substitution and calculation:

// Solution 4
test1:=eq3_12 | Leq=solution4;
result:= % | K_A=1 | K_B_s_1=1 | K_B_s_2=1 |  Rtot=1 | Ltot=1;
float(result);
Simplify(result);

Rtot = -(2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*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2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)

 

 

 

 

 

 

Summary of equations for all species

 

Show species names

anames(Properties,User);

{K_A, K_B_s_1, K_B_s_2, Leq, Ltot, RLeq, R_s_1eq, R_s_2eq, Req, Rtot}

 

 

 

Name equations to recognize them in a different context

 

Leq_U_2R:=eq3_14

Leq = -(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)

Req_U_2R:=eq3_11

Req = -(Leq - Ltot)/(K_A*Leq)

R_s_1eq_U_2R:=eq3_7

R_s_1eq = K_B_s_1*Req

R_s_2eq_U_2R:=eq3_9

R_s_2eq = K_B_s_2*Req

 

RLeq_U_2R:=eq3_1

RLeq = K_A*Leq*Req

 

 

 

 

Create functions for computing concentrations

Here I only check that the results are numerically meaningful--functions were created right. Scientific meaningfulness will be analyzed in a separate notebook 'Analysis'.

(use --> to force direct substitution):

fLeq_U_2R:= (Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) --> Leq_U_2R[2]

(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) -> -(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)

//test operation
fLeq_U_2R(1,1,1,1,1):
float(%)

0.7912878475

=> OK

 

fReq_U_2R:=(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) --> Req_U_2R[2] | Leq_U_2R

(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) -> -(2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)))/(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)

//test operation
fReq_U_2R(1,1,1,1,1):
float(%)

0.2637626158

=> OK

 

 

fR_s_1eq_U_2R:=(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) --> R_s_1eq_U_2R[2] | Req_U_2R | Leq_U_2R

(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) -> -(2*K_B_s_1*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)))/(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)

//test operation
fR_s_1eq_U_2R(1,1,1,1,1):
float(%)

0.2637626158

=> OK

 

 

fR_s_2eq_U_2R:=(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) --> R_s_2eq_U_2R[2] | Req_U_2R | Leq_U_2R

(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) -> -(2*K_B_s_2*(Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)))/(K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)

//test operation
fR_s_2eq_U_2R(1,1,1,1,1):
float(%)

0.2637626158

=> OK

 

 

fRLeq_U_2R:=(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) --> RLeq_U_2R[2] | Req_U_2R | Leq_U_2R

(Rtot, Ltot, K_A, K_B_s_1, K_B_s_2) -> Ltot + (K_B_s_1 + K_B_s_2 - (K_A^2*Ltot^2 - 2*K_A^2*Ltot*Rtot + K_A^2*Rtot^2 + 2*K_A*K_B_s_1*Ltot + 2*K_A*K_B_s_1*Rtot + 2*K_A*K_B_s_2*Ltot + 2*K_A*K_B_s_2*Rtot + 2*K_A*Ltot + 2*K_A*Rtot + K_B_s_1^2 + 2*K_B_s_1*K_B_s_2 + 2*K_B_s_1 + K_B_s_2^2 + 2*K_B_s_2 + 1)^(1/2) - K_A*Ltot + K_A*Rtot + 1)/(2*K_A)

//test operation
fRLeq_U_2R(1,1,1,1,1):
float(%)

0.2087121525

=> OK

 

Check conservation laws (check the Rtot and Ltot are set to 1) :

fRLeq_U_2R(1,1,1,1,1)+fLeq_U_2R(1,1,1,1,1)

1

good

fRLeq_U_2R(1,1,1,1,1)+fR_s_2eq_U_2R(1,1,1,1,1)+fR_s_1eq_U_2R(1,1,1,1,1)+fReq_U_2R(1,1,1,1,1);
float(%)

5/2 - (6*(21^(1/2)/2 - 5/2))/(21^(1/2) - 3) - 21^(1/2)/2
1.0

good!

 

Back to Contents

 

 

 

 

 

5. Save results on disk

 

(you can retrieve them later by executing: fread(filename,Quiet))

ProjectName

"U-2R"

filename:=CurrentPath.ProjectName.".mb";
write(filename,

// Equations
Leq_U_2R,
Req_U_2R,
R_s_1eq_U_2R,
R_s_2eq_U_2R,
RLeq_U_2R,

// Analytical functions
fLeq_U_2R,
fReq_U_2R,
fR_s_1eq_U_2R,
fR_s_2eq_U_2R,
fRLeq_U_2R
)

"/Users/kovrigin_laptop/Documents/Workspace/Global_Analysis/IDAP/Mathematical_models/Equilibrium_thermodynamic_models/U-multi-path-models/nR/U-2RU-2R.mb"

 

 

 

 

 

 

Back to Contents

 

 

 

 

 

Conclusions

 

1. Analytical solution obtained.

 

2. Functions for analysis of behavior of solutions are created and saved.

 

 

 

Back to Contents