Modal time solvers

The aim of this section is to describe the modal time solvers available for solving Multi-degrees of freedom (Mdof) systems. To explain, the theoretical foundations of the proposed solvers, let’s consider a Mdof system with \(N\) degrees of freedom. The equation of motion of the system is given by: \[ \mathbf{M} \ddot{\mathbf{x}}(t) + \mathbf{C} \dot{\mathbf{x}}(t) + \mathbf{K} \mathbf{x}(t) = \mathbf{F}(t) \] where \(\mathbf{M}\) is the mass matrix, \(\mathbf{C}\) is the damping matrix, \(\mathbf{K}\) is the stiffness matrix, \(\mathbf{x}(t)\) is the displacement vector, and \(\mathbf{F}(t)\) is the vector of external forces.

To solve the previous in the modal space, the solution \(\mathbf{x}(t)\) is expressed as: \[ \mathbf{x}(t) = \mathbf{\Phi} \mathbf{q}(t) \] where \(\mathbf{\Phi}\) is the matrix of the mode shapes and \(\mathbf{q}(t)\) is the vector of modal coordinates.

Substituting the previous expression in the equation of motion, premultiplying by \(\mathbf{\Phi}^\mathsf{T}\), and using the orthogonality property of the mode shapes, one obtains a set of \(N\) independent modal equations of motion given by: \[ \ddot{q}_n(t) + 2 \xi_n \omega_n \dot{q}_n(t) + \omega_n^2 q_n(t) = \frac{f_n(t)}{m_n} \] where for the n-th mode, \(q_n(t)\) is the generalized coordinate, \(\xi_n\) is the damping ratio, \(\omega_n\) is the natural angular frequency, \(f_n(t)\) is the modal force, and \(m_n\) is the modal mass.

It should be noticed that a modal equation of motion corresponds to the equation of motion of a Sdof system with mass \(m_n\), damping ratio \(\xi_n\), natural angular frequency \(\omega_n\).

It results that computing the response of an Mdof system in the modal space is equivalent to solving \(N\) independent Sdof systems.

Note

In the following, only modal damping is considered. This means that: \[ \mathbf{C}_n = \mathbf{\Phi}^\mathsf{T} \mathbf{C} \mathbf{\Phi} = \text{diag}(2\xi_1 \omega_1, 2\xi_2 \omega_2, \ldots, 2\xi_N \omega_N). \]

1 Free response

The free response of an MDOF system is the response of the system when there are no external forces acting on it. In this case, the modal equations of motion of the system is given by: \[ \ddot{q}_n(t) + 2 \xi_n \omega_n \dot{q}_n(t) + \omega_n^2 q_n(t) = 0 \]

The solution of the previous equation can be found in Sdof solvers - Section 1.1.

1.1 API

Data type

FreeModalTimeProblem


FreeModalTimeProblem(K, M, ξn, n = size(K, 1); ismodal = false)

Structure containing data for the modal time solver

Fields

  • K::VecOrMat{Real}:

    • If ismodal = false then Matrix{Real}: Stiffness matrix

    • If ismodal = true then Vector{Real}: Natural angular frequencies

  • M::AbtractMatrix:

    • If ismodal = false: Mass matrix

    • If ismodal = true: Mass-normalized mode shapes

  • ξn: Damping ratios

  • u0::Tuple: Initial conditions

    • u0[1]: Initial displacement (or modal displacement)

    • u0[2]: Initial velocity (or modal velocity)

  • t::AbstractRange: Time points at which to evaluate the response

  • F::Matrix{Real}: External force matrix (or modal force matrix)

  • n::Int: Number of modes to retain in the modal basis

  • ismodal::Bool: Flag to indicate if the problem contains modal data

Note

Two possibilities are offered to the user to enter the structural properties of the system.

  1. Provide the stiffness and mass matrices.
  2. Provide the squared natural frequencies and (mass-normalized) mode shapes. This allows to use the modal information computed analytically for continuous systems or numerically for discrete systems.

In the latter case, the initial conditions must be expressed in the modal space.

Related function

solve


solve(prob::FreeModalTimeProblem)

Compute the free response of a multi-degrees of freedom (Mdof) system using the modal approach.

Inputs

  • prob: Structure containing the parameters of the Mdof problem

Output

  • sol: ModalTimeSolution structure containing the response of the system at the given time points

1.2 Example

# System parameters
M = Diagonal([2., 1.])
K = [6. -2.; -2. 4.]
ξ = 0.05

# Time vector
t = 0.:1e-2:30.

# Initial conditions
x0 = [0.2, 0.1]
v0 = zeros(2)

# Problem definition - case 1 - Provide the stiffness and mass matrices
u0 = (x0, v0)
prob = FreeModalTimeProblem(K, M, ξ, u0, t)

# Problem definition - case 2 - Provide the squared natural frequencies and mode shapes
ωm, Φm = eigenmode(K, M)
x0m = Φm'*M*x0
v0m = Φm'*M*v0
u0m = (x0m, v0m)
prob_modal = FreeModalTimeProblem(ωm, Φm, ξ, u0m, t, ismodal = true)

# Solution
x_free = solve(prob).u
x_free_modal = solve(prob_modal).u

2 Forced response

The forced response of an Mdof system is the response of the system when external forces are acting on it. In this case, the modal equations of motion of the system is given by: \[ \ddot{q}_n(t) + 2 \xi_n \omega_n \dot{q}_n(t) + \omega_n^2 q_n(t) = \frac{f_n(t)}{m_n} \]

The solution of the previous equation can be found in Sdof solvers - Section 1.2.

2.1 Harmonic excitation

2.1.1 API

Data type

HarmonicModalTimeProblem


HarmonicModalTimeProblem(K, M, ξn, u0, t, F, ω = 0., n = size(K, 1); ismodal = false)

Structure containing data for the modal time solver for computing the forced response due to an harmonic excitation

Constructor

  • K::VecOrMat{Real}:

    • If ismodal = false then Matrix{Real}: Stiffness matrix

    • If ismodal = true then Vector{Real}: Natural angular frequencies

  • M::AbtractMatrix:

    • If ismodal = false: Mass matrix

    • If ismodal = true: Mass-normalized mode shapes

  • ξn: Damping ratios

  • u0::Tuple: Initial conditions

    • u0[1]: Initial displacement (or modal displacement)

    • u0[2]: Initial velocity (or modal velocity)

  • t::AbstractRange: Time points at which to evaluate the response

  • F::Real: External force matrix (or modal participation factors)

  • freq::Real: Excitation frequency

  • n::Int: Number of modes to retain in the modal basis

  • ismodal::Bool: Flag to indicate if the problem contains modal data

Fields

  • K: Stiffness matrix (or modal stiffness matrix)

  • M: Mass matrix (or mass-normalized mode shapes)

  • ξn: Damping ratios

  • u0: Initial conditions

    • u0[1]: Initial displacement (or modal displacement)

    • u0[2]: Initial velocity (or modal velocity)

  • t: Time points at which to evaluate the response

  • F: Amplitude vector (or modal participation vector)

  • ω: Excitation angular frequency

  • n: Number of modes to retain in the modal basis

  • ismodal: Flag to indicate if the problem contains modal data

Related function

solve


solve(prob::HarmonicModalTimeProblem)

Compute the forced response of a multi-degrees of freedom (Mdof) system due to an harmonic excitation using the modal approach.

Inputs

  • prob: Structure containing the parameters of the Mdof problem

Output

  • sol: Solution structure containing the response of the system at the given time points

    • u: Displacement

    • du: Velocity

    • ddu: Acceleration

2.1.2 Example

# System parameters
M = Diagonal([2., 1.])
K = [6. -2.; -2. 4.]
ξ = 0.05

# Time vector
t = 0.:1e-2:30.

# Initial conditions
x0 = [0., 1e-4]
v0 = zeros(2)
u0 = (x0, v0)

# Excitation parameters
F = [1., 2.]
freq = 0.5

# Problem definition - case 1 - Provide the stiffness and mass matrices
prob_harmo = HarmonicModalTimeProblem(K, M, ξ, F, 2π*freq, u0, t)

# Problem definition - case 2 - Provide the squared natural frequencies and mode shapes
ωm, Φm = eigenmode(K, M)
x0m = Φm'*M*x0
v0m = Φm'*M*v0
u0m = (x0m, v0m)
Lm = Φm'*F
prob_harmo_modal = HarmonicModalTimeProblem(ωm, Φm, ξ, Lm, 2π*freq, u0m, t, ismodal = true)

# Solution
x_harmo = solve(prob_harmo).u
x_harmo_modal = solve(prob_harmo_modal).u

2.2 Arbitrary excitation

2.2.1 API

Data type

ForcedModalTimeProblem


ForcedModalTimeProblem(K, M, ξn, u0, t, F, n = size(K, 1); ismodal = false)

Structure containing data for modal time solver for computing the forced response due to an arbitrary excitation

Fields

  • K::VecOrMat{Real}:

    • If ismodal = false then Matrix{Real}: Stiffness matrix

    • If ismodal = true then Vector{Real}: Natural angular frequencies

  • M::AbtractMatrix:

    • If ismodal = false: Mass matrix

    • If ismodal = true: Mass-normalized mode shapes

  • ξn: Damping ratios

  • F::Matrix{Real}: External force matrix (or modal participation factors)

  • u0::Tuple: Initial conditions

    • u0[1]: Initial displacement (or modal displacement)

    • u0[2]: Initial velocity (or modal velocity)

  • t::AbstractRange: Time points at which to evaluate the response

  • n::Int: Number of modes to retain in the modal basis

  • ismodal::Bool: Flag to indicate if the problem contains modal data

Related function

solve


solve(prob::ForcedModalTimeProblem)

Compute the forced response of a multi-degrees of freedom (Mdof) system due to an arbitrary excitation using the modal approach.

Inputs

  • prob: Structure containing the parameters of the Mdof problem

  • method: Method to compute the Duhamel's integral

    • :filt: Filtering using the Z-transform of the impulse response (default)

    • :interp: Interpolation + Gaussian quadrature

    • :conv: Convolution

Output

  • sol: ModalTimeSolution structure containing the response of the system at the given time points

2.2.2 Example

# System parameters
M = Diagonal([2., 1.])
K = [6. -2.; -2. 4.]
ξ = 0.05

# Time vector
t = 0.:1e-2:30.

# Initial conditions
u0 = (zeros(2), zeros(2))

# Excitation parameters
F0 = 10.
tstart = 2.
duration = 5.
haversine = HaverSine(F0, tstart, duration)
F0 = excitation(haversine, t)
F = zeros(2, length(t))
F[1, :] .= F0

# Problem definition - case 1 - Provide the stiffness and mass matrices
prob_forced = ForcedModalTimeProblem(K, M, ξ, F, u0, t)

# Problem definition - case 2 - Provide the squared natural frequencies and mode shapes
ωm, Φm = eigenmode(K, M)
u0m = (zeros(2), zeros(2))
Lm = Φm'*F
prob_forced_modal = ForcedModalTimeProblem(ωm, Φm, ξ, Lm, u0m, t, ismodal = true)

# Solution
x_forced = solve(prob_forced).u
x_forced_modal = solve(prob_forced_modal).u

3 Additional function - Impulse response matrix

The impulse response matrix of an Mdof system is obtained from the modal impulse response matrix. The modal impulse response matrix is given by: \[ \mathbf{h}(t) = \Phi \begin{bmatrix} h_1(t) & & & & \\ & \ddots & & & \\ & & h_n(t) & & \\ & & & \ddots & \\ & & & & h_N(t) \end{bmatrix} \Phi^\mathsf{T}, \] where \(h_n(t)\) is the modal impulse response of the mode \(n\) computed as in Sdof solvers - Section 1.3.

impulse_response


impulse_response(K::Matrix{Float64}, M::Matrix{Float64}, ξn, t, n = size(K, 1); ismat = false)

Compute the impulse response of a multi-degrees of freedom (Mdof) system using the modal approach

Inputs

  • K:

    • If ismodal = false: Stiffness matrix

    • If ismodal = true: Squared natural angular frequencies

  • M:

    • If ismodal = false: Mass matrix

    • If ismodal = true: Mass-normalized mode shapes

  • ξn: Damping ratios

  • t: Time points at which to evaluate the response

  • n: Number of modes to retain in the modal basis

  • ismodal::Bool: Flag to indicate if the problem contains modal data

  • ismat::Bool: Flag to indicate if the output should be a matrix

Output

  • sol: ModalImpulseSolution

    • u: Impulse response matrix

# System parameters
M = Diagonal([2., 1.])
K = [6. -2.; -2. 4.]
ξ = 0.05

# Time vector
t = 0.:1e-2:30.

# Impulse response matrix
h = impulse_response(K, M, ξ, t, ismat = true).u;