Effacer les filtres
Effacer les filtres

Need help in projected area of pipe along the direction of flow

2 vues (au cours des 30 derniers jours)
Md Mia
Md Mia le 25 Juil 2023
Modifié(e) : Md Mia le 25 Juil 2023
Hi
I have modeled pipe and elbow using MATLAB. Have some confusion how to calculate the projected area of the element of pipe and elbow. For instance, if water is flowing in Z direction, elements of pipe1 and pipe 3 will not experience any pressure and force, while pipe 2, elbow 1 and elbow 2 will experience water pressure and corresponsidng forces. I was told that I have to calculate projected length and width and multiply to get projected area. This area will be such that when water is flowing in Z direction, corresponding area of pipe 1 and pipe 3 will be zero and there would be area for the remaining parts.
My code was as follows:
%% element area pipe 1
for m = 1:size(element_num_shell_1_1,2) % size(element_num_shell_1_1,2) = 840, total number of elements of pipe 1
if mod(m,n_ele_circum-1)~= 0 % n_ele_circum = number of elements around the circumference = 15
P1 = node_coord_list(m,[2:4]); %
Q1 = node_coord_list(m+1,[2:4]);
R1 = node_coord_list(m+(n_ele_circum-1),[2:4]);
else
P1 = node_coord_list(m,[2:4]);
Q1 = node_coord_list(m-(n_ele_circum-2),[2:4]);
R1 = node_coord_list(m+(n_ele_circum-1),[2:4]);
end
if flow_direction == 1 % flow_direction =1 means flow paralle to + Z axis
l = abs(P1(1)-Q1(1)); % length
w = abs(P1(2)-R1(2)); % width
elseif flow_direction == 2 % flow_direction =2 means flow paralle to + X axis
l = abs(P1(3)-Q1(3)); % length
w = abs(P1(2)-R1(2)); % width
end
Area_ele(m) = l*w;
end
Here, P1, Q1 and R1 are as follows:
The problem is that, for pipe 1 and pipe 3, I got zero area, however, for pipe 2 and elbow also I got zero projected area. Can anyone help me in this regards? Thanks.

Réponses (1)

Mrutyunjaya Hiremath
Mrutyunjaya Hiremath le 25 Juil 2023
It looks like there might be a mistake in your code while calculating the projected area of the elements. The issue seems to be related to the conditions used in the if statement for determining the coordinates P1, Q1, and R1.
  • To calculate the projected area correctly, you need to consider the orientation of the elements with respect to the flow direction. Let's assume the elements of the pipe are oriented along the Z-axis, and the elements of the elbow are oriented along the X-axis. Based on this assumption, you can modify your code as follows:
for m = 1:size(element_num_shell_1_1,2) % size(element_num_shell_1_1,2) = 840, total number of elements of pipe 1
if mod(m,n_ele_circum-1)~= 0 % n_ele_circum = number of elements around the circumference = 15
P1 = node_coord_list(m,[2:4]); %
Q1 = node_coord_list(m+1,[2:4]);
R1 = node_coord_list(m+(n_ele_circum-1),[2:4]);
else
P1 = node_coord_list(m,[2:4]);
Q1 = node_coord_list(m-(n_ele_circum-2),[2:4]);
R1 = node_coord_list(m+(n_ele_circum-1),[2:4]);
end
if flow_direction == 1 % flow_direction =1 means flow parallel to + Z axis
l = abs(P1(3)-Q1(3)); % length along Z-axis
w = abs(P1(2)-R1(2)); % width along Y-axis
elseif flow_direction == 2 % flow_direction =2 means flow parallel to + X axis
l = abs(P1(1)-Q1(1)); % length along X-axis
w = abs(P1(2)-R1(2)); % width along Y-axis
end
Area_ele(m) = l * w;
end
  • Please note that the direction of flow should be provided correctly in the flow_direction variable. If the orientation of the elements is different than what is assumed in the code, you may need to adjust the flow direction accordingly. Also, make sure that the node_coord_list contains the correct coordinates of the elements.
  1 commentaire
Md Mia
Md Mia le 25 Juil 2023
Modifié(e) : Md Mia le 25 Juil 2023
Hi
Thanks for your reply. I checked the flow direction and node_coord_list as you suggested. I did not understand this line, "Let's assume the elements of the pipe are oriented along the Z-axis, and the elements of the elbow are oriented along the X-axis".
For pipe 1, elements can be said to be oriented along Z while for pipe 2, its oriented along X and for pipe 3, its oriented along Z. So, if the flow is coming in Z axis, do I need to write the follwoing lines for pipe 1 and pipe 3:
if flow_direction == 1 % flow_direction =1 means flow parallel to + Z axis
l = abs(P1(3)-Q1(3)); % length along Z-axis
w = abs(P1(2)-R1(2)); % width along Y-axis
For pipe 2, it would be:
if flow_direction == 1 % flow_direction =1 means flow parallel to + Z axis
l = abs(P1(1)-Q1(1)); % length along X-axis
w = abs(P1(2)-R1(2)); % width along Y-axis
Is that you are trying to say? But what about the elbow? As you can see from the figure, they are 90-degree elbow, not exactly along X or Z.
I will be grateful if you can explain it. Thanks again.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Install Products dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by