PDE Toolbox Heat transfer EdgeLabels for Circular Geometries
3 views (last 30 days)
Show older comments
Hello everyone,
currently I am trying to visualize the heat transfer of cylindric geometries, single-, and multi-layered. Most of the time when I create a geometry and type in boundary conditions and material properties I can chose between 4 edges per circle. Is there a possibility to increase this number up to for example 6 edges per circle or even create a relation to an angle? For example if the angle was set to 360° i could reach the entire periphery of the circle with only one edge.
Also I've concerend myself with the matrix that the toolbox creates when using the rectangle function (which can easily used for circles too), but it seems like it only creates the geoemtry itself, while not having any influence on the amount of the edgelabels and its positions. Rather i came to the conclusion that these edgelabes and their positions are created in the toolbox which means that i really do not have the ability to effect them.
Does anybody know more?
0 Comments
Accepted Answer
Ravi Kumar
on 4 Nov 2017
If your aim is to assign different boundary values on a circular boundary based on the angular position, then you can do so using the functional form of BC specification.
Use the values of Cartesian coordinates passed to the boundary function as region.x and region.y to first compute the angular position of point in question and then set appropriate boundary value based on the computed angle.
2 Comments
Ravi Kumar
on 6 Nov 2017
Edited: Ravi Kumar
on 6 Nov 2017
Hi Julian,
It is not possible to split an edge in PDE Toolbox. The workaround I am suggesting should enable you to achieve your end goal:
"E1 makes one quarter of the circle meaning 90°. So what i would like to have is an angle function where i can type in a number, lets say 360°, and then the temperature of E1 would already cover the entire circle."
You can achieve the above BC functionality by using a function handle to define BC. You don't need to create additional edges to assign such BC.
For example, say you want to control the BC on the inner circular boundary E1,E2,E3, and E4. Create on Dirichlet boundary containing those four edges as:
applyBoundaryCondition(model,'dirichlet','Edge',1:4,'u',@setSectorTemperature)
Then you can define the setSectorTemperature as:
function t = setSectorTemperature(region,state)
if isnan(region.x)
t = nan(size(region.x))
return
end
% Compute angle
theta = atan(region.y/region.x);
%Make sure you update this angle calculation is unwarped
%and converted to degree if you are
%using (0,360) as range to decide the BC.
if (theta>=45 && theta <=60)
t = 1000*ones(size(region.x));
else
t = zeros(size(region.x));
end
end
The about BC function setSectorTemperature would then assign a temperature of 1000 on an arc that subtends 15 degs and zero everywhere else. You can develop on this idea and make the BC as fine grained as you like.
Hope this helps.
-Ravi
More Answers (0)
See Also
Categories
Find more on Geometry and Mesh 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!