Skip to content

[IMPL] Equivalent stress amplitude functions #60

Activity

  1. added theissue type on Mar 4, 2026
  2. Vybornak2 commented on Mar 20, 2026

    @Vybornak2
    CollaboratorAuthor

    @KarasTomas

    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
    
  3. Vybornak2 commented on Mar 20, 2026

    @Vybornak2
    CollaboratorAuthor

    @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 correction function 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.

  4. KarasTomas commented on Mar 20, 2026

    @KarasTomas
    Collaborator

    @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 correction function 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.

  5. Vybornak2 commented on Mar 25, 2026

    @Vybornak2
    CollaboratorAuthor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions