pystra.calibration.GenericCalibration#
- class GenericCalibration(aq_points, ag_points)[source]#
Bases:
object
A generic code calibration
Initialize the generic code calibration class with the calculation points.
- Parameters:
q_points (nd.array) – The grid of points to use for the live load ratio.
g_points (nd.array) – The grid of points to use for the dead load ratio.
- Return type:
None.
Methods
Add a probability model to the calibration.
add_range
Analyse the code calibration problem given the probability models.
Reliability analysis of the design according to the code rules.
The main plotting function.
Do a structural design for z, the design parameter, based on the code rules.
Determine the reliabilities across the full range of dead and live load ratios.
Limit state function for the generic code calibration problem.
Plot the region for each probability model with their descriptions.
Plots a region of reliability indices, and adds a line for the smallest dead load ratio.
- add_model(model, color, label)[source]#
Add a probability model to the calibration.
- Parameters:
model (GenericModel object) – A probability model.
color (str) – Matplotlib string representation of a colour for plotting.
label (str) – Label for use in plot legend.
- Return type:
None.
- lsf(z, aq, ag, wR, R, wS, G, P, Q)[source]#
Limit state function for the generic code calibration problem.
- Parameters:
z (float) – Design parameter.
aq (float) – Ratio of live to total loads.
ag (float) – Ratio of dead to total dead and permanent load.
wR (float) – Model error for resistance.
R (float) – Normalized resistance.
wS (float) – Model error for loading/analysis.
G (float) – Normalized dead load.
P (float) – Normalized permanent load.
Q (float) – Normalized live load.
- Returns:
Evaluation of the limit state.
- Return type:
float
- design(aq, ag, phi, gamma_g, gamma_p, gamma_q, Rk, Gk, Pk, Qk)[source]#
Do a structural design for z, the design parameter, based on the code rules.
- Parameters:
aq (float) – Ratio of live to total loads.
ag (float) – Ratio of dead to total dead and permanent load.
phi (float) – Capacity reduction factor.
gamma_g (float) – Dead load factor.
gamma_p (float) – Permanent load factor.
gamma_q (float) – Live load factor.
Rk (float) – Characteristic value of resistance.
Gk (float) – Characteristic value of dead load.
Pk (float) – Characteristic value of permanent load.
Qk (float) – Characteristic value of live load.
- Returns:
z – Design parameter.
- Return type:
float
- analyse_design(z, aq, ag, wR, R, wS, G, P, Q)[source]#
Reliability analysis of the design according to the code rules.
- Parameters:
z (float) – Design parameter.
aq (float) – Ratio of live to total loads.
ag (float) – Ratio of dead to total dead and permanent load.
wR (float) – Model error for resistance.
R (float) – Normalized resistance.
wS (float) – Model error for loading/analysis.
G (float) – Normalized dead load.
P (float) – Normalized permanent load.
Q (float) – Normalized live load.
- Returns:
The reliability index, beta.
- Return type:
float
- get_reliabilities(Aq, Ag, model)[source]#
Determine the reliabilities across the full range of dead and live load ratios.
- Parameters:
Aq (nd.array) – The grid of live load ratio points.
Ag (nd.array) – The grid of dead load ratio points.
model (GenericModel) – Probability model and code rules for analysis.
- Returns:
beta – Reliability indices at each dead and live load ratio grid point.
- Return type:
nd.array
- analyse()[source]#
Analyse the code calibration problem given the probability models.
- Raises:
ValueError – If there are no probability models assigned.
- Return type:
None.
- plot_region(ax, x, beta, facecolor, label)[source]#
Plots a region of reliability indices, and adds a line for the smallest dead load ratio.
- Parameters:
ax (Matplotlib Axes object) – The axes to plot on.
x (nd.array) – Vector of live load ratio points.
beta (nd.array) – Matrix of reliability indices correspond go the dead and live ratios grid.
facecolor (str) – Matplotlib string description of a colour.
label (str) – Label for the plot legend.
- Return type:
None.
- beta_region_plot(Aq, data, beta_t, ranges, figsize=(12, 9), **kwargs)[source]#
The main plotting function.
- Parameters:
Aq (nd.array) – Vector of live load ratio points..
data (List[Dict{GemericModel}]) – List of dictionaries of GenericModels, plotting info, and results.
beta_t (float) – Target reliability index.
ranges (Dict) –
- A dictionary of range information with the following keys:
xl, xu, ytext, text, alpha
defining the lower and upper aq values, the position of the text, the text, and the alpha of the range colouring.
figsize (Tuple(float), optional) – The figure size in inches. The default is (12, 9).
- Returns:
fig (Matplotlib Figure object) – The figure.
ax (Matplotlib Axes object) – The axes.
- plot(beta_t=4.7, ranges=None, **kwargs)[source]#
Plot the region for each probability model with their descriptions.
- Parameters:
beta_t (float) – Target reliability index.
ranges (Dict) –
- A dictionary of range information with the following keys:
xl, xu, ytext, text, alpha
defining the lower and upper aq values, the position of the text, the text, and the alpha of the range colouring.
- Raises:
ValueError – If there are no analysis results.
- Returns:
fig,ax – The figure and axes.
- Return type:
Tuple(Matplotlib Figure, Matplotlib Axes)