weac.analysis package¶
Submodules¶
- weac.analysis.analyzer module
track_analyzer_call()
Analyzer
Analyzer.__init__()
Analyzer.sm
Analyzer.printing_enabled
Analyzer.get_call_stats()
Analyzer.print_call_stats()
Analyzer.rasterize_solution()
Analyzer.get_zmesh()
Analyzer.Sxx()
Analyzer.Txz()
Analyzer.Szz()
Analyzer.principal_stress_slab()
Analyzer.principal_stress_weaklayer()
Analyzer.incremental_ERR()
Analyzer.differential_ERR()
Analyzer.total_potential()
- weac.analysis.criteria_evaluator module
CoupledCriterionHistory
CoupledCriterionResult
CoupledCriterionResult.converged
CoupledCriterionResult.message
CoupledCriterionResult.self_collapse
CoupledCriterionResult.pure_stress_criteria
CoupledCriterionResult.critical_skier_weight
CoupledCriterionResult.initial_critical_skier_weight
CoupledCriterionResult.crack_length
CoupledCriterionResult.g_delta
CoupledCriterionResult.dist_ERR_envelope
CoupledCriterionResult.iterations
CoupledCriterionResult.history
CoupledCriterionResult.final_system
CoupledCriterionResult.max_dist_stress
CoupledCriterionResult.min_dist_stress
CoupledCriterionResult.__init__()
SSERRResult
FindMinimumForceResult
CriteriaEvaluator
CriteriaEvaluator.__init__()
CriteriaEvaluator.criteria_config
CriteriaEvaluator.fracture_toughness_envelope()
CriteriaEvaluator.stress_envelope()
CriteriaEvaluator.evaluate_coupled_criterion()
CriteriaEvaluator.evaluate_SSERR()
CriteriaEvaluator.find_minimum_force()
CriteriaEvaluator.find_minimum_crack_length()
CriteriaEvaluator.check_crack_self_propagation()
CriteriaEvaluator.find_crack_length_for_weight()
- weac.analysis.plotter module
MidpointNormalize
Plotter
Plotter.__init__()
Plotter.plot_slab_profile()
Plotter.plot_rotated_slab_profile()
Plotter.plot_section_forces()
Plotter.plot_energy_release_rates()
Plotter.plot_deformed()
Plotter.plot_stress_envelope()
Plotter.plot_err_envelope()
Plotter.plot_analysis()
Plotter.plot_displacements()
Plotter.plot_stresses()
Plotter.plot_stress_criteria()
Plotter.plot_ERR_comp()
Plotter.plot_ERR_modes()
Plotter.plot_fea_disp()
Plotter.plot_fea_stress()
Module contents¶
This package contains modules for analyzing the results of the WEAC model.
- class weac.analysis.Analyzer(system_model, printing_enabled=True)[source]¶
Bases:
object
Provides methods for the analysis of layered slabs on compliant elastic foundations.
- Parameters:
system_model (SystemModel)
printing_enabled (bool)
- Sxx(Z, phi, dz=2, unit='kPa')[source]¶
Compute axial normal stress in slab layers.
- Parameters:
Z (ndarray) – Solution vector [u(x) u’(x) w(x) w’(x) psi(x), psi’(x)]^T
phi (float) – Inclination (degrees). Counterclockwise positive.
dz (float, optional) – Element size along z-axis (mm). Default is 2 mm.
unit ({'kPa', 'MPa'}, optional) – Desired output unit. Default is ‘kPa’.
- Returns:
Axial slab normal stress in specified unit.
- Return type:
ndarray, float
- Szz(Z, phi, dz=2, unit='kPa')[source]¶
Compute transverse normal stress in slab layers.
- Parameters:
Z (ndarray) – Solution vector [u(x) u’(x) w(x) w’(x) psi(x), psi’(x)]^T
phi (float) – Inclination (degrees). Counterclockwise positive.
dz (float, optional) – Element size along z-axis (mm). Default is 2 mm.
unit ({'kPa', 'MPa'}, optional) – Desired output unit. Default is ‘kPa’.
- Returns:
Transverse normal stress at grid points in the slab in specified unit.
- Return type:
ndarray, float
- Txz(Z, phi, dz=2, unit='kPa')[source]¶
Compute shear stress in slab layers.
- Parameters:
Z (ndarray) – Solution vector [u(x) u’(x) w(x) w’(x) psi(x), psi’(x)]^T
phi (float) – Inclination (degrees). Counterclockwise positive.
dz (float, optional) – Element size along z-axis (mm). Default is 2 mm.
unit ({'kPa', 'MPa'}, optional) – Desired output unit. Default is ‘kPa’.
- Returns:
Shear stress at grid points in the slab in specified unit.
- Return type:
ndarray
- __init__(system_model, printing_enabled=True)[source]¶
- Parameters:
system_model (SystemModel)
printing_enabled (bool)
- differential_ERR(unit='kJ/m^2')[source]¶
Compute differential energy release rate of all crack tips.
- Returns:
List of total, mode I, and mode II energy release rates.
- Return type:
ndarray
- Parameters:
unit (Literal['kJ/m^2', 'J/m^2'])
- get_zmesh(dz=2)[source]¶
Get z-coordinates of grid points and corresponding elastic properties.
- Parameters:
dz (float, optional) – Element size along z-axis (mm). Default is 2 mm.
- Returns:
mesh – Mesh along z-axis. Columns are a list of z-coordinates (mm) of grid points along z-axis with at least two grid points (top, bottom) per layer, Young’s modulus of each grid point, shear modulus of each grid point, and Poisson’s ratio of each grid point.
- Return type:
ndarray
- incremental_ERR(tolerance=1e-6, unit='kJ/m^2')[source]¶
Compute incremental energy release rate (ERR) of all cracks.
- Returns:
List of total, mode I, and mode II energy release rates.
- Return type:
ndarray
- Parameters:
tolerance (float)
unit (Literal['kJ/m^2', 'J/m^2'])
- principal_stress_slab(Z, phi, dz=2, unit='kPa', val='max', normalize=False)[source]¶
Compute maximum or minimum principal stress in slab layers.
- Parameters:
Z (ndarray) – Solution vector [u(x) u’(x) w(x) w’(x) psi(x), psi’(x)]^T
phi (float) – Inclination (degrees). Counterclockwise positive.
dz (float, optional) – Element size along z-axis (mm). Default is 2 mm.
unit ({'kPa', 'MPa'}, optional) – Desired output unit. Default is ‘kPa’.
val (str, optional) – Maximum ‘max’ or minimum ‘min’ principal stress. Default is ‘max’.
normalize (bool) – Toggle layerwise normalization to strength.
- Returns:
Maximum or minimum principal stress in specified unit.
- Return type:
ndarray
- Raises:
ValueError – If specified principal stress component is neither ‘max’ nor ‘min’, or if normalization of compressive principal stress is requested.
- principal_stress_weaklayer(Z, sc=2.6, unit='kPa', val='min', normalize=False)[source]¶
Compute maximum or minimum principal stress in the weak layer.
- Parameters:
Z (ndarray) – Solution vector [u(x) u’(x) w(x) w’(x) psi(x), psi’(x)]^T
sc (float) – Weak-layer compressive strength. Default is 2.6 kPa.
unit ({'kPa', 'MPa'}, optional) – Desired output unit. Default is ‘kPa’.
val (str, optional) – Maximum ‘max’ or minimum ‘min’ principal stress. Default is ‘min’.
normalize (bool) – Toggle layerwise normalization to strength.
- Returns:
Maximum or minimum principal stress in specified unit.
- Return type:
ndarray
- Raises:
ValueError – If specified principal stress component is neither ‘max’ nor ‘min’, or if normalization of tensile principal stress is requested.
- print_call_stats(message='Analyzer Call Statistics')[source]¶
Prints the call statistics in a readable format.
- Parameters:
message (str)
- printing_enabled: bool = True¶
- rasterize_solution(mode='cracked', num=4000)[source]¶
Compute rasterized solution vector.
Parameters:¶
- modeLiteral[“cracked”, “uncracked”]
Mode of the solution.
- numint
Number of grid points.
- returns:
xs (ndarray) – Grid point x-coordinates at which solution vector is discretized.
zs (ndarray) – Matrix with solution vectors as columns at grid points xs.
x_founded (ndarray) – Grid point x-coordinates that lie on a foundation.
- Parameters:
mode (Literal['cracked', 'uncracked'])
num (int)
- total_potential()[source]¶
Returns total differential potential. Currently only implemented for PST systems.
- Returns:
Pi – Total differential potential (Nmm).
- Return type:
float
- sm: SystemModel¶
- class weac.analysis.CriteriaEvaluator(criteria_config)[source]¶
Bases:
object
Provides methods for stability analysis of layered slabs on compliant elastic foundations, based on the logic from criterion_check.py.
- Parameters:
criteria_config (CriteriaConfig)
- __init__(criteria_config)[source]¶
Initializes the evaluator with global simulation and criteria configurations.
Parameters:¶
criteria_config (CriteriaConfig): The configuration for failure criteria.
- Parameters:
criteria_config (CriteriaConfig)
- 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:
system (SystemModel)
rm_skier_weight (bool)
- Return type:
tuple[float, bool]
- evaluate_SSERR(system, vertical=False, print_call_stats=False)[source]¶
Evaluates the Touchdown Distance in the Steady State and the Steady State Energy Release Rate.
Parameters:¶
- system: SystemModel
The system model.
- vertical: bool, optional
Whether to evaluate the system in a vertical configuration. Defaults to False.
- print_call_stats: bool, optional
Whether to print the call statistics. Defaults to False.
IMPORTANT: There is a bug in vertical = True, so always slope normal, i.e. vertical=False should be used.
- Parameters:
system (SystemModel)
vertical (bool)
print_call_stats (bool)
- Return type:
- 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)[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.
- 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)
- Return type:
- 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:
system (SystemModel)
skier_weight (float)
- Return type:
tuple[float, List[Segment]]
- 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]]
- 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:
- fracture_toughness_envelope(G_I, G_II, weak_layer)[source]¶
Evaluates the fracture toughness criterion for a given combination of Mode I (G_I) and Mode II (G_II) energy release rates.
A value of 1 indicates the boundary of the fracture toughness envelope is reached.
Parameters:¶
- G_Ifloat
Mode I energy release rate (ERR) in J/m².
- G_IIfloat
Mode II energy release rate (ERR) in J/m².
- weak_layerWeakLayer
The weak layer object containing G_Ic and G_IIc.
Returns:¶
- g_deltafloat
Evaluation of the fracture toughness envelope.
- Parameters:
G_I (float | ndarray)
G_II (float | ndarray)
weak_layer (WeakLayer)
- Return type:
float | ndarray
- stress_envelope(sigma, tau, weak_layer, method=None)[source]¶
Evaluate the stress envelope for given stress components. Weak Layer failure is defined as the stress envelope crossing 1.
- Parameters:
sigma (ndarray) – Normal stress components (kPa).
tau (ndarray) – Shear stress components (kPa).
weak_layer (WeakLayer) – The weak layer object, used to get density.
method (str, optional) – Method to use for the stress envelope. Defaults to None.
- Returns:
stress_envelope – Stress envelope evaluation values in [0, inf]. Values > 1 indicate failure.
- Return type:
ndarray
Notes
- Mede’s envelopes (‘mede_s-RG1’, ‘mede_s-RG2’, ‘mede_s-FCDH’) are derived
from the work of Mede et al. (2018), “Snow Failure Modes Under Mixed Loading,” published in Geophysical Research Letters.
- Schöttner’s envelope (‘schottner’) is based on the preprint by Schöttner
et al. (2025), “On the Compressive Strength of Weak Snow Layers of Depth Hoar”.
- The ‘adam_unpublished’ envelope scales with weak layer density linearly
(compared to density baseline) by a ‘scaling_factor’ (weak layer density / density baseline), unless modified by ‘order_of_magnitude’.
- Mede’s criteria (‘mede_s-RG1’, ‘mede_s-RG2’, ‘mede_s-FCDH’) define
failure based on a piecewise function of stress ranges.
- criteria_config: CriteriaConfig¶
- class weac.analysis.CoupledCriterionHistory(skier_weights, crack_lengths, incr_energies, g_deltas, dist_maxs, dist_mins)[source]¶
Bases:
object
Stores the history of the coupled criterion evaluation.
- Parameters:
skier_weights (List[float])
crack_lengths (List[float])
incr_energies (List[ndarray])
g_deltas (List[float])
dist_maxs (List[float])
dist_mins (List[float])
- __init__(skier_weights, crack_lengths, incr_energies, g_deltas, dist_maxs, dist_mins)¶
- Parameters:
skier_weights (List[float])
crack_lengths (List[float])
incr_energies (List[ndarray])
g_deltas (List[float])
dist_maxs (List[float])
dist_mins (List[float])
- Return type:
None
- skier_weights: List[float]¶
- crack_lengths: List[float]¶
- incr_energies: List[ndarray]¶
- g_deltas: List[float]¶
- dist_maxs: List[float]¶
- dist_mins: List[float]¶
- class weac.analysis.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
The maximum distance to failure.
- min_dist_stressfloat
The minimum distance to failure.
- __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
- 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¶
- 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.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.
- __init__(success, critical_skier_weight, new_segments, old_segments, iterations, max_dist_stress, min_dist_stress)¶
- success: bool¶
- critical_skier_weight: float¶
- iterations: int | None¶
- max_dist_stress: float¶
- min_dist_stress: float¶
- class weac.analysis.SSERRResult(converged, message, touchdown_distance, SSERR)[source]¶
Bases:
object
Holds the results of the SSERR evaluation.
Attributes:¶
- convergedbool
Whether the algorithm converged.
- messagestr
The message of the evaluation.
- touchdown_distancefloat
The touchdown distance.
- SSERRfloat
The Steady-State Energy Release Rate calculated with the touchdown distance from G_I and G_II.
- __init__(converged, message, touchdown_distance, SSERR)¶
- Parameters:
converged (bool)
message (str)
touchdown_distance (float)
SSERR (float)
- Return type:
None
- converged: bool¶
- message: str¶
- touchdown_distance: float¶
- SSERR: float¶
- Parameters:
converged (bool)
message (str)
touchdown_distance (float)
SSERR (float)
- class weac.analysis.Plotter(plot_dir='plots')[source]¶
Bases:
object
Modern plotting class for WEAC simulations with support for multiple system comparisons.
This class provides comprehensive visualization capabilities for weak layer anticrack nucleation simulations, including single system analysis and multi-system comparisons.
Features: - Single and multi-system plotting - System override functionality for selective plotting - Comprehensive dashboard creation - Modern matplotlib styling - Jupyter notebook integration - Automatic plot directory management
- Parameters:
plot_dir (str)
- __init__(plot_dir='plots')[source]¶
Initialize the plotter.
- Parameters:
system (SystemModel, optional) – Single system model for analysis
systems (List[SystemModel], optional) – List of system models for comparison
labels (List[str], optional) – Labels for each system in plots
colors (List[str], optional) – Colors for each system in plots
plot_dir (str, default "plots") – Directory to save plots
- plot_ERR_comp(analyzer, da, Gdif, Ginc, mode=0)[source]¶
Wrap energy release rate plot.
- Parameters:
analyzer (Analyzer)
da (ndarray)
Gdif (ndarray)
Ginc (ndarray)
mode (int)
- Return type:
Figure
- plot_ERR_modes(analyzer, da, G, kind='inc')[source]¶
Wrap energy release rate plot.
- Parameters:
analyzer (Analyzer)
da (ndarray)
G (ndarray)
kind (str)
- Return type:
Figure
- plot_analysis(system, criteria_evaluator, min_force_result, min_crack_length, coupled_criterion_result, dz=2, deformation_scale=100.0, window=np.inf, levels=300, filename='analysis')[source]¶
Plot deformed slab with field contours.
- Parameters:
field (str, default 'w') – Field to plot (‘w’, ‘u’, ‘principal’, ‘sigma’, ‘tau’)
system_model (SystemModel, optional) – System to plot (uses first system if not specified)
filename (str, optional) – Filename for saving plot
system (SystemModel)
criteria_evaluator (CriteriaEvaluator)
min_force_result (FindMinimumForceResult)
min_crack_length (float)
coupled_criterion_result (CoupledCriterionResult)
dz (int)
deformation_scale (float)
window (int)
levels (int)
- Return type:
Figure
- plot_deformed(xsl, xwl, z, analyzer, dz=2, scale=100, window=np.inf, pad=2, levels=300, aspect=2, field='w', normalize=True, filename='deformed_slab')[source]¶
Plot deformed slab with field contours.
- Parameters:
xsl (np.ndarray) – Slab x-coordinates.
xwl (np.ndarray) – Weak layer x-coordinates.
z (np.ndarray) – Solution vector.
analyzer (Analyzer) – Analyzer instance.
dz (int, optional) – Element size along z-axis (mm). Default is 2 mm.
scale (int, optional) – Deformation scale factor. Default is 100.
window (float, optional) – Plot window width. Default is inf.
pad (int, optional) – Padding around plot. Default is 2.
levels (int, optional) – Number of contour levels. Default is 300.
aspect (int, optional) – Aspect ratio. Default is 2.
field (str, optional) – Field to plot (‘w’, ‘u’, ‘principal’, ‘Sxx’, ‘Txz’, ‘Szz’). Default is ‘w’.
normalize (bool, optional) – Toggle normalization. Default is True.
filename (str, optional) – Filename for saving plot. Default is “deformed_slab”.
- Returns:
The generated plot figure.
- Return type:
matplotlib.figure.Figure
- plot_displacements(analyzer, x, z, filename='displacements')[source]¶
Wrap for displacements plot.
- Parameters:
analyzer (Analyzer)
x (ndarray)
z (ndarray)
filename (str)
- Return type:
Figure
- plot_energy_release_rates(system_model=None, system_models=None, filename='ERR', labels=None, colors=None)[source]¶
Plot energy release rates (G_I, G_II) for comparison.
- Parameters:
system_model (SystemModel, optional) – Single system to plot (overrides default)
system_models (List[SystemModel], optional) – Multiple systems to plot (overrides default)
filename (str, optional) – Filename for saving plot
labels (list of str, optional) – Labels for each system.
colors (list of str, optional) – Colors for each system.
- plot_err_envelope(system_model, criteria_evaluator, filename='err_envelope')[source]¶
Plot the ERR envelope.
- Parameters:
system_model (SystemModel)
criteria_evaluator (CriteriaEvaluator)
filename (str)
- Return type:
Figure
- plot_fea_disp(analyzer, x, z, fea)[source]¶
Wrap displacements plot.
- Parameters:
analyzer (Analyzer)
x (ndarray)
z (ndarray)
fea (ndarray)
- Return type:
Figure
- plot_fea_stress(analyzer, xb, zb, fea)[source]¶
Wrap stress plot.
- Parameters:
analyzer (Analyzer)
xb (ndarray)
zb (ndarray)
fea (ndarray)
- Return type:
Figure
- plot_rotated_slab_profile(weak_layer, slab, angle=0, weight=0, slab_width=200, filename='rotated_slab_profile', title='Rotated Slab Profile')[source]¶
Plot a rectangular slab profile with layers stacked vertically, colored by density, and rotated by the specified angle.
- Parameters:
weak_layer (WeakLayer) – The weak layer to plot at the bottom.
slab (Slab) – The slab with layers to plot.
angle (float, optional) – Rotation angle in degrees. Default is 0.
slab_width (float, optional) – Width of the slab rectangle in mm. Default is 200.
filename (str, optional) – Filename for saving plot. Default is “rotated_slab_profile”.
title (str, optional) – Plot title. Default is “Rotated Slab Profile”.
weight (float)
- Returns:
The generated plot figure.
- Return type:
matplotlib.figure.Figure
- plot_section_forces(system_model=None, system_models=None, filename='section_forces', labels=None, colors=None)[source]¶
Plot section forces (N, M, V) for comparison.
- Parameters:
system_model (SystemModel, optional) – Single system to plot (overrides default)
system_models (List[SystemModel], optional) – Multiple systems to plot (overrides default)
filename (str, optional) – Filename for saving plot
labels (list of str, optional) – Labels for each system.
colors (list of str, optional) – Colors for each system.
- plot_slab_profile(weak_layers, slabs, filename='slab_profile', labels=None, colors=None)[source]¶
Plot slab layer profiles for comparison.
- Parameters:
- Returns:
The generated plot figure.
- Return type:
matplotlib.figure.Figure
- plot_stress_criteria(analyzer, x, stress)[source]¶
Wrap plot of stress and energy criteria.
- Parameters:
analyzer (Analyzer)
x (ndarray)
stress (ndarray)
- Return type:
Figure
- plot_stress_envelope(system_model, criteria_evaluator, all_envelopes=False, filename=None)[source]¶
Plot stress envelope in τ-σ space.
- Parameters:
system_model (SystemModel) – System to plot
criteria_evaluator (CriteriaEvaluator) – Criteria evaluator to use for the stress envelope
all_envelopes (bool, optional) – Whether to plot all four quadrants of the envelope
filename (str, optional) – Filename for saving plot