function u = InvInputTransfD(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]

A  = p(2);                                               % tuning parameter
B  = p(3);                                               % tuning parameter

R  = [1 1; T1-T T2-T];
S  = [v(1); V*(A*T+B*v(2))];

u  = R\S     ;         % solve linear system of eqn to find physical inputs
end