MATLAB: Applying boundary conditions to a circle

heat fluxpde

For my dissertation, I need to model an Underground Thermal Energy Storage (UTES) and show how heat will effect the surrounding soil. For some reason, when applying a temperature of 30 degrees celsius to an inner circle, the final model shows everyhting with a temperature of 0 degrees celsius. Below is the code, any help is appreciated.
thermalmodelS = createpde('thermal','steadystate');
R1 = [3; 4; -2.7; 2.7; 2.7; -2.7; -3.7; -3.7; 3.7; 3.7];
R2 = [3; 4; -2.2; 2.2; 2.2; -2.2; -3.2; -3.2; 3.2; 3.2];
R3 = [3; 4; -2.025; 2.025; 2.025; -2.025; -3.025; -3.025; 3.025; 3.025];
R4 = [3; 4; -2; 2; 2; -2; -3; -3; 3; 3];
C1 = [1; 0; 0; 1.5; 0; 0; 0; 0; 0; 0];
C2 = [1; 0; 0; 1.3; 0; 0; 0; 0; 0; 0];
gdm = [R1 R2 R3 R4 C1 C2];
sf = 'R1+R2+R3+R4+C1+C2';
ns = char('R1','R2','R3','R4','C1','C2');
ns = ns';
dl = decsg(gdm,sf,ns);
geometryFromEdges(thermalmodelS,dl);
pdegplot(thermalmodelS,'EdgeLabels','on','FaceLabels','on');
xlim([-2.7 2.7]);
ylim([-3.7 3.7]);
axis equal
inital model - easy to play about to change sizes, add stuff etc
Soil is sand with moisture content of 3.3%
UTES housed in concrete
Soil properties
thermalProperties(thermalmodelS, 'ThermalConductivity',2,"Face",1);
Concrete
thermalProperties(thermalmodelS,'ThermalConductivity',1.13,'Face',2);
Insulation
thermalProperties(thermalmodelS,'ThermalConductivity',0.13,'Face',3
Crushed sandstone for heat transfer of hot water (which is 30 degrees)
thermalProperties(thermalmodelS,'ThermalConductivity',6.2,'Face',4);
304 stainless steel
thermalProperties(thermalmodelS,'ThermalConductivity',16.2,'Face',6);
Water at 30 degrees
thermalProperties(thermalmodelS,'ThermalConductivity',0.55,'Face',5);
thermalBC(thermalmodelS,"Edge",[21 22 23 24],'Temperature',30);
thermalBC(thermalmodelS,'Edge',[17 18 19 20],'HeatFlux',1215);
thermalBC(thermalmodelS,'Edge',[16 15 8 7],'HeatFlux',67.8);
thermalBC(thermalmodelS,'Edge',[14 13 6 5],'HeatFlux',0.222226);
thermalBC(thermalmodelS,'Edge',[12 11 4 3],'HeatFlux',12.6);
generateMesh(thermalmodelS,'Hmax',0.2);
figure
pdeplot(thermalmodelS);
axis equal
title 'UTES temperature affect on soil'
R = solve(thermalmodelS);
T = R.Temperature;
figure
pdeplot(thermalmodelS,'XYData',T,'Contour','on','ColorMap','hot');
axis equal
title 'Temperature, Steady State Solution'

Best Answer

Hi Alun,
You are applying your BCs on interior edges, these are not boundaries. Please refer to this page:
Perhaps you need to use internalHeatSource function to apply heat generation in the interior regions. You can only specify boundary conditions on the boundary.
Regards,
Ravi