Пример #1
0
def main(s=[1,0,0,0,0,0],iopt=0,inorm=False):
    """
    Arguments
    ---------
    s = [1,0,0,0,0,0] - Cauchy stress
    iopt (used in cpb_data.tab1_cpb)
    inorm = False (if True, normalize the yield locus by
            tension stress along RD)
    """
    if type(s).__name__=='ndarray':
        S=s.copy()
    else:
        s=np.array(s,dtype='float')
        S=s.copy()
    Sdev = cpb_lib.deviator(S)

    C, k = cpb_data.tab1_cpb(iopt=iopt)
    # C, k = cpb_data.tab2_cpb(iopt=iopt)

    # ## find principal values
    Sig = princ(s, C)
    Sig = np.sort(Sig)

    a = 2.
    F = eq9(S=Sig, a=a, k=k)
    f1 = (F)**(1./a)

    if inorm:
        """
        normarlize w.r.t. uniaxial tension yield stress along RD
        """
        s0t, s0c = eq12(C,a,k)
        f1=f1*s0t
    return S.copy()/f1
Пример #2
0
def main(s=[1,0,0,0,0,0],a=4,k=0.):
    """
    Argument
    --------
    s=[1,0,0,0,0,0]
    a
    k
    """
    import cpb_lib
    if type(s).__name__=='ndarray':
        S=s.copy()
    else:
        S=np.array(s,dtype='float')
    Sdev = cpb_lib.deviator(S)

    f=eq4(S=Sdev.copy(),a=a,k=k)
    f1=(f)**(1./a)
    # Sdev2 = cpb_lib.deviator(S.copy()/f1)
    # f2=eq4(Sdev2.copy(),a=a,k=k)
    # print 'f2:',f2

    return S.copy()/f1
Пример #3
0
def main(s=[1, 0, 0, 0, 0, 0], a=4, k=0.):
    """
    Argument
    --------
    s=[1,0,0,0,0,0]
    a
    k
    """
    import cpb_lib
    if type(s).__name__ == 'ndarray':
        S = s.copy()
    else:
        S = np.array(s, dtype='float')
    Sdev = cpb_lib.deviator(S)

    f = eq4(S=Sdev.copy(), a=a, k=k)
    f1 = (f)**(1. / a)
    # Sdev2 = cpb_lib.deviator(S.copy()/f1)
    # f2=eq4(Sdev2.copy(),a=a,k=k)
    # print 'f2:',f2

    return S.copy() / f1