// STATE BOUNDARY SURFACE (SBS) OF THE MODIFIED CAM CLAY MODEL // Project: Animating Soil Models https://soilmodels.com/soilanim // by: Gertraud Medicus, University of Innbruck, 08/2021 import graph3; //view currentprojection=orthographic(60,120,120); // fill in M and p0: real M=1; // M=6*sin(phi)/(3-sin(phi)) real p0=100; // preconsolidation pressure to define size of yield locus // The sbs is formulated as parametric surface by x(p,theta), y(p,theta), z(p,theta) triple f(pair l) { real theta=l.x; // Lode angle theta real p=l.y; // mean effective stress p real q=sqrt(M^2*p*(p0-p)); //q: deviatoric stess; equation for ellipse // Drucker-Prager: deviatoric plane; formulation e.g. in Griffiths (1990): doi: 10.1061/(ASCE)0733-9410(1990)116:6(986) return ( (p+2/3*q*sin(theta-2*pi/3)), //x(p,theta) (p+2/3*q*sin(theta)), //y(p,theta) (p+2/3*q*sin(theta+2*pi/3)) //z(p,theta) );} surface s=surface(f,(-180*pi/180,.01),(180*pi/180,100),10,100,Spline); draw(s,orange+opacity(0.9),meshpen=black,render(merge=true)); // axes xaxis3("$\sigma_1'$",0,p0); yaxis3("$\sigma_2'$",0,p0); zaxis3("$\sigma_3'$",0,p0);