This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Hoek-Brown parameters in literature by Berk Demir | |
This is a simple dictionary called "RockDict" for different rock types and their mi and MR values. Deviations (± from the average) are also stored as miSTD and MRSTD. | |
Keys: Rock Types. | |
Sub-dictionary keys: | |
* "MR": Modulus Ratio - int | |
* "MRSTD": Deviation of Modulus Ratio - int | |
* "Type": Rock type - str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def group_forces(plate_list, plate_names, phase_list): | |
""" | |
Plaxis group forces fetcher by Berk Demir / https://github.com/berkdemir | |
Returns (M, N) as a tuple from Plaxis. If no group is defined in the model, it will return None. | |
""" | |
select_group_obj = [] | |
for i, j in enumerate(group_names): | |
# In my original code, I offer user the list of group_names and user select the groups. Returned selected_group_names is used to enumerate here. This is why code is structured the way it is. | |
select_group_obj.append( | |
group_list[group_names.index(j)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plate_forces(plate_list, plate_names, phase_list): | |
""" | |
Plaxis plate forces fetcher by Berk Demir / https://github.com/berkdemir | |
Returns (M, N) as a tuple from Plaxis. | |
""" | |
select_plate_obj = [] | |
for _, j in enumerate(plate_names): | |
# In my original code, I offer user the list of plate_names and user select the plates. Returned selected_plate_names is used to enumerate here. This is why code is structured the way it is. | |
select_plate_obj.append( | |
plate_list[plate_names.index(j)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def EFS(Ground_Type, PGV, PGV_Red, VS, PI=20, OCR=1, Eff_Pressure=300): | |
""" | |
Effective Shear Wave Velocity Using Darendeli (2001) and Schnabel (1973) by Berk Demir / https://github.com/berkdemir | |
Inputs: | |
Ground_Type: Either "Soil" or "Rock" | |
PGV: Peak Ground Velocity (cm/sec) | |
PGV_Red: PGV reduction ratio with depth | |
VS: Maximum shear wave velocity (m/s) | |
PI: Plasticity index in percent. (For Soil only.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from plxscripting.easy import * | |
localhostport_i = 10000 | |
password = "123456" | |
s_i, g_i = new_server("localhost", localhostport_i, password=password) | |
line_list = [g_i.Line_142_Line_153_1, g_i.Line_142_Line_152_1, g_i.Line_151_1] | |
# line_list is the list of lines that are to be activated. | |
# Activate only after the first 4 phases. (Including Initial Phase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Data from Tatone, B. S., Abdelaziz, A., & Grasselli, G. (2022). Novel Mechanical Classification Method of Rock Based on the Uniaxial Compressive Strength and Brazilian Disc Strength. Rock Mechanics and Rock Engineering, 1-5. | |
import pandas as pd | |
import seaborn as sns | |
# Rock Category | |
rock_type = {"Sedimentary": ["SL", "SSh", "SS", "SC"], | |
"Metamorphic": ["MG", "MS", "MQ", "MM"], | |
"Igneous": ["IG", "IF", "ID"]} | |
ordered_box_list = [] |