Multiple_GGmax_Damping_Curves#

class PySeismoSoil.class_curves.Multiple_GGmax_Damping_Curves(*, mgc_and_mdc: tuple[PySeismoSoil.class_curves.Multiple_GGmax_Curves, PySeismoSoil.class_curves.Multiple_Damping_Curves] | None = None, data: numpy.ndarray | str | None = None)[source]#

Bases: object

A “parent” class that holds both G/Gmax curves and damping curves information. The user can EITHER initialize this class by providing instances of Multiple_GGmax_Curves and Multiple_Damping_Curves classes, OR by providing a numpy array containing the curves. (The user can provide one and only one input parameter, and leave the other parameter to None.)

Parameters:
  • mgc_and_mdc (tuple[Multiple_GGmax_Curves, Multiple_Damping_Curves] | None) – A tuple of two elements, which are the G/Gmax curve information and the damping curve information, respectively. The two objects needs to have the same n_layer attribute.

  • data (np.ndarray | str | None) –

    A 2D numpy array of the following format:

    strain [%]

    G/Gmax

    strain [%]

    damping [%]

    strain [%]

    G/Gmax

    Or a full name of a text file containing the 2D array.

mgc#

Object containing information of G/Gmax curves. It will be None if mgc_and_mdc is not provided.

Type:

Multiple_GGmax_Curves

mdc#

Object containing information of damping curves. It will be None if mgc_and_mdc is not provided.

Type:

Multiple_Damping_Curves

data#

2D numpy array containing the curve information in the format shown above. It will be None if the data is not provided.

Type:

np.ndarray

n_layer#

Number of soil layers.

Type:

int

Raises:
  • TypeError – When the type of mgc_and_mdc is wrong

  • ValueError – When both input arguments are None, or neither of them are None

Methods Summary

get_MGC_MDC_objects()

Get Multiple_GGmax_Curves and Multiple_Damping_Curves objects.

get_curve_matrix()

Get a "curve matrix" containing both G/Gmax and damping information.

plot()

Plot the G/Gmax and damping curves.

Methods Documentation

get_MGC_MDC_objects() tuple[PySeismoSoil.class_curves.Multiple_GGmax_Curves, PySeismoSoil.class_curves.Multiple_Damping_Curves][source]#

Get Multiple_GGmax_Curves and Multiple_Damping_Curves objects.

Returns:

  • mgc (Multiple_GGmax_Curves) – Object containing information of G/Gmax curves.

  • mdc (Multiple_Damping_Curves) – Object containing information of damping curves.

get_curve_matrix() ndarray[source]#

Get a “curve matrix” containing both G/Gmax and damping information.

Returns:

curve_matrix

A 2D numpy array with the following format::

strain [%]

G/Gmax

strain [%]

damping [%]

strain [%]

G/Gmax

Return type:

np.ndarray

plot() None[source]#

Plot the G/Gmax and damping curves.