weac.analysis.analyzer module¶
This module provides the Analyzer class, which is used to analyze the results of the WEAC model.
- weac.analysis.analyzer.track_analyzer_call(func)[source]¶
Decorator to track call count and execution time of Analyzer methods.
- class weac.analysis.analyzer.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)
- __init__(system_model, printing_enabled=True)[source]¶
- Parameters:
system_model (SystemModel)
printing_enabled (bool)
- sm: SystemModel¶
- printing_enabled: bool = True¶
- print_call_stats(message='Analyzer Call Statistics')[source]¶
Prints the call statistics in a readable format.
- Parameters:
message (str)
- 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)
- 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
- 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
- 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
- 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
- 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.
- 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'])