PDE TOOLBOOX heat transfer error
조회 수: 2 (최근 30일)
이전 댓글 표시
Why am I getting this error??? I want to observe conduction heat transfer on Stacked Cylindricall Cells. I keep getting the same error;
Check for missing argument or incorrect argument data type in call to function 'thermalProperties'.
Error in bugnshaf (line 26) ''thermalProperties(modelc,'ThermalConductivity',k,'SpecificHeat',Cp,'MassDensity',rho)''
My codes
modelc = createpde('thermal','transient');
modelc = createpde
gm = multicylinder(0.28,[0.724 0.802 0.702 3.353],'ZOffset',[0 0.724 1.526 2.228])
modelc.Geometry = gm
pdegplot(modelc,'CellLabels','on','FaceAlpha',0.99)
subplot(1,2,2)
pdegplot(model,'FaceAlpha',0.25,'FaceLabel','on')
figure
mesh_Hmax = generateMesh(modelc,'Hmax',0.056)
pdemesh(mesh_Hmax)
% thermal material properties.
k = 40.3; % Thermal conductivity, W/(m*C)
rho = 7715; % Density, kg/m^3
cp = 441; % Specific heat, W*s/(kg*C)
q = 0; % Heat source, W/m^3
thermalProperties(modelc,'ThermalConductivity',k,'SpecificHeat',cp,'MassDensity',rho)
thermalBC(modelc,'Face',1,'Temperature',185);
thermalBC(modelc,'Face',2,'Temperature',255)
thermalBC(modelc,'Face',3,'Temperature',295)
thermalBC(modelc,'Face',4,'Temperature',205)
thermalBC(modelc,'Face',5,'Temperature',255)
thermalBC(modelc,'Face',6,'Temperature',175)
thermalBC(modelc,'Face',7,'Temperature',200)
thermalBC(modelc,'Face',8,'Temperature',75)
thermalBC(modelc,'Face',9,'Temperature',175)
thermalIC(modelc,25)
tlist = 0:100:3000;
R = solve(modelc,tlist);
figure
pdeplot3D(modelc,'ColorMapData',R.Temperature(:,4))
댓글 수: 0
채택된 답변
Ravi Kumar
2020년 9월 12일
You are overwriting modelc immediately after creating the thermal model. Remove the second line: modelc = createpde
댓글 수: 3
Ravi Kumar
2020년 9월 12일
I ran your code after removing the line I mentioned and got the following result. No error.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!