using mask with boundary conditions
Im using mask to set where temperatures need to go.
Basically its a rectangle box with a hole through it, the hole has a liquid of 80 degrees C going through it and the outer edges of the rectangular shape are at 20 degrees.
So I got my mask matrix to have 0's where the hole is and i need to assign the 80 degree temperature to this hole of 0's.
From what I have the mask comes out ok with 0's in the right place but after that the matrix seems to change size. Any ideas?
tedge = 20;
tcore = 80;
side = 100;
h = 2.5;
[x y] = meshgrid(-side/2:h:side/2,-side/2:h:side/2);
[M N] = size(x);
Rcore = 19.05;
mask = (x.^2 + y.^2) > Rcore^2;
%assign boundary conditions
for x = 1:41
for y = 1:41
if mask(x,y) == 0;
X(x,y)=tcore;
end
end
end
.
Relevant Pages
- Re: Writing a logic for shape coordinates
... and slots (rectangle with a semi-circle) in the drawing and where ever ... I want to check if the hole is in the range of the sensor, ... ' Check if Little circle is completly outside or completly inside ... If LittleY - LittleR < RectY Then ... (microsoft.public.excel.programming) - Re: Writing a logic for shape coordinates
... rectangle and then top left corner of the rectangle. ... The two sets conditions are written for each angle if the sensor is ... circle and rectangle, then execute the conditions that I have given ... R coordinates of each hole and some necessary info for the slot hole. ... (microsoft.public.excel.programming) - Re: Writing a logic for shape coordinates
... value 0 will go for sensors that ... R coordinates of each hole and some necessary info for the slot hole. ... Second semicircle can be on any side of the rectangle. ... corners or a rectangle to see if a rectangle is outside of a larger circle. ... (microsoft.public.excel.programming) - Re: Writing a logic for shape coordinates
... value 0 will go for sensors that ... R coordinates of each hole and some necessary info for the slot hole. ... Second semicircle can be on any side of the rectangle. ... corners or a rectangle to see if a rectangle is outside of a larger circle. ... (microsoft.public.excel.programming) - Re: Writing a logic for shape coordinates
... value 0 will go for sensors that ... R coordinates of each hole and some necessary info for the slot hole. ... Second semicircle can be on any side of the rectangle. ... corners or a rectangle to see if a rectangle is outside of a larger circle. ... (microsoft.public.excel.programming) |
|