wntr.scenario.earthquake module

The wntr.scenario.earthquake module includes methods to define an earthquake location, magnitude and depth, and compute PGA, PGV, and repair rate.

class wntr.scenario.earthquake.Earthquake(epicenter, magnitude, depth)[source]

Bases: object

Earthquake scenario class.

epicenter

Earthquake epicenter, (x,y) tuple in meters

magnitude

Earthquake magnitude, Richter scale

depth

Earthquake depth, m

distance_to_epicenter(wn, element_type=<class 'wntr.network.base.Node'>)[source]

Distance to the epicenter

Parameters
  • wn (WaterNetworkModel) –

  • element_type (optional (default = wntr.network.Node)) –

Returns

A pandas Series with distance to epicenter (m)

pga_attenuation_model(R, method=None)[source]

Peak ground acceleration attenuation models

Parameters
  • R (pd.Series) – Distance to epicenter (m)

  • method (int (optional, default = None, average)) – 1 = Kawashima et al. (1984) 2 = Baag et al. (1998) 3 = Lee and Cho (2002)

Returns

A pandas Series with peak ground acceleration (g)

pgv_attenuation_model(R, method=None)[source]

Peak ground velocity attenuation models

Parameters
  • R (pd.Series) – Distance to epicenter (m)

  • method (int (optional, default = None, average)) – 1 = Yu and Jin (2008) - Rock 2 = Yu and Jin (2008) - Soil

Returns

A pandas Series with peak ground velocity (m/s)

correction_factor(pipe_characteristics, diameter_weight=None, material_weight=None, topography_weight=None, liquifaction_weight=None)[source]

Correction factor, maps pipe characteristics to weights

Parameters
  • pipe_characteristics (pd.DataFrame) – Pipe characteristics which includes diameter, material, topography, and liquifaction

  • diameter_weight (dict) – Weights, defaults based on Isoyama et al., 2000

  • material_weight (dict) – Weights, defaults based on Isoyama et al., 2000

  • topography_weight (dict) – Weights, defaults based on Isoyama et al., 2000

  • liquifaction_weight (dict) – Weights, defaults based on Isoyama et al., 2000

Returns

A pandas Series with the correction factor

repair_rate_model(PGV, C=1, method=1)[source]

Calculate repair rate

Parameters
  • PGV (pd.Series) – Peak ground velocity (m/s)

  • K (pd.Series) – Correction factor

  • method (int (default = 1)) – 1 = Linear 2 = Power

Returns

A pandas Series with repair rate (number of repairs per m)

DTGR(M, M_min, M_max, b)[source]

Returns the the Doubly Truncated Gutenberg Richter cumulative probability for the specified magnitude, magnitude range, and coefficient.

DTGR_inv(P, M_min, M_max, b)[source]

Returns the inverse of the Doubly Truncated Gutenberg Richter distribution for the specified probability, magnitude range, and coefficient.