Azzera filtri
Azzera filtri

How to plot stress countours with same colour code in ABAQUS?

12 visualizzazioni (ultimi 30 giorni)
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 Commento
dpb
dpb il 1 Ott 2022
Well, first you'll have to know what the ABAQUS colormap is versus stress levels...

Accedi per commentare.

Risposte (1)

Shubham
Shubham il 29 Mag 2023
Hi Shins K,
To plot stress values in MATLAB with the same colour code as in ABAQUS, you can follow the steps below:
  1. Use the imagesc() function to create a 2-D plot of the stress values matrix.
  2. Assign the minimum and maximum stress values to the caxis() function to set the color limits.
  3. 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".
  4. 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.

Categorie

Scopri di più su Stress and Strain in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by