How to create readable files from Matlab to Paraview to display structural deformation?
Show older comments
Hello,
I'm really new to Paraview, I'd like to create a plot in Paraview showing the displacement of a rectangular mesh. I use this function "vtkwrite" to export the vtk file:
I wrote this line:
vtkwrite('cantiBeam', 'polydata','triangle', xdis, ydis, z, tri);
where cantiBeam is the file name, polydata is the datatype, triangle is the element type, xdis is the deformed x coordinate, ydis is the deformed y coordinate, z is set to 0 as this is a 2d structure. tri is the connectivity.
I successfully plot this structure in Paraview like this (I used random deformation just to demonstrate):

However, I'd like to plot the deformation with colors, e.g. dark color for large deformations, for example, like in Abaqus:

I guess when creating vtk file, there needs to be the information to tell Paraview what the deformation is, but how can I do it?
Thanks!
2 Comments
KSSV
on 27 Sep 2017
I am surprised......why you want to go to Paraview to plot when you have MATLAB..... :|
Xiaohan Du
on 27 Sep 2017
Answers (1)
KSSV
on 27 Sep 2017
0 votes
It can be very much plotted......Check this file exchange for more details: https://in.mathworks.com/matlabcentral/fileexchange/32719-postprocessing-in-fem. Any more questions feel free to discuss.
8 Comments
Xiaohan Du
on 27 Sep 2017
KSSV
on 28 Sep 2017
You attach a data which you feel is not doable..I will plot it and show you.
Xiaohan Du
on 28 Sep 2017
KSSV
on 28 Sep 2017
That only supports....QUA4, TRI3 eleemnts as of now....but can be extended to any case....
Xiaohan Du
on 28 Sep 2017
Edited: Xiaohan Du
on 28 Sep 2017
KSSV
on 28 Sep 2017
The figure is very much fine.....what made you feel not good?
Xiaohan Du
on 28 Sep 2017
Xiaohan Du
on 28 Sep 2017
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
