How to impose a variable temperature distribution for one edge of a rectangular plate while keeping the temperatures of other three edges same and constant?
Show older comments
Hi all,
I was trying to plot heat flux lines for a heat transfer problem. The problem specifies a 0.3m by 0.1m rectangular plate. Its right, left and bottom edges are kept at 273.15K and the top edge has a temperature distribution:
with thermal conductivity, k=2.5 W/mK. I've tried the following to solve this problem:
load('gd');
load('ns');
load('sf');
g=decsg(gd,sf,ns);
thermalmodel = createpde('thermal');
geometryFromEdges(thermalmodel,g);
pdegplot(thermalmodel,'EdgeLabels','on')
xlim([0 .3])
ylim([0 .15])
axis equal
dx=.0001;
x=0:dx:.3;
thermalProperties(thermalmodel,'ThermalConductivity',2.5,'Face',1);
thermalBC(thermalmodel,'Edge',1,'Temperature',273.15);
thermalBC(thermalmodel,'Edge',2,'Temperature',273.15);
thermalBC(thermalmodel,'Edge',4,'Temperature',273.15);
thermalBC(thermalmodel,'Edge',3,'Temperature',30.*sin(pi.*x/.3));
generateMesh(thermalmodel);
results = solve(thermalmodel)
I'm getting the following error: Error using pde.ThermalBC/set.Temperature (line 136)
Temperature for all specified edges or faces must be a scalar value or a single function handle. Could someone suggest how I can impose the variable temperature distribution?
Accepted Answer
More Answers (0)
Categories
Find more on Heat Transfer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!