Exemplo n.º 1
0
 def f_ext(numdensity):
     # Fsolve might need to go outside of our minimum or maximum density that RG was used with, thus this function...
     # ... sets the values of the free energy outside those bounds.
     if numdensity > 0.0001 and numdensity < max_fillingfraction_handled / (
             4 * np.pi / 3):
         return finterp(numdensity)
     return RG.fiterative(temp, numdensity, 0)
Exemplo n.º 2
0
def firstPass():
        global f01interp
        f01interp=lambda n: RG.fiterative(temp,n,0)
        data=[]
        t = time.time()
        lastprint = t
        for i in range(numdata):
            n = numdensity[i]
            print "%d of %d: "%(i,numdata),
            free_energy = RG_first_pass(temp,n,1)
            data.append([n,free_energy])
        elapsed = time.time() - t
        print(elapsed)

        np.savetxt(fsave,data)
Exemplo n.º 3
0
def f01_ext(numdensity):
        if numdensity > 0.0008 and numdensity < max_fillingfraction_handled/sphere_volume:
                return f01interp(numdensity)
        return RG.fiterative(temp,numdensity,0)
Exemplo n.º 4
0
def f0(n):
        return RG.fiterative(temp,n,0)
Exemplo n.º 5
0
def fns_ext(numdensity, i):
    if numdensity > 0.0001 and numdensity < 0.2:
        return fns[i](numdensity)
    return RG.fiterative(temp[i], numdensity, 0)
Exemplo n.º 6
0
def f05_ext(numdensity):
        if numdensity > 0.0001 and numdensity < 0.2:
                return f05interp(numdensity)
        return RG.fiterative(temp,numdensity,0)
Exemplo n.º 7
0
 def f_ext(numdensity):
         # Fsolve might need to go outside of our minimum or maximum density that RG was used with, thus this function...
         # ... sets the values of the free energy outside those bounds.
         if numdensity > 0.0001 and numdensity < 0.2:
                 return finterp(numdensity)
         return RG.fiterative(temp,numdensity,0)
Exemplo n.º 8
0
def f05_ext(numdensity):
    if numdensity > 0.0001 and numdensity < 0.2:
        return f05interp(numdensity)
    return RG.fiterative(temp, numdensity, 0)
Exemplo n.º 9
0
def fns_ext(numdensity,i):
        if numdensity > 0.0001 and numdensity < 0.2:
                return fns[i](numdensity)
        return RG.fiterative(temp[i],numdensity,0)