weac.core.scenario module

This module defines the Scenario class, which encapsulates the physical setup of the model.

class weac.core.scenario.Scenario(scenario_config, segments, weak_layer, slab)[source]

Bases: object

Sets up the scenario on which the eigensystem is solved.

Parameters:
li

length of segment i [mm]

Type:

List[float]

ki

booleans indicating foundation support for segment i

Type:

List[bool]

mi

skier masses (kg) on boundary of segment i and i+1 [kg]

Type:

List[float]

system_type
Type:

SystemType

phi

Angle of slab in positive in counter-clockwise direction [deg]

Type:

float

L

Length of the model [mm]

Type:

float

crack_h

Height of the crack [mm]

Type:

float

li: ndarray
ki: ndarray
mi: ndarray
cum_sum_li: ndarray
qw: float
qn: float
qt: float
L: float
crack_h: float
__init__(scenario_config, segments, weak_layer, slab)[source]
Parameters:
scenario_config: ScenarioConfig
segments: List[Segment]
weak_layer: WeakLayer
slab: Slab
system_type: Literal['skier', 'skiers', 'pst-', '-pst', 'rot', 'trans', 'vpst-', '-vpst']
phi: float
surface_load: float
cut_length: float
refresh_from_config()[source]

Pull changed values out of scenario_config and recompute derived attributes.

get_segment_idx(x)[source]

Get the segment index for a given x-coordinate or coordinates.

Parameters:

x (Union[float, Sequence[float], np.ndarray]) – A single x-coordinate or a sequence of x-coordinates.

Returns:

The segment index or an array of indices.

Return type:

Union[int, np.ndarray]