Package: liquepy
LiquepyPython tools for solving problems related to soil liquefactionFeaturesTriggering:Calculate liquefaction factor of safety according to Boulanger and Idriss (2014)Calculate expected lateral strain and volumetric strain according to Zhang et al (2002)Settlement:Calculate foundation settlement on liquefiable deposit according to Karamitros et al. (2013) or Bray et al. (2018)Element tests:Calculate the dissipated energy required to liquefySite response analysisPerform equivalent linear site response analysis using thepysrapackageInstallationpipinstallliquepyOptional modules (sra,fig,spatial) require large third-party dependencies and therefore do
not import unless dependencies are satisfied.to install all dependencies for these optional modules run (example for installingsradependencies)pipinstallliquepy[sra]ContributorsHow do I get set up?Runpip install-rrequirements.txtCode suggestionsImplementations of published liquefaction methods should be written ascalc_<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.FormattingFollowpep8 formatting standard(except for line character limit not strictly observed)Docstrings written innumpy formatTabulated data stored as comma separated or semi-colon separated files (not xlsx or xls)TestingTests are run with pytestLocally run:pyteston the command line.Tests are run on every push using travis, see the.travis.ymlfileTo test the docs:Install the check docs package: Runpip install collective.checkdocsRun the check docs package and fix the errors: Runpython setup.py checkdocsDeploymentTo deploy the package to pypi.com you need to:Push to thepypibranch. This executes the tests on circleci.comCreate a git tag and push to github, run:trigger_deploy.pyor manually:gittag0.5.2-m"version 0.5.2"gitpush--tagsoriginpypiHistoryPre-release0.6.23 (2021-06-23)Fixed issue with conversion of NZGD file usingconvert_raw02_xlsx_or_raw_03_xlsfunctionAdded support for the PM4Silt constitutive modelAdded missinge_minande_maxparameters to optional parameters for PM4Sand model0.6.22 (2021-04-19)Soils now define water mass densitywmdandliq_sginstead ofliq_mass_densityto allow for not water liquids.Can set min shear wave velocity in sra usingvs_min.Default k0 conditions now calculated using poisson ratio rather than friction angle.Added the ELSA (Equivalent Linear Stockwell Analysis) method for performing site response analysis using time dependent transfer functions.0.6.18 (2020-12-08)Can get set liquefaction criteria for element test using double or single  amplitude strainCan deal with loading a cpt file when the gwl level is not setAdded the ManzariDafaliasModel soil modelbig_fadded as a parameter in Boulanger and Idriss CPT analysisfixed function to allow crr_n15 to be computed from q_c1ncs according to BI20140.6.15 (2020-07-22)Added back-calc of n1_60 from crr_m7p5 using bi2014calc_n1_60cs_from_crr_m7p5Addedsra.PysraAnalysisandsra.run_pysraas ways to run an equivalent linear
analysis using the PySRA packageCan set point of liquefaction in element test using single aplitude and double amplitude strain criteria0.6.14 (2020-04-29)Added theory one and two layer transfer functionsMinor change to LSN calculation to not use the average depth between pointsAddedrun_pysrato run a site response analysis and obtain ACCX, TAU, and STRSUpdated logic for handling FLAC fis file inputs0.6.13 (2020-02-24)Fixed issue with creating ESP when cpt depths are irregular0.6.12 (2020-02-21)Fixed issue with fitting 3- and 5-layer ESPs now uses median to find value of least deviations0.6.11 (2020-02-10)Added MRD curves for clayFixed issue with fitting 5-layer equivalent soil profile (ESP)0.6.10 (2020-01-31)Added .p_atm to Boulanger and Idriss (2014) methodImproved plotting colors for i_cChanged liquefaction factor of safety for high plasticity soil to be 2.25Added method for detecting cyclic peaks using peak energyremoved examples folder from pip install of packageAdded more FLAC based functionsSignificant increase in package loading speedingAdded Equivalent Soil Profile method from Millen et al. (2020)0.6.9 (2019-12-6)Added nzgd CPT file converterCorrected error inest_shear_vel_hegazy_and_mayne_2006Change modules (sra,fig,spatial) to be optional due to heavy dependencies. Only imported at base level if all
dependencies are satisfied.0.6.7 (2019-11-12)Updated docsUpdated names for PM4Sand FLACRefactored numerical models to be in generic num.models.py file and the inherited in application specific files
(flac, o3), where app specific details are added.Added permeability estimateest_permeability_robertson_and_cabal_2012Added more tests to increase coverageCan change empirical fitting parameter ‘c0’ in calculation of CRR_m7.5 from BI2016Added more logic for FLACSoil model to output to fis fileFixed issue where could not calculate transfer function in site response analysisdetermine_t_liq_indexnow uses ru greater than or equal to limit, rather than just greater than0.6.3 (2019-10-31)Added missingimport eqsigat top of lq.element.assess.py file - used incalc_stored_energy_abs_incs_fd_peaks_and_indicesfunctionFinalised NSES example0.6.2 (2019-10-30)Fixed issue with Soil stack not working for overriding soil propertiesAdded h_po to PM4Sand objAdded estimation of cumulative absolute (change in) strain energy (CASE) in 1D soil profile using the nodal surface
energy spectrum (NSES) from Millen et al. (2019) as a functionlq.trigger.nses.est_case_1d_millen_et_al_2019()Added example of estimation of CASE compared to linear analysis using pysra packageAdded calculation of cumulative absolute (change in) strain energy (CASE) of element test from Millen et al. (2019)
as functioncalc_case_peaks_and_indices_fd0.6.1 (2019-10-7)Incremented numerical model inputs to make use of latest sfsimodels version0.6.0 (2019-08-23)If CPT file contains key word ‘Pre-Drill:’ then CPT loads with pre-drilled depth removedCan set depth limit to LDI calculationCan set relative density limits to zhang_2002 relative density calculationFixed issue with I_c color map for plottingSwitched[Not backward compatible] Switched Zhang et al shear and volumetric strain calculations to proper naming convention
and changed to return strain as decimal, removed old functions0.5.7 (2019-07-05)Build without history in setup.py file0.5.6 (2019-07-05)Added geographiclib to install reqs.0.5.5 (2019-07-05)Added support for setting weight of the pre-drilled depth for B&I2014Added support for calculating Liquefaction Potential Index (LPI) and Lateral Displacement Index (LDI)Fixed bug where calculation of shear strain from Zhang et al. (2004) used wrong value for interpolating between
different Dr lines, such that upper or lower limit were taken not interpolated value (resulted in slight change of
values for Bray foundation settlement method)Added new default cpt loaderload_mpa_cpt_file, where all values are in MPa and metres and delimeter is ‘,’Fixed bug wherebig_Qin B&I2014 triggering method was calculated with themfrom Eq. 2.15b,
now calculated using thenfrom Robertson and Wride (1997)0.5.4 (2019-05-28)Added support for computing liquefaction triggering using BI2014 for a sfsimodels.SoilProfile objectFixed issue in sra module where depth increment was larger than layer, then failedFixed bug where ‘void_ratio’ method for unit weight in BI2014 triggering added dry weight twiceAdded support for loading cpt files that do not have the u2 columnUpdated factor of safety colors for plotting, added color map and colors accessible as static valuesAdded npts to bi2014 objectAdded colors and color map for I_c soil valuesMinor speed improvements to the B&I2014 triggering method0.5.3 (2019-04-08)Set base layer of eqlin site response to be elasticRefactored crr_m7p5 function from bi2014 methodSwitched sra commands to use latests sfsimodels package0.5.1 (2019-03-29)Added more correlationsChanged all calculation functions to start with the prefix ‘calc’Can set cut_time for obtaining strain compatible site response profile0.5.0 (2019-03-14)Changed order of inputs in ElementTest object!Changed ElementTest attributes (gamma -> strain, tau -> stress)0.4.12 (2019-03-14)Added calculation of dissipated energy and cumulative absolute change in shear stress of element tests0.4.11 (2019-03-14)Added plotting functions for CPTCleaned up names of input motion saving functions, and order of args0.4.8 - 0.4.10 (2019-03-08)Updated docstrings, readme fileFixed number of columns to load on CPT to be 0-30.4.7 (2019-02-28)run_bi2014fixed bug where water unit weight was 10 times too big0.4.5 (2019-02-27)BoulangerIdriss2014unit weight calculation now uses the specific weight of water a gravity=9.8BoulangerIdriss2014gwl now is the ground water level during the earthquake, while cpt_gwl is the gwl at cpt measureAddedBoulangerIdriss2014CPTwhich performsBoulangerIdriss2014but takes CPT as an input0.4.4 (2019-02-27)Changes toBoulangerIdriss2014:Addedbig_qas a propertyModified unit weight calculation (minimum changed from 15kN/m3 to 14.715kN/m3 (lowest value in original study
by Roberston (2010)), Added maximum unit weight 19.62kN/m3 (maximum value in study),Changed atmospheric pressure from 100kPa to 101kPa (also added as an optional input)Inputmagnitude->m_wAdded support for calculation of unit weight using specific weightOptional inputs_gto override specific weight of 2.65Optional inputs_g_waterto override specific weight of water