weac.utils.misc module

This module contains miscellaneous utility functions.

weac.utils.misc.decompose_to_xyz(f, phi, theta=0)[source]

Resolve a gravity-type force/line-load into its x’-component (downslope), y’-component (cross-slope) and z’-component (into-slope) with respect to an inclined surface. Fully vectorized; if input contains arrays, output matches shape.

Parameters:
  • f (float | NDArray[np.float64]) – is interpreted as a vertical load magnitude acting straight downward (global z negative).

  • phi (float | NDArray[np.float64]) – Surface dip angle in degrees, measured between horizontal plane and the slabs axis (local x’-axis). Positive phi means the surface slopes upward in +x.

  • theta (float | NDArray[np.float64]) – rotation angle in degrees, measured between the x’z-plane and the x’z’-plane. Positive theta means the slab is rotated counterclockwise around the slab axis (local x’-axis).

Returns:

f_x’, f_y’, f_z’ – Magnitudes of the x’-component (downslope), y’-component (cross-slope) and z’-component (into-slope) components, respectively.

Return type:

float | NDArray[np.float64]

weac.utils.misc.get_skier_point_load(m)[source]

Calculate skier point load.

Parameters:

m (float) – Skier weight [kg].

Returns:

f – Skier load [N/mm].

Return type:

float

weac.utils.misc.load_dummy_profile(profile_id)[source]

Define standard layering types for comparison.

Parameters:

profile_id (Literal['a', 'b', 'c', 'd', 'e', 'f', 'h', 'soft', 'medium', 'hard', 'comp'])

Return type:

list[Layer]

weac.utils.misc.isnotebook()[source]

Check if code is running in a Jupyter notebook environment.

Returns:

True if running in Jupyter notebook, False otherwise.

Return type:

bool