Correct use for internalHeatSource and thermalBC in 2D and 3D problems
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using Matlab 2022a. I am using the pde toolbox to try to solve a heat transfer problem.
I am uncertain about the use of internalHeatSource and thermalBC.
For internalHeatSource in 3D, I believe that one uses heat per unit volume (J/m3) as the input and for thermalBC heat per unit area (J/m2) is used. I assume that for the 2D problem I should use J/m2 for internalHeatSource and J/m for thermalBC.
I am simulating a thin free standing film where the heat source is located in the centre of the film. I was thinking that the result should be very similar if I restrict the internalHeatSource or the thermalBC to be in a small volume (in 3D) or area (in 2D) since the total amount of heat entering the system at this point should be similar. However, I get different results in 2D (between internalHeatSource and thermal BC) and in 3D (also between internalHeatSource and thermal BC and the 2D results).
The code for the 2D problem (currently setup for the internalHeatSource) is listed below. I can provide the 3D code if needed.
Many thanks in advance
Chris
close all
clear all
steadyState = false;
if steadyState
thermalmodel = createpde('thermal','steadystate-axisymmetric');
else
thermalmodel = createpde('thermal','transient-axisymmetric');
end
filmDepth = 0.000005;
beamWidth = 0.0001;
R1 = [3 4 .001 .001 .002 .002 0 .001 .001 0]';
R2 = [3 4 beamWidth beamWidth .001 .001 0 filmDepth filmDepth 0]';
R3 = [3 4 0 0 beamWidth beamWidth 0 filmDepth filmDepth 0]';
gm = [R1,R2,R3];
sf = 'R1+R2+R3';
ns = char('R1','R2','R3');
ns = ns';
g = decsg(gm,sf,ns);
geometryFromEdges(thermalmodel,g);
figure
pdegplot(thermalmodel,'FaceLabels','on','EdgeLabels','on')
axis equal
thermalmodel.StefanBoltzmannConstant = 5.670373E-8;
thermalProperties(thermalmodel,'Face', 1, 'ThermalConductivity',170,...
'MassDensity',19250,...
'SpecificHeat',134);
% Properties for Titanium in freestanding thin film where beam hits film.
thermalProperties(thermalmodel,'Face', 2, 'ThermalConductivity', @conductivityTi,...
'MassDensity',16690,...
'SpecificHeat',140);
% Properties for Titanium in freestanding thin film
thermalProperties(thermalmodel,'Face', 3, 'ThermalConductivity', @conductivityTi,...
'MassDensity',16690,...
'SpecificHeat',140);
ATval = 25; %ambient temperature Celsius
thermalBC(thermalmodel,'Edge',2,'Temperature',ATval);
lengthEdge9 = beamWidth;
areaFace3 = beamWidth*filmDepth;
volumeFace3 = areaFace3*filmDepth;
%thermalBC(thermalmodel,'Edge',9,'HeatFlux',60/lengthEdge9);
internalHeatSource(thermalmodel,60/areaFace3,'Face',3);
thermalIC(thermalmodel,ATval);
msh = generateMesh(thermalmodel);
figure
pdeplot(thermalmodel)
axis equal
if steadyState
result = solve(thermalmodel);
else
tfinal = 0.1;
tlist = 0:tfinal/100:tfinal;
result = solve(thermalmodel, tlist);
end
T = result.Temperature;
figure
axis equal
if steadyState
pdeplot(thermalmodel,'XYData',T,'Contour','on')
title 'Steady-State Temperature'
else
pdeplot(thermalmodel,'XYData',T(:,end),'Contour','on')
title(sprintf(['Transient Temperature' ...
' at Final Time (%g seconds)'],tfinal))
end
if ~steadyState
Tcentre = interpolateTemperature(result,[0.0;0.0],1:numel(tlist));
figure
plot(tlist,Tcentre)
title 'Temperature at the Centre of film as a Function of Time'
xlabel 'Time, s'
ylabel 'Temperature, C'
grid on
legend('Center Axis','Location','SouthEast')
end
function thermalVal = conductivityTi(location,state)
thermalVal = 57.53743136+0.003683833*state.u;
end
6 个评论
Torsten
2022-9-15
You are not injecting heat. The heat also has to conduct from the wall into the small region and from there away along the film. So you should make a very fine grid for the small region to resolve the process if you want to use the boundary condition and not the internal heat source for the process.
From my feeling, the heat flux from the wall in W/m^2 must be much bigger than the volumetric heat source in W/m^3 for that both have the same effect.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!