weac.components.config module

Configuration for the WEAC simulation. These settings control runtime parameters for WEAC. In general, developers maintain these defaults; end users should see a stable configuration.

We utilize the pydantic library to define the configuration.

Pydantic syntax is for a field: field_name: type = Field(…, gt=0, description=”Description”) - typing, default value, constraints, description

class weac.components.config.Config(*, touchdown=False, backend='classic', forced_touchdown_mode=None)[source]

Bases: BaseModel

Configuration for the WEAC simulation.

Parameters:
  • touchdown (bool)

  • backend (Literal['classic', 'generalized'])

  • forced_touchdown_mode (Literal['A_free_hanging', 'B_point_contact', 'C_in_contact'] | None)

touchdown

Whether slab touchdown on the collapsed weak layer is considered.

Type:

bool

backend

Selects which eigensystem implementation to use under the hood.

Type:

Literal[“classic”, “generalized”]

forced_touchdown_mode

If set, forces the touchdown mode instead of calculating it from l_AB/l_BC. This avoids floating-point precision issues when the mode boundary values are recalculated with different scenario parameters.

Type:

TouchdownMode | None

model_config: ClassVar[ConfigDict] = {'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

touchdown: bool
backend: Literal['classic', 'generalized']
forced_touchdown_mode: Literal['A_free_hanging', 'B_point_contact', 'C_in_contact'] | None
classmethod validate_touchdown_with_backend(v, info)[source]

Validate touchdown compatibility when touchdown is assigned.

classmethod validate_backend_with_touchdown(v, info)[source]

Validate backend compatibility when backend is assigned.

validate_touchdown_backend_compatibility()[source]