Stress classes

class pygaf.stresses.StressSeries(periods=[1.0], values=[0.0], from_csv='', title='Stress Series', xlabel='Time', ylabel='Value')

Bases: object

Stress series class defining sress periods and values.

The default StressSeries object has default values periods=[1.0] and values=[0.0]. Stress periods and values are provided in corresponding lists, which can be created manually or loaded from a csv file containig comma-separated period and value pairs, one per line. Exceptions occur if a period is negative or if the number of periods and stresses do not match.

The .plot method displays a timeseries graph of the stress series.

Example csv file with three stress periods:

10,25.6

15.2,38.7

48,-12

periods

List of stress period lengths; used if from_csv is an empty string (units T, default [1.0]).

Type:

float

values

List of stress period values, one per stress period; used if from_csv is an empty string (units consistent, default [0.0]).

Type:

float

from_csv

File path of csv file to read stress data from; no data are read if the string is empty (default ‘’).

Type:

str

property periods

List of stress period lengths.

Setter method checks for valid values and triggers an exception if invalid values are specified.

Type:

list (float)

plot(dw=8)

Plot the stress series.

Parameters:

dw (float) – Width of figure (default 8).

property series

stress series dataframe.

Type:

pandas dataframe

property values

List of stress period values.

Setter method checks for valid values and triggers an exception if invalid values are specified.

Type:

list (float)