function v = InputTransf(u,p,d,x)
% static calculation block to find v = f(u,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 = u(1);                                            % [m3/s] inlet flow 1
q2 = u(2);                                            % [m3/s] inlet flow 2

v1 = q1+q2;
v2 = (q1*T1+q2*T2)/(q1+q2); 
v  = [v1;v2];                                          % transformed inputs
end