def powerFit(x,y):
    '''
    Deprecated. Please update yr code to call this from NumUtils.py
    '''    
    print('Deprecated. Please update yr code to call this from NumUtils.py')
    
    import NumUtils as nu
    a,b = nu.powerFit(x,y)
    return a,b
Beispiel #2
0
def lowerYieldStress(rheoData, rheoInfo):

    import numpy as np
    import NumUtils as nu
    g, t, gd = (rheoData['gamma'], rheoData['tau'], rheoData['gammadot'])
    LI = rheoInfo['lowerN']

    # lower yield stress
    gL1 = g[LI[0,0]:LI[0,1]]
    tL1 = t[LI[0,0]:LI[0,1]]

    gL2 = g[LI[1,0]:LI[1,1]]
    tL1 = g[LI[1,0]:LI[1,1]]

    aL1, bL1 = nu.powerFit(tL1, gL1)
    aL2, bL2 = nu.powerFit(tL2, gL2)


    tau_y = np.exp(np.log(aL2/aL1)/(bL1/bL2))
    lys = {'lowerYS' : tau_y,
          'gamma_y' : aL1 * tau_y**bL1,
          'fit'     : np.array([[aL1, bL1],[aL2, bL2]])}

    return ys