示例#1
0
def dDInnerdx(x):
    dDiameterdx = np.zeros(nX)
    dDiameterdx += dSFdx(x, xLower + LInnerInsert, DeltaSmoothingFunction,
                         DInnerInsert, 0.0)
    dDiameterdx += dSFdx(x, xLower + LOuterInsert, DeltaSmoothingFunction,
                         DOuterInsertFront - DInnerInsert, 0.0)
    dDiameterdx += dSFdx(x, xLower + LOuterInsert / 2.0, LOuterInsert,
                         DOuterInsertBack - DOuterInsertFront, 0.0)
    return dDiameterdx
示例#2
0
 def dDInnerdx_dis(x):
     # initialize array
     dDIndx = np.zeros(x.shape)
     dx = x[1] - x[0]  # calculate step size of gird
     for d in range(0, len(disX)):
         # find range of points previously smoothed, otherwise slope is zero
         LowBond = sum(disX[d] > x) - delta
         UpBond = sum(disX[d] > x) + delta
         x_loc = x[LowBond:UpBond]
         try:
             dDIndx[LowBond:UpBond] = dSFdx(x_loc, disX[d],
                                            2 * delta * dx, disD[d],
                                            disD[d + 1])
         except:  # when the loop forwards to the last insert, set the final diameter to zero
             dDIndx[LowBond:UpBond] = dSFdx(x_loc, disX[d],
                                            2 * delta * dx, disD[d], 0)
     return dDIndx
示例#3
0
 def dDInnerdx_dis(x):
     dDIndx = np.zeros(x.shape)
     for d in range(0, int(np.floor(len(x) / x_step)) - 1):
         LowBond = int(d * x_step - delta)
         UpBond = int(d * x_step + delta)
         x_loc = x[LowBond:UpBond]
         dDIndx[LowBond:UpBond] = dSFdx(x_loc, disX[d], 2 * delta * dx,
                                        disD[d], disD[d + 1])
     return dDIndx
示例#4
0
 def dDOuterdx(x):
     return dSFdx(x, xShock, Delta, DDriver, DDriven)
示例#5
0
        def dDOuterdx(x): return dSFdx(x, xShock, Delta, DDriver, DDriven)

        A = lambda x: np.pi / 4.0 * (DOuter(x) ** 2.0 - DInner(x) ** 2.0)