Bilin

class streng.tools.bilin.Bilin(curve_ini: streng.common.math.charts.linexy.LineXY = LineXY(x=None, y=None, name=None, tags=[]), xtarget: float = 0.0, dropstrength: float = 0.75, elastoplastic: bool = False, allowa010: bool = True, EPSILON: float = 1e-06)[source]

class Bilin {
.. members ..
+ curve_ini: LineXY = LineXY()
+ xtarget: float = 0.0
+ dropstrength: float = 0.75
+ elastoplastic: bool = False
+ allowa010: bool = True
+ EPSILON: float = 0.000001
.. properties ..
+ x_max()
+ x_min()
+ y_max()
+ y_min()
+ y_max_index()
.. methods ..
+ calc()
- __iteration()
- __curve_to_xcheck()
- __get_area()
}

calc()[source]
EPSILON: float = 1e-06
allowa010: bool = True
curve_ini: streng.common.math.charts.linexy.LineXY = LineXY(x=None, y=None, name=None, tags=[])
dropstrength: float = 0.75
elastoplastic: bool = False
xtarget: float = 0.0
class streng.tools.bilin.BilinearCurve(ay: float, au: float, dy: float, du: float, a0: float = 0.0, d0: float = 0.0)[source]

class BilinearCurve {
.. members ..
+ ay: float
+ au: float
+ dy: float
+ du: float
+ a0: float = 0.
+ d0: float = 0.
.. properties ..
+ μ()
+ kel()
+ kinel()
+ α()
+ β0()
+ d_array()
+ a_array()
+ T0
+ all_quantities
.. methods ..
+ Teq(Τ0)

}

Teq(T0)[source]

Effective period Teq after Fema440 Equation 3-5

\[T_{eq} = T_0 \sqrt{\dfrac{μ}{1 + α \cdot μ - α}}\]
property T0

Initial period T0

\[T_0 = 2 π \sqrt{\dfrac{d_y - d_0}{a_y - a_0}}\]
a0: float = 0.0
property a_array
property all_quantities
au: float
ay: float
d0: float = 0.0
property d_array
du: float
dy: float
property kel

Slope of the elastic branch, \(k_{el} = \dfrac{a_y - a_0}{d_y - d_0}\)

property kinel

Slope of the inelastic branch, \(k_{inel} = \dfrac{a_u - a_y}{d_u - d_y}\)

property α

Hardening, \(α = k_{inel}/k_{el}\)

property β0

Damping after Fema440 Equation 3-6

\[β_0 = \dfrac{2}{π}\dfrac{(μ - 1) \cdot (1 - α)}{μ \cdot (1 + α \cdot μ - α)}\]
property μ
\[μ = \dfrac{d_u - d_0}{d_y - d_0}\]

Seismic Motions

class streng.tools.seismic_motion.Accelerogram(accelerations: numpy.array, dt: float)[source]

Acceleration record.

Gets acceleration values and dt and calculates several motion parameters.

Most properties are cached, there was no actual need for that since calculations do not really take such a long time. Used the cached-property package.

class Record {
.. initialize attributes ..
+ accelerations: np.array
+ dt: float
.. cached properties ..
+ steps
+ time_total
+ time
+ velocities
+ displacements
+ props
+ husid
+ husid_norm
.. properties ..
+ output
+ plot_time_series
.. classmethods - cunstructors ..
+ from_one_column_txt(filename, dt)
+ from_multi_column_txt(filename, dt, skip_header=0, skip_footer=0)
+ from_karakostas_acc(filename, direction)
.. methods ..
+ significant_duration(start_percentage, end_percentage)

}

accelerations

an array with the acceleration values. Units should be m/sec2

Type

np.array

dt

time increment

Type

float

clear_cached_properties()[source]
classmethod from_athanassiadou_acc(filename, direction, scale=0.01)[source]

direction = ‘L’ or ‘T’ or ‘V’

classmethod from_multi_column_txt(filename, dt, scale=1.0, skip_header=0, skip_footer=0)[source]

constructor that loads values from a multicolumn text file

Parameters
  • filename – file to load

  • dt – time increment

  • skip_header (int) – number of lines to skip at the beginning of the file

  • skip_footer (int) – number of lines to skip at the end of the file

classmethod from_one_column_txt(filename, dt, scale=1.0)[source]

constructor that loads values from a single column text file

get_spectra(damping, startT=0.0, endT=4.0, noTs=401)[source]
show_parameters()[source]
static show_spectra_parameters(spectrum)[source]
significant_duration(start_percentage, end_percentage)[source]
accelerations: numpy.array
displacements

displacement values

Type

np.array

dt: float
husid

values of the Husid plot

Type

np.array

husid_norm

values of the normalized Husid plot

Type

np.array

property output

A collection of output tables and strings

Tables:
  • RecordMotionProperties

Type

OutputExtended

property plot_time_series

Plots acc, vel, dipl vs time

props

a dictionary with several input motion parameters

Type

dict

steps

number of steps

Type

int

time

time values

Type

np.array

time_total

total time of the motion

Type

float

velocities

velocity values

Type

np.array

class streng.tools.seismic_motion.Spectra(accel: numpy.array, dt: float)[source]

A class for calculating the response spectra using the Nigam Jennings approach. Adopted code found at the The GEMScienceTools - Risk Modellers Toolkit (RMTK).

class Record {
.. initialize attributes ..
+ accelerations: np.array
+ dt: float

.. classmethods ..
+ calculate_time_series()
+ NigamJennings()

.. staticmethods ..
+ show_spectra_parameters

.. methods ..
+ get_spectra

}

accelerations

an array with the acceleration values. Units should be m/sec2

Type

np.array

dt

time increment

Type

float

classmethod NigamJennings(acc, periods, damping, dt)[source]
classmethod calculate_time_series(num_steps, num_per, acc, const, omega2, dt)[source]

Calculates the acceleration, velocities and displacement time series for the SDOF oscillator

Parameters
  • num_steps (int) – number of input motion steps

  • num_per (int) – number of periods where values are calculated

  • acc (np.array) – acceleration values

  • const (dict) – constants of the algorithm

  • omega2 (np.array) – squared circular frequency

  • dt (float) – time increment

Returns

a tuple containing x_a, x_v, x_d
  • x_a = Acceleration time series

  • x_v = Velocity time series

  • x_d = Displacement time series

Return type

tuple

get_spectra(damping, startT=0.0, endT=4.0, noTs=401)[source]
static show_spectra_parameters(spectrum)[source]
accel: numpy.array
dt: float
streng.tools.seismic_motion.NigamJennings(acc, periods, damping, dt)[source]
streng.tools.seismic_motion.calculate_time_series(num_steps, num_per, acc, const, omega2, dt)[source]

Calculates the acceleration, velocities and displacement time series for the SDOF oscillator

Parameters
  • num_steps (int) – number of input motion steps

  • num_per (int) – number of periods where values are calculated

  • acc (np.array) – acceleration values

  • const (dict) – constants of the algorithm

  • omega2 (np.array) – squared circular frequency

  • dt (float) – time increment

Returns

a tuple containing x_a, x_v, x_d
  • x_a = Acceleration time series

  • x_v = Velocity time series

  • x_d = Displacement time series

Return type

tuple

Jupyters

Jupyter notebooks