Beispiel #1
0
 def get_yield_function(self,stress):
     if material_type=='druckerprager':   #yf=J_2**0.5+alpha*tr(stress)-k
         from mesh import Point
         poi=Point()
         m=poi.get_mean_stress(stress)
         J2=poi.get_second_invariant_of_deviatoric_stress(stress)
         yf=J2**0.5+3*alpha*m-k
     return yf
    def get_yield_function(self, stress):
        if material_type == "druckerprager":  # yf=J_2**0.5+alpha*tr(stress)-k
            from mesh import Point

            poi = Point()
            m = poi.get_mean_stress(stress)
            J2 = poi.get_second_invariant_of_deviatoric_stress(stress)
            yf = J2 ** 0.5 + 3 * alpha * m - k
        return yf
def Rmatrix(ipoint):
    from mesh import Point
    from math import sin,cos
    poi=Point()
    R=np.zeros([3,3],dtype=float)
    angle=poi.get_angle(ipoint)
    # angle=0.
    R[0,0]=cos(angle)
    R[0,1]=sin(angle)
    R[1,0]=-sin(angle)
    R[1,1]=cos(angle)
    R[2,2]=1.
    return R
Beispiel #4
0
def Rmatrix(ipoint):
    from mesh import Point
    from math import sin, cos
    poi = Point()
    R = np.zeros([3, 3], dtype=float)
    angle = poi.get_angle(ipoint)
    # angle=0.
    R[0, 0] = cos(angle)
    R[0, 1] = sin(angle)
    R[1, 0] = -sin(angle)
    R[1, 1] = cos(angle)
    R[2, 2] = 1.
    return R
Beispiel #5
0
 def get_derivative_of_yield_function(self,stress):
     import numpy as np
     if material_type=='druckerprager':
         from mesh import Point
         poi=Point()
         J2=poi.get_second_invariant_of_deviatoric_stress(stress)
         J2+=1.e-10
         dJ2=np.empty(3,dtype=float)
         for i in range(3):
             j=(i+1)%3
             k=(i+2)%3
             dJ2[i]=(2*stress[i]-stress[j]-stress[k])/3
         dyf=np.empty(6,dtype=float)
         dyf[0]=0.5*dJ2[0]*J2**(-0.5)+alpha
         dyf[1]=0.5*dJ2[1]*J2**(-0.5)+alpha
         dyf[2]=0.5*dJ2[2]*J2**(-0.5)+alpha
         dyf[3]=stress[3]*J2**(-0.5)
         dyf[4]=stress[4]*J2**(-0.5)
         dyf[5]=stress[5]*J2**(-0.5)
     return dyf
    def get_derivative_of_yield_function(self, stress):
        import numpy as np

        if material_type == "druckerprager":
            from mesh import Point

            poi = Point()
            J2 = poi.get_second_invariant_of_deviatoric_stress(stress)
            J2 += 1.0e-10
            dJ2 = np.empty(3, dtype=float)
            for i in range(3):
                j = (i + 1) % 3
                k = (i + 2) % 3
                dJ2[i] = (2 * stress[i] - stress[j] - stress[k]) / 3
            dyf = np.empty(6, dtype=float)
            dyf[0] = 0.5 * dJ2[0] * J2 ** (-0.5) + alpha
            dyf[1] = 0.5 * dJ2[1] * J2 ** (-0.5) + alpha
            dyf[2] = 0.5 * dJ2[2] * J2 ** (-0.5) + alpha
            dyf[3] = stress[3] * J2 ** (-0.5)
            dyf[4] = stress[4] * J2 ** (-0.5)
            dyf[5] = stress[5] * J2 ** (-0.5)
        return dyf