Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. t = var('t')
  2. (k_0, k_1, k_2) = var('k_0, k_1, k_2, s_0, e_0')
  3. c_p = function('c_p', t)
  4. c_s = function('c_s', t)
  5. c_e = function('c_e', t)
  6. c_se = function('c_se', t)
  7. eq_0 = -diff(c_p, t) +  +k_2*c_se
  8. eq_1 = -diff(c_s, t) +  -k_0*c_s*c_e +k_1*c_se
  9. eq_2 = -diff(c_e, t) +  -k_0*c_s*c_e +k_1*c_se +k_2*c_se
  10. eq_3 = -diff(c_se, t) +  +k_0*c_s*c_e -k_1*c_se -k_2*c_se
  11. eq_4 = c_e(0) == e_0
  12. eq_5 = c_s(0) == s_0
  13. eq_6 = c_se(0) == 0
  14. eq_7 = c_p(0) == 0
  15. desolve_system([eq_0, eq_1, eq_2, eq_3, eq_4, eq_5, eq_6, eq_7], [c_p, c_s, c_e, c_se])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement