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

4 Ansichten (letzte 30 Tage)
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

Antworten (0)

Kategorien

Mehr zu Thermal Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by