I'm currently working on a project to build a solar food dryer and I need to model on Matlab how temperature of the product will change with respect to change in solar radiation, Q .
Q is given by ;
Q =960*(sin(2*pi*Time2/24)).^2; %W/m2
where
Time2 = (1:t:12); %hours
The heat flow equation is given by
Q(t)A = mcp*(T2-T1) + (mw*lw)
where :
mw = 0.706; % Mass of water loss from product in hr (Kg/h)
m = 15; % Mass of product to dry (Kg)
lw = 2260000; % Latent heat of vaporisation of water (J/Kg)
A = 1; % Surface Area of collector (m^2)
cp= 3746; % Specific heat capacity of product (J/Kg/C)
T1 = temperature at t
T2 = temperature at t + dt
Manipulating the heat flow give T2 as ;
T2= (((Q*A*3600) -(mw*lw))/(m*cp)) + T1; % 3600 is there to convert j/s to J/h
however implementing this on Matlab is proving a challenge for me- I'm fairly new to Matlab
This is what I have so far ;
close all
clear;
mw = 0.706; % Mass of water loss from product in hr (Kg/h)
m = 15; % Mass of product to dry (Kg)
lw = 2260000; % Latent heat of vaporisation of water (J/Kg)
A = 1; % Surface Area of Collector (m^2)
cp= 3746; % Specific heat capacity of product (J/Kg/C)
t = 1; % Time step
T = 24; % Initial Temperature (°C)
Time2=(1:t:12); hours
Q=960*(sin(2*pi*Time2/24)).^2; % Solar irradiation in tropical regions at specific time (W/m2)
for j = 1:12
T(j+1)= ((((QQ2(j)*A*j*3600))-(mw*lw))/(m*cp))+ T(1);
end
figure(2)
plot(T)
title('Temperature')
xlabel('time (hours)')
ylabel('Temperature (°C)')
This seems wrong since the mass, m should decrease by mw after each hr and the temperature profile should follow the profile of the solar radiation. i.e peak at the same time
I have been spending days to get my head around this but i'm pretty bad at Matlab so I haven't made any meaningful progress. Any help will be appreciated
