C Library#
Data Structures#
//
Integration#
//
-
int sdof_integrate(struct sdof_alpha *conf, double M, double C, double K, double scale, int n, double *p, double dt, double *response)#
Main linear integrator.
- Parameters:
conf (struct sdof_alpha*) – Struct holding integration parameters.
load (const double[n]) – Pointer to excitation series
n (const int) – size of excitation series
dt (const double) – Time step of excitation data.
M (double) – Mass.
C (double) – Damping.
K (double) – Stiffness
response (double[n][3]) – Pointer to the beginning of an n x 3 array of doubles. displacement at
i
:response[i][0]
velocity ati
:response[i][1]
acceleration ati
:response[i][2]
Note
The first row of the response array is expected to be initialized, ie
response[0][0] = u0; response[0][1] = v0;
-
int sdof_integrate_plastic(struct sdof_alpha *conf, double M, double C, double K, double scale, int n, double *p, double dt, double *response)#
Elastic-perfectly plastic
Simo, J.C. and Hughes, T.J.R. (2000) Computational inelasticity. Corr. 2. print. New York Heidelberg Berlin: Springer (Interdisciplinary applied mathematics Mechanics and materials, 7).
- Parameters:
Fy (double) – Yield force
a (double) – Kinematic hardening ratio
-
UR_INCR#
Integrate a linear system, tracking only peak values.
-
int sdof_integrate_peaks(struct sdof_alpha *conf, double M, double C, double K, double scale, int n, double *p, double dt, struct sdof_peaks *response)#
Integrate a linear system, tracking only peak values.
-
struct sdof_peaks sdof_integrate_peaks_2(struct sdof_alpha *conf, double M, double C, double K, double scale, int n, const double *p, double dt)#
Alternative implementation to return an sdof_peaks struct by value. This is used in _spectrum.c .
Response Spectra#
//
-
int sdof_spectrum(struct sdof_alpha *conf, const double *load, const int n, const double dt, const double t_min, const double t_max, const int n_periods, const double damp, int n_threads, struct sdof_peaks *response)#
Threaded response spectrum over regularly spaced periods.
This function spawns n_threads threads to perform a total of n_periods integrations over regularly spaced periods.
- Parameters:
conf (struct sdof_alpha*) –
.
load (const double[n]) – Pointer to excitation series
n (const int) – size of excitation series
dt (const double) – Time step of excitation data.
t_min (const double) – Start period
t_max (const double) – End period
n_periods (const int) – Number of periods to integrate.
damp (const double) –
.
n_threads (int) –
.
*response (struct sdof_peaks) –