Error when putting boundary condition on internal edge of 2d heat transfer

1 次查看(过去 30 天)
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.362966e-21.
I get an error when I put the convection coefficient on Edge 3. Works all fine when it's on 2.
thermalmodel = createpde('thermal','steadystate');
rect1 = [3 4 -1 1 1 -1 0 0 -0.5 -0.5];
rect2 = [3 4 -1 1 1 -1 0 0 0.5 0.5];
gh = [rect1',rect2'];
dl = decsg(gh);
gm=geometryFromEdges(thermalmodel,dl);
pdegplot(dl,'EdgeLabels','on','SubdomainLabels','on')
thermalProperties(thermalmodel,'ThermalConductivity',1, ...
'Face',[1,2]);
thermalBC(thermalmodel,'ConvectionCoefficient',1000,'Edge',3,'AmbientTemperature',0);
P=@(region) 500./(sqrt(2*pi)).*exp(-1/2.*(region./(0.15./2)).^2);
thermalBC(thermalmodel,'Heatflux',@(location,~) P(location.x),'Edge',1);
generateMesh(thermalmodel);
pdeplot(thermalmodel)
thermalresults = solve(thermalmodel);
pdeplot(thermalmodel,'XYData',thermalresults.Temperature,'Contour','on','ColorMap','hot'); drawnow

回答(0 个)

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by