function u = CalcBlockCase3(x,v,d,p)
% model for level and concentration 
q2   = d(1);                           % [kg/s], inlet flow 2
c1    = d(2);                          % [kg/kg] inlet flow 1 concentration 
c2    = d(3);                          % [kg/kg] inlet flow 2 concentration
A     = p(1); 
c    = x;                                          % [kg/kg], concentration
%backcalculate u from v
u = (v+q2*(c-c2)+A*c)/(c1-c);
end