weac.core.generalized_eigensystem module

Adapter backend for a generalized eigensystem (composition only).

This class intentionally does NOT inherit from the classic Eigensystem. It exposes the same public API surface that callers expect (zh, zp, get_load_vector, calc_eigensystem, assemble_system_matrix, eigen data, stiffness parameters), but you are free to replace internals with a 12/24-DOF formulation without being constrained by the 6-DOF base class.

Initially, all calls delegate to the classic implementation to preserve behavior. Replace the internals incrementally with the generalized (OOP-based) formulas.

class weac.core.generalized_eigensystem.GeneralizedEigensystem(weak_layer, slab)[source]

Bases: object

Composition-based adapter for gradual introduction of generalized physics. Calculates system properties and solves the eigenvalue problem for a layered beam on an isotropic elastic layer under generalized loading conditions.

Parameters:
weak_layer
Type:

WeakLayer

slab
Type:

Slab

System properties
-----------------
A11
Type:

float # extensional stiffness

B11
Type:

float # coupling stiffness

D11
Type:

float # bending stiffness

kA55
Type:

float # shear stiffness

kB55
Type:

float # higher-order shear stiffness

kD55
Type:

float # higher-order bending shear stiffness

K
Type:

float # system matrix

Eigenvalues and Eigenvectors

ewC: NDArray[np.complex128] # shape (k): Complex Eigenvalues ewR: NDArray[np.float64] # shape (k): Real Eigenvalues evC: NDArray[np.complex128] # shape (24, k): Complex Eigenvectors evR: NDArray[np.float64] # shape (24, k): Real Eigenvectors sR: NDArray[np.float64] # shape (k): Real positive eigenvalue shifts

# (for numerical robustness)

sC: NDArray[np.float64] # shape (k): Complex positive eigenvalue shifts

# (for numerical robustness)

A11: float
B11: float
D11: float
kA55: float
kB55: float
kD55: float
K0: float
K: ndarray[tuple[Any, ...], dtype[_ScalarT]]
ewC: ndarray[tuple[Any, ...], dtype[complex128]]
ewR: ndarray[tuple[Any, ...], dtype[float64]]
evC: ndarray[tuple[Any, ...], dtype[complex128]]
evR: ndarray[tuple[Any, ...], dtype[float64]]
sR: ndarray[tuple[Any, ...], dtype[float64]]
sC: ndarray[tuple[Any, ...], dtype[float64]]
__init__(weak_layer, slab)[source]
Parameters:
weak_layer: WeakLayer
slab: Slab
calc_eigensystem()[source]

Calculate generalized fundamental system (if needed).

assemble_system_matrix()[source]

Assemble generalized first-order ODE system matrix K (if needed).

Return type:

ndarray[tuple[Any, …], dtype[float64]]

calc_eigenvalues_and_eigenvectors(system_matrix)[source]

Calculate eigenvalues and eigenvectors of the system matrix.

Parameters:

system_matrix: NDArray # system_matrix size (24x24) of the eigenvalue problem

Return:

ewC: NDArray[np.complex128] # shape (k): Complex Eigenvalues ewR: NDArray[np.float64] # shape (g): Real Eigenvalues evC: NDArray[np.complex128] # shape (24, k): Complex Eigenvectors evR: NDArray[np.float64] # shape (24, g): Real Eigenvectors sR: NDArray[np.float64] # shape (k): Real positive eigenvalue shifts

# (for numerical robustness)

sC: NDArray[np.float64] # shape (g): Complex positive eigenvalue shifts

# (for numerical robustness)

Parameters:

system_matrix (ndarray[tuple[Any, ...], dtype[float64]])

Return type:

tuple[ndarray[tuple[Any, …], dtype[complex128]], ndarray[tuple[Any, …], dtype[float64]], ndarray[tuple[Any, …], dtype[complex128]], ndarray[tuple[Any, …], dtype[float64]], ndarray[tuple[Any, …], dtype[float64]], ndarray[tuple[Any, …], dtype[float64]]]

zh(x, length=0, has_foundation=True)[source]

Compute bedded or free complementary solution at position x.

Parameters:
  • x (float) – Horizontal coordinate (mm).

  • length (float, optional) – Segment length (mm). Default is 0.

  • has_foundation (bool) – Indicates whether segment has foundation or not. Default is True.

Returns:

zh – Complementary solution matrix (24x24) at position x.

Return type:

ndarray

zp(x, phi=0, theta=0, has_foundation=True, qs=0)[source]

Return particular integral vector (24x1).

Parameters:
  • x (float)

  • phi (float)

  • theta (float)

  • has_foundation (bool)

  • qs (float)

Return type:

ndarray[tuple[Any, …], dtype[_ScalarT]]

get_load_vector(phi, theta, qs=0, has_foundation=True)[source]

Return generalized load vector q if your pipeline needs it.

Parameters:
  • phi (float)

  • theta (float)

  • qs (float)

  • has_foundation (bool)

Return type:

ndarray[tuple[Any, …], dtype[_ScalarT]]