HH_Param#

class PySeismoSoil.class_parameters.HH_Param(param_dict: dict[str, float])[source]#

Bases: Parameter

Class implementation of the HH model parameters. After initialization, you can access/modify individual parameter values just like a dictionary.

Parameters:

param_dict (dict[str, float]) –

Values of the HH model parameters. Acceptable key names are:

gamma_t, a, gamma_ref, beta, s, Gmax, mu, Tmax, d

data#

HH model parameters with the keys listed above.

Type:

dict[str, float]

allowable_keys#

Valid parameter names of the HH model.

Type:

set[str]

Methods Summary

clear()

copy()

fromkeys(iterable[, value])

get(k[,d])

get_GGmax([strain_in_pct])

Get the G/Gmax array inferred from the set of parameters

get_damping([strain_in_pct])

Get the damping array inferred from the set of parameters

get_stress([strain_in_pct])

Get the shear stress array inferred from the set of parameters

items()

keys()

plot_curves([figsize, dpi])

Plot G/Gmax and damping curves from the model parameters

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

serialize()

Return an array of parameter values in the order of: {'gamma_t', 'a', 'gamma_ref', 'beta', 's', 'Gmax', 'mu', 'Tmax', 'd'}

setdefault(k[,d])

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()

Methods Documentation

clear() None.  Remove all items from D.#
copy()#
classmethod fromkeys(iterable, value=None)#
get(k[, d]) D[k] if k in D, else d.  d defaults to None.#
get_GGmax(strain_in_pct: ndarray = array([0.01, 0.01151395, 0.01325711, 0.01526418, 0.01757511, 0.0202359, 0.02329952, 0.02682696, 0.03088844, 0.0355648, 0.04094915, 0.04714866, 0.05428675, 0.06250552, 0.07196857, 0.08286428, 0.09540955, 0.10985411, 0.12648552, 0.14563485, 0.16768329, 0.19306977, 0.22229965, 0.25595479, 0.29470517, 0.33932218, 0.39069399, 0.44984327, 0.51794747, 0.59636233, 0.68664885, 0.79060432, 0.91029818, 1.04811313, 1.20679264, 1.38949549, 1.59985872, 1.84206997, 2.12095089, 2.44205309, 2.8117687, 3.23745754, 3.72759372, 4.29193426, 4.94171336, 5.68986603, 6.55128557, 7.54312006, 8.68511374, 10.])) ndarray#

Get the G/Gmax array inferred from the set of parameters

Parameters:

strain_in_pct (np.ndarray) – Strain array. Must be a 1D numpy array. Unit: %

Returns:

result – The G/Gmax array, with the same shape as the strain array.

Return type:

np.ndarray

get_damping(strain_in_pct: ndarray = array([0.01, 0.01151395, 0.01325711, 0.01526418, 0.01757511, 0.0202359, 0.02329952, 0.02682696, 0.03088844, 0.0355648, 0.04094915, 0.04714866, 0.05428675, 0.06250552, 0.07196857, 0.08286428, 0.09540955, 0.10985411, 0.12648552, 0.14563485, 0.16768329, 0.19306977, 0.22229965, 0.25595479, 0.29470517, 0.33932218, 0.39069399, 0.44984327, 0.51794747, 0.59636233, 0.68664885, 0.79060432, 0.91029818, 1.04811313, 1.20679264, 1.38949549, 1.59985872, 1.84206997, 2.12095089, 2.44205309, 2.8117687, 3.23745754, 3.72759372, 4.29193426, 4.94171336, 5.68986603, 6.55128557, 7.54312006, 8.68511374, 10.])) ndarray#

Get the damping array inferred from the set of parameters

Parameters:

strain_in_pct (np.ndarray) – Strain array. Must be a 1D numpy array. Unit: %

Returns:

result – The damping array (unit: %), with the same shape as the strain array

Return type:

np.ndarray

get_stress(strain_in_pct: ndarray = array([0.01, 0.01151395, 0.01325711, 0.01526418, 0.01757511, 0.0202359, 0.02329952, 0.02682696, 0.03088844, 0.0355648, 0.04094915, 0.04714866, 0.05428675, 0.06250552, 0.07196857, 0.08286428, 0.09540955, 0.10985411, 0.12648552, 0.14563485, 0.16768329, 0.19306977, 0.22229965, 0.25595479, 0.29470517, 0.33932218, 0.39069399, 0.44984327, 0.51794747, 0.59636233, 0.68664885, 0.79060432, 0.91029818, 1.04811313, 1.20679264, 1.38949549, 1.59985872, 1.84206997, 2.12095089, 2.44205309, 2.8117687, 3.23745754, 3.72759372, 4.29193426, 4.94171336, 5.68986603, 6.55128557, 7.54312006, 8.68511374, 10.])) numpy.ndarray | None#

Get the shear stress array inferred from the set of parameters

Parameters:

strain_in_pct (np.ndarray) – Strain array. Must be a 1D numpy array. Unit: %

Returns:

result – The shear stress array, with the same shape as the strain array. Its unit is identical to the unit of Gmax (one of the HH parameters).

Return type:

np.ndarray | None

items() a set-like object providing a view on D's items#
keys() a set-like object providing a view on D's keys#
plot_curves(figsize: tuple[float, float] = None, dpi: float = 100, **kwargs_to_matplotlib: dict[Any, Any]) tuple[matplotlib.figure.Figure, list[matplotlib.axes._axes.Axes]]#

Plot G/Gmax and damping curves from the model parameters

Parameters:
  • figsize (tuple[float, float]) – Figure size in inches, as a tuple of two numbers. If None, use (3, 6).

  • dpi (float) – Figure resolution. If None, use 100.

  • **kwargs_to_matplotlib (dict[Any, Any]) – Keyword arguments to be passed to matplotlib.pyplot.plot().

Returns:

  • fig (Figure) – The figure object.

  • ax (list[Axes]) – A list of two axes objects.

pop(k[, d]) v, remove specified key and return the corresponding value.#

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() (k, v), remove and return some (key, value) pair#

as a 2-tuple; but raise KeyError if D is empty.

serialize() ndarray[source]#

Return an array of parameter values in the order of: {‘gamma_t’, ‘a’, ‘gamma_ref’, ‘beta’, ‘s’, ‘Gmax’, ‘mu’, ‘Tmax’, ‘d’}

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D#
update([E, ]**F) None.  Update D from mapping/iterable E and F.#

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() an object providing a view on D's values#