o3seespy.time_series

class o3seespy.command.time_series.Constant(osi, factor: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Constant TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor applied remains constant and is independent of the time in the domain, i.e. \lambda = f(t) = C.

Initial method for Constant

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • factor (float, optional) – The load factor applied

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Constant(osi, factor=1.0)
op_type = 'Constant'
class o3seespy.command.time_series.Linear(osi, factor: Optional[float] = None, t_start: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Linear TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor applied is linearly proportional to the time in the domain, i.e.:math:lambda = f(t) = cFactor * (t-tStart). (0 if t < tStart)

Initial method for Linear

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • factor (float, optional) – Linear factor

  • t_start (float, optional) – Start time

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Linear(osi, factor=1.0)
op_type = 'Linear'
class o3seespy.command.time_series.Path(osi, dt: Optional[float] = None, values: Optional[list] = None, time: Optional[list] = None, file_path: Optional[str] = None, file_time: Optional[str] = None, factor: Optional[float] = None, start_time: Optional[float] = None, use_last=False, prepend_zero=False)[source]

Bases: TimeSeriesBase

The Path TimeSeries Class

The relationship between loadfactor and time is input by the user as a series of discrete points inthe 2d space (load factor, time). The input points can come from afile or from a list in the script. When the time specified does not matchany of the input points, linear interpolation is used between points.There are many ways to specify the load path, for example,

Initial method for Path

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • dt (float, optional) – Time interval between specified points.

  • values (list, optional) – Load factor values in a |list|.

  • time (array_like, optional) – Time values in a |list|.

  • file_path (str, optional) – File containing the load factors values.

  • file_time (str, optional) – File containing the time values for corresponding load factors.

  • factor (float, optional) – A factor to multiply load factors by.

  • start_time (float, optional) – Provide a start time for provided load factors.

  • use_last (bool) – Use last value after the end of the series.

  • prepend_zero (bool) – Prepend a zero value to the series of load factors.

op_type = 'Path'
class o3seespy.command.time_series.Pulse(osi, t_start, t_end, period, width: Optional[float] = None, shift: Optional[float] = None, factor: Optional[float] = None, zero_shift: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Pulse TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor is some pulse function of the time in the domain.

\lambda = f(t) =
\begin{cases}
    cFactor+zeroShift, &  k < width\\
zeroshift, & k < 1\\
0.0, & otherwise
\end{cases}

k = \frac{t+shift-tStart}{period}-floor(\frac{t+shift-tStart}{period})

Initial method for Pulse

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • t_start (float) – Starting time of non-zero load factor.

  • t_end (float) – Ending time of non-zero load factor.

  • period (float) – Characteristic period of pulse.

  • width (float, optional) – Pulse width as a fraction of the period. (optinal)

  • shift (float, optional) – Phase shift in seconds.

  • factor (float, optional) – Load factor.

  • zero_shift (float, optional) – Zero shift.

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Pulse(osi, t_start=1.0, t_end=1.0, period=1.0, width=0.5, shift=0.0, factor=1.0, zero_shift=0.0)
op_type = 'Pulse'
class o3seespy.command.time_series.Rectangular(osi, t_start, t_end, factor: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Rectangular TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor is constant for a specified period and 0 otherwise, i.e.

\lambda = f(t) =
\begin{cases}
    cFactor, &  tStart<=t<=tEnd\\
0.0, & otherwise
\end{cases}

Initial method for Rectangular

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • t_start (float) – Starting time of non-zero load factor.

  • t_end (float) – Ending time of non-zero load factor.

  • factor (float, optional) – Load factor.

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Rectangular(osi, t_start=1.0, t_end=1.0, factor=1.0)
op_type = 'Rectangular'
class o3seespy.command.time_series.TimeSeriesBase[source]

Bases: OpenSeesObject

op_base_type = 'timeSeries'
class o3seespy.command.time_series.Triangle(osi, t_start, t_end, period, factor: Optional[float] = None, shift: Optional[float] = None, zero_shift: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Triangle TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor is some triangular function of the time in the domain.

\lambda = f(t) =
\begin{cases}
    slope*k*period+zeroShift, & k < 0.25\\
cFactor-slope*(k-0.25)*period+zeroShift, & k < 0.75\\
-cFactor+slope*(k-0.75)*period+zeroShift, & k < 1.0\\
0.0, & otherwise
\end{cases}

slope = \frac{cFactor}{period/4}
k = \frac{t+\phi-tStart}{period}-floor(\frac{t+\phi-tStart}{period})
\phi = shift - \frac{zeroShift}{slope}

Initial method for Triangle

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • t_start (float) – Starting time of non-zero load factor.

  • t_end (float) – Ending time of non-zero load factor.

  • period (float) – Characteristic period of sine wave.

  • factor (float, optional) – Load factor.

  • shift (float, optional) – Phase shift in radians.

  • zero_shift (float, optional) – Zero shift.

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Triangle(osi, t_start=1.0, t_end=1.0, period=1.0, factor=1.0, shift=0.0, zero_shift=0.0)
op_type = 'Triangle'
class o3seespy.command.time_series.Trig(osi, t_start, t_end, period, factor: Optional[float] = None, shift: Optional[float] = None, zero_shift: Optional[float] = None)[source]

Bases: TimeSeriesBase

The Trig TimeSeries Class

This command is used to construct a TimeSeries object in which the load factor is some trigonemtric function of the time in the domain

\lambda = f(t) =
\begin{cases}
    cFactor * sin(\frac{2.0\pi(t-tStart)}{period}+\phi), &  tStart<=t<=tEnd\\
    0.0, & otherwise
\end{cases}
\phi = shift - \frac{period}{2.0\pi} * \arcsin(\frac{zeroShift}{cFactor})

Initial method for Trig

Parameters
  • osi (o3seespy.OpenSeesInstance) –

  • t_start (float) – Starting time of non-zero load factor.

  • t_end (float) – Ending time of non-zero load factor.

  • period (float) – Characteristic period of sine wave.

  • factor (float, optional) – Load factor.

  • shift (float, optional) – Phase shift in radians.

  • zero_shift (float, optional) – Zero shift.

Examples

>>> import o3seespy as o3
>>> osi = o3.OpenSeesInstance(ndm=2)
>>> o3.time_series.Trig(osi, t_start=1.0, t_end=1.0, period=1.0, factor=1.0, shift=0.0, zero_shift=0.0)
op_type = 'Trig'