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:
SimulationNonlinear 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
boundaryis set to"elastic", and it should be the recorded motion at the bottom of the Vs profile (i.e., the “borehole” motion) ifboundaryis 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.
- soil_profile#
Same as the input parameter
soil_profile.- Type:
- input_motion#
Same as the input parameter
input_motion.- Type:
- G_param#
Same as the input parameter
G_param.- Type:
- xi_param#
Same as the input parameter
xi_param.- Type:
- boundary#
Same as the input parameter
boundary.- Type:
Literal[‘elastic’, ‘rigid’]
- Raises:
TypeError – When
G_paramorxi_paramisNone
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_figis set toTrue.remove_sim_dir (bool) – Whether to remove
sim_dirfrom the hard drive after simulations, only effective whensave_txtandsave_figare 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