0.1.1 • Published 1 year ago

sdof v0.1.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
1 year ago

sdof

Fast integration of single degree-of-freedom systems.

This package solves scalar problems of the form

$$ m \ddot{u} + c \dot{u} + k u = f(t) $$

Integration is carried out using the Generalized - $\alpha$ method. This is an implicit method that like the HHT method allows for high frequency energy dissipation and second order accuracy.

Compile

Python

pip install .

Javascript

  • Install emscripten from here
  • run make. This creates the following files:

    • dist/fsdof.wasm - Web assembly - compiled library,
    • dist/fsdof.js - interface to binary fsdof.wasm
  • to test, you can use Python to start an HTTP server in the current directory as follows:

    python -m http.server .

Python API

def peaks(m, c, k, f, dt): ...

Integrator (Reproduced from OpenSees docs)

$$\gamma = \dfrac{1}{2} + \gamma_M - \gamma_F$$

$$\beta = \dfrac{1}{4}(1 + \gamma_M - \gamma_F)^2$$

Theory

The generalized $\alpha$ method is a one step implicit method for solving the transient problem which attempts to increase the amount of numerical damping present without degrading the order of accuracy. In the HHT method, the same Newmark approximations are used:

$$U{t+\Delta t} = U_t + \Delta t \dot U_t + (0.5 - \beta) \Delta t^2 \ddot U_t + \beta \Delta t^2 \ddot U{t+\Delta t}$$

$$\dot U{t+\Delta t} = \dot U_t + (1-\gamma)\Delta t \ddot U_t + \gamma \Delta t \ddot U{t+\Delta t} $$

$$R{t + \alpha_M \Delta t} = F{t+\Delta t}^{ext} - M \ddot U{t + \alpha_M \Delta t} - C \dot U{t+\alphaF \Delta t} - F^{int}(U{t + \alpha_F \Delta t}) $$

where the displacements and velocities at the intermediate point are given by:

$$U{t+ \alpha_F \Delta t} = (1 - \alpha_F) U_t + \alpha_F U{t + \Delta t}$$

$$\dot U{t+\alpha_F \Delta t} = (1-\alpha_F) \dot U_t + \alpha_F \dot U{t + \Delta t}$$

$$\ddot U{t+\alpha_M \Delta t} = (1-\alpha_M) \ddot U_t + \alpha_M \ddot U{t + \Delta t}$$

$$K{t+\Delta t}^{*i} d U{t+\Delta t}^{i+1} = R_{t+\Delta t}^i$$

$$K_{t+\Delta t}^{*i} = \alpha_F K_t + \frac{\alpha_F \gamma}{\beta \Delta t} C_t + \frac{\alpha_M}{\beta \Delta t^2} M$$

$$R{t+\Delta t}^i = F{t + \Delta t}^{ext} - F(U{t + \alpha F \Delta t}^{i-1})^{int} - C \dot U{t+\alpha F \Delta t}^{i-1} - M \ddot U_{t+ \alpha M \Delta t}^{i-1}$$

The linear equations are used to solve for

$$U{t+\alpha_F \Delta t}, \dot U{t + \alphaF \Delta t} \ddot U{t+ \alpha M \Delta t}$$

Once convergence has been achieved the displacements, velocities and accelerations at time $t + \Delta t$ can be computed.

References

0.1.1

1 year ago

0.1.0

1 year ago