铁杆木虫 (著名写手)
奥林匹亚光学院院长 ![]()
|
【答案】应助回帖
感谢参与,应助指数 +1
y1 = 40; y2 = 20; b = 0.18;
Subscript[c, 1] = 10^-3; Subscript[c, 2] = 10^-4;
Subscript[d, 1] = Subscript[d, 2] = 40;
e = 1;
g = 0.72;
h = 10^-14;
(*前面是已知的常数*)
DD = (yy1/b)/(1 + Subscript[c, 1]/x +
Subscript[c, 1]*Subscript[d, 1]*e/(b*x)) + (yy2/b)/(1 +
Subscript[c, 2]/x + Subscript[c, 2]*Subscript[d, 2]*e/(b*x)) ==
g + h/x - x;
phData = {};
For[i = 1, i <= 200, i++,
t = x /. Solve[Evaluate[DD /. {yy1 -> y1, yy2 -> y2}]][[4]];
pH = -Log[10, t]; phData = Append[phData, pH];
Ai1 = (y1/b)/(1 + Subscript[c, 1]/t +
Subscript[c, 1]*Subscript[d, 1]*e/(b*t));
Ai2 = (y2/b)/(1 + Subscript[c, 2]/t +
Subscript[c, 2]*Subscript[d, 2]*e/(b*t));
y1 = t*Ai1/Subscript[c, 1] + Ai1;
y2 = t*Ai2/Subscript[c, 2] + Ai2]
phData;
ListLinePlot[phData, PlotStyle -> Directive[Red, Thickness[.0035]],
Joined -> True, PlotRange -> All, AspectRatio -> .5]
Export["D:\\pH.gif", %, ImageSize -> {900, 650}]
![]()
|
|