How can i make the thickness of a pipe from Nastran in Matlab variable?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1420733/image.jpeg)
As shown this pipe are made of CQUAD4 elements and all have the same material properties PSHELL (PID 5101060) which contains how thick it should be.
CQUAD4 5102048 5101060 5105380 5105385 5105135 5105213
CQUAD4 5102049 5101060 5105135 5104645 5104825 5104974
CQUAD4 5102050 5101060 5105385 5105387 5104645 5105135
CQUAD4 5102051 5101060 5105184 5104510 5105115 5104974
CQUAD4 5102052 5101060 5105143 5105184 5104974 5104825
CQUAD4 5102053 5101060 5105213 5104460 5105382 5105380
CQUAD4 5102054 5101060 5105115 5104565 5104460 5105213
CQUAD4 5102055 5101060 5104510 5104081 5104565 5105115
$$
$$ Properties
$
PSHELL 510106096069001 3.496069001 96069001
MAT1 9606900172000.0 0.33 2.8-9
I want to make this pipe to have different thickness at different position instead of equally thick everywhere. My first thought was to create as many PSHELL properties as CQUAD4 elements. And thickness in PSHELL properties are set as variable, which could be replaced with different values. Then every properties ID will be reassigned to each CQUAD4 elements. This way i can take a function for example y = x and replace variables with value from y =x and have a pipe with increasing thickness. But in this case elements on the same cross section would have different thickness, which is not what i want. What should i do?
0 Kommentare
Antworten (1)
Saksham
am 22 Aug. 2023
Hi Jiahong
I understand you wish to create a pipe in MATLAB having different thickness at different positions.
Below is a sample code to demonstrate how pipe of variable thickness can be created in MATLAB:
% Define pipe parameters
length = 5; % Length of the pipe
% Define thickness parameters
innerRadius = 1; % Inner radius of the pipe
outerRadius = 2; % Outer radius of the pipe
% Generate surface points
theta = linspace(0, 2*pi, 100); % Angular coordinates
z = linspace(0, length, 100); % Axial coordinates
[theta, z] = meshgrid(theta, z); % Create meshgrid
% Calculate radius at each point along the length
radius = innerRadius + (outerRadius - innerRadius) * z / length;
% Calculate x and y coordinates
x = radius .* cos(theta); % X-coordinates
y = radius .* sin(theta); % Y-coordinates
% Plot the pipe's surface
surf(x, y, z);
axis equal; % Set equal aspect ratios
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Pipe Visualization');
I hope the above code will be helpful to you.
Sincerely,
Saksham
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!