how to plot deformation with value from ansys to matlab

29 visualizaciones (últimos 30 días)
Nobeth Bastanta Ginting
Nobeth Bastanta Ginting el 24 de Jun. de 2022
Comentada: Jue Gu el 15 de Dic. de 2022
in ansys
data displacements =
UX = displacements (:,2);
UY = displacements (:,3);
data coordinates = coordinates(:,2:end);
data nodes = nodes(:,2:end);
i want value deformation in nodes. can you help me? and can get like in ansys. Thank you.

Respuesta aceptada

Karim
Karim el 24 de Jun. de 2022
you can use the patch command, see the method below
coordinates = readmatrix("coordinates.csv");
displacements = readmatrix("displacements.csv");
nodes = readmatrix("nodes.csv");
scale = 5e8; % scale the very small deformations (otherwise you won't see anything)
figure
subplot(1,2,1)
patch('Faces',nodes(:,2:end),'Vertices',coordinates(:,2:end),'FaceAlpha',0.3)
view(3)
axis equal
title("Undeformed")
view([150 45])
subplot(1,2,2)
patch('Faces',nodes(:,2:end),'Vertices',coordinates(:,2:end) + displacements(:,2:end).*scale,'FaceVertexCData', sqrt( sum(displacements(:,2:end).^2,2)),'FaceColor','interp')
view(3)
axis equal
colormap jet
title("Deformed")
view([150 45])
  2 comentarios
Nobeth Bastanta Ginting
Nobeth Bastanta Ginting el 24 de Jun. de 2022
clear
clc
load coordinates.dat ;
coordinates = coordinates(:,2:end);
load nodes.dat;
nodes = nodes(:,2:end);
load displacements.dat ;
scale = 5e8; % scale the very small deformations (otherwise you won't see anything)
figure
subplot(1,2,1)
patch('Faces',nodes,'Vertices',coordinates,'FaceAlpha',0.3)
view(3)
axis equal
title("Undeformed")
view([150 45])
subplot(1,2,2)
patch('Faces',nodes,'Vertices',coordinates + displacements.*scale,'FaceVertexCData', sqrt( sum(displacements.^2,2)),'FaceColor','interp')
view(3)
axis equal
colormap jet
title("Deformed")
view([150 45])
my question : hello sir i use your coding but i make with use file .dat but the value is same. why in deformation no out the no deformation results. because in line 17 it havent problem. can you help me ?
Jue Gu
Jue Gu el 15 de Dic. de 2022
You haven't defined the variation "displacements" which will be used in the patch of subplot(1,2,2).

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Orange en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by