Code to plot von mises and tresca yield conditions

103 vues (au cours des 30 derniers jours)
dan
dan le 15 Nov 2019
Commenté : Sharlin Shahid le 10 Fév 2021
Hello,
I am trying to figure out how to write a code to plot Von mises and Tresca yield condions at plane stress state. I am having trouble putting it all together in one code. Your help is much appreciated!!
  6 commentaires
Stephan
Stephan le 16 Nov 2019
I suspect the question refers to mechanical stress.
Sharlin Shahid
Sharlin Shahid le 10 Fév 2021
You can check how to plot von Mises and Hill48 yield surfaces to compare with experiments in this video:
https://youtu.be/JiCorn4u6TY

Connectez-vous pour commenter.

Réponses (1)

Unai San Miguel
Unai San Miguel le 17 Déc 2019
This plot can be generated
  1. with some analytic work, by getting the ellipse in parametric equations, generating points along that curve an plotting them with plot, and the same for the Tresca criterion, which is just a bunch of straight lines, or
  2. with brute force, defining functions for the left side of the equations and using contour to plot a single contour.
The latter approach has the advantage that one can plot any implicit function.
% Von Mises, s1^2 - s1s2 + s2^2 = Sy^2
% Non-dimensional variables x = s1 / Sy, y = s2 / Sy
vmc = @(x, y) x.^2 - x.*y + y.^2;
trc = @(x, y) 0.5 * max(cat(3, abs(x - y), abs(x), abs(y)), [], 3);
xx = linspace(-2, 2, 101);
yy = linspace(-2, 2, 101);
[X, Y] = ndgrid(xx, yy);
contour(X, Y, vmc(X, Y), [1 1])
hold on
contour(X, Y, trc(X, Y), [1 1]/2)
Note that the plot of the Tresca criterion is not going to be precise enough with this approach...
The trick of using contour to plot a single contour is in the documentation for the contour function, and the syntax for cat and |max| in their doc pages too.
  2 commentaires
Sahil Bharti
Sahil Bharti le 20 Jan 2021
Hi,
contour(X, Y, vmc(X, Y), [1 1])
What is the use of [1 1 ], in this expression ?
Thanks
Unai San Miguel
Unai San Miguel le 21 Jan 2021
It is the way to plot only the contour with value 1, See this in the documentation.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Stress and Strain dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by