Plotting system of equations for a phase diagram
조회 수: 33 (최근 30일)
이전 댓글 표시
Currently I am struggling to graph a phase diagram similar looking to the attached photo. I have two equations, which depend on two variants of X (one for each line on the graph, respectively called x_1 and x_2. The formulas look like so
Equation 1: ln(x_1/x_2)=2070(1/T-1/1726)
Equation 2: ln((1-x_1)/(1-x_2))=1580(1/T-1/1357)
It should be possible to solve for x_1 and x_2 then overlay two graphs, one being x_1 on the x-axis and T on the y-axis, and the other with x_2 on the x-axis and T on the y-axis. The bounds for the graph are 0<x<1 and 1357<T<1726. Thank you so much for your help!
댓글 수: 2
David Goodmanson
2020년 4월 23일
Hi Eric,
In the first equation, the maximum possible value of the rhs is at T = 1/1357: 10*(1/1357-1/1726) = .0016
so log(x1) - log(x2) = .0016 or less. That's a really small amount, so x1 and x2 will always be very near each other in value and the two curves will almost be overlays. Qualitatively that is a lot different than the plot above. Are you positive about the 10 and 9.6?
채택된 답변
David Goodmanson
2020년 4월 23일
편집: David Goodmanson
2020년 4월 23일
Hi Eric,
let T1 = 1357; T2 = 1726; T = T1:T2;
if you exponentiate both sides of each equation, you get
x1/x2 = f
(1-x1)/(1-x2) = g
where
f = exp(2070*(1./T- 1/T2));
g = exp(1580*(1./T -1/T1));
Solve for x1 and x2 in terms of f and g, then plot(x1,T,x2,T).
f and g are vectors, so calculating x1 and x2 requires element-by-element operators such as ./ .
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Pole and Zero Locations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!