def calc_tor_stiff(wheel,
                   theta=0.,
                   N=20,
                   smeared_spokes=True,
                   tension=True,
                   buckling=True,
                   coupling=True,
                   r0=False):
    'Calculate torsional (wind-up) stiffness in [N/rad].'

    mm = ModeMatrix(wheel, N=N)

    F_ext = mm.F_ext(theta, [0., 0., 1., 0.])
    d = np.zeros(F_ext.shape)

    K = (mm.K_rim(tension=buckling, r0=r0) +
         mm.K_spk(tension=tension, smeared_spokes=smeared_spokes))

    if coupling:
        d = np.linalg.solve(K, F_ext)
    else:
        ix_uc = mm.get_ix_uncoupled(dim='radial')
        K = mm.get_K_uncoupled(K=K, dim='radial')
        d[ix_uc] = np.linalg.solve(K, F_ext[ix_uc])

    return wheel.rim.radius / mm.B_theta(theta).dot(d)[2]
def calc_lat_stiff(wheel,
                   theta=0.,
                   N=20,
                   smeared_spokes=True,
                   tension=True,
                   buckling=True,
                   coupling=False,
                   r0=False):
    'Calculate lateral stiffness.'

    mm = ModeMatrix(wheel, N=N)

    F_ext = mm.F_ext(0., [1., 0., 0., 0.])
    d = np.zeros(F_ext.shape)

    K = (mm.K_rim(tension=buckling, r0=r0) +
         mm.K_spk(tension=tension, smeared_spokes=smeared_spokes))

    if coupling:
        d = np.linalg.solve(K, F_ext)
    else:
        ix_uc = mm.get_ix_uncoupled(dim='lateral')
        K = mm.get_K_uncoupled(K=K, dim='lateral')
        d[ix_uc] = np.linalg.solve(K, F_ext[ix_uc])

    return 1. / mm.B_theta(0.).dot(d)[0]
Exemple #3
0
F_ext = mm.F_ext(0., np.array([0., 500., 0., 0.]))

# Calculate stiffness matrix
K = mm.K_rim(tension=False) + mm.K_spk(smeared_spokes=False, tension=False)

# Solve for the mode coefficients
dm = np.linalg.solve(K, F_ext)

# Get radial deflection
theta = np.linspace(-np.pi, np.pi, 100)
rad_def = mm.rim_def_rad(theta, dm)

# Calculate change in spoke tensions
dT = [
    -s.EA / s.length * np.dot(s.n,
                              mm.B_theta(s.rim_pt[1], comps=[0, 1, 2]).dot(dm))
    for s in wheel.spokes
]

# Plot radial deformation and tension change
fig, ax = plt.subplots(nrows=2, figsize=(5, 5))

ax[0].plot(theta, 1000. * rad_def)
ax[0].set_xlim(-np.pi, np.pi)
ax[0].set_ylabel('Radial deflection [mm]')

ax[1].bar(np.arange(-np.pi, np.pi, 2 * np.pi / 36),
          np.roll(dT, 18),
          width=1.5 * np.pi / 36)
ax[1].set_xlim(-np.pi, np.pi)
ax[1].set_xlabel('theta')