Skip to content

Commit

Permalink
0.5.1 (2018-03-29)
Browse files Browse the repository at this point in the history
-------------------

* Added more correlations
* Changed all calculation functions to start with the prefix 'calc'
  • Loading branch information
millen1m committed Mar 29, 2019
1 parent a2d41ca commit 6034196
Show file tree
Hide file tree
Showing 14 changed files with 275 additions and 116 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
History
=======

0.5.1 (2018-03-29)
-------------------

* Added more correlations
* Changed all calculation functions to start with the prefix 'calc'
* Can set cut_time for obtaining strain compatible site response profile

0.5.0 (2018-03-14)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ How do I get set up?
Code suggestions
----------------

* Implementations of published liquefaction methods should be written as `calc_<first_author>[_et_al]_<date>()`
* Implementations of published liquefaction methods should be written as `calc_<property>_<first_author>[_et_al]_<date>()` for two authors include both.

* Plotting and visualisation should be not included in computation objects. Instead plotting functions or objects should receive computation objects as inputs.

Expand Down
24 changes: 24 additions & 0 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,27 @@ @article{McGann:2015fd
doi = {10.1016/j.soildyn.2015.03.023},
}

@article{Boulanger:2017pm4_v3p1,
author = {Boulanger, Ross W and Ziotopoulou, Katerina},
title = {{PM4SAND (VERSION 3.1): A Sand Plasticity Model for Earthquake Engineering Applications}},
year = {2017},
pages = {1--113},
}

@article{Idriss:2008ua,
author = {Idriss, I M and Boulanger, Ross W},
title = {{Soil Liquefaction during Earthquakes}},
year = {2008},
pages = {1--264},
}

@article{Karamitros:2013gi,
author = {Karamitros, Dimitrios K and Bouckovalas, George D and Chaloulos, Y K},
title = {{Seismic settlements of shallow foundations on liquefiable soil with a clay crust}},
year = {2013},
volume = {46},
number = {C},
pages = {64--76},
doi = {10.1016/j.soildyn.2012.11.012},
}

2 changes: 1 addition & 1 deletion liquepy/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
__project__ = "liquepy"
__author__ = "Maxim Millen and Julieth Quintero"
__license__ = "MIT"
72 changes: 71 additions & 1 deletion liquepy/field/correlations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np


def calc_vs_profile_mcgann_2015(cpt):
def calc_shear_vel_mcgann_2015_cpt(cpt):
"""
Computes the shear wave velocity profile according to :cite:`McGann:2015fd`
Expand All @@ -15,3 +16,72 @@ def calc_vs_profile_mcgann_2015(cpt):
"""
return 18.4 * cpt.q_c ** 0.144 * cpt.f_s ** 0.0832 * cpt.depth ** 0.278


def calc_shear_vel_andrus_and_stokoe_2000_spt_values(n_1_60):
"""
Eq 98 in Pm4Sand v3.1 manual
:param n_1_60:
:return: float or array_like
"""
return 85.8 * (n_1_60 + 2.5) ** 0.25


def calc_relative_density_idriss_and_boulanger_2008_spt_values(n_1_60, c_d=46):
"""
Calculate the relative density from SPT normalised blow count (Eq. 35 :cite:`Idriss:2008ua`)
Parameters
----------
n_1_60: array_like
Corrected normalised SPT values
c_d: float
Correlation factor, default=46 (from :cite:`Idriss:2008ua`)
other proposals:
* Meyerhof (1957): 41
* Skempton (1986): 55 fine and 65 coarse natural norm-consolidated sand, 35 lab, 40 recent fills
* Cubrinovski and Ishihara (1999): 51 clean sand, 26 silty sand, 39 all samples
Returns
-------
array_like
"""
return np.sqrt(n_1_60 / c_d)


def calc_relative_density_salgado_et_al_1997_cpt_values(q_c1n, c_dq=0.9):
"""
Eq. 95 in PM4Sand v3.1 manual
Parameters
----------
q_c1n: array_like
Normalised cone penetration resistance
c_dq: float, default=0.9 (from :cite:`Idriss:2008ua`)
Correlation factor, (range 0.64-155 from Salgado (1997)
Returns
-------
array_like
"""
return 0.465 * np.sqrt(q_c1n / c_dq) - 1.063


def calc_g0_mod_boulanger_and_ziotopoulou_2015_spt_values(n_1_60):
"""
Calculate the normalised shear modulus :cite:`Boulanger:2017pm4_v3p1`
Parameters
----------
n_1_60: array_like
Corrected normalised SPT values
Returns
-------
array_like
"""
return 167. * np.sqrt(n_1_60 + 2.5)



60 changes: 49 additions & 11 deletions liquepy/settlement/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,65 @@ def cal_z_c(fd, z_liq, h0):
def karamitros_settlement(fd, z_liq, q, q_ult, acc, dt):
"""
Calculate the settlement using the method proposed by Karamitros et al. 2013 - sett
:param sss:
:return:
"""
sett_dyn_ts = karamitros_settlement_time_series(fd, z_liq, q, q_ult, acc, dt)

return sett_dyn_ts[-1]


def karamitros_settlement_time_series(fd, z_liq, q, q_ult, acc, dt): # units: m, Pa, s
def karamitros_settlement_time_series(fd, z_liq, q, q_ult, acc, dt, c_dash=0.003): # units: m, Pa, s
"""
Calculate the settlement using the method proposed by Karamitros et al. 2013 - sett
:param sss:
:return:
Calculate the settlement using the method proposed by :cite:`Karamitros:2013gi`
Parameters
----------
fd: sfsimodels.Foundation
z_liq
q
q_ult
acc
dt
c_dash
Returns
-------
"""
c_dash = 0.003 # Karamitros 2013 sett
asig = eqsig.AccSignal(acc, dt)
fd_q_ult = q_ult
fd_q_demand = q
return calc_settlement_karamitros_et_al_2013(fd, asig, fd_q_ult, fd_q_demand, z_liq, c_dash=c_dash)


def calc_settlement_karamitros_et_al_2013(fd, asig, fd_q_ult, fd_q_demand, y_liq, c_dash=0.003):
"""
Calculate the settlement using the method proposed by :cite:`Karamitros:2013gi`
Parameters
----------
fd: sfsimodels.Foundation
asig: eqsig.AccSignal
fd_q_ult: float or array_like
Bearing capacity of foundation
fd_q_demand: float or array_like
Bearing load on foundation
y_liq: float
Depth to liquefaction
c_dash: float (default 0.003)
Returns
-------
array_like
"""

c_factor = min(c_dash * (1.0 + 1.65 * fd.length / fd.width), 11.65 * c_dash) # Karamitros 2013 sett
int_vel = eqsig.im.calc_integral_of_abs_velocity(acc, dt)

int_vel = eqsig.im.calc_integral_of_abs_velocity(asig)
amax_t2_n = (np.pi ** 2) * int_vel
fs_deg = q_ult / q
sett_dyn_ts = c_factor * amax_t2_n * (z_liq / fd.width) ** 1.5 * (1.0 / fs_deg) ** 3
fs_deg = fd_q_ult / fd_q_demand
sett_dyn_ts = c_factor * amax_t2_n * (y_liq / fd.width) ** 1.5 * (1.0 / fs_deg) ** 3
return sett_dyn_ts


Expand Down Expand Up @@ -150,7 +189,7 @@ def bray_and_macedo_settlement_time_series(soil_profile, fd, asig, liq_layers):

fs = calculate_factor_safety(q_c1ncs=q_c1ncs, p_a=101000, magnitude=asig.magnitude, pga=pga_max, depth=depth, soil_profile=soil_profile)
d_r = soil_profile.layer(2).relative_density
e_shear = lq.trigger.calculate_shear_strain(fs=fs, d_r=d_r)
e_shear = lq.trigger.calc_shear_strain(fs=fs, d_r=d_r)
if depth < fd.depth:
w = 0
else:
Expand Down Expand Up @@ -247,7 +286,6 @@ def lu_settlements(q, fd, Dr, acc):
else:
raise ValueError("q value ({0}) out of range (10-120)".format(q))


c_d = 1-(fd.depth/(4*fd.width))

sett_dyn_lu = c_d * (q / N_lr) * ((fd.width / (fd.width + 0.33)) ** 2)
Expand Down
3 changes: 3 additions & 0 deletions liquepy/sra/sra.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@


def compute_pysra_tf(pysra_profile, pysra_freqs=None):
return calc_pysra_tf(pysra_profile, pysra_freqs)


def calc_pysra_tf(pysra_profile, pysra_freqs=None):
if pysra_freqs is None:
pysra_freqs = np.logspace(-0.7, 1.5, num=200)
m = pysra.motion.Motion(freqs=pysra_freqs)
Expand Down
4 changes: 2 additions & 2 deletions liquepy/trigger/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from liquepy.trigger.boulanger_and_idriss_2014 import BoulangerIdriss2014, run_bi2014, BoulangerIdriss2014CPT
from liquepy.trigger.triggering_measures import calculate_lpi, calculate_lsn
from liquepy.trigger.volumetric_strain import calculate_volumetric_strain
from liquepy.trigger.shear_strain import calculate_shear_strain
from liquepy.trigger.volumetric_strain import calc_volumetric_strain, calculate_volumetric_strain
from liquepy.trigger.shear_strain import calc_shear_strain, calculate_shear_strain

0 comments on commit 6034196

Please sign in to comment.