A Python package for fracture growth modeling.
Project description
fracmechpy: Fracture Mechanics
Overview
fracmechpy is a Python package that calculates the fatigue crack growth rate (da/dN) and the stress intensity factor range (ΔK) for Compact Tension (CT) specimens with the Secant method based on ASTM E647.
Features
- Computes fatigue crack growth rate (da/dN)
- Computes stress intensity factor range (ΔK) )
- Implements ASTM E647 standard
- Includes error handling for ASTM E647 validity limits
Installation
Installing from PyPI (Future Deployment)
If FracGrowM is available on PyPI, you can install it using:
pip install fracmechpy
Installing from Source
To install the package manually:
- Clone the repository:
git clone https://github.com/dhaselib/fracmechpy.git
- Navigate to the directory:
cd FracGrowM
- Install using pip:
pip install .
Ensure you have NumPy installed using:
pip install numpy
Function
Secant(N, af, ab, W, p_max, p_min, B)
This function calculates the fatigue crack growth rate (da/dN) and the stress intensity factor range (ΔK) for a CT specimen.
Parameters:
N(numpy array): Number of cyclesaf(numpy array): Crack length at the front face of the specimenab(numpy array): Crack length at the back face of the specimenW(float): Width of the specimenp_max(float): Maximum applied loadp_min(float): Minimum applied loadB(float): Thickness of the specimen
Returns:
dadN(numpy array): Fatigue crack growth rate (da/dN)dK(numpy array): Stress intensity factor range (ΔK)
Example Usage
# Sample input data
import numpy as np
from fracmechpy import Secant
# Sample input data
N = np.array([560000, 570000, 580000, 590000])
af = np.array([4.68, 5.04, 5.46, 5.86])
ab = np.array([4.52, 5.02, 5.35, 5.21])
W = 50 # Width in (mm)
p_max = 4000 # Maximum load in (N)
p_min = 400 # Minimum load in (N)
B = 5 # Thickness in (mm)
# Compute crack growth rate and stress intensity factor range
dadN, dK = Secant(N, af, ab, W, p_max, p_min, B)
print("da/dN:", dadN)
print("dK:", dK)
Error Handling
The function enforces ASTM E647 validity limits for crack growth increments (da). If the increment exceeds the standard-defined limits based on α = aᵥₑ/W , the function prints an error message and returns None.
License
This package is distributed under the MIT License.
Contact
For questions or contributions, please reach out to the author dhaselib@gmail.com.
"# fracmechpy"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fracmechpy-0.0.1.tar.gz.
File metadata
- Download URL: fracmechpy-0.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e6f6726ba6c62ea774d69a9627980bce2f1be0a7408b4425709de4c8d77cbbd
|
|
| MD5 |
ab73e28b0e0e158cc4dbe70b504a6156
|
|
| BLAKE2b-256 |
b135840c9ef5276c33889a62a3e7bc31692f9bbc0a5becbf5e0d6033261034bb
|
File details
Details for the file fracmechpy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fracmechpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e1d85a05f7df8952a921cd356b094440cb8c6d909f8947a885ecac980fffe0
|
|
| MD5 |
87cfb219cd872b4190b07233b6ce9368
|
|
| BLAKE2b-256 |
8dbe1a5eabe5ea20c5a74e764612f1e3d65a8a3a9386c5d56899af35fd66c54a
|