# Talk:Yield surface

Jump to: navigation, search
WikiProject Engineering (Rated Start-class, Mid-importance)
This article is within the scope of WikiProject Engineering, a collaborative effort to improve the coverage of engineering on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start  This article has been rated as Start-Class on the project's quality scale.
Mid  This article has been rated as Mid-importance on the project's importance scale.
WikiProject Physics (Rated Start-class, Low-importance)
This article is within the scope of WikiProject Physics, a collaborative effort to improve the coverage of Physics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start  This article has been rated as Start-Class on the project's quality scale.
Low  This article has been rated as Low-importance on the project's importance scale.

I'm not skilled at writing articles. I'm sure that the pictures and their captions can be placed better, I just don't know how to do it better than it currently is. Please make it better if you can :)

Janek Kozicki 17:24, 19 November 2006 (UTC)

Oh, and I don't have the formulas for Brestler-Pister and Willam-Warnke expressed in principal stresses (${\displaystyle \sigma _{1},\sigma _{2},\sigma _{3}}$). If I find it, I will be able to plot it, just like all the other surfaces. If you know this formula, plese write it here, so later I will see your addition, and I will plot the surface.

Janek Kozicki 07:51, 20 November 2006 (UTC)

OK, I couldn't find in the literature if the formula for Bresler - Pister yield surface is correct. But using this formula, I was able to plot the surfaces, and I added the images of this surface. Someone please verify this if you can. Janek Kozicki (talk) 17:40, 17 May 2008 (UTC)

## Willam-Warnke surface

To plot the Willam-Warnke surface in ${\displaystyle \sigma _{1},\sigma _{2},\sigma _{3}}$ space you will need ${\displaystyle I_{1}}$, ${\displaystyle J_{2}}$ and ${\displaystyle J_{3}}$ in terms of ${\displaystyle \sigma _{1},\sigma _{2},\sigma _{3}}$. From the article on Stress we have

{\displaystyle {\begin{aligned}I_{1}&=\sigma _{1}+\sigma _{2}+\sigma _{3}\\J_{2}&={\tfrac {1}{6}}\left[(\sigma _{1}-\sigma _{2})^{2}+(\sigma _{2}-\sigma _{3})^{2}+(\sigma _{3}-\sigma _{1})^{2}\right]\end{aligned}}}

To find ${\displaystyle J_{3}}$ in terms of ${\displaystyle \sigma _{1},\sigma _{2},\sigma _{3}}$ we note that

{\displaystyle {\begin{aligned}J_{3}&=\det({\boldsymbol {s}})=\det({\boldsymbol {\sigma }}-{\tfrac {1}{3}}{\text{tr}}({\boldsymbol {\sigma }}){\boldsymbol {1}})\end{aligned}}}

In matrix form (in terms of the principal stresses)

${\displaystyle {\boldsymbol {\sigma }}={\begin{bmatrix}\sigma _{1}&0&0\\0&\sigma _{2}&0\\0&0&\sigma _{3}\end{bmatrix}}~~~{\text{and}}~~{\text{tr}}({\boldsymbol {\sigma }}){\boldsymbol {1}}={\tfrac {1}{3}}(\sigma _{1}+\sigma _{2}+\sigma _{3}){\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}}}$

Therefore,

{\displaystyle {\begin{aligned}{\boldsymbol {s}}&={\begin{bmatrix}\sigma _{1}-{\tfrac {1}{3}}(\sigma _{1}+\sigma _{2}+\sigma _{3})&0&0\\0&\sigma _{2}-{\tfrac {1}{3}}(\sigma _{1}+\sigma _{2}+\sigma _{3})&0\\0&0&\sigma _{3}-{\tfrac {1}{3}}(\sigma _{1}+\sigma _{2}+\sigma _{3})\end{bmatrix}}\\&={\cfrac {1}{3}}{\begin{bmatrix}2\sigma _{1}-\sigma _{2}-\sigma _{3}&0&0\\0&2\sigma _{2}-\sigma _{3}-\sigma _{1}&0\\0&0&2\sigma _{3}-\sigma _{1}-\sigma _{2}\end{bmatrix}}\end{aligned}}}

This leads to the needed expression for ${\displaystyle J_{3}}$ in terms of ${\displaystyle \sigma _{1},\sigma _{2},\sigma _{3}}$

${\displaystyle J_{3}=\det({\boldsymbol {s}})={\tfrac {1}{27}}(2\sigma _{1}-\sigma _{2}-\sigma _{3})(2\sigma _{2}-\sigma _{3}-\sigma _{1})(2\sigma _{3}-\sigma _{1}-\sigma _{2})}$

Next you can compute the Haigh-Westergaard coordinates using the relations

${\displaystyle \xi ={\cfrac {1}{\sqrt {3}}}~I_{1}~;~~\rho ={\sqrt {2J_{2}}}~;~~\theta ={\tfrac {1}{3}}\arccos \left({\cfrac {3{\sqrt {3}}}{2}}~{\cfrac {J_{3}}{J_{2}^{3/2}}}\right)}$

Then compute

{\displaystyle {\begin{aligned}r_{c}:=&{\sqrt {\tfrac {6}{5}}}\left[{\cfrac {\sigma _{b}\sigma _{t}}{3\sigma _{b}\sigma _{t}+\sigma _{b}\sigma _{c}-\sigma _{t}\sigma _{c}}}\right]\\r_{t}:=&{\sqrt {\tfrac {6}{5}}}\left[{\cfrac {\sigma _{b}\sigma _{t}}{\sigma _{c}(2\sigma _{b}+\sigma _{t})}}\right]\\g(\theta ):=&{\cfrac {2~r_{c}~(r_{c}^{2}-r_{t}^{2})~\cos \theta +r_{c}~(2~r_{t}-r_{c}){\sqrt {4~(r_{c}^{2}-r_{t}^{2})~\cos ^{2}\theta +5~r_{t}^{2}-4~r_{t}~r_{c}}}}{4(r_{c}^{2}-r_{t}^{2})\cos ^{2}\theta +(r_{c}-2~r_{t})^{2}}}\end{aligned}}}

followed by

${\displaystyle {\bar {\lambda }}:={\sqrt {\tfrac {1}{5}}}~\left({\cfrac {1}{g(\theta )}}\right)~;~~{\bar {B}}:={\tfrac {1}{\sqrt {3}}}~\left[{\cfrac {\sigma _{b}\sigma _{t}}{\sigma _{c}(\sigma _{b}-\sigma _{t})}}\right]}$

Finally, plug into the expression for the Willam-Warnke condition

${\displaystyle f={\bar {\lambda }}(\theta )~\rho +{\bar {B}}~\xi -\sigma _{c}}$

A (untested) piece of code to generate a scalar field (of which the 0 level set is the yield surface) is:

void viewer::generateScalarField()
{
using namespace std;
for(int i=0;i<sizeX;i++) {
for(int j=0;j<sizeY;j++) {
for(int k=0;k<sizeZ;k++) {

// calculate s1,s2,s3 from the position in 3D array scalarField
// the origin of the coordinate system is in the center (sizeXYZ * 0.5)
// and the 3D array scalarField represents a cube from -1.0 to 1.0

long double s1 = (long double)i/(long double)sizeX*2.0-1.0;
long double s2 = (long double)j/(long double)sizeY*2.0-1.0;
long double s3 = (long double)k/(long double)sizeZ*2.0-1.0;

long double I1 = s1+s2+s3;
long double J2 = 1.0l/6.0l*(pow(s2-s3,2.0l)+pow(s3-s1,2.0l)+pow(s1-s2,2.0l));
long double J3 = 1.0l/27.0l*(2.0l*s1-s2-s3)*(2.0l*s2-s1-s3)*(2.0l*s3-s1-s2);

long double xi = 1.0l/sqrt(3.0l)*I1;
long double rho = sqrt(2.0l*J2);
long double theta = 0.0000001l;

// calculate theta
double t4 = J2*J2*J3;
double t5 = 1.5*sqrt(3)*J3;
double t6 = sqrt(t4);
bool flag = true;
if (fabs(t6) <= fabs(t5)*1.0e-16) {theta = 0.0000001; flag = false;}
if (fabs(t6) < 1.0e-16 && flag) {theta = 0.0000001; flag = false;}
double t7 = t5/t6;
double ta1 = fabs(t7-1.0);
double ta2 = fabs(t7+1.0);
if (ta1 < 0.1 && flag) {theta = 0.0000001/3.0; flag = false;}
if (ta2 < 0.1 && flag) {theta = 3.1415921/3.0; flag = false;}
if ((t7 > 1.0 || t7 < -1.0) && flag) {theta = 3.1415921/3.0; flag = false;}
if (flag) {
theta = 1.0/3.0*acos(t7);
flag = false;
}

// Willam-Warnke
long double sc = 1.0l;
long double st = 0.2l;
long double sb = 1.5l;

long double r_c = sqrt(1.2l)*sb*st/(3.0l*sb*st + sb*sc - st*sc);
long double r_t = sqrt(1.2l)*sb*st/(sc*(2.0l*sb+st));

long double g_numer = 2.0l*r_c*(r_c*r_c-r_t*r_t)*cos(theta) + r_c*(2.0l*r_t - r_c)*
sqrt(4*(r_c*r_c - r_t*r_t)*pow(cos(theta),2.0l) + 5.0l*r_t*r_t - 4.0l*r_t*r_c);
long double g_denom = 4.0l*(r_c*r_c - r_t*r_t)*pow(cos(theta),2.0l) + pow(r_c-2*r_t,2.0l);
long double g = g_numer/g_denom;

long double lambda = sqrt(0.2l)/g;
long double B = 1.0l/sqrt(3.0l)*(sb*st)/(sc*sb-st);

scalarField[i][j][k] = lambda*rho + B*xi - sc;
}
}
}
}


Bbanerje (talk) 02:59, 25 May 2008 (UTC)

Pictures:

Problems:

• It's an infinite pipe. I expected that it would have a tip, like Mohr-Coulomb
• I have some surprising holes, I suppose that Marching cubes algorithm does not work in some particular case here. But I can quickly fix it with GIMP. Janek Kozicki (talk) 19:01, 25 May 2008 (UTC)

So I calculated this again. I changed the code (shown above) to use high precision - long double (the "l" after numbres say that they are long double also, instead of double). Now we can see that the holes are rather not due to marching cubes mistake, but rather there is some linear discontinuity on the "edges".

Janek Kozicki (talk) 19:24, 25 May 2008 (UTC)

You are running into problems at the locations where ${\displaystyle \theta =0}$ and ${\displaystyle \theta =\pi /3}$. Also the yield surface should not be cylindrical.
I've updated the Willam-Warnke page with a slightly different version of the model.
{\displaystyle {\begin{aligned}I_{1}&=\sigma _{1}+\sigma _{2}+\sigma _{3}\\J_{2}&={\tfrac {1}{6}}\left[(\sigma _{1}-\sigma _{2})^{2}+(\sigma _{2}-\sigma _{3})^{2}+(\sigma _{3}-\sigma _{1})^{2}\right]\\J_{3}&=\det({\boldsymbol {s}})={\tfrac {1}{27}}(2\sigma _{1}-\sigma _{2}-\sigma _{3})(2\sigma _{2}-\sigma _{3}-\sigma _{1})(2\sigma _{3}-\sigma _{1}-\sigma _{2})\\\xi &={\cfrac {1}{\sqrt {3}}}~I_{1}~;~~\rho ={\sqrt {2J_{2}}}~;~~\theta ={\tfrac {1}{3}}\arccos \left({\cfrac {3{\sqrt {3}}}{2}}~{\cfrac {J_{3}}{J_{2}^{3/2}}}\right)\end{aligned}}}
But now
{\displaystyle {\begin{aligned}r_{t}:=&{\cfrac {{\sqrt {3}}~(\sigma _{b}-\sigma _{t})}{2\sigma _{b}-\sigma _{t}}}\\r_{c}:=&{\cfrac {{\sqrt {3}}~\sigma _{c}~(\sigma _{b}-\sigma _{t})}{(\sigma _{c}+\sigma _{t})\sigma _{b}-\sigma _{c}\sigma _{t}}}\end{aligned}}}
and
{\displaystyle {\begin{aligned}u(\theta ):=&2~r_{c}~(r_{c}^{2}-r_{t}^{2})~\cos \theta \\v(\theta ):=&r_{c}~(2~r_{t}-r_{c}){\sqrt {4~(r_{c}^{2}-r_{t}^{2})~\cos ^{2}\theta +5~r_{t}^{2}-4~r_{t}~r_{c}}}\\w(\theta ):=&4(r_{c}^{2}-r_{t}^{2})\cos ^{2}\theta +(r_{c}-2~r_{t})^{2}\end{aligned}}}
with
${\displaystyle {\bar {\lambda }}:={\sqrt {\tfrac {2}{3}}}~{\cfrac {u(\theta )+v(\theta )}{w(\theta )}}~;~~{\bar {B}}:={\tfrac {1}{\sqrt {3}}}~\left[{\cfrac {\sigma _{b}\sigma _{t}}{\sigma _{b}-\sigma _{t}}}\right]}$
The new version of the Willam-Warnke criterion is
${\displaystyle f:=\rho +{\bar {\lambda }}(\theta )~\left(\xi -{\bar {B}}\right)=0}$
The updated version of the code is
void viewer::generateScalarField()
{
using namespace std;
for(int i=0;i<sizeX;i++) {
for(int j=0;j<sizeY;j++) {
for(int k=0;k<sizeZ;k++) {

// calculate s1,s2,s3 from the position in 3D array scalarField
// the origin of the coordinate system is in the center (sizeXYZ * 0.5)
// and the 3D array scalarField represents a cube from -1.0 to 1.0

long double s1 = (long double)i/(long double)sizeX*2.0-1.0;
long double s2 = (long double)j/(long double)sizeY*2.0-1.0;
long double s3 = (long double)k/(long double)sizeZ*2.0-1.0;

long double I1 = s1+s2+s3;
long double J2 = 1.0l/6.0l*(pow(s2-s3,2.0l)+pow(s3-s1,2.0l)+pow(s1-s2,2.0l));
long double J3 = 1.0l/27.0l*(2.0l*s1-s2-s3)*(2.0l*s2-s1-s3)*(2.0l*s3-s1-s2);

long double xi = 1.0l/sqrt(3.0l)*I1;
long double rho = sqrt(2.0l*J2);
long double theta = 0.0000001l;

// calculate theta
double t4 = J2*J2*J3;
double t5 = 1.5*sqrt(3)*J3;
double t6 = sqrt(t4);
bool flag = true;
if (fabs(t6) <= fabs(t5)*1.0e-16) {theta = 0.0000001; flag = false;}
if (fabs(t6) < 1.0e-16 && flag) {theta = 0.0000001; flag = false;}
double t7 = t5/t6;
double ta1 = fabs(t7-1.0);
double ta2 = fabs(t7+1.0);
if (ta1 < 0.1 && flag) {theta = 0.0000001/3.0; flag = false;}
if (ta2 < 0.1 && flag) {theta = 3.1415921/3.0; flag = false;}
if ((t7 > 1.0 || t7 < -1.0) && flag) {theta = 3.1415921/3.0; flag = false;}
if (flag) {
theta = 1.0/3.0*acos(t7);
flag = false;
}

// Willam-Warnke
long double sc = 1.0l;
long double st = 0.2l;
long double sb = 1.5l;

long double r_c = sqrt(3.0l)*sc*(sb-st)/((sc+st)*sb-sc*st);
long double r_t = sqrt(3.0l)*(sb-st)/(2.0l*sb-st);

long double u_theta = 2.0l*r_c*(r_c*r_c-r_t*r_t)*cos(theta);
long double v_theta = r_c*(2.0l*r_t - r_c)*
sqrt(4*(r_c*r_c - r_t*r_t)*pow(cos(theta),2.0l) + 5.0l*r_t^2 - 4.0l*r_t*r_c);
long double w_theta = 4.0l*(r_c*r_c - r_t*r_t)*pow(cos(theta),2.0l) + pow(r_c-2*r_t,2.0l);

long double lambda = sqrt(2.0l/3.0l)*(u_theta+v_theta)/w_theta;
long double B = 1.0l/sqrt(3.0l)*(sb*st)/(sb-st);

scalarField[i][j][k] = rho + lambda*(xi - B);
}
}
}
}

Bbanerje (talk) 00:53, 26 May 2008 (UTC)