using "types";
FlowSheet test_PP
PARAMETERS
PP as Plugin(Type="PP",
Components = ["oxygen","nitrogen"],
LiquidModel = "IdealLiquid",
VapourModel = "Ideal"
);
N as Integer;
NC as Integer;
SET
N = 3;
NC = PP.NumberOfComponents;
VARIABLES
T(N+1) as temperature;
dT as temp_delta;
P as pressure;
z(NC) as fraction;
h(N+1) as enth_mol;
EQUATIONS
for i in [1:N+1]
h(i) = PP.VapourEnthalpy(T(i),P,z);
end
# h(1) = PP.VapourEnthalpy(T(1),P,z);
# h(2) = PP.VapourEnthalpy(T(2),P,z);
# h(3) = PP.VapourEnthalpy(T(3),P,z);
# h(4) = PP.VapourEnthalpy(T(4),P,z);
for i in [2:N]
T(i) = T(i-1) + dT;
end
dT = (T(N+1) - T(1))/N;
SPECIFY
T(1) = 300*'K';
T(N+1) = 400*'K';
P = 1*'atm';
z = [0.21, 0.79];
OPTIONS
Dynamic = false;
end