Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2025 Feb 28;15:7106. doi: 10.1038/s41598-024-82340-8

B-FADE: Bayesian-fatigue model estimator in Python and its application to the probabilistic estimation of El Haddad curves

Alessandro Tognan 1,, Enrico Salvati 1
PMCID: PMC11868521  PMID: 40016220

Abstract

The accurate calibration of semi-empirical fatigue models against experimental evidence is a critical step for achieving reliable predictions. Amongst many semi-empirical fatigue models, El Haddad’s (EH) curve is widely exploited to characterise the fatigue endurance limit of defect-laden and cracked metallic alloys. A few deterministic computational models exist in this respect, however, they lack a robust probabilistic perspective and their implementation code is not publicly accessible. The authors of the present work have recently exploited Maximum a Posteriori (MAP) to robustly and probabilistically estimate EH’s curves, even in case of data scarcity or incomplete datasets, combining experimental evidence and prior knowledge taken from literature. Whilst the implementation scheme was published, the associated code was not made available. Hereby, the authors present B-FADE, a flexible open-source Python package, aimed at releasing the implementation of the MAP approach with improvements, as well as several pre- and post-processing utilities to facilitate its deployment. The package is conferred with a sufficient level of abstraction, thus turning out to be easily extensible to future implementation of other relevant fatigue models.

Keywords: El Haddad, Defects, Fatigue endurance limit, Maximum a posteriori, Python

Subject terms: Mechanical engineering, Software, Structural materials

Introduction

El Haddad’s (EH) curve is a semi-empirical model based on Linear Elastic Fracture Mechanics (LEFM) that allows practitioners to estimate the fatigue endurance limit of metals as a function of material’s cracks or defects characteristic size, for a predefined runout threshold in terms of the number of cycles (Inline graphic), and applied stress ratio (R)1,2. Without loss of generality, the author will refer to defective materials, however, the same reasoning can straightforwardly be applied to other solids containing cracks. To do so, the application of EH’s curve necessitates defects to be regarded as cracks, endowed with a characteristic crack-length and having such a dimension much smaller than the whole probed material’s cross section. As comprehensively reviewed in3, Murakami’s rationale can be followed for several metallic alloys manufactured through various techniques, for instance casting and additive manufacturing. In this respect, defects are related to the renowned Inline graphic, i.e. the square root of their surface projection onto the plane orthogonal to the direction of the applied stress range Inline graphic4,5. The EH formulation of the fatigue endurance limit assumes the stress intensity factor (SIF) range as the fatigue crack driving force. Adopting Inline graphic for the crack-like defect length, the SIF is defined as:

graphic file with name M5.gif 1

where Y is given by the distance of defect’s centroid to the free-surface of the fatigued sample6. EH’s curve is mathematically expressed as:

graphic file with name M6.gif 2

in which Inline graphic is the fatigue endurance limit of the defect-free specimen, and Inline graphic is EH’s critical length:

graphic file with name M9.gif 3

where, in turn, depends upon the SIF range threshold for long cracks Inline graphic. From a phenomenological perspective, EH’s curve partitions the Inline graphic plane into the regions of propagating and non-propagating cracks. Hence, prospective runout and failed samples with a given Inline graphic shall predominantly be collocated beneath and above the curve, respectively, as schematically portrayed in Fig. 1. Under this traditional phenomenological behaviour of EH’s curve, runouts are regarded as samples that are expected to survive at least Inline graphic cycles, whereas failed samples are those meant to fail prior to Inline graphic.

Fig. 1.

Fig. 1

Pictorial representation of EH’s curve along with a fictitious dataset over a log-log plot. Runout and failed samples are primarily located above and beneath the curve. Runouts as those sample whose fatigue life exceeds the fatigue runout threshold (Inline graphic). Failed samples are those specimens that collapse prior to Inline graphic.

The robust estimation of Inline graphic and Inline graphic is vital when employing EH’s curve in the context of defective or cracked metallic materials. Nonetheless, estimating Inline graphic is rather prohibitive since producing ideally defect-free metallic parts without altering the intrinsic fatigue properties of the materials is hardly attainable. In contrast, determining Inline graphic is feasible through established fatigue crack growth (FCG) tests, albeit not always affordable. When Inline graphic cannot experimentally be determined, a viable solution would be to infer EH’s parameters (Inline graphic and Inline graphic) by exploiting classic uniaxial constant amplitude fatigue tests at different magnitude of amplitude, thus exploiting post-mortem fractography to evaluate the characteristic dimension (Inline graphic) of the defect responsible for fatigue crack nucleation and failure (killer defect). Conversely, if Inline graphic is independently retrievable through dedicated experiment, such information can act as prior knowledge, thus being extremely beneficial to achieve even more precise estimation of EH’s parameters. It is important to highlight that, fatigue data of defective materials incorporates relevant epistemic and aleatoric uncertainty, thus leading to scattered fatigue response713. Hence, Inline graphic and Inline graphic urge to be probabilistically determined to account for these uncertainties.

EH’s curve has undergone several advancements, specifically regarding its generalisation to the finite fatigue life regime. Accordingly, several deterministic identification methods for EH’s curves have been emerged. For instance, Ciavarella exploited fatigue data in conjunction with fatigue crack growth (FCG) models to identify EH’s curves at targeted fatigue lives14. Besides, Sheridan used Paris’15, Donahue’s model16, and NASGRO equation17,18 to address the same issue in regards to the commercial Inconel 71819,20. It is worth mentioning Chapetti’s work that aimed to extend EH’s to the short-cracks regime while identifying EH’s parameters considering crack closure effects as well21,22. This approach has recently found application in the context of additive manufacturing23,24. Being practical and readily applicable, the EH curve has been exploited for in numerous scenarios3. Despite this, it should be noted that the EH curve characterises the fatigue endurance limit for a single fatigue load condition. Therefore, the EH curve does not allow for capturing the effects of other factors, e.g. R and load frequency, which are known to impact both the endurance limit and lifetime25,26 – the latter, however, may have an effect only under particular conditions27.

The literature reports a few methods to address the identification of EH’s curves from a probabilistic standpoint. Aigner et al. inferred both Inline graphic and Inline graphic through a Weibull’s distribution to model the survival probability of the analysed batch of AlSi8Cu3 samples28. Eventually, the parameters of the distribution were identified by combining FCG and fatigue tests, and post-mortem fractography data. Another strategy sharing some of the aspects with the former approach was devised in regards to AM50hp and AZ91hp Mg alloys29. More recently, the authors of the present paper exploited Maximum a Posteriori Estimation (MAP) and Machine Learning (ML) to probabilistically determine Inline graphic and Inline graphic. The key concept of the approach was morphing the behaviour of EH’s curve (Fig. 1) into a dichotomous classification problem via Logistic Regression (LR)30. The proposed computational algorithm was designed to process only uniaxial constant amplitude fatigue data retrieved at several levels of Inline graphic, and the corresponding size, Inline graphic, of the “killer” defect that triggered fatigue failure. The MAP approach effectively dealt with incomplete datasets and small-data regimes, thanks to the possibility of introducing relevant information from the literature by shaping appropriate prior (distributions). Furthermore, statistical post-processing allowed for the retrieval of EH’s curve at different failure probabilities31. Given the relatively young age of the MAP approach, its potential has only been exploited in32, to the best of the authors’ knowledge.

Notwithstanding many specific approaches to identifying EH’s curve, the literature seems to lack handy publicly available software packages to assist practitioners with this crucial issue. To bridge this gap, the present work pursues the ambitious objective of providing the research community with a novel open-source Python package, namely B-FADE, which revises and encodes the MAP-based approach formerly conceived and presented in31. An illustrative example is presented with regard to EH’s curve, thereby showing its workflow to prospective users. Additionally, the work aims to propose a flexible and extensible code intending to subsequently address MAP for numerous recurrent fatigue models besides EH’s curve. Herein, the distinctive features, and limitations of B-FADE are critically vetted.

Mathematical framework of B-FADE

General setting

Given a target curve Inline graphic described by a set of parameters gathered in the vector Inline graphic, B-FADE is designed to solve MAP, i.e. it maximises the posterior (distribution) Inline graphic of Inline graphic after observing the training dataset Inline graphic. To facilitate the calculations the logarithm is formerly applied to Inline graphic, whose monotonicity lead to the following equivalent formulation of MAP:

graphic file with name M40.gif 4

In fact, B-FADE solves for Inline graphic since it uses minimize from scipy.optimise33. In the last relationship, Inline graphic is given by Bayes’ theorem:

graphic file with name M43.gif 5

hence:

graphic file with name M44.gif 6

in which Inline graphic, Inline graphic, are respectively the log-likelihood (function) and the log-prior, whereas Inline graphic i.e. logarithm of the so-called evidence, is neglected in the implementation since it is a constant as vanishes while maximising Eq. (4). As concerns the term Inline graphic, namely the log-likelihood, B-FADE implements Bernoulli likelihood since it is currently devoted to classification problems:

graphic file with name M49.gif 7

where Inline graphic is the ground-truth label, and Inline graphic is predicted label via LR:

graphic file with name M52.gif 8

where Inline graphic is the signed distance between the training point Inline graphic to the target curve having unknown parameters Inline graphic. In regards to the prior Inline graphic, B-FADE initially prescribes independent uniform probability distributions over Inline graphic. Nonetheless, the user can place over Inline graphic any pertinent distribution based on their prior knowledge subsequently.

After estimating Inline graphic via Eq. (4) and the corresponding curve Inline graphic, B-FADE carries out additional operations to approximate the full posterior. The variational approximation of Inline graphic is computed34, i.e. the posterior is represented as a multivariate Gaussian distribution whose mean is Inline graphic:

graphic file with name M63.gif 9

where Inline graphic is the inverse Hessian matrix of Inline graphic, which act as a covariance matrix.

Upon approximating the posterior, B-FADE can compute the prediction interval for the identified curve Inline graphic:

graphic file with name M67.gif 10

B-FADE does so by sampling Inline graphic curves from Eq. (9) in a Monte Carlo fashion. The sampling can be performed either by considering the full Hessian matrix, or by neglecting its anti-diagonal entries. The former option, however, allows for taking into account the potential correlation that might arise from Inline graphic. In any case, Eq. (10) shows the mean, Inline graphic, and semi-amplitude of the interval, Inline graphic, of the Inline graphic curve trials:

graphic file with name M73.gif 11

where Inline graphic is the prescribed confidence level, Inline graphic is the standard deviation of the curve trials. Lastly, Inline graphic is Inline graphic percentile of Student’s t-distribution.

Besides the prediction interval, which were only originally envisaged in31, B-FADE also offers the computation of the predictive posterior (distribution), which can be useful to predict the output class y unseen data Inline graphic. The predictive posterior is mathematically stated as:

graphic file with name M79.gif 12

which can be post-processed in terms of the expected value Inline graphic (mean) and the uncertainty Inline graphic (standard deviation) to probabilistically characterise the predictions. Still, the integration is well-known to be analytically unfeasible, so B-FADE implements the following approximation:

graphic file with name M82.gif 13

where the samples Inline graphic are drawn from Inline graphic.

El Haddad curves

If one wishes to identify EH’s curves, they would consider Eqs. (23) and define Inline graphic as the vector of trainable parameters. It should be noted that the present approach is designed to addresses the identification of the Inline graphic and Inline graphic for a given stress ratio R, in agreement with the traditional formulation of the EH curve. Therefore, under a given R the user would collate the following training dataset containing Inline graphic samples after fatigue tests and fractography:

graphic file with name M89.gif 14

which contains the outcomes of the fatigue tests at Inline graphic with reference to a prescribed fatigue endurance limit Inline graphic, i.e. Inline graphic (runout) and Inline graphic (failed), and the fractographic characterisation of the killer defect’s size, namely Inline graphic. The vector of the input features shall be denoted as Inline graphic hereinafter.

In case of defects characterised by multiple Inline graphic, the SIF equivalence is used to rescale Inline graphic accordingly, thus enabling defects to be represented over a unique diagram:

graphic file with name M98.gif 15

where Inline graphic is a predefined reference value.

Upon possibly prescribing appropriate prior Inline graphic, the dataset is processed via Eq. (5) to perform the MAP estimation of the parameters sought. It is worth commenting how Inline graphic is computed (Eq. 7) with reference to the application of the LR, see Eq. (8). Particularly regarding EH’s curve, B-FADE computes the signed distance across two stages. The first, entails finding the minimum-distance point Inline graphic along the target EH’s curve over log-log plane, thus solving:

graphic file with name M103.gif 16

The second, involves calculating the signed distance between Inline graphic and Inline graphic using the common Euclidean norm:

graphic file with name M106.gif 17

where Inline graphic gives the sign according to the relative position of Inline graphic to the target EH’s curve:

graphic file with name M109.gif 18

Although the outlined approach slightly differs from that developed in Ref.31 regarding the computation of the signed distance, the authors believe that the revised framework closely reflect the functional form of EH’s, which is traditionally represented on the log-log plane. This approach is deemed to deliver more accurate and reliable estimations while leading to sufficient gradient magnitude for Inline graphic to ensure an appropriate transition between the considered classes.

As mentioned earlier, one can compute both the prediction interval of the estimated EH’s curve and the predictive posterior according to the associated variational approximation of the posterior after running MAP. In agreement with31, the curves enclosing the prediction interval represent the fatigue endurance limit curve at selected failure probabilities. Since the prediction interval is retrieved via Monte Carlo simulations, it offers a frequentist evaluation of the propagating crack region. As shall be clearer later with reference to the illustrative example, the prediction interval, besides its practical interpretation, it also provides a measure of data scatter. Precisely, the more the data is scattered the wider the interval tends to be. Furthermore, the more outliers, i.e. runout surrounding failed and vice versa, the more the interval widens. For this reason such interval shall be referred to as scatter band in the following. On the other hand, Equation Eq. (13) enables one to estimate the propagating crack region in a Bayesian manner, thereby rigorously aligning with the developed MAP methodology. However, it is important to note that the application of one method does not exclude the use of the other. Specifically, users can compute the EH curves at different failure probabilities through the frequentist approach. Alongside this, practitioners can precisely compute the class of unseen data, including the uncertainty over the predicted outcome, in a Bayesian fashion. Since the approaches offer complementary insights, it was decided to implement both in B-FADE.

Overview of B-FADE

The application programming interface (API) resort to a set of specific modules, as depicted in Fig. 2.

Fig. 2.

Fig. 2

Architecture of B-FADE. Modules are framed inside rounded-corner boxes. CamelCase monospaced words are classes. Lowercase monospaced words represents class methods. Lines terminating with triangle markers indicate subclasses. Please note that the figure reports only the core methods. Ancillary methods, such as those for inspection purposes, are not shown for conciseness. util.py conceptually lists the contents of the module. Please refer to the source code for the contents not shown herein.

The module abstract.py contains three classes endowing B-FADE with sufficient abstractness, thus making it particularly suited for further extensions. The class AbstractCurve provides a generic representation for describing the curves of fatigue semi-empirical models, whereby the subclass ElHaddadCurve is instantiated, whose concrete method equation implements EH’s curve (Eqs. 23)). Alongside, AbstractBayes incorporates the methods to carry out MAP for the concrete representation of fatigue models. ElHaddadBayes is subclassed from AbstractBayes while implementing the concrete method predictor. Such a method encodes the computation of the LR and signed distance as shown in Eq. (816), respectively.

Regarding data preparation, B-FADE conveys two main classes in dataset.py. The former is SyntheticDataset, which incorporates a method to generate datasets for testing purposes. The latter is Dataset, which is a generic class that provides a common interface to structure the acquisition of datasets. In this instance, ElHaddadDataset is subclassed from the latter, and it implements methods to partition and pre-process the set of experimental observations, such as the SIF equivalence of Eq. (15).

The module statistics.py contains the class MonteCarlo, which is devoted to sampling the posterior (Eq. 12) and computing the scatter band (Eq. 1011). Alongside this class, Distribution is designed to wrap scipy distributions33, thereby facilitating the prescription of priors.

As concerns the inspection of input data, intermediate stages of MAP, and results, the module viewers.py provides the users with three viewers to probe the methods of the classes above – similarly to a model-view-controller design pattern35. In particular, BayesViewer and LaplacePosteriorViewer are subclassed from AbstractMAPViewer. The former is dedicated to inspecting the contours of the elements of Bayes’ theorem (Eq. 5), i.e. log-prior, -likelihood, and -posterior, whereas the latter allows displaying the approximated posterior (Eq. 13) and its marginal distributions. Further, PreProViewer class generates a canvas which permits the user to display the input data, the scatter band, and the predictive posterior over the plane where the identified curve is expected to lay in.

Lastly, util.py collects several utilities to support the execution the previous modules – their explanation is deferred to the documentation for brevity.

Workflow for El Haddad curves and discussion

To showcase the workflow of B-FADE, the literature dataset of a Ti6Al4V manufactured via both Selective Laser Melting (SLM) and Electron Beam Melting (EBM) taken from Ref.36,37 was considered as a case study. The material underwent constant stress amplitude fatigue tests at Inline graphic, and the fatigue endurance limit was referred to Inline graphic cycles.

Data acquisition and pre-processing

B-FADE primarily reads data from comma-separated files and spreadsheets. Irrespective of the format, the files must report dedicated columns listing Inline graphic, Inline graphic, Inline graphic for each i-th killer defect (or prospective killer defects for runout samples). An additional column must be reserved to a binary label Inline graphic indicating whether each sample is either runout (Inline graphic) or failed (Inline graphic). In this case, all defects are regarded as surface and referred to Inline graphic; therefore, an equivalent Inline graphic must be calculated beforehand according to Eq. (15), if necessary.

After acquiring and preparing the dataset, it is possible to obtain a preliminary overview of the experimental observations using PreProViewer from viewers.py. Analogously to what is shown in36, it was decided to collate the samples of both manufacturing processes into a single dataset, as portrayed in Fig. 3.

Fig. 3.

Fig. 3

Dataset of the Ti6Al4V manufactured via both SLM and EBM from36,37. Runout and failed specimens are represented as circle and cross markers. Whilst the rightmost colour bar shows the SIF range Inline graphic associated with each sample.

Maximum a posteriori

Let us assume Inline graphic priors are prescribed over Inline graphic, i.e. in the absence of prior knowledge. Thus, MAP (Eq. 4) reduces to Maximum Likelihood Estimation (MLE). Before proceeding, it is worth visualising Inline graphic invoking BayesViewer in viewers.py, see Fig. 4a). Therein, it is possible to observe that the log-likelihood possesses a maximum surrounded by the contour line holding the highest value. The execution of MAP, in fact MLE in this case, succeeded in providing the expected values: Inline graphic and Inline graphic and the associated EH’s curve Inline graphic The results are reported in Fig. 8 and transferred to Appendix “MLE estimate of El Haddad curve” in order not to overload the main content of the present manuscript. Therein, the displayed identified curve approaches that in Ref.36, and it can be regarded as plausible given the limited amount of data. Still, little mismatch can be noticed with particular regard to Inline graphic, and Inline graphic may overestimate the fatigue endurance limit of the considered material. Moreover, MLE is rather limiting as it can only compute the expected values of the parameters compared to MAP, which can calculate the probabilistic intervals where the parameters are meant to belong.

Fig. 4.

Fig. 4

Contour plots of the MAP elements. (a) Log-likelihood. (b) Log-prior. (c) Log-posterior. The marker in this panel indicates the position of the maximum, i.e. Inline graphic, and Inline graphic.

Fig. 8.

Fig. 8

MLE Estimate of EH’s curve for the considered dataset and comparison with the curve of Ref.36.

For these reasons, prior information from other appraisals in the literature was exploited38,39. Accordingly, the following priors were placed over the parameters sought, namely Inline graphic Inline graphic. The resulting log-prior Inline graphic is shown in Fig. 4b, whereas the Inline graphic is given Fig. 4c, which clearly indicates the existence of a maximum point surrounded by the highest contour line. Therefore, MAP was executed and converged to the anticipated maximum located at Inline graphic and Inline graphic. The curve associated with these values shall be referred to as Inline graphic. Following MAP, B-FADE computed the variational approximation of the posterior in agreement with Eq. (9), i.e. Inline graphic. The contour of its joint distribution is shown in Fig. 5a, whereas its marginal distributions are given in Fig. 5b,c. Quantitively, these marginal distribution turned out to be Inline graphic and Inline graphic.

Fig. 5.

Fig. 5

Variational approximation of the posterior. (a) Contour plot of the joint distribution of the posterior. (b) Marginal distribution of Inline graphic. (c) Marginal distribution of Inline graphic.

Frequentist characterisation of the propagating crack region

Since significant correlation owing to Inline graphic can be noticed in Fig. 5a, the joint posterior is sampled Inline graphic times. A Monte Carlo simulation was run, thus retrieving the scatter band of Inline graphic for a confidence level Inline graphic Accordingly, the retrieved lower and upper bounds of the scatter band, i.e. Inline graphic and Inline graphic correspond to fatigue endurance the limit at 0.5% and 99.5% failure probability level. This yields to a natural interpretation of the obtained bounds: the experimental points located surrounding the lower and upper bounds shall be characterised by 0.5% and 99.5% failure probability, respectively. For instance, an unseen datum close to the upper bound (99.5% curve) is expect to fail, i.e. it holds label 1, with 99.5% probability – analogously for the 0.5% curve. It is worth remarking that the scatter band was retrieved in a Monte Carlo fashion, so it offers a frequentist characterisation of the propagating crack region.

The bounds of the scatter band are shown along with Inline graphic in Fig. 6. As concerns Inline graphic, the expected curve well captures the global pattern of Inline graphic and it evidently aims to optimally separate the failed specimens from runouts. Although there exists only partial agreement between the identified curve and that of Ref36 (represented in light blue and orange, respectively), it is crucial to emphasise that the objective of B-FADE is not to achieve a perfect match with the reference curve. Instead, the goal is to infer the curve based on available data and potentially prior information from the literature. Hence, discrepancies in Inline graphic results may arise if the reference curve is determined using alternative methodologies. It is worth mentioning that prior experimental appraisals of Inline graphic, when available, would permit the construction of a statistical distribution to craft a prior, thus achieving a considerably more accurate estimate of the sought parameters. Nevertheless, Inline graphic is more than satisfactory for the intended purpose.

Fig. 6.

Fig. 6

Frequentist characterisation of the propagating crack region via in terms of the scatter band along with the estimated (optimal) EH’s curve.

Owing to Bayesian Inference, the width of the prediction bands relates to the distribution of the data: the higher the point density, the narrower the prediction bands are. The opposite phenomenon is observed towards the edges of the plot where experimental evidence becomes progressively scarce. Additionally, the information available where the training points are concentrated makes the expected curve closely align with the observed data pattern while limiting the parameters’ variability and uncertainty. Bayesian Inference also ensures that more confident predictions and even narrower bands can be obtained if additional data or prior information are provided. Furthermore, the scatter band also encloses the “reference” curve from Ref36, thereby deeming it admissible for the current dataset. As mentioned earlier, the scatter band is influenced by the dispersion of the data. Since the data points are appropriately arranged and few outliers are present, the amplitude of the scatter band is significantly limited. Furthermore, given the configuration of the dataset, a sharp transition is modelled between failures and runouts. This is also reflected in a sudden change between the region of non-propagating and propagating cracks.

Bayesian characterisation of the propagating crack region

Combining ElHaddadBayes and PreProViewer, one can compute and display the predictive posterior, namely Eq. (13), thus predicting the failure probability of prospective experimental samples Inline graphic i.e. Inline graphic Specifically, ElHaddadBayes probed the predictive posterior 50 times over a regular grid in the KT diagram, i.e. Inline graphic having a resolution of Inline graphic points. This resulted in 125000 evaluation points where Inline graphic was predicted. The grid was selected to sufficiently cover the crack size and fatigue load spectrum. In agreement with Section General Setting, the predicted values were post-processed to calculate the mean Inline graphic and the uncertainty Inline graphic at each evaluation point. The contour of the mean and uncertainty are shown in Fig. 7a,b, respectively, along with the scatter band independently determined via Eqs. (1011). In particular, these contours offers the Bayesian representation of the propagating crack region, where the contour lines represent iso-failure probability curves. This approach allows one to readily characterise the failure probability Inline graphic (Eq. 12) for unseen data Inline graphic. In this case, Inline graphic is expressed in terms of the expected value Inline graphic (mean, Fig. 7a), which takes values in [0, 1] (Inline graphic and Inline graphic), and the related uncertainty Inline graphic (standard deviation, Fig. 7b). Therefore, practitioners can straightforwardly express the predictions as Inline graphic.

Fig. 7.

Fig. 7

Bayesian characterisation of the propagating crack region via contour plots of the predictive posterior. (a) Expected value (mean), Inline graphic. (b) Uncertainty (standard deviation), Inline graphic. Each panel portrays the scatter band independently computed by Eqs. (1011).

Intriguingly, the contour’s gradient depletes within the scatter band. This foreshadows a reasonable equivalence between the methods, despite their different fundamental nature, i.e. frequentist (Monte Carlo) and fully Bayesian, respectively. The obtained results also corroborate the interpretation of the scatter band. As can be seen in Fig. 7a, the contour of mean approaches the anticipated level of failure probability in correspondence of the lower and upper bound of the scatter band derived from the adopted Inline graphic.

Prospective impact

The release of B-FADE constitutes a substantial advancement for the fatigue & fracture mechanics community. Specifically, this software package intends to address the need for available open-source codes to estimate the parameters of semi-empirical fatigue models. B-FADE implements an intuitive interface for the MAP approach of Ref.31, making it particularly suitable for being routinely employed to design structural engineering components against fatigue failure. Although current version of the package only targets the estimation of EH’s curves, its level of abstractness does not prevent further developments to tackle fatigue models other than EH’s. It should be acknowledged, however, that B-FADE tackles the identification of the EH’s curve according to its traditional formulation, i.e. under a single fatigue test condition. Therefore, one needs to identify separate EH curves for each load conditions and use them under different scenarios.

A major advantage of B-FADE over deterministic algorithms is the potential to provide probability distributions of the parameters sought, e.g. Inline graphic and Inline graphic for the specific case of EH’s curves. Consequently, this allows for computing the failure probability of samples rather than forecasting point-valued predictions, thus readily ascertaining the robustness of the predictions. Furthermore, as shown in the illustrative example, B-FADE effectively handles small datasets, thus limiting the commitment to extensive experimental data collection and reducing the related onerousness.

The strength that distinguishes B-FADE from other existing methods stems from injecting prior knowledge from the literature or experimental evidence during the parameters’ identification. In this respect, practitioners are conferred with the ability to shape any prior for incorporating information deemed relevant to the examined dataset.

Conclusions

The present manuscript illustrated the open-source Python package B-FADE and described its API, which improves and wraps the MAP approach, previously conceived by the authors in31. Although the current version of B-FADE is specifically implemented and validated for the Bayesian identification algorithm to determine EH’s parameters, i.e. Inline graphic and Inline graphic, under a specific fatigue test condition, further developments are planned to extend the code to other fatigue models. As concerns EH’s curves, however, besides offering the frequentist Monte Carlo estimation of the propagating crack region, B-FADE also provides a full Bayesian computation thereof – the two methods yield consistency. Additionally, the package implements data pre-processing and results post-processing utilities to assist users throughout the computational stages.

The illustrative case study on the Bayesian identification of EH’s curve for the considered Ti6Al4V literature dataset, demonstrated B-FADE ’s capability to deal with small-data regimes. Furthermore, B-FADE showed its potential to inject prior knowledge from the literature, thereby ensuring physically consistent results. Lastly, the Bayesian evaluation of the propagating crack region allows one to easily forecast the failure probability of prospective unseen data.

In conclusion, B-FADE shall represent a practical resource to accurately estimate EH’s curve, thus holding the promise of being routinely used for the design against fatigue failure of cracked or defective metallic materials, and generalised to other semi-empirical fatigue models.

Acknowledgements

This work has been supported by the following projects “NextGenerationEU – PNRR M4.C2.1.1 – PRIN 2022 – Codice 20229BM9EL – CUP G53D23001140006” funded by the European Union.

Appendix: MLE estimate of El Haddad curve

See Fig. 8.

Author contributions

A.T. and E.S. conceptualised and developed the methodology. A.T. carried out the implementation of software. A.T. wrote the original draft. E.S. Acquired funding resources. All authors reviewed the manuscript.

Data availability

The dataset considered herein was taken from the literature; see the referenced papers for additional information.

Code availability

The source code of B-FADE along with tutorial examples is publicly available at https://github.com/aletgn/b-fade, whereas its documentation is published at https://b-fade.readthedocs.io/en/latest/index.html. The package is available at https://pypi.org/project/b-fade/, so one can install it via, for instance, pip install –user b-fade+.

Declarations

Competing interests

The authors declare no competing interests.

Consent for publication

All the authors consent to the content of the manuscript.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.El Haddad, M. H., Smith, K. N. & Topper, T. H. Fatigue crack propagation of short cracks. J. Eng. Mater. Technol.101, 42–46. 10.1115/1.3443647 (1979). [Google Scholar]
  • 2.El Haddad, M., Topper, T. & Smith, K. Prediction of non propagating cracks. Eng. Fract. Mech.11, 573–584. 10.1016/0013-7944(79)90081-X (1979). [Google Scholar]
  • 3.Zerbst, U. et al. Damage tolerant design of additively manufactured metallic components subjected to cyclic loading: State of the art and challenges. Prog. Mater Sci.121, 100786. 10.1016/j.pmatsci.2021.100786 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Murakami, Y. & Endo, M. Effects of defects, inclusions and inhomogeneities on fatigue strength. Int. J. Fatigue16, 163–182. 10.1016/0142-1123(94)90001-9 (1994). [Google Scholar]
  • 5.Murakami, Y. Material defects as the basis of fatigue design. Int. J. Fatigue41, 2–10. 10.1016/j.ijfatigue.2011.12.001 (2012). [Google Scholar]
  • 6.Murakami, Y. II - Metal Fatigue: Effects of Small Defects and Nonmetallic Inclusions (Elsevier, 2019).
  • 7.Leonetti, D., Maljaars, J. & Snijder, H. H. B. Fitting fatigue test data with a novel S-N curve using frequentist and Bayesian inference. Int. J. Fatigue105, 128–143. 10.1016/j.ijfatigue.2017.08.024 (2017). [Google Scholar]
  • 8.Sandberg, D., Mansour, R. & Olsson, M. Fatigue probability assessment including aleatory and epistemic uncertainty with application to gas turbine compressor blades. Int. J. Fatigue95, 132–142. 10.1016/j.ijfatigue.2016.10.001 (2017). [Google Scholar]
  • 9.Patriarca, L., Beretta, S., Foletti, S., Riva, A. & Parodi, S. A probabilistic framework to define the design stress and acceptable defects under combined-cycle fatigue conditions. Eng. Fract. Mech.224, 106784. 10.1016/j.engfracmech.2019.106784 (2020). [Google Scholar]
  • 10.Beretta, S., Foletti, S., Rusconi, E., Riva, A. & Socie, D. A log-normal format for failure probability under LCF: Concept, validation and definition of design curve. Int. J. Fatigue82, 2–11. 10.1016/j.ijfatigue.2015.08.027 (2016). [Google Scholar]
  • 11.Chen, J., Liu, S., Zhang, W. & Liu, Y. Uncertainty quantification of fatigue S-N curves with sparse data using hierarchical Bayesian data augmentation. Int. J. Fatigue134, 105511. 10.1016/j.ijfatigue.2020.105511 (2020). [Google Scholar]
  • 12.Karolczuk, A. & Kurek, M. Fatigue life uncertainty prediction using the Monte Carlo and Latin hypercube sampling techniques under uniaxial and multiaxial cyclic loading. Int. J. Fatigue160, 106867. 10.1016/j.ijfatigue.2022.106867 (2022). [Google Scholar]
  • 13.Murakami, Y., Takagi, T., Wada, K. & Matsunaga, H. Essential structure of S-N curve: Prediction of fatigue life and fatigue limit of defective materials and nature of scatter. Int. J. Fatigue146, 106138. 10.1016/j.ijfatigue.2020.106138 (2021). [Google Scholar]
  • 14.Ciavarella, M. & Monno, F. On the possible generalizations of the Kitagawa-Takahashi diagram and of the El Haddad equation to finite life. Int. J. Fatigue28, 1826–1837. 10.1016/j.ijfatigue.2005.12.001 (2006). [Google Scholar]
  • 15.Paris, P. & Erdogan, F. A critical analysis of crack propagation laws. J. Basic Eng.85, 528–533. 10.1115/1.3656900 (1963). [Google Scholar]
  • 16.Donahue, R. J., Clark, H. M., Atanmo, P., Kumble, R. & McEvily, A. J. Crack opening displacement and the rate of fatigue crack growth. Int. J. Fract. Mech.8, 209–219. 10.1007/BF00189783 (1972). [Google Scholar]
  • 17.NASA-JSC & SwRI. NASGRO fracture mechanics and fatigue crack growth analysis software, version 4.02 (2002).
  • 18.Forman, R. et al. NASGRO: Fracture mechanics and fatigue crack growth analysis software (2004).
  • 19.Sheridan, L. A modified El-Haddad model for versatile defect tolerant design. Int. J. Fatigue145, 106062. 10.1016/j.ijfatigue.2020.106062 (2021). [Google Scholar]
  • 20.Sheridan, L., Gockel, J. E. & Scott-Emuakpor, O. E. Stress-defect-life interactions of fatigued additively manufactured alloy 718. Int. J. Fatigue143, 106033. 10.1016/j.ijfatigue.2020.106033 (2021). [Google Scholar]
  • 21.Chapetti, M. Fatigue propagation threshold of short cracks under constant amplitude loading. Int. J. Fatigue25, 1319–1326. 10.1016/S0142-1123(03)00065-3 (2003). [Google Scholar]
  • 22.Chapetti, M. D. Fracture mechanics models for short crack growth estimation and fatigue strength assessment. Materia (Rio de Janeiro)27, e20220030. 10.1590/1517-7076-rmat-2022-0030 (2022). [Google Scholar]
  • 23.Bergant, M., Werner, T., Madia, M., Yawny, A. & Zerbst, U. Short crack propagation analysis and fatigue strength assessment of additively manufactured materials: An application to AISI 316L. Int. J. Fatigue151, 106396. 10.1016/j.ijfatigue.2021.106396 (2021). [Google Scholar]
  • 24.Bergant, M., Larrosa, N. O., Yawny, A. & Madia, M. Short crack growth model for the evaluation of the fatigue strength of WAAM Ti-6Al-4V alloy containing pore-type defects. Eng. Fract. Mech.289, 109467. 10.1016/j.engfracmech.2023.109467 (2023). [Google Scholar]
  • 25.Castillo, E. & Fernández-Canteli, A. A Unified Statistical Methodology for Modeling Fatigue Damage (Springer, Netherlands, 2009). [Google Scholar]
  • 26.Castillo, E. & Fernández-Canteli, A. A compatible regression Weibull model for the description of the three-dimensional fatigue Inline graphic-N-R field as a basis for cumulative damage approach. Int. J. Fatigue155, 106596. 10.1016/j.ijfatigue.2021.106596 (2022). [Google Scholar]
  • 27.Salvati, E. Evaluating fatigue onset in metallic materials: Problem, current focus and future perspectives. Int. J. Fatigue[SPACE]10.1016/j.ijfatigue.2024.108487 (2024). [Google Scholar]
  • 28.Aigner, R., Pusterhofer, S., Pomberger, S., Leitner, M. & Stoschka, M. A probabilistic Kitagawa-Takahashi diagram for fatigue strength assessment of cast aluminium alloys. Mater. Sci. Eng., A745, 326–334. 10.1016/j.msea.2018.12.108 (2019). [Google Scholar]
  • 29.Köhler, B., Bomas, H., Leis, W. & Kallien, L. Endurance limit of die-cast magnesium alloys AM50hp and AZ91hp depending on type and size of internal cavities. Int. J. Fatigue44, 51–60. 10.1016/j.ijfatigue.2012.05.011 (2012). [Google Scholar]
  • 30.Dreiseitl, S. & Ohno-Machado, L. Logistic regression and artificial neural network classification models: a methodology review. J. Biomed. Inform.35, 352–359. 10.1016/S1532-0464(03)00034-0 (2002). [DOI] [PubMed] [Google Scholar]
  • 31.Tognan, A. & Salvati, E. Probabilistic defect-based modelling of fatigue strength for incomplete datasets assisted by literature data. Int. J. Fatigue173, 107665. 10.1016/j.ijfatigue.2023.107665 (2023). [Google Scholar]
  • 32.Tognan, A., Patanè, A., Laurenti, L. & Salvati, E. A Bayesian defect-based physics-guided neural network model for probabilistic fatigue endurance limit evaluation. Comput. Methods Appl. Mech. Eng.418, 116521. 10.1016/j.cma.2023.116521 (2024). [Google Scholar]
  • 33.Virtanen, P. et al. Fundamental algorithms for scientific computing in Python SciPy 1.0. Nat. Methods17, 261–272. 10.1038/s41592-019-0686-2 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Murphy, K. P. Machine learning: a probabilistic perspective. Adaptive computation and machine learning series (MIT Press, 2012).
  • 35.Gamma, E., Helm, R., Johnson, R. & Vlissides, J. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional Computing Series (Pearson Education, 1994).
  • 36.Rigon, D. & Meneghetti, G. An engineering estimation of fatigue thresholds from a microstructural size and Vickers hardness: Application to wrought and additively manufactured metals. Int. J. Fatigue139, 105796. 10.1016/j.ijfatigue.2020.105796 (2020). [Google Scholar]
  • 37.Masuo, H. et al. Influence of defects, surface roughness and HIP on the fatigue strength of Ti–6Al–4V manufactured by additive manufacturing. Int. J. Fatigue117, 163–179. 10.1016/j.ijfatigue.2018.07.020 (2018). [Google Scholar]
  • 38.Santus, C. & Taylor, D. Physically short crack propagation in metals during high cycle fatigue. Int. J. Fatigue31, 1356–1365. 10.1016/j.ijfatigue.2009.03.002 (2009). [Google Scholar]
  • 39.Benedetti, M. & Santus, C. Building the Kitagawa-Takahashi diagram of flawed materials and components using an optimized V-notched cylindrical specimen. Eng. Fract. Mech.224, 106810 (2020). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The dataset considered herein was taken from the literature; see the referenced papers for additional information.

The source code of B-FADE along with tutorial examples is publicly available at https://github.com/aletgn/b-fade, whereas its documentation is published at https://b-fade.readthedocs.io/en/latest/index.html. The package is available at https://pypi.org/project/b-fade/, so one can install it via, for instance, pip install –user b-fade+.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES