Exporting image-generated geometry in matlab to FEA compatible format
Hello, I am doing an undergraduate thesis, and I like to implement MATLAB in some of the analysis.
The query is, how to export a file generated as an image in a code, to a format compatible with FEA (Finite element analysis).
The goal is to find the temperature profile in this slag pot geometry, which is a truncated cone.
So, once having the compatible geometry I can use matlab pdegplot and some commands related to find the temperature profile.
The code was generated by AI (Claude).
% Dibujo tronco de cono en 3D. Luego, obtener el perfil de temperatura y
% modelamiento de pérdida de calor mediante el uso de ecuaciones
% diferenciales.
% Parámetros del problema
R1 = 1.155; % Semi-eje mayor de la elipse menor (m)
R2 = 2.082; % Semi-eje mayor de la elipse mayor (m)
b1 = 1.549; % Semi-eje menor de la elipse mayor (m)
b2 = 0.838; % Semi-eje menor de la elipse menor (m)
h = 2.921; % Altura del tronco de cono (m)
theta = linspace(0, 2*pi, 100); % Ángulo para las elipses
% Coordenadas para la elipse menor (base inferior)
x1 = R1 * cos(theta);
y1 = b2 * sin(theta);
z1 = zeros(size(theta));
% Coordenadas para la elipse mayor (base superior)
x2 = R2 * cos(theta);
y2 = b1 * sin(theta);
z2 = h * ones(size(theta));
% Superficie lateral del tronco de cono
[Theta, Z] = meshgrid(theta, linspace(0, h, 100));
R = (R2 – R1) / h * Z + R1;
B = (b1 – b2) / h * Z + b2;
X = R .* cos(Theta);
Y = B .* sin(Theta);
% Graficar el tronco de cono
figure;
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceAlpha’, 0.7); % Superficie lateral
fill3(x1, y1, z1, ‘r’); % Base inferior
fill3(x2, y2, z2, ‘b’); % Base superior
xlabel(‘X (m)’);
ylabel(‘Y (m)’);
zlabel(‘Z (m)’);
title(‘Tronco de Cono con Bases Elípticas’);
axis equal;
grid on;
hold off;Hello, I am doing an undergraduate thesis, and I like to implement MATLAB in some of the analysis.
The query is, how to export a file generated as an image in a code, to a format compatible with FEA (Finite element analysis).
The goal is to find the temperature profile in this slag pot geometry, which is a truncated cone.
So, once having the compatible geometry I can use matlab pdegplot and some commands related to find the temperature profile.
The code was generated by AI (Claude).
% Dibujo tronco de cono en 3D. Luego, obtener el perfil de temperatura y
% modelamiento de pérdida de calor mediante el uso de ecuaciones
% diferenciales.
% Parámetros del problema
R1 = 1.155; % Semi-eje mayor de la elipse menor (m)
R2 = 2.082; % Semi-eje mayor de la elipse mayor (m)
b1 = 1.549; % Semi-eje menor de la elipse mayor (m)
b2 = 0.838; % Semi-eje menor de la elipse menor (m)
h = 2.921; % Altura del tronco de cono (m)
theta = linspace(0, 2*pi, 100); % Ángulo para las elipses
% Coordenadas para la elipse menor (base inferior)
x1 = R1 * cos(theta);
y1 = b2 * sin(theta);
z1 = zeros(size(theta));
% Coordenadas para la elipse mayor (base superior)
x2 = R2 * cos(theta);
y2 = b1 * sin(theta);
z2 = h * ones(size(theta));
% Superficie lateral del tronco de cono
[Theta, Z] = meshgrid(theta, linspace(0, h, 100));
R = (R2 – R1) / h * Z + R1;
B = (b1 – b2) / h * Z + b2;
X = R .* cos(Theta);
Y = B .* sin(Theta);
% Graficar el tronco de cono
figure;
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceAlpha’, 0.7); % Superficie lateral
fill3(x1, y1, z1, ‘r’); % Base inferior
fill3(x2, y2, z2, ‘b’); % Base superior
xlabel(‘X (m)’);
ylabel(‘Y (m)’);
zlabel(‘Z (m)’);
title(‘Tronco de Cono con Bases Elípticas’);
axis equal;
grid on;
hold off; Hello, I am doing an undergraduate thesis, and I like to implement MATLAB in some of the analysis.
The query is, how to export a file generated as an image in a code, to a format compatible with FEA (Finite element analysis).
The goal is to find the temperature profile in this slag pot geometry, which is a truncated cone.
So, once having the compatible geometry I can use matlab pdegplot and some commands related to find the temperature profile.
The code was generated by AI (Claude).
% Dibujo tronco de cono en 3D. Luego, obtener el perfil de temperatura y
% modelamiento de pérdida de calor mediante el uso de ecuaciones
% diferenciales.
% Parámetros del problema
R1 = 1.155; % Semi-eje mayor de la elipse menor (m)
R2 = 2.082; % Semi-eje mayor de la elipse mayor (m)
b1 = 1.549; % Semi-eje menor de la elipse mayor (m)
b2 = 0.838; % Semi-eje menor de la elipse menor (m)
h = 2.921; % Altura del tronco de cono (m)
theta = linspace(0, 2*pi, 100); % Ángulo para las elipses
% Coordenadas para la elipse menor (base inferior)
x1 = R1 * cos(theta);
y1 = b2 * sin(theta);
z1 = zeros(size(theta));
% Coordenadas para la elipse mayor (base superior)
x2 = R2 * cos(theta);
y2 = b1 * sin(theta);
z2 = h * ones(size(theta));
% Superficie lateral del tronco de cono
[Theta, Z] = meshgrid(theta, linspace(0, h, 100));
R = (R2 – R1) / h * Z + R1;
B = (b1 – b2) / h * Z + b2;
X = R .* cos(Theta);
Y = B .* sin(Theta);
% Graficar el tronco de cono
figure;
hold on;
surf(X, Y, Z, ‘EdgeColor’, ‘none’, ‘FaceAlpha’, 0.7); % Superficie lateral
fill3(x1, y1, z1, ‘r’); % Base inferior
fill3(x2, y2, z2, ‘b’); % Base superior
xlabel(‘X (m)’);
ylabel(‘Y (m)’);
zlabel(‘Z (m)’);
title(‘Tronco de Cono con Bases Elípticas’);
axis equal;
grid on;
hold off; matlab, 3d plots, export MATLAB Answers — New Questions