I am trying to solve a set of ODES which represent a second order consecutive chemical reaction.
eqn = {
CA'[t] == -k1*CA[t]*CF[t],
CB'[t] == k1*CA[t]*CF[t] - k2*CB[t]*CF[t],
CC'[t] == k2*CB[t]*CF[t] - k3*CC[t]*CF[t],
CD'[t] == k3*CC[t]*CF[t] - k4*CD[t]*CF[t],
CE'[t] == k4*CD[t]*CF[t],
CF'[t] == -(k1*CA[t]*CF[t] + k2*CB[t]*CF[t] + k3*CC[t]*CF[t] +
k4*CD[t]*CF[t])};
I want to solve these equations either for a generic expression for k1, k2, k3, or k4, or for a particular value with these particular boundary conditions, n.b. not to sure if both t= 1 and t = 4 needs to be used...
bcs = {
CA[0] == 0.052952,
CB[0] == 0,
CC[0] == 0,
CD[0] == 0,
CE[0] == 0,
CF[0] == 0.0226939,
CA[1] == 0.047442,
CB[1] == 4.08*10^-3,
CC[1] == 1.24*10^-3,
CD[1] == 0.19*10^-3,
CE[1] == 0,
CF[1] == 0.0191289,
CA[4] == 0.043412,
CB[4] == 5.03*10^-3,
CC[4] == 3.54*10^-3,
CD[4] == 0.90*10^-3,
CE[4] == 0.07*10^-3,
CF[4] == 0.0151489};
I have tried to use both NDsolve and Dsolve, NDSolve requires that I have initial values for k1, k2, k3, k4 and Dsolve doesn't seem to want to help... the rest of my code for DSolve...
vars = {CA[t], CB[t], CC[t], CD[t], CE[t], CF[t]};
solution[t_] = DSolve[{eqn, bcs}, vars, t]
Any help would be appreciated!! Chemistry is my forte not Mathematica!!
Cheers!
Comments
Post a Comment