weac.analysis.coupled_criterion module

Coupled-criterion search and related stress / crack helpers.

class weac.analysis.coupled_criterion.CoupledCriterionHistory(skier_weights=<factory>, crack_lengths=<factory>, incr_energies=<factory>, sigma_maxs=<factory>, tau_maxs=<factory>, g_deltas=<factory>, dist_maxs=<factory>, dist_mins=<factory>)[source]

Bases: object

Stores the history of the coupled criterion evaluation.

Attributes:

skier_weightslist[float]

Skier weights evaluated during the iteration.

crack_lengthslist[float]

Crack lengths evaluated during the iteration.

incr_energieslist[np.ndarray]

Incremental energy release rates for each evaluated state.

sigma_maxslist[float]

Maximum normal stress values in kPa for each evaluated state. After iteration 1, values reuse the iteration-1 sample (uncracked rasterize is skipped; see main-loop stress bookkeeping).

tau_maxslist[float]

Maximum shear stress values in kPa for each evaluated state. After iteration 1, values reuse the iteration-1 sample.

g_deltaslist[float]

Fracture toughness envelope values for each evaluated state.

dist_maxslist[float]

Maximum distances to the stress envelope for each evaluated state. After iteration 1, values reuse the iteration-1 sample.

dist_minslist[float]

Minimum distances to the stress envelope for each evaluated state. After iteration 1, values reuse the iteration-1 sample.

skier_weights: list[float]
crack_lengths: list[float]
incr_energies: list[ndarray]
sigma_maxs: list[float]
tau_maxs: list[float]
g_deltas: list[float]
dist_maxs: list[float]
dist_mins: list[float]
__init__(skier_weights=<factory>, crack_lengths=<factory>, incr_energies=<factory>, sigma_maxs=<factory>, tau_maxs=<factory>, g_deltas=<factory>, dist_maxs=<factory>, dist_mins=<factory>)
Parameters:
  • skier_weights (list[float])

  • crack_lengths (list[float])

  • incr_energies (list[ndarray])

  • sigma_maxs (list[float])

  • tau_maxs (list[float])

  • g_deltas (list[float])

  • dist_maxs (list[float])

  • dist_mins (list[float])

Return type:

None

Parameters:
  • skier_weights (list[float])

  • crack_lengths (list[float])

  • incr_energies (list[ndarray])

  • sigma_maxs (list[float])

  • tau_maxs (list[float])

  • g_deltas (list[float])

  • dist_maxs (list[float])

  • dist_mins (list[float])

class weac.analysis.coupled_criterion.CoupledCriterionResult(converged, message, self_collapse, pure_stress_criteria, critical_skier_weight, initial_critical_skier_weight, crack_length, g_delta, dist_ERR_envelope, iterations, history, final_system, max_dist_stress, min_dist_stress)[source]

Bases: object

Holds the results of the coupled criterion evaluation.

Attributes:

convergedbool

Whether the algorithm converged.

messagestr

The message of the evaluation.

self_collapsebool

Whether the system collapsed.

pure_stress_criteriabool

Whether the pure stress criteria is satisfied.

critical_skier_weightfloat

The critical skier weight.

initial_critical_skier_weightfloat

The initial critical skier weight.

crack_lengthfloat

The crack length.

g_deltafloat

The g_delta value.

dist_ERR_envelopefloat

The distance to the ERR envelope.

iterationsint

The number of iterations.

historyCoupledCriterionHistory

The history of the evaluation.

final_systemSystemModel

The final system model.

max_dist_stressfloat

Maximum distance to the stress envelope for the returned final_system geometry.

min_dist_stressfloat

Minimum distance to the stress envelope for the returned final_system geometry.

converged: bool
message: str
self_collapse: bool
pure_stress_criteria: bool
critical_skier_weight: float
initial_critical_skier_weight: float
crack_length: float
g_delta: float
dist_ERR_envelope: float
iterations: int
history: CoupledCriterionHistory | None
final_system: SystemModel
max_dist_stress: float
min_dist_stress: float
__init__(converged, message, self_collapse, pure_stress_criteria, critical_skier_weight, initial_critical_skier_weight, crack_length, g_delta, dist_ERR_envelope, iterations, history, final_system, max_dist_stress, min_dist_stress)
Parameters:
  • converged (bool)

  • message (str)

  • self_collapse (bool)

  • pure_stress_criteria (bool)

  • critical_skier_weight (float)

  • initial_critical_skier_weight (float)

  • crack_length (float)

  • g_delta (float)

  • dist_ERR_envelope (float)

  • iterations (int)

  • history (CoupledCriterionHistory | None)

  • final_system (SystemModel)

  • max_dist_stress (float)

  • min_dist_stress (float)

Return type:

None

Parameters:
  • converged (bool)

  • message (str)

  • self_collapse (bool)

  • pure_stress_criteria (bool)

  • critical_skier_weight (float)

  • initial_critical_skier_weight (float)

  • crack_length (float)

  • g_delta (float)

  • dist_ERR_envelope (float)

  • iterations (int)

  • history (CoupledCriterionHistory | None)

  • final_system (SystemModel)

  • max_dist_stress (float)

  • min_dist_stress (float)

class weac.analysis.coupled_criterion.FindMinimumForceResult(success, critical_skier_weight, new_segments, old_segments, iterations, max_dist_stress, min_dist_stress)[source]

Bases: object

Holds the results of the find_minimum_force evaluation.

Attributes:

successbool

Whether the algorithm converged.

critical_skier_weightfloat

The critical skier weight.

new_segmentslist[Segment]

The new segments.

old_segmentslist[Segment]

The old segments.

iterationsint

The number of iterations.

max_dist_stressfloat

The maximum distance to failure.

min_dist_stressfloat

The minimum distance to failure.

success: bool
critical_skier_weight: float
new_segments: list[Segment]
old_segments: list[Segment]
iterations: int | None
max_dist_stress: float
min_dist_stress: float
__init__(success, critical_skier_weight, new_segments, old_segments, iterations, max_dist_stress, min_dist_stress)
Parameters:
  • success (bool)

  • critical_skier_weight (float)

  • new_segments (list[Segment])

  • old_segments (list[Segment])

  • iterations (int | None)

  • max_dist_stress (float)

  • min_dist_stress (float)

Return type:

None

Parameters:
  • success (bool)

  • critical_skier_weight (float)

  • new_segments (list[Segment])

  • old_segments (list[Segment])

  • iterations (int | None)

  • max_dist_stress (float)

  • min_dist_stress (float)

class weac.analysis.coupled_criterion.MaximalStressResult(principal_stress_kPa, Sxx_kPa, principal_stress_norm, Sxx_norm, max_principal_stress_norm, max_Sxx_norm, slab_tensile_criterion)[source]

Bases: object

Holds the results of the maximal stress evaluation.

Attributes:

principal_stress_kPa: np.ndarray

The principal stress in kPa.

Sxx_kPa: np.ndarray

The axial normal stress in kPa.

principal_stress_norm: np.ndarray

The normalized principal stress to the tensile strength of the layers.

Sxx_norm: np.ndarray

The normalized axial normal stress to the tensile strength of the layers.

max_principal_stress_norm: float

The normalized maximum principal stress to the tensile strength of the layers.

max_Sxx_norm: float

The normalized maximum axial normal stress to the tensile strength of the layers.

slab_tensile_criterion: float

The slab tensile criterion, i.e. the portion of the slab thickness that is prone to fail under tensile stresses in the steady state (between 0 and 1).

principal_stress_kPa: ndarray
Sxx_kPa: ndarray
principal_stress_norm: ndarray
Sxx_norm: ndarray
max_principal_stress_norm: float
max_Sxx_norm: float
slab_tensile_criterion: float
__init__(principal_stress_kPa, Sxx_kPa, principal_stress_norm, Sxx_norm, max_principal_stress_norm, max_Sxx_norm, slab_tensile_criterion)
Parameters:
  • principal_stress_kPa (ndarray)

  • Sxx_kPa (ndarray)

  • principal_stress_norm (ndarray)

  • Sxx_norm (ndarray)

  • max_principal_stress_norm (float)

  • max_Sxx_norm (float)

  • slab_tensile_criterion (float)

Return type:

None

Parameters:
  • principal_stress_kPa (ndarray)

  • Sxx_kPa (ndarray)

  • principal_stress_norm (ndarray)

  • Sxx_norm (ndarray)

  • max_principal_stress_norm (float)

  • max_Sxx_norm (float)

  • slab_tensile_criterion (float)

class weac.analysis.coupled_criterion.CoupledCriterionEngine(criteria_config)[source]

Bases: object

Coupled-criterion and related helper evaluations.

Parameters:

criteria_config (CriteriaConfig)

__init__(criteria_config)[source]
Parameters:

criteria_config (CriteriaConfig)

criteria_config: CriteriaConfig
fracture_toughness_envelope(G_I, G_II, weak_layer)[source]
stress_envelope(sigma, tau, weak_layer, method=None)[source]
evaluate_coupled_criterion(system, max_iterations=25, damping_ERR=0.0, tolerance_ERR=0.002, tolerance_stress=0.005, print_call_stats=False, _recursion_depth=0, _force_result=None)[source]

Evaluates the coupled criterion for anticrack nucleation, finding the critical combination of skier weight and anticrack length.

Parameters:

system: SystemModel

The system model.

max_iterations: int

Max iterations for the solver. Defaults to 25.

damping_ERR: float

damping factor for the ERR criterion. Defaults to 0.0.

tolerance_ERR: float, optional

Tolerance for g_delta convergence. Defaults to 0.002.

tolerance_stress: float, optional

Tolerance for stress envelope convergence. Defaults to 0.005.

print_call_stats: bool

Whether to print the call statistics. Defaults to False.

_recursion_depth: int

The depth of the recursion. Defaults to 0.

_force_result: FindMinimumForceResult | None

Optional precomputed force result to reuse across damping restarts. Defaults to None (compute once at top level).

returns:

results – An object containing the results of the analysis, including critical skier weight, crack length, and convergence details.

rtype:

CoupledCriterionResult

Parameters:
  • system (SystemModel)

  • max_iterations (int)

  • damping_ERR (float)

  • tolerance_ERR (float)

  • tolerance_stress (float)

  • print_call_stats (bool)

  • _recursion_depth (int)

  • _force_result (FindMinimumForceResult | None)

Return type:

CoupledCriterionResult

find_minimum_force(system, tolerance_stress=0.0005, print_call_stats=False)[source]

Finds the minimum skier weight required to surpass the stress failure envelope.

This method iteratively adjusts the skier weight until the maximum distance to the stress envelope converges to 1, indicating the critical state.

Parameters:

system: SystemModel

The system model.

tolerance_stress: float, optional

Tolerance for the stress envelope. Defaults to 0.005.

print_call_stats: bool, optional

Whether to print the call statistics. Defaults to False.

Returns:

results: FindMinimumForceResult

An object containing the results of the analysis, including critical skier weight, and convergence details.

Parameters:
  • system (SystemModel)

  • tolerance_stress (float)

  • print_call_stats (bool)

Return type:

FindMinimumForceResult

find_minimum_crack_length(system, search_interval=None, target=1)[source]

Finds the minimum crack length required to surpass the energy release rate envelope.

Parameters:

system: SystemModel

The system model.

Returns:

minimum_crack_length: float

The minimum crack length required to surpass the energy release rate envelope [mm]

new_segments: list[Segment]

The updated list of segments

Parameters:
  • system (SystemModel)

  • search_interval (tuple[float, float] | None)

  • target (float)

Return type:

tuple[float, list[Segment]]

check_crack_self_propagation(system, rm_skier_weight=False)[source]

Evaluates whether a crack will propagate without any additional load. This method determines if a pre-existing crack will propagate without any additional load.

Parameters:

system: SystemModel

returns:
  • g_delta_diff (float) – The evaluation of the fracture toughness envelope.

  • can_propagate (bool) – True if the criterion is met (g_delta_diff >= 1).

Parameters:
Return type:

tuple[float, bool]

find_crack_length_for_weight(system, skier_weight)[source]

Finds the resulting anticrack length and updated segment configurations for a given skier weight.

Parameters:

system: SystemModel

The system model.

skier_weight: float

The weight of the skier [kg]

returns:
  • new_crack_length (float) – The total length of the new cracked segments [mm]

  • new_segments (list[Segment]) – The updated list of segments

Parameters:
Return type:

tuple[float, list[Segment]]