Linear_Simulation#

class PySeismoSoil.class_simulation.Linear_Simulation(soil_profile: Vs_Profile, input_motion: Ground_Motion, *, boundary: Literal['elastic', 'rigid'] = 'elastic', G_param: PySeismoSoil.class_parameters.HH_Param_Multi_Layer | PySeismoSoil.class_parameters.MKZ_Param_Multi_Layer | None = None, xi_param: PySeismoSoil.class_parameters.HH_Param_Multi_Layer | PySeismoSoil.class_parameters.MKZ_Param_Multi_Layer | None = None, GGmax_and_damping_curves: PySeismoSoil.class_curves.Multiple_GGmax_Damping_Curves | None = None)[source]#

Bases: Simulation

Linear site response simulation.

Parameters:
  • soil_profile (Vs_Profile) – Soil profile.

  • input_motion (Ground_Motion) – Input ground motion. It should be the “rock outrcop” 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) if boundary is set to "rigid".

  • 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

Methods Summary

run([every_layer, deconv, show_fig, ...])

Run linear simulation.

Methods Documentation

run(every_layer: bool = True, deconv: bool = False, show_fig: bool = False, save_fig: bool = False, motion_name: str | None = None, save_txt: bool = False, save_full_time_history: bool = False, output_dir: str = None, verbose: bool = True) Simulation_Results[source]#

Run linear simulation.

Parameters:
  • every_layer (bool) – If True, use the algorithm that can produce ground motion time histories of every soil layer. If False, use a simpler and faster algorithm to produce the motion on the ground surface only.

  • deconv (bool) – Whether this operation is deconvolution. If True, it means that the input_motion will be propagated downwards, and the motion at the bottom will be collected. Only effective if every_layer is set to False.

  • show_fig (bool) – Whether to show figures of the simulation results.

  • save_fig (bool) – Whether to save figures to output_dir. Only effective when show_fig is set to True.

  • 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 results as text files to output_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. Only effective if every_layer is True.

  • output_dir (str) – Directory for saving the figures and/or result files.

  • verbose (bool) – Whether to show simulation progress.

Returns:

sim_results – An object that contains all the simulation results.

Return type:

Simulation_Results