Talk:Yield surface

From Wikipedia, the free encyclopedia

WikiProject Physics This article is within the scope of WikiProject Physics, which collaborates on articles related to physics.
??? This article has not yet received a rating on the assessment scale. [FAQ]
??? This article has not yet received an importance rating within physics.

Help with this template Please rate this article, and then leave comments to explain the ratings and/or to identify its strengths and weaknesses.

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 (σ123). 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)

[edit] Willam-Warnke surface

To plot the Willam-Warnke surface in σ123 space you will need I1, J2 and J3 in terms of σ123. From the article on Stress we have


  \begin{align}
  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{align}

To find J3 in terms of σ123 we note that


   \begin{align}
   J_3 & = \det(\boldsymbol{s}) = \det(\boldsymbol{\sigma}-\tfrac{1}{3}\text{tr}(\boldsymbol{\sigma})\boldsymbol{1})
   \end{align}

In matrix form (in terms of the principal stresses)


   \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,


  \begin{align}
  \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{align}

This leads to the needed expression for J3 in terms of σ123


   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


     \xi  = \cfrac{1}{\sqrt{3}}~I_1 ~;~~
     \rho  = \sqrt{2 J_2} ~;~~
     \theta  = \tfrac{1}{3}\arccos\left(\cfrac{3\sqrt{3}}{2}~\cfrac{J_3}{J_2^{3/2}}\right)

Then compute


   \begin{align}
   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{align}

followed by


   \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


   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:

Image:Willam-Warnke yield surface 3D.png Image:Willam-Warnke yield surface 2D.png

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".

Image:Willam-Warnke yield surface 3D (long double precision).png

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

You are running into problems at the locations where θ = 0 and θ = π / 3. Also the yield surface should not be cylindrical.
I've updated the Willam-Warnke page with a slightly different version of the model.

  \begin{align}
  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{2 J_2} ~;~~
     \theta  = \tfrac{1}{3}\arccos\left(\cfrac{3\sqrt{3}}{2}~\cfrac{J_3}{J_2^{3/2}}\right)
  \end{align}
But now

  \begin{align}
    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{align}
and

  \begin{align}
    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{align}
with

   \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

   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)