Nonlinear_Simulation#
- class PySeismoSoil.class_simulation.Nonlinear_Simulation(soil_profile: Vs_Profile, input_motion: Ground_Motion, *, G_param: PySeismoSoil.class_parameters.HH_Param_Multi_Layer | PySeismoSoil.class_parameters.MKZ_Param_Multi_Layer | None, xi_param: PySeismoSoil.class_parameters.HH_Param_Multi_Layer | PySeismoSoil.class_parameters.MKZ_Param_Multi_Layer | None, boundary: Literal['elastic', 'rigid'] = 'elastic')[source]#
Bases:
Simulation
Nonlinear site response simulation.
- Parameters:
soil_profile (Vs_Profile) – Soil profile.
input_motion (Ground_Motion) – Input ground motion. It should be the “rock outcrop” motion if
boundary
is set to"elastic"
, and it should be the recorded motion at the bottom of the Vs profile (i.e., the “borehole” motion) ifboundary
is set to"rigid"
.G_param (HH_Param_Multi_Layer | MKZ_Param_Multi_Layer | None) – Parameters that describe the G/Gmax curves.
xi_param (HH_Param_Multi_Layer | MKZ_Param_Multi_Layer | None) – Parameters that describe the damping curves.
boundary (Literal['elastic', 'rigid']) – Boundary condition. “Elastic” means that the boundary allows waves to propagate through. “Rigid” means that all downgoing waves are reflected back to the soil medium.
- Attributes same as the inputs
- Raises:
TypeError – When
G_param
orxi_param
isNone
Methods Summary
run
([sim_dir, motion_name, save_txt, ...])Start nonlinear simulation.
Methods Documentation
- run(sim_dir: str | None = None, motion_name: str | None = None, save_txt: bool = False, save_full_time_history: bool = True, show_fig: bool = False, save_fig: bool = False, remove_sim_dir: bool = False, verbose: bool = True) Simulation_Results [source]#
Start nonlinear simulation.
- Parameters:
sim_dir (str | None) – Directory for storing temporary input files and storing permenant output files/figures.
motion_name (str | None) – Name of the input ground motion. For example, “Northridge”. If not provided (i.e.,
None
), the current time stamp will be used.save_txt (bool) – Whether to save the simulation results as text files to
sim_dir
.save_full_time_history (bool) – When saving simulation results, whether to save the full time histories (i.e., every time step, every depth) of the acceleration, velocity, displacement, stress, and strain.
show_fig (bool) – Whether to show figures of the simulation results (input and output motions, maximum accel/veloc/displ/strain/stress profiles)
save_fig (bool) – Whether to save figures to
sim_dir
. Only effective whenshow_fig
is set toTrue
.remove_sim_dir (bool) – Whether to remove
sim_dir
from the hard drive after simulations, only effective whensave_txt
andsave_fig
are both set toFalse
.verbose (bool) – Whether to show simulation progress on the console.
- Returns:
sim_results – An object that contains all the simulation results.
- Return type:
- Raises:
ValueError – When unknown operating system is encountered