image thumbnail

Thermal Processing of Foods - GUI

by

 

a GUI to calculate a thermal process, using variable thermal properties (Choi Okos)

[T_center,T_retort,rho_time,k_time,Cp_time,alpha_time,...
function [T_center,T_retort,rho_time,k_time,Cp_time,alpha_time,...
    ct,X,Y,x,y,t]=simul_process(rho,k,Cp,alpha,SI_can_internal_diameter,...
    SI_can_height,time_full_process,time_cooling,...
    Food_Initial_Temperature,Temperature_retort,Temperature_cooling,...
    food_protein,food_fat,food_carbh,...
    food_fiber,food_ash,food_water)
nodos = 13;
%==========================================================================
r=SI_can_internal_diameter/2;
x=linspace(0,SI_can_internal_diameter,nodos);
dr=mean(diff(x));
cx=length(x);
y=0:dr:SI_can_height;
cy=length(y);
[X,Y]=meshgrid (x,y);
dt = 0.1*dr^2/(alpha*60);
t=0:dt:time_full_process;
ct=length(t);
% =========================================================================
T_cen = zeros(1,ct);
rho_time = zeros(1,ct);
k_time = zeros(1,ct);
Cp_time = zeros(1,ct);
alpha_time = zeros(1,ct);
T_retort = zeros(1,ct);
rho_time(1,1) = rho;
k_time(1,1) = k;
Cp_time(1,1) = Cp;
alpha_time(1,1) = alpha;
T_cen(1,1) = Food_Initial_Temperature;
T_retort(1,1) = Temperature_retort;
%==========================================================================
T=zeros(cx,cy,ct);
%==========================================================================
T(:,:,1)=Food_Initial_Temperature;
%==========================================================================
Fo=(alpha*dt*60)/(dr^2);
%==========================================================================
for p = (1:1:ct-1)
    check_time_cooling = t(p);
    if check_time_cooling <= time_cooling 
        T(1:end,1,p+1) = Temperature_retort;
        T(end,1:end,p+1) = Temperature_retort;
        T(1:end,end,p+1) = Temperature_retort;
        T(1,1:end,p+1) = Temperature_retort;
        T_retort(1,p+1) = Temperature_retort;
    else
        T(1:end,1,p+1) = Temperature_cooling;
        T(end,1:end,p+1) = Temperature_cooling;
        T(1:end,end,p+1) = Temperature_cooling;
        T(1,1:end,p+1) = Temperature_cooling;
        T_retort(1,p+1) = Temperature_cooling;
    end
     
  for n=(2:cy-1)
    T(2:(nodos+1)/2-1,n,p+1)=(Fo-(alpha*dt)/(2*r*dr))*T(1:(nodos+1)/2-2,n,p)...
                    +(Fo+(alpha*dt)/(2*r*dr))*T(3:(nodos+1)/2,n,p)...
                    +Fo*(T(2:(nodos+1)/2-1,n+1,p)+T(2:(nodos+1)/2-1,n-1,p))+(1-4*Fo)*T(2:(nodos+1)/2-1,n,p);
                
    T((nodos+1)/2,n,p+1)=Fo*(2*T((nodos+1)/2+1,n,p)+2*T((nodos+1)/2-1,n,p)+T((nodos+1)/2,n+1,p)...
                    +T((nodos+1)/2,n-1,p))+(1-6*Fo)*T((nodos+1)/2,n,p);  
                
    T(((nodos+1)/2+1):end-1,n,p+1)=(Fo+(alpha*dt)/(2*r*dr))*T(((nodos+1)/2):end-2,n,p)...
                    +(Fo-(alpha*dt)/(2*r*dr))*T(((nodos+1)/2+2):end,n,p)...
                    +Fo*(T(((nodos+1)/2+1):end-1,n+1,p)+T(((nodos+1)/2+1):end-1,n-1,p))+(1-4*Fo)*T(((nodos+1)/2+1):end-1,n,p); 

  end
  T_cen(1,p+1) = T((nodos+1)/2,(nodos+1)/2,p+1);
  [rho,k,Cp,alpha]=choiokos(T_cen(1,p+1),food_protein,food_fat,food_carbh,...
    food_fiber,food_ash,food_water,0);
    rho_time(1,p+1) = rho;
    k_time(1,p+1) = k;
    Cp_time(1,p+1) = Cp;
    alpha_time(1,p+1) = alpha;
    Fo=(alpha*dt*60)/(dr^2);
end
%==========================================================================
T_center = T_cen;

Contact us