function res = vaporizer(x, aux)
d = aux.d;
sc = aux.sc;
u = aux.u;
x = x.*sc.x;
T = x(1);
A = x(2);
Q = x(3);
Nl = x(4);
Nv = x(5);
Vl = x(6);
P = x(7);
n = u(1);
Tcs = u(2);
hin = u(3);
h = d.Cpg*(T-d.Tref)+d.hvap;
Vv = d.Vvap-sum(Vl); 
res = [Q-n*(h-hin);
       Q-d.Uvap.*A.*(Tcs-T);
       Nl-rhol(d).*Vl;
       Nv-rhov(T, P, d).*Vv;
       P-psat(T,d)]./sc.res;
