Dynamic analysis ~~~~~~~~~~~~~~~~ In this section, a brief summary of the theory of dynamic analysis of structures is provided. The different types of analysis that can be used allow to solve the dynamic behaviour of a system, calculate their natural vibration modes, or obtaining the maximum response on a structure subjected to seismic loads, by using spectral analysis. ~~~~~~~~~~~~~~~~~~ Direct integration ~~~~~~~~~~~~~~~~~~ The direct integration methods seek the time history of the dynamic response. Such a response is not obtained in continuous form but rather in a predetermined discrete series of points in time :math:`t_i`. One of the most popular direct integration methods is the Newmark method. The starting point of the problem is the governing equation of a structure with various degrees of freedom. Such as a governing equation can be written in the following form: .. math:: \begin{aligned} \boldsymbol{M} \ddot{\boldsymbol{D}} + \boldsymbol{C} \dot{\boldsymbol{D}} + \boldsymbol{K} \boldsymbol{D} = \boldsymbol{P} (t) \end{aligned} :label: Eq.Motion For time :math:`t=t_i`, this equation is discretised as follows: .. math:: \boldsymbol{M} \ddot{\boldsymbol{D}}_{i+1} + \boldsymbol{C} \dot{\boldsymbol{D}}_{i+1} + \boldsymbol{K} \boldsymbol{D}_{i+1} = \boldsymbol{P}_{i} On the other hand, the velocity and the acceleration are expressed as follows: .. math:: \begin{aligned} \dot{\boldsymbol{D}}_{i+1} = \frac{\gamma}{\beta \Delta t} \left[\boldsymbol{D}_{i+1} - \boldsymbol{D}_i \right] + \left (1 - \frac{\gamma}{\beta} \right) \dot{\boldsymbol{D}}_i + \left(1-\frac{\gamma}{2\beta}\right) \Delta t \ddot{\boldsymbol{D}}_i \end{aligned} :label: .. math:: \begin{aligned} \ddot{\boldsymbol{D}}_{i+1} = \frac{1}{\beta \Delta t^2} \left[\boldsymbol{D}_{i+1} - \boldsymbol{D}_{i-1} - \boldsymbol{D}_i \Delta t \right] - \left (\frac{1}{2\beta} -1 \right) \ddot{\boldsymbol{D}}_i \end{aligned} :label: Substituting these expressions into the equation of motion, we obtain: .. math:: \begin{aligned} \boldsymbol{K}^c \boldsymbol{D}_{i+1} = \boldsymbol{P}_{i+1}^c \end{aligned} :label: Where .. math:: \begin{aligned} \boldsymbol{K}^c = \boldsymbol{K}+ \frac{1}{\beta \Delta t^2} \boldsymbol{M} + \frac{\gamma}{\beta \Delta t} \boldsymbol{C} \end{aligned} :label: .. math:: \begin{aligned} \boldsymbol{P}_{i+1}^c = \boldsymbol{P}_{i+1} + \boldsymbol{M} \left[\frac{1}{\beta \Delta t^2} \boldsymbol{D}_i + \frac{1}{\beta \Delta t} \dot{\boldsymbol{D}}_i + \left( \frac{1}{2\beta}-1\right) \ddot{\boldsymbol{D}}_i \right] + \\ + \boldsymbol{C} \left[ \frac{\gamma}{\beta \Delta t} \boldsymbol{D}_i + \left( \frac{\gamma}{\beta} -1 \right) \dot{\boldsymbol{D}}_i + \left( \frac{\gamma}{2\beta} -1 \right) \Delta t \ddot{\boldsymbol{D}}_i \right] \end{aligned} :label: Usually, the initial conditions to close the problem consist of assuming that the structure has neither displacements nor velocity. ~~~~~~~~~~~~~~~~~~ Modal analysis ~~~~~~~~~~~~~~~~~~ Equation :eq:`Eq.Motion` represents the system of equations corresponding to a structure with n degrees of freedom. The corresponding free vibrations not damped problem is represented by the following equation: .. math:: \begin{aligned} \boldsymbol{M} \ddot{\boldsymbol{D}} + \boldsymbol{K} \boldsymbol{D} = 0 \end{aligned} :label: Eq.FreeVibrationNonDamp Assuming the displacement vector is going to have a sinusoidal response in time, the admissible solutions to the above problem will be a linear combination of solutions to the generalized eigenvalue problem: .. math:: \begin{aligned} \omega^2 \boldsymbol{M} \boldsymbol{D} = - \boldsymbol{K} \boldsymbol{D} \end{aligned} :label: where :math:`\omega^2` is the eigenvalue. Hence, by solving a classic eigenvalue problem, the natural vibration modes of the structure can be found. The solution eigenvectors, which are orthogonal to both the mass and the stiffness matrix, form a complete base of the displacements vector field. Hence, free vibration displacements can be written as a linear combination of the modal vectors :math:`\varphi_i`: .. math:: \begin{aligned} D = \sum_{i=1}^n \varphi_i \, y_i(t) \end{aligned} :label: where :math:`y_i(t)` are scalar functions of time, called generalized coordinates. Using the previous expressions and taking into account the orthogonality conditions, we can transform the governing equation as to obtain the following system of :math:`n` equations with one degree of freedom each: .. math:: \begin{aligned} \boldsymbol{M}_j^{*} \ddot{y}_i(t) + \boldsymbol{C}_j^{*} \dot{y}_j (t) + \boldsymbol{K}_j^{*} y_j(t) = \varphi_i^T \boldsymbol{P}(t) \end{aligned} :label: Where .. math:: \begin{aligned} \boldsymbol{M}_j^{*} = \varphi_j^T \boldsymbol{M} \varphi_j \end{aligned} :label: .. math:: \begin{aligned} \boldsymbol{C}_j^{*} = \varphi_j^T \boldsymbol{C} \varphi_j \end{aligned} :label: .. math:: \begin{aligned} \boldsymbol{K}_j^{*} = \varphi_j^T \boldsymbol{K} \varphi_j \end{aligned} :label: ~~~~~~~~~~~~~~~~~~ Spectral analysis ~~~~~~~~~~~~~~~~~~ Spectrum analysis is typically used in RamSeries to solve dynamic problems associated with seismic actions that enforce the movement at the base of the foundation of a given structure. To this aim, the decoupled equation of motion for each mode is expressed as: .. math:: \begin{aligned} \boldsymbol{M}_j^{*} \ddot{y}_i(t) + \boldsymbol{C}_j^{*} \dot{y}_j (t) + \boldsymbol{K}_j^{*} y_j(t) = - \frac{\varphi_j^T \boldsymbol{M} \boldsymbol{J}}{\varphi_j^T \boldsymbol{M} \varphi_j} a(t) \end{aligned} :label: where :math:`a(t)` is the seismic acceleration. This equation can be solved using the response spectra. In this case, only the maximum response of the structure is obtained taking into account the maximum acceleration :math:`|a(t)|_{max} =S`. In this case, it is evident that the maximum response acceleration of the system would amount to: .. math:: \begin{aligned} |y_i(t)|_{max} = \frac{\varphi_j^T \boldsymbol{M} \boldsymbol{J}}{\varphi_j^T \boldsymbol{M} \varphi_j} \boldsymbol{S} \end{aligned} :label: As a consequence, the maximum displacement is given by: .. math:: \begin{aligned} |y_i(t)|_{max} = \frac{\varphi_j^T \boldsymbol{M} \boldsymbol{J}}{\varphi_j^T \boldsymbol{M} \varphi_j} \frac{\boldsymbol{S}_j}{\omega_j^2} \end{aligned} :label: Using this solution, we can calculate the maximum displacements in all the nodes of the discrete structure for mode j in the following form: .. math:: \begin{aligned} \boldsymbol{D}_{max}^j = \left[\boldsymbol{D}_1^j, \boldsymbol{D}_2^j, \cdots, \boldsymbol{D}_n^j \right] = \phi_j |y_j(t)|_{max} = \varphi_j \frac{\varphi_j^T \boldsymbol{M} \boldsymbol{J}}{\varphi_j^T \boldsymbol{M} \varphi_j} \cdot \frac{\boldsymbol{S}_j}{\omega_i^2} = A_j \cdot \frac{\boldsymbol{S}_j}{\omega_i^2} \end{aligned} :label: Where :math:`A` is the vector of the modal participation coefficients corresponding to mode :math:`j` of the vibration. Supposing that for each degree of freedom the maximum response does not occur at the same instant in each mode, the maximum response of the structure will not be equal to the sum of the maximum corresponding to each mode .. math:: \begin{aligned} \boldsymbol{D}_{max} \neq \sum_{i=1}^n \boldsymbol{D}_j \end{aligned} :label: Different formulas to find the value of :math:`D` through :math:`D` have been proposed. The most simple and, at the same time, most used is that which establishes that the response is equal to the square root of the sum of the squares of the modal responses: .. math:: \begin{aligned} D_{max} = \sqrt{\sum_{i=1}^q \left(\boldsymbol{D}_{max}^j \right)^2} \end{aligned} :label: As for the stresses, reactions and in general any response R which is to be determined, we can get analogously: .. math:: \begin{aligned} R_{max} = \sqrt{\sum_{i=1}^q \left(\boldsymbol{R}_{max}^j \right)^2} \end{aligned} :label: