<jupyter_start><jupyter_text>This notebook demonstrates the pipeline for using the equivalent linear method to perform site response analysis.<jupyter_code>from PySeismoSoil.class_Vs_profile import Vs_Profile
from PySeismoSoil.class_ground_motion import Ground_Motion
from PySeismoSoil.class_curves import Multiple_GGmax_Curves, Multiple_Damping_Curves, Multiple_GGmax_Damping_Curves
from PySeismoSoil.class_hh_calibration import HH_Calibration
from PySeismoSoil.class_damping_calibration import Damping_Calibration
from PySeismoSoil.class_simulation import Equiv_Linear_Simulation<jupyter_output><empty_output><jupyter_text>To perform an equivalent linear analysis, we need the following information:- Input acceleration- $V_S$ profile- $G/G_{\max}$ and damping curves (of every soil layer)<jupyter_code>input_accel = Ground_Motion('../PySeismoSoil/tests/files/sample_accel.txt', unit='cm/s/s')
vs_profile = Vs_Profile('../PySeismoSoil/tests/files/profile_FKSH14.txt')<jupyter_output><empty_output><jupyter_text>(`Vs_Profile` class: [documentation](https://pyseismosoil.readthedocs.io/en/stable/api_docs/class_Vs_profile.html) and [examples](./Demo_02_Vs_Profile.ipynb). `Ground_Motion` class: [documentations](https://pyseismosoil.readthedocs.io/en/stable/api_docs/class_ground_motion.html) and [examples](./Demo_01_Ground_Motion.ipynb).)<jupyter_code>vs_profile.summary()
input_accel.plot();<jupyter_output><empty_output><jupyter_text>The users often only know the $V_S$ profile and the input motion. In this case, we can empirically estimate $G/G_{\max}$ and damping curves from the $V_S$ profile: Estimate $G/G_{\max}$ curves from the $V_S$ profile, using the "HH calibration" procedure proposed by [<NAME> (2017)](http://resolver.caltech.edu/CaltechAUTHORS:20170404-150827374) via the [`HH_Calibration` class](./Pipeline_02_HH_Calibration.ipynb):<jupyter_code>hh_c = HH_Calibration(vs_profile)
hh_g_param = hh_c.fit()
ggmax_curves, _ = hh_g_param.construct_curves()<jupyter_output>========== Start optimizing for HH_G parameters ===========
------ G/Gmax not provided; will generate MKZ curves using Darendeli (2001): ------
-----------  FKZ optimization  -----------------------------
1/5: mu = 0.220, a = 100.0, gamma_t = 0.052%, d = 0.902
2/5: mu = 0.206, a = 100.0, gamma_t = 0.023%, d = 0.844
3/5: mu = 0.265, a = 100.0, gamma_t = 0.044%, d = 0.865
4/5: mu = 1.000, a = 100.0, gamma_t = 0.011%, d = 0.981
5/5: mu = 1.000, a = 100.0, gamma_t = 0.010%, d = 0.981<jupyter_text>Estimate damping curves using empirical formulas proposed by [Darendeli (2001)](https://repositories.lib.utexas.edu/handle/2152/10396) via the [`Damping_Calibration` class](https://pyseismosoil.readthedocs.io/en/stable/api_docs/class_damping_calibration.html):<jupyter_code>d_c = Damping_Calibration(vs_profile)
damping_curves = d_c.get_damping_curves(show_fig=True)<jupyter_output><empty_output><jupyter_text>Merge `ggmax_curves` and `damping_curves` into one meta object:<jupyter_code>ggmax_and_damping_curves = Multiple_GGmax_Damping_Curves(mgc_and_mdc=(ggmax_curves, damping_curves))<jupyter_output><empty_output><jupyter_text>Initialize an `Equiv_Linear_Simulation` object, and run a simulation:<jupyter_code>eql_sim = Equiv_Linear_Simulation(vs_profile, input_accel, ggmax_and_damping_curves, boundary='elastic')
sim_results = eql_sim.run(verbose=True, show_fig=True)<jupyter_output>Iteration No.1.  G_diff =  166.19%, D_diff =   83.58%
Iteration No.2.  G_diff =   20.88%, D_diff =   26.54%
Iteration No.3.  G_diff =    9.78%, D_diff =    8.68%
Iteration No.4.  G_diff =    4.61%, D_diff =    3.91%
---------- Convergence achieved ---------------
{'fraction_non_alphanumeric': 0.14022546054440474, 'fraction_numerical': 0.046466868298047845, 'mean_word_length': 5.8, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '303231', 'license': 'FSFAP', 'n_tokens_mistral': 1480, 'n_tokens_neox': 1310, 'n_words': 254, 'path': 'examples/Pipeline_04_Equivalent_Linear_Method.ipynb', 'repo_name': 'jsh9/PySeismoSoil', 'size': '3646'}