Differential eq of a hot storage tank

4 visualizaciones (últimos 30 días)
Ricard Escriva
Ricard Escriva el 13 de En. de 2021
Respondida: Star Strider el 13 de En. de 2021
Hello,
I am modelling a hot salt storage tank with an initial mass of m_tank_0 at a temperature T_0.
A mass m (kg/s) is extracted. Heat is lost through an area A to the steel side plates and then to ambient temperature.
The differential equation vector Y contains the mass of the tank, and temperatures of each step.
The problem is that the mass is expressed in kg/s but the solver creates a vector [time,Y] with time intervals different from 1s.
Therefore the tank drains too fast.
How could I solve this?? Thank you for your time
function dy=eq_diferencials_hot(t,y,Cp,Cp_s,m_tank_0,m,h_i,h_e,A,rho,rho_s,Tamb,esp,k)
dy=zeros(4,1);
dy(1)=-m; %Mtank
dy(2)=(-m*Cp*y(2)-h_i*A*(y(2)-y(3)))/(y(1)*Cp); %Ttank
dy(3)=(1/(0.5*rho_s*Cp_s*esp))*(-k/esp*(y(3)-y(4))+h_i*(y(2)-y(3))); %Twall inner
dy(4)=(1/(0.5*rho_s*Cp_s*esp))*((k/esp)*(y(3)-y(4))-(h_e*(y(4)-Tamb)));%Twall outer
endfunction
%IN ANOTHER FILE
hores=7*3600; %segons de emmagatzematge disponibles
P=1e4; %(W)net electric power
nu=0.4; %efficiency SG & rankine cycle
Tamb=30; %(ºC)
T_0=550; %(ºC) Hot temp
T_c=280; %(ºC) Cold temp
Cp=1.56; %(kJ/kgK)
Cp_s=0.5024; %(kJ/kgK)
rho_s=8100; %(kg/m3)
rho=1640; %(kg/m3)
m=P/(nu*Cp*(T_0-T_c)); %(kg/s) extraction mass from the tank
h_e=5; %(W/m2) convective heat coefficient outside
h_i=2; %(W/m2) convective heat coefficient inside
esp=0.08; %(m) espesor del metall del deposit
k=0.44; %(W/mK) conductivitat del metall del deposit
Tinit=[m_tank_0 T_0 300 100];
options=odeset('RelTol',1e-6,'AbsTol',1e-6*ones(1,4));
[time,Y]=ode45(@(t,y)eq_diferencials_hot(t,y,Cp,Cp_s,m_tank_0,m,h_i,h_e,A,rho,rho_s,Tamb,esp,k),[0 hores],Tinit,options);
plot(time,Y(:,1))
xlabel('time [s]'); ylabel('Mass in tank [kg]');

Respuestas (1)

Star Strider
Star Strider el 13 de En. de 2021
The time intervals the ODE solvers use are whatever you define them to be, since they have no inherent unit. In the ‘m’ assignment, it will probably be necessary for you to add a constant that scales them appropriately.
(There are several missing constants, so I cannot run the code to see what the problem is, or to suggest a specific solution.)

Categorías

Más información sobre Thermal Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by