function dxMixdt = ODEMixer(xmix,umix,T2hot,m2,m3,T0,P)
Mmix = xmix(1); T2 = xmix(2); % Dynamic states
mbypass = umix(1); % Input
Cpg = P(1); dHvap45 = P(2); % Parameters 

dMmixdt = m2 + mbypass - m3; % Dynamic massbalance for the mixer
dT2dt = (1/Mmix)*(m2*(T2hot - T2) + ...
    mbypass*(T0 - dHvap45/Cpg - T2)); % Dynamic energybalance for the mixer

dxMixdt = [dMmixdt; dT2dt];
end

