Beispiel #1
0
def mt_rekursi(res,tebal,freq):
    k = np.sqrt(1j*2.*np.pi*4.*np.pi*1e-7*(freq/res))
    t = tebal
    
    c = k[-2]/k[-1]
    for i in range(len(res)-2,0,-1):
        c = k[i-1]/k[i]*mpm.coth(k[i]*t[i]+mpm.acoth(c))
    c = 1./k[0]*mpm.coth(k[0]*t[0]+mpm.acoth(c))
#    if c.real!=c.real and c.imag!=c.imag:
#	print 'res',res[:5]
    return c
Beispiel #2
0
def FJC(f, b=None, k_pN_nm=0.1, L_nm=20, S_pN=1e3):
    if b == None:
        b = 3 * kT / (k_pN_nm * L_nm)
    x = f * b / kT
    z = []
    w = []
    for xi in x:
        z.append(L_nm * (mpmath.coth(xi) - 1 / xi))
        w.append(np.log(np.sinh(xi) / xi))
    z = np.asarray(z)
    z += L_nm * f / S_pN
    w = np.asarray(w)
    w += f**2 / (2 * S_pN)
    return z, w
Beispiel #3
0
 def intReT(t):
     return quad(lambda w: w**(-2) * Jw(w) *
                 (1 - cos(w * t)) * coth(w / (2 * T)),
                 0,
                 inf,
                 limit=subdiv)[0]
Beispiel #4
0
# -*- coding: utf-8 -*-
"""

Created by libsedmlscript v0.0.1
"""

from sed_roadrunner import model, task, plot

from mpmath import coth
#----------------------------------------------

coth(0.5)
Beispiel #5
0
def func(t):
    return mp.coth(g*mub*Hz/(kb*t))-1.0/(g*mub*Hz/(kb*t))
Beispiel #6
0
 def eval(self, z):
     return mpmath.coth(z)
Beispiel #7
0
 def eval(self, z):
     return mpmath.coth(z)
 def sigma(iterative): #Boudreau 1997 pg 315. Sigma is the "amount of blending" between backward and central differences
     sig = mpmath.coth((w*dz)/(2*find_Ds(iterative))) - ((2*find_Ds(iterative))/(w*dz))
     return sig