Single Degree of Freedom Oscillator Parameters
Definition of the custom type, Oscillator to represent a single degree of freedom (SDOF) oscillator. Type simply stores the oscillator frequency and damping ratio.
StochasticGroundMotionSimulation.Oscillator — TypeOscillator{T<:Float64}Custom type to represent a SDOF oscillator. The type has two fields:
f_nis the natural frequency of the oscillatorζ_nis the damping ratio
Examples
sdof = Oscillator( 1.0, 0.05 )## Functionality
The main methods that are used to interact with Oscillator instances are:
StochasticGroundMotionSimulation.period — Functionperiod(sdof::Oscillator)Natural period (s) of the sdof Oscillator.
StochasticGroundMotionSimulation.transfer — Functiontransfer(f::T, sdof::Oscillator) where {T<:Real}Compute the modulus of the transfer function for a SDOF system.
The transfer function is defined as:
\[|H(f,f_n,\zeta_n)| = \frac{1}{\sqrt{ \left(1 - \beta^2 \right) + \left(2\zeta_n\beta\right)^2 }}\]
where $\beta$ is the tuning ratio defined by $f/f_n$.
Examples
f = 2.0
sdof = Oscillator(1.0, 0.05)
Hf = transfer(f, sdof)See also: squared_transfer
transfer(f::Vector{T}, sdof::Oscillator) where T<:RealComputes the modulus of the transfer function of a SDOF for a vector of frequencies
f::Vectoris the vector of frequenciessdof::Oscillatoris the oscillator instance
Examples
f = collect(range(0.1, stop=10.0, step=0.01))
sdof = Oscillator(1.0)
Hf = transfer(f, sdof)StochasticGroundMotionSimulation.squared_transfer — Functionsquared_transfer(f, sdof::Oscillator)Compute the square of the transfer function for a SDOF system, sdof, at frequency f.
Examples
f = 2.0
# create sdof with natural frequency f_n=1.0 and damping ζ=0.05
sdof = Oscillator( 1.0, 0.05 )
Hf2 = squared_transfer( f, sdof )See also: transfer