Ejemplo n.º 1
0
    def sigmaHat(self, t, ColeColefunc=ColeCole):
        etc = np.c_[self.curModel.eta, self.curModel.tau, self.curModel.c]
        unqEtc, uETCind, invInd = uniqueRows(etc)

        sigmaHat = []
        for (ev, tv, cv) in unqEtc:
            if ev == 0.:
                sigmaHat.append(0.)
            else:

                key = '%.5e_%.5f_%.5e_%.5f' % (t, ev, tv, cv)
                if self.sigmaHatDict.has_key(key):
                    val = self.sigmaHatDict[key]
                else:
                    if t == 0:
                        # val = transFilt(F,1e-6)
                        val = ev / (tv * (1. - ev))
                    else:
                        F = lambda frq: (1j * 2 * np.pi * frq) * ColeColefunc(
                            frq, sigmaInf=1., eta=ev, tau=tv, c=cv)
                        val = transFilt(F, t)
                    self.sigmaHatDict[key] = val
                sigmaHat.append(val)

        sigmaHat = self.curModel.sigmaInf * np.array(sigmaHat)[invInd]
        return sigmaHat
Ejemplo n.º 2
0
    def sigmaHat(self, t, ColeColefunc=ColeCole):
        etc = np.c_[self.curModel.eta, self.curModel.tau, self.curModel.c]
        unqEtc, uETCind, invInd = uniqueRows(etc)

        sigmaHat = []
        for (ev, tv, cv) in unqEtc:
            if ev == 0.:
                sigmaHat.append(0.)
            else:

                key = '%.5e_%.5f_%.5e_%.5f' %(t, ev, tv, cv)
                if self.sigmaHatDict.has_key(key):
                    val = self.sigmaHatDict[key]
                else:
                    if t == 0:
                        # val = transFilt(F,1e-6)
                        val = ev/(tv*(1.-ev))
                    else:
                        F = lambda frq: (1j*2*np.pi*frq)*ColeColefunc(frq, sigmaInf=1., eta=ev, tau=tv, c=cv)
                        val = transFilt(F,t)
                    self.sigmaHatDict[key] = val    
                sigmaHat.append(val)
        
        sigmaHat = self.curModel.sigmaInf*np.array(sigmaHat)[invInd]
        return sigmaHat
Ejemplo n.º 3
0
 def getGamma(self, dt):
     setc = np.c_[self.curModel.sigmaInf, self.curModel.eta, self.curModel.tau, self.curModel.c]
     unqEtc, uETCind, invInd = uniqueRows(setc)
     gammaVals = []
     for (sv, ev, tv, cv) in unqEtc:
         if ev == 0:
             gammaVal = 0.
         elif cv == 1.:
             gammaVal = (dt/2.)*sv*ev/((1. - ev)*tv)
         else:
             m, d = self.getMD(dt, sv, ev, tv, cv)
             gammaVal = (m*dt**cv)/(cv*(cv+1)) + d*dt/2.
         gammaVals.append(gammaVal)
     gamma = np.array(gammaVals)[invInd]
     return gamma
Ejemplo n.º 4
0
 def getGamma(self, dt):
     setc = np.c_[self.curModel.sigmaInf, self.curModel.eta,
                  self.curModel.tau, self.curModel.c]
     unqEtc, uETCind, invInd = uniqueRows(setc)
     gammaVals = []
     for (sv, ev, tv, cv) in unqEtc:
         if ev == 0:
             gammaVal = 0.
         elif cv == 1.:
             gammaVal = (dt / 2.) * sv * ev / ((1. - ev) * tv)
         else:
             m, d = self.getMD(dt, sv, ev, tv, cv)
             gammaVal = (m * dt**cv) / (cv * (cv + 1)) + d * dt / 2.
         gammaVals.append(gammaVal)
     gamma = np.array(gammaVals)[invInd]
     return gamma