How to define heat flux boundary condition for 1D transient heat conduction analysis?

조회 수: 4 (최근 30일)
L = 0.2*10^-3; %m, wall thickness
n = 5; %number of nodes
T0 = 300; %deg K, initial temperature of wall
dx = L/n; %m node thickness
alpha = 1.13*10^-4; %thermal diffusivity
t_final = 12*10^-3; %s, final time
dt = 1.1*10^-5; %time step, %s
q = 0.4*1.12*10^10; % heat flux (W/m^2)
rho = 8940; % density of material (kg/m^3)
C = 386; %specific heat capacity (J/kg K)
x = dx/2:dx:L-dx/2;
T = ones(n,1)*T0;
dTdt = zeros(n,1);
t = 0:dt:t_final;
for j = 1:length(t)
for i = 2:n-1
dTdt(i) = alpha*(-(T(i)-T(i-1))/dx^2+(T(i+1)-T(i))/dx^2);
end
dTdt(1) = alpha*((T(1)-T0)/(dx))+ (q/(rho*C));
Here is it the right way to define heat flux boundary condition ?
dTdt(n) = alpha*((T0-T(n-1))/(2*dx));
T = T+dTdt*dt;
figure(1)
plot(x,T)
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Thermal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by