周囲温度をTを上げていった際の、気体→液体への相転移時の圧力Pk(臨界温度Tc以上では臨界圧力pcに一致)をみたい。
ファンデルワールスの状態方程式で、周囲温度Tを上げていく。
ファンデルワールスの状態方程式でP-V曲線を計算し、変曲点をMatlabで計算する。
clc; clear; close all; a = 3.59; b= 0.0427; R = 0.08206; Ts=linspace(300,319,10); vs = []; pcs = []; for idx=1:length(Ts) T = Ts(idx); v0 = 0.1; vf = 0.2; v = linspace(v0,vf,1000);%m3 p = R*T./(v-b) - a./v.^2; dy = gradient(p, v); % 1次微分 d2y = gradient(dy, v); % 2次微分 inflection_points = find(diff(sign(d2y)) ~= 0); semilogx(v,p,'b'); hold on; plot(v(inflection_points),p(inflection_points),'*'); pcs(end+1) = p(inflection_points); pause(0.1); end title('ファンデルワールスの状態方程式'); xlabel('v[L]'); ylabel('p[atm]') figure(); plot(Ts,pcs); title('周囲温度Tと相転移時の圧力pkの関係');
周囲温度Tを上げると変曲点が右上、すなわち相転移時の圧力pkが増大する方向にシフトする

PkとTの関係を示すグラフ

以下のグラフに一致する
