%Eksergi ved trykkutjevning
clear all;
close all;
x = (0.25:0.01:10);
%g = Wmax/p2V0; x = p2/p1
g = (1./x).*log(2./(1+x)) + log(2.*x./(1+x));
figure;
plot(x,g);
grid on;
axis([0 10 0 1.1*max(g)]);
xlabel('p_2/p_1');
ylabel('W_{max}/p_2 V_0');