Processing
Module with functions for processing materials test data. This includes functionality for finding properties like yield strength Young's modulus from stress-strain curves, as well as post-processing functions for cleaning and correcting experimental measurements.
calculate_strain_rate(ds, strain_key='Strain', time_key='Time_s', strain_rate_key='Strain_Rate')
Calculate the strain rate of a stress-strain curve.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem with stress-strain curve |
required | |
strain_key |
str
|
Key for strain data |
'Strain'
|
time_key |
str
|
Key for time data |
'Time_s'
|
strain_rate_key |
str
|
Key for strain rate data |
'Strain_Rate'
|
Source code in paramaterial\processing.py
correct_friction_UC(di, mu_key='mu', h0_key='h_0', D0_key='D_0', disp_key='Disp(mm)', force_key='Force(kN)')
Calculate the pressure and corrected stress for a uniaxial compression test with friction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem
|
DataItem with uniaxial compression test data |
required |
mu_key |
str
|
Key for friction coefficient in info |
'mu'
|
h0_key |
str
|
Key for initial height in info |
'h_0'
|
D0_key |
str
|
Key for initial diameter in info |
'D_0'
|
disp_key |
str
|
Key for displacement data |
'Disp(mm)'
|
force_key |
str
|
Key for force data |
'Force(kN)'
|
Source code in paramaterial\processing.py
find_E(ds, LPL_stress, UPL_stress, strain_key='Strain', stress_key='Stress_MPa', E_key='E')
Find the elastic modulus of a stress-strain curve by fitting a line to the points between the specified stresses.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem with stress-strain curve |
required | |
LPL_stress |
float
|
Lower stress bound |
required |
UPL_stress |
float
|
Upper stress bound |
required |
strain_key |
str
|
Key for strain data |
'Strain'
|
stress_key |
str
|
Key for stress data |
'Stress_MPa'
|
E_key |
str
|
Key to store elastic modulus in info |
'E'
|
Source code in paramaterial\processing.py
find_UTS(ds, strain_key='Strain', stress_key='Stress_MPa', max_strain=None)
Find the ultimate tensile strength (UTS) of an engineering stress-strain curves in the DataSet. The UTS is defined as the maximum stress in the curve. The UTS is added to the DataSet.info dictionary as 'UTS_1' and the strain at the UTS is added as 'UTS_0'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds |
DataSet
|
DataSet containing the stress-strain curves. |
required |
strain_key |
str
|
Key for the strain data in the DataItem. |
'Strain'
|
stress_key |
str
|
Key for the stress data in the DataItem. |
'Stress_MPa'
|
max_strain |
Optional[float]
|
Maximum strain to consider when finding the UTS. If None, the maximum strain in the curve is used. |
None
|
Source code in paramaterial\processing.py
find_flow_stress_values(ds, strain_key='Strain', stress_key='Stress_MPa', temperature_key=None, rate_key=None, flow_strain=None)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem with stress-strain curve |
required | |
strain_key |
str
|
Data key for reading strain. |
'Strain'
|
stress_key |
str
|
Data key for reading stress. |
'Stress_MPa'
|
flow_strain_key |
Info key for writing flow strain. |
required | |
flow_stress_key |
Info key for storing flow stress. |
required | |
flow_strain |
Union[int, float, Tuple[float, float]]
|
Strain at which to find the flow stress. If None, the maximum stress is used. |
None
|
Source code in paramaterial\processing.py
find_fracture_point(ds, strain_key='Strain', stress_key='Stress_MPa')
Find the fracture point for the stress-strain curves in the DataSet. The fracture point is defined as the maximum strain in the curve. The fracture point is added to the DataSet.info dictionary as 'FP_1' and the stress at the fracture point is added as 'FP_0'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ds |
DataSet
|
DataSet with stress-strain curves |
required |
strain_key |
str
|
Key for strain data |
'Strain'
|
stress_key |
str
|
Key for stress data |
'Stress_MPa'
|
Source code in paramaterial\processing.py
find_proof_stress(ds, proof_strain=0.002, strain_key='Strain', stress_key='Stress_MPa', E_key='E')
Find the proof stress of a stress-strain curve.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem with stress-strain curve |
required | |
proof_strain |
float
|
Strain at which to find the proof stress |
0.002
|
strain_key |
str
|
Key for strain data |
'Strain'
|
stress_key |
str
|
Key for stress data |
'Stress_MPa'
|
Source code in paramaterial\processing.py
find_upl_and_lpl(ds, strain_key='Strain', stress_key='Stress_MPa', preload=0, preload_key='Stress_MPa', max_strain=None, suppress_numpy_warnings=True)
Determine the upper proportional limit (UPL) and lower proportional limit (LPL) of a stress-strain curve. The UPL is the point that minimizes the residuals of the slope fit between that point and the specified preload. The LPL is the point that minimizes the residuals of the slope fit between that point and the UPL. The elastic modulus is the slope between the UPL and LPL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
di |
DataItem with stress-strain curve |
required | |
strain_key |
str
|
key for strain data |
'Strain'
|
stress_key |
str
|
key for stress data |
'Stress_MPa'
|
preload |
float
|
preload value |
0
|
preload_key |
str
|
key for preload data |
'Stress_MPa'
|
max_strain |
Optional[float]
|
maximum strain to consider |
None
|
suppress_numpy_warnings |
bool
|
suppress numpy warnings |
True
|
Returns:
| Type | Description |
|---|---|
DataSet
|
DataItem with UPL, LPL, and E added to info. |
Source code in paramaterial\processing.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |