% cpest.m is a function that calculates the Cp-value (in J/kgK) for selected fluids
% at the Crude Oil HEN at Mongstad.

% Daniel Greiner Edvardsen
% May 18, 2010

function cp=cpest(Fluid,T)

 if (strcmp(Fluid,'CRUDE')) 
   cp   = 1000*(2.0*2.1297e-003*T + 1.7895);
 elseif (strcmp(Fluid,'RES'))
   cp   = 1000*(2.0*1.8189e-003*T + 1.7798);
 elseif (strcmp(Fluid,'BC'))
   cp   = 1000*(2.0*1.9783e-003*T + 1.7771);
 elseif (strcmp(Fluid,'HGO'))
   cp   = 1000*(2.0*1.9901e-003*T + 1.7924);
 elseif (strcmp(Fluid,'LGO'))
   cp   = 1000*(2.0*2.0636e-003*T + 1.7963);
 elseif (strcmp(Fluid,'KERO'))
   cp   = 1000*(2.0*2.2148e-003*T + 1.7941);
 elseif (strcmp(Fluid,'HNAF'))
   cp   = 1000*(2.0*2.4663e-003*T + 1.7791);
 elseif (strcmp(Fluid,'TSR'))
   cp   = 1000*(2.0*2.5109e-003*T + 1.7798);
 elseif (strcmp(Fluid,'MSR'))
   cp   = 1000*(2.0*2.2292e-003*T + 1.7967);
 elseif (strcmp(Fluid,'BSR'))
   cp   = 1000*(2.0*2.0483e-003*T + 1.7877);
 elseif (strcmp(Fluid,'FCR'))
   cp   = 1000*(2.0*1.9509e-003*T + 1.7847);
 end     