How to plot stress countours with same colour code in ABAQUS?
14 views (last 30 days)
Show older comments
I have the stress values as a matrix. I want to plot the stress throughout my 2-D model domain using the same colour code availabe in ABAQUS. Essentially I would like to compare the stress plot obtained from MATLAB (which is plotted using the theoretical values of stresses) with that the of the plot obtained in ABAQUS after the numerical analysis.
1 Comment
dpb
on 1 Oct 2022
Well, first you'll have to know what the ABAQUS colormap is versus stress levels...
Answers (1)
Shubham
on 29 May 2023
Hi Shins K,
To plot stress values in MATLAB with the same colour code as in ABAQUS, you can follow the steps below:
- Use the imagesc() function to create a 2-D plot of the stress values matrix.
- Assign the minimum and maximum stress values to the caxis() function to set the color limits.
- Use the colormap() function to set the color map. The default colormap in MATLAB is not the same as that in ABAQUS, therefore, to match the same color code as in Abaqus, you can set the colormap to "jet".
- Add a colorbar to show the stress values and their corresponding color representation.
Here is a sample code to plot the stress values using MATLAB
% Create a sample stress matrix with dimension 50x50
stress_matrix = rand(50,50)*100;
% Plot the stress matrix with a colorbar
imagesc(stress_matrix);
axis equal;
caxis([min(stress_matrix(:)) max(stress_matrix(:))]); % Set the color limits
colormap(jet); % Set the color map
colorbar(); % Add the colorbar
title("Stress distribution plot");
The rand() function here is used to generate random stress values in the range of 0 to 100 for a 50x50 domain, which can be replaced by your actual stress values matrix.
Once you plot the theoretical stress values in MATLAB using the above approach, you can compare them with stress plots obtained from the numerical analysis in ABAQUS, and check for similarities and differences visually.
0 Comments
See Also
Categories
Find more on Stress and Strain 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!