Guest User

Untitled

a guest
Jul 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def fullsol(x, DIC, QCharge):
  2.  
  3. return [x[3] - (DIC/((1 +(K1/x[0]) + (K1*K2/(x[0])**2)))),
  4. x[1] - (DIC/((1 +(x[0]/K1) + (K2/(x[0]))))),
  5. x[2] - (DIC/(1 +(x[0]/K2) + ((x[0]**2)/K1*K2))),
  6. (x[0]*x[4]) - Kw,
  7. 2*QCharge - x[0] + x[1] + 2*x[2] + x[4] - (DIC/0.78)]
  8.  
  9. x0 = ([0.1, 0.1, 0.1, 0.1, 0.1])
  10.  
  11. solution = optimize.least_squares(fullsol, x0, args=(0.0035, 0),bounds =(0,np.inf))
Add Comment
Please, Sign In to add comment