Computing the damage

There is a few similar methods for the damage calculation. (note: damage is reversed value of Number of cycles; D = 1/N)

They differ only in the load input format. Load can be defined by load1 and load2 (compute_D_l1_l2()), or by apmlitude and R-ratio (compute_D_amp_R()) or by the amplitude and meanstress (compute_D_amp_mean()).

Let's show one of them, e.g. compute_D_l1_l2():

compute_D_l1_l2(self, load, verbose=False, excel_out=None):

load : np.ndarray
    0 axis ... loadcycles
    1 axis ... sequence of [load1, load2, required_cycles, shift_factor]

    [[load1, load2, required_cycles, shift_factor], ...]

verbose : bool
    if True, prints recalculated SN-curve amplitudes to R=-1 (used for calculation),
    default: False

excel_out : string, optional
    name of the xlsx output file where calculation details will be written

df : pd.DataFrame
    includes results and some other interesting information

You can see that the load is defined in the numpy array. First axis contains separate loadings to be computed, second axis contains an iterable of load1, load2, required_cycles & shift_factor. (other methods like compute_D_amp_R() contain amplitude and R-ratio instead of load1 and load2)

There is a verbose option, that warns you in the case that SN curve is given for different R-ratio than R=-1. In that case SN-curve parameters are recalcualted automatically to R=-1 as well as the load.

output to the excel document

Another interesting option is the possibility to export results into an excel file. Calculation results, used SN-curve parameters for original R and R=-1 and also SN-curve points (e.g. for a fast plot) will be exported in excel document if you pass its name as a parameter excel_out.