function res = compressor(x, aux)
d = aux.d;
sc = aux.sc;
u = aux.u;
x = x.*sc.x;
Ws = x(1);
Tout = x(2);
Tin = u(1);
n = u(2);
Ph = u(3);
Pl = u(4);
res = [Ws-n*d.Cpg*(Tout-Tin);
       Tout-Tin*(Ph/Pl)^(d.R/d.Cpg)]./sc.res;
