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]

fi

force vectors at the boundaries of the segments masses (kg) on boundary of segment i and i+1 [N, N N, Nmm, Nmm, Nmm]

Type:

List[np.arrays]

gi

booleans indicating loading for segment i

Type:

List[bool]

load_vector_left

load vector on the left side of the configuration

Type:

np.ndarray

load_vector_right

load vector on the right side of the configuration

Type:

np.ndarray

system_type : SystemType phi : float

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

thetafloat

Angle of slab rotation around its axis [deg]

Lfloat

Length of the model [mm]

crack_h: float

Height of the crack [mm]

li: ndarray
ki: ndarray
gi: ndarray
fi: ndarray
cum_sum_li: ndarray
qw: float
qx: float
qy: float
qz: 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
theta: float
surface_load: float
cut_length: float
load_vector_left: ndarray
load_vector_right: ndarray
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 (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:

int | np.ndarray