필터 지우기
필터 지우기

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

조회 수: 12 (최근 30일)
Shins K
Shins K 2022년 9월 30일
답변: Shubham 2023년 5월 29일
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
dpb
dpb 2022년 10월 1일
Well, first you'll have to know what the ABAQUS colormap is versus stress levels...

댓글을 달려면 로그인하십시오.

답변 (1개)

Shubham
Shubham 2023년 5월 29일
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.

카테고리

Help CenterFile Exchange에서 Stress and Strain에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by