ckunte.net

DAF

DAF v. Frequency ratio

For a talk on structural dynamics, I needed a set of curves plotting dynamic amplification factors against frequency ratios, $\Omega$. I looked at a few text books, but in the end, I decided to generate my own. Q is given by the following equation, in which $\zeta$ is the damping ratio.

\begin{aligned} Q = \frac{1}{\sqrt{\left(1 - \Omega^2\right)^2 + \left(2\cdot\zeta\cdot\Omega\right)^2}} \newline \end{aligned}

Here’s the code.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
daf.py -- 2015 ckunte
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import spline

def main():
    x = np.linspace(0.1, 10)
    x_sm = np.array(x)
    x_smooth = np.linspace(x_sm.min(), x_sm.max(), 500)
    z = [1.0, 0.5, 0.2, 0.1, 0.001]
    for i in z:
        y = ((1 - x**2)**2 + (2 * i * x)**2)**-0.5
        y_smooth = spline(x, y, x_smooth)
        plt.semilogx(x_smooth, y_smooth, linewidth=2.0, label='$\zeta$ = %0.3f' %i)
    plt.legend(loc=0)
    plt.xlabel('Frequency ratio, $\Omega$ = $\omega$/$\omega_n$')
    plt.ylabel('Dynamic amplification factor, Q')
    plt.savefig('daf.png')
    plt.show()

if __name__ == '__main__':
    main()

My viewgraphs on Introduction to structural dynamics are done, and I gave the inaugural talk last week to a tiny audience.