function u = InvInputTransf(v,x,d,p)
% static calculation block to solve for u = f(v,x,d)

T1 = d(1);                   % [degC], disturbance inlet flow 1 temperature
T2 = d(2);                   % [degC], disturbance inlet flow 1 temperature

T  = x;                                    % diff state. temperature [degC]
V  = p(1);                                               % tank holdup [m3]

q1 = v(1)*(v(2)-T2)/(T1-T2);                          % [m3/s] inlet flow 1 
q2 = v(1)*(T1-v(2))/(T1-T2);                          % [m3/s] inlet flow 2

u  = [q1;q2];
end