Choi Okos Equation GUI

by

 

Find ThermoPhysical Properties of Foods using the Choi Okos Equation w/ GUI

[rho,k,Cp,alpha]=choiokos(T,fracw)
function [rho,k,Cp,alpha]=choiokos(T,fracw)
%==========================================================================
rhop = 1.3299e3 - 5.1840e-1*T;
rhof = 9.2559e2 - 4.1757e-1*T;
rhoc = 1.5991e3 - 3.1046e-1*T;
rhofi = 1.3115e3 - 3.6589e-1*T;
rhoa = 2.4238e3 - 2.8063e-1*T;
rhow = 9.9718e2 + 3.1439e-3*T - 3.7574e-3*T.^2;
rhoi = 9.1689e2 - 1.3071e-1*T;
ro=[rhop' rhof' rhoc' rhofi' rhoa' rhow' rhoi'];
N=length(T);
rho=zeros(1,N);
for q=1:N
    rho(1,q)=1./sum(fracw(q,:)./ro(q,:));
end
%==========================================================================
kp = 1.7881e-1 + 1.1958e-3*T - 2.7178e-6*T.^2;
kf = 1.8071e-1 - 2.7604e-3*T - 1.7749e-7*T.^2;
kc = 2.0141e-1 + 1.3874e-3*T - 4.3312e-6*T.^2;
kfi = 1.8331e-1 + 1.2497e-3*T - 3.1683e-6*T.^2;
ka = 3.2962e-1 + 1.4011e-3*T - 2.9069e-6*T.^2;
kw = 5.7109e-1 + 1.7625e-3*T - 6.7036e-6*T.^2;
ki = 2.2196 - 6.2489e-3*T + 1.0154e-4*T.^2;
K=[kp' kf' kc' kfi' ka' kw' ki'];
k=zeros(1,q);
for q=1:N
    fracv(q,:)=(fracw(q,:)./rho(1,q))./sum(fracw(q,:)./rho(1,q));
    k(1,q)=sum(fracv(q,:).*K(q,:));
end
%==========================================================================
Cpp = 2.0082 + 1.2089e-3*T - 1.3129e-6*T.^2;
Cpf = 1.9842 + 1.4733e-3*T - 4.8008e-6*T.^2;
Cpc = 1.5488 + 1.9625e-3*T - 5.9399e-6*T.^2;
Cpfi = 1.8459 + 1.8306e-3*T - 4.6509e-6*T.^2;
Cpa = 1.0926 + 1.8896e-3*T - 3.6817e-6*T.^2;
Cpw = 4.1762 - 9.0864e-5*T + 5.4731e-6*T.^2;
Cpi = 4.0817 - 5.3062e-3*T + 9.9516e-4*T.^2;
CP=[Cpp' Cpf' Cpc' Cpfi' Cpa' Cpw' Cpi'];
Cp=zeros(1,N);
for q=1:N
    Cp(1,q)=sum(fracw(q,:)./CP(q,:));
end
Cp=10*Cp;
%==========================================================================
alphap = 6.8714e-2 + 4.7578e-4*T - 1.4646e-6*T.^2;
alphaf = 9.8777e-2 - 1.2569e-4*T - 3.8286e-8*T.^2;
alphac = 8.0842e-2 + 5.3052e-4*T - 2.3218e-6*T.^2;
alphafi = 7.3976e-2 + 5.1902e-4*T - 2.2202e-6*T.^2;
alphaa = 1.2461e-1 + 3.7321e-4*T - 1.2244e-6*T.^2;
alphaw = 1.3168e-1 + 6.2477e-4*T - 2.4022e-6*T.^2;
alphai = 1.1756 - 6.0833e-3*T + 9.5037e-5*T.^2;
Alpha=[alphap' alphaf' alphac' alphafi' alphaa' alphaw' alphai'];
alpha=zeros(1,q);
for q=1:N
    alpha(1,q)=sum(fracv(q,:).*Alpha(q,:))*1e-6;
end
%==========================================================================

Contact us