Repository navigation
[IMPL] Equivalent stress amplitude functions #60
Description
Activity
After a discussion with @MartinNesladek we decided that mean stress corrections should include negative mean stress handling. Look at the following code. This should be implemented to all mean stress functions. For more information please consult with @MartinNesladek. Thank you
import numpy as np from numpy.typing import ArrayLike, NDArray def _calc_eq_amp_stress( mean_stress: ArrayLike, stress_amp: ArrayLike, some_param: float, ) -> NDArray[np.float64]: pass def calc_eq_amp_stress( mean_stress: ArrayLike, stress_amp: ArrayLike, some_param: float, allow_neg_mean_stress: bool = True, ) -> NDArray[np.float64]: """Calculate the equivalent stress based on mean stress and amplitude stress. Args: mean_stress (ArrayLike): The mean stress values. stress_amp (ArrayLike): The amplitude stress values. some_param (float): Description of some_param. allow_neg_mean_stress (bool, optional): A flag to control the calculation method. Defaults to True. Returns: NDArray[np.float64]: The calculated equivalent amplitude stress values. """ mean_stress = np.asarray(mean_stress, dtype=np.float64) stress_amp = np.asarray(stress_amp, dtype=np.float64) some_param = float(some_param) eq_amp_stress = _calc_eq_amp_stress(mean_stress, stress_amp, some_param) if not allow_neg_mean_stress: eq_amp_stress = np.where(mean_stress < 0, stress_amp, eq_amp_stress) return eq_amp_stress@JanHPapuga
I would like to ask you for feedback of usecase applicability for the Meanstress corrections, so we ship meaningful documentation along with functions.One or two sentences per
mean stress correctionfunction should be ideal.Here is a list of criterions
original paperIn addition I think that @KarasTomas has implemented some based on MartinNesladek Lectures.
@KarasTomas Please fill in here list of criterions that we need documentation for. Thank you.@JanHPapuga I would like to ask you for feedback of usecase applicability for the Meanstress corrections, so we ship meaningful documentation along with functions.
One or two sentences per
mean stress correctionfunction should be ideal.Here is a list of criterions original paper
In addition I think that @KarasTomas has implemented some based on MartinNesladek Lectures. @KarasTomas Please fill in here list of criterions that we need documentation for. Thank you.
List of implemented functions:
- ASME
- Bagci
- Gerber
- Goodman
- Half-Slope
- Linear
- Morrow
- Soderberg
- Smith
- SWT
- Walker
If there is another function that would fit the scope of this issue feel free to mention them with some reference/description. I can add them to PR #55 before we merge it.
@KarasTomas
According to @MartinNesladek it is not simply possible to summarize use-case / meaning of the mean stress correction methods further than describing mathematical formulation, therefore it can be ommited.
Implement equivalent stress amplitude functions for
In addition in collaboration with @JanHPapuga update docstrings of the function to include applicability, meaning.