Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

Defect Descriptor

Configurational-force and mixed-mode defect descriptors directly from experimental field maps.

License: MITMATLABPaper DOIInputs

Defect Descriptor is a MATLAB toolbox for extracting local mechanical descriptors from measured or synthetic displacement, displacement-gradient, deformation-gradient, and strain maps. It calculates configurational-force quantities and mixed-mode stress intensity factors directly from field data, without requiring a standard specimen geometry, a known applied load, or a predefined finite-element boundary-value problem.

The toolbox is intended for cracks, dislocations, microcracks, fatigue cracks, and other localised defect fields where the useful information is already present in the measured map.

Defect Descriptor computational workflow

Computational workflow for field import, preprocessing, integral calculation, mode decomposition, and output generation.


What the toolbox gives you

OutputMeaningTypical use
JEnergy-release/configurational-force integralCrack-driving force and contour convergence checks
MConfigurational-force descriptorDirectional defect force and defect-severity analysis
KIMode-I stress intensity factorOpening or closing at the crack/defect field
KIIMode-II stress intensity factorIn-plane shear contribution
KIIIMode-III stress intensity factorOut-of-plane or anti-plane shear contribution, where supported by the input field
J1, J2Vectorial components of the J-integralDirectional crack-driving force
M1, M2Vectorial components of the M-integralDirectional configurational-force descriptor
Direction sweepJ, M, KI, KII, and KIII over trial directionsFinding the maximum-energy virtual crack extension direction

The main solver is:

[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data, Prop);

The returned structures contain the converged values, contour/domain-wise raw values, standard deviations, and plotting data used to judge convergence.


Why this matters

Conventional fracture-mechanics calculations are clean when the geometry, crack path, loading, and boundary conditions are known. Real experimental data are rarely that clean.

Defect Descriptor starts from the measured field itself. It is useful when you want to:

  • calculate J, M, KI, KII, and KIII from local field maps;
  • analyse non-standard cracks, curved crack fronts, microcracks, dislocations, or defect clusters;
  • work with DIC, stereo-DIC, DVC, HR-EBSD, HR-TKD, or synthetic validation fields;
  • avoid relying on idealised specimen solutions when the real boundary conditions are unknown;
  • test how the assumed virtual crack extension direction changes the extracted fracture descriptors.

The method is powerful, but not magic. It extracts meaningful quantities only when the input field is physically meaningful, sufficiently resolved, correctly scaled, and centred around the defect.


Repository structure

Defect_Descriptor/
├── Data/ # Example datasets and README figures
│ ├── 366_2025_2262_Fig1_HTML.webp
│ ├── 366_2025_2262_Fig2_HTML.png
│ ├── 366_2025_2262_Fig3_HTML.webp
│ ├── 366_2025_2262_Fig4_HTML.webp
│ ├── 366_2025_2262_Fig5_HTML.webp
│ └── 366_2025_2262_Fig6_HTML.webp
├── functions/ # Core MATLAB routines
├── input_desk_Validation.m # Synthetic-field validation examples
├── input_desk_DIC.m # 2D DIC, stereo-DIC, and elastoplastic examples
├── input_desk_xEBSD.m # HR-EBSD/xEBSD example workflow
├── input_Direction_Sweep.m # Direction sweep over trial VCE angles
├── LICENSE # MIT licence
└── README.md

Quick start

Clone the repository and run MATLAB from the repository root:

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));

Then choose the input desk that matches your data type.

Input deskUse it for
input_desk_Validation.mSynthetic fields with known KI, KII, and KIII
input_desk_DIC.m2D DIC, stereo-DIC, displacement maps, and elastoplastic examples
input_desk_xEBSD.mHR-EBSD/xEBSD displacement-gradient or strain-gradient workflows
input_Direction_Sweep.mVCE-angle sweep from negative to positive trial directions

Example 1: validate the code with a synthetic mixed-mode field

Start here before using experimental data. The validation desk generates a known mixed-mode field and checks whether the toolbox recovers the prescribed values.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
% Generate synthetic field with known mixed-mode input:% KI = 3, KII = 1, KIII = 2
[~, ~, alldata, Prop] = Calibration_2DKIII(3, 1, 2);
% U means displacement-gradient input
Prop.Operation ='U';
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(alldata, Prop);

Synthetic mixed-mode validation field and convergence plots

Synthetic mixed-mode validation: displacement fields, convergence of KI, KII, KIII, and sensitivity to virtual crack extension direction.

Use this workflow to test installation, paths, units, and the expected data layout before introducing experimental noise.


Example 2: DIC or stereo-DIC displacement fields

Use input_desk_DIC.m for measured displacement maps.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
Prop.E =210e9; % Young's modulus [Pa]
Prop.nu =0.30; % Poisson's ratio [-]
Prop.units.St ='Pa'; % Stress unit
Prop.units.xy ='mm'; % Coordinate unit: 'm', 'mm', 'um', or 'nm'
Prop.stressstat ='plane_stress'; % 'plane_stress' or 'plane_strain'
Prop.Operation ='DIC'; % Raw DIC or stereo-DIC displacement data
DataDirect = fullfile(pwd, 'Data', '1KI-2KII-3KII_Data.dat');
Data = importdata(DataDirect);
[K, KI, KII, KIII, J, M, Maps] = M_J_KIII_2D(Data.data, Prop);

For elastoplastic behaviour, define the additional Ramberg-Osgood-type parameters before calling the solver:

Prop.E =210e9;
Prop.nu =0.30;
Prop.yield =4e9; % Yield stress [Pa]
Prop.Yield_offset =1.24; % Hardening coefficient
Prop.Exponent =26.67; % Hardening exponent
Prop.units.St ='Pa';
Prop.units.xy ='m';
Prop.stressstat ='plane_stress';
Prop.Operation ='DIC';

Experimental DIC setup and EDI concept

DIC measurement and equivalent domain integration concept around a crack tip.


Example 3: HR-EBSD or xEBSD maps

Use input_desk_xEBSD.m when the field has been prepared through an xEBSD-style workflow.

clc; clear; closeall
addpath(genpath(fullfile(pwd, 'functions')));
filename = fullfile(pwd, 'Data', 'Crack_in_Si_XEBSD');
[Maps, alldata] = GetGrainData(filename);
M_J_KIII_2D(alldata, Maps);

For CrossCourt or other HR-EBSD pipelines, prepare the data into the same column structure expected by the solver. The example is a useful template, not a universal importer for every HR-EBSD output format.

HR-EBSD indentation crack example

Example HR-EBSD application to an indentation-induced microcrack, including stress maps and convergence of J and SIFs.


Example 4: dislocation and M-integral analysis

For dislocations or other defect fields where the goal is not only crack-tip fracture but configurational-force characterisation, the toolbox can be used to evaluate M1 and M2 from measured or simulated displacement-gradient fields.

HR-TKD dislocation example and M-integral convergence

Application to experimental and simulated dislocation fields in anisotropic tungsten, showing M-integral convergence.


Example 5: direction sweep

input_Direction_Sweep.m rotates the local tensor field over a range of trial angles and recalculates the descriptors at each angle.

crack_angles =-90:1:90;
for i =1:length(crack_angles)
theta = crack_angles(i);
R = [cosd(theta) -sind(theta) 0;
sind(theta) cosd(theta) 0;
001];
% Rotate the local tensor field before solving% RotatedAlldata = ...
[K, KI, KII, KIII, J, M] = M_J_KIII_2D(RotatedAlldata, Prop);
end

Typical sweep outputs include:

ColumnMeaning
Theta_degTrial virtual crack extension angle
J_J_per_m2Scalar J value
KI_MPa_sqrt_mMode-I stress intensity factor
KII_MPa_sqrt_mMode-II stress intensity factor
KIII_MPa_sqrt_mMode-III stress intensity factor
J1_J_per_m2, J2_J_per_m2Vectorial J components
M1_J_per_m, M2_J_per_mVectorial M components

Use this workflow when the crack or defect direction is uncertain, when the local field suggests kinking, or when the maximum-energy direction is part of the scientific question.


Example 6: 3D displacement fields and curved crack fronts

The toolbox can also be used with 3D displacement fields, for example fields obtained from digital volume correlation of X-ray computed tomography data. This is useful for fatigue cracks with complicated crack-front geometry.

3D crack example from DVC and direction sweep

DVC-based fatigue-crack example showing 3D displacement data, contour convergence, and virtual crack extension angle sweep.


Input formats

The solver accepts several forms of local field data. The most common layouts are listed below.

DIC displacement data

For 2D DIC:

X Y Ux Uy

For stereo-DIC or 3D surface displacement:

X Y Z Ux Uy Uz

Displacement-gradient or deformation-gradient data

For gradient-based input, arrange the data as:

X Y Z G11 G12 G13 G21 G22 G23 G31 G32 G33

where Gij is either the displacement-gradient component or the deformation-gradient component depending on Prop.Operation.

Operation modes

Prop.OperationInput meaningTypical source
'DIC'Displacement field2D DIC, stereo-DIC, DVC slices, synthetic displacement maps
'U'Displacement-gradient fieldSynthetic validation, HR-EBSD-style prepared data
'F'Deformation-gradient fieldDeformation-gradient maps

Required assumptions and data checks

This section is deliberately strict. Most wrong results come from violating one of these points.

Geometry and grid

Your map should be:

  • square, with the same number of points in X and Y;
  • uniformly spaced, with equal spacing in X and Y;
  • centred, with the crack tip, dislocation core, or defect centre at the centre of the analysis window;
  • large enough, so that the expanding integration domain can reach a converged region;
  • cleaned, with crack faces, holes, grain-boundary artefacts, or missing measurements handled consistently.

Units

Use compatible units throughout the analysis.

QuantityRecommended unit
StressPa
Elastic modulusPa
CoordinatesDeclare explicitly through Prop.units.xy
DisplacementsConsistent with coordinate units
JJ/m²
MJ/m
KMPa√m in reported plots/tables, depending on conversion inside the workflow

Do not mix metres, millimetres, micrometres, nanometres, Pa, and MPa casually. That is the fastest way to get a beautiful but meaningless plot.

Material behaviour

The current workflows support:

  • isotropic elastic material properties through Prop.E and Prop.nu;
  • anisotropic stiffness input where prepared in the relevant workflow;
  • elastoplastic behaviour through Ramberg-Osgood-type parameters in the DIC workflow.

The implementation is most appropriate for small-strain mechanics. Do not treat it as a finite-deformation hyperelastic toolbox without extending the formulation.


How to interpret convergence

The code expands the integration domain away from the defect and reports descriptor values as a function of contour or domain size. A useful result normally shows a stable region after the highly localised near-tip field has been excluded and before the domain reaches unrelated boundaries or neighbouring defects.

A sensible workflow is:

  1. Run the solver.
  2. Inspect the raw contour/domain sequence.
  3. Exclude the first contours if they are dominated by singularity, noise, or missing data.
  4. Exclude later contours if they interact with boundaries, grain boundaries, other cracks, or surrounding defects.
  5. Report the mean and standard deviation over the stable region only.

If there is no stable region, the result is not trustworthy. Do not rescue it by averaging everything.


Common problems

ProblemLikely causeWhat to check
J or K values are orders of magnitude wrongUnit mismatchProp.units.xy, stress units, modulus units, displacement units
No stable convergence regionField of view too small or neighbouring defects includedCrop differently or increase the measured region
Strong oscillation in KII or KIIINoisy gradient field or incorrect VCE directionSmooth cautiously, verify coordinate frame, run a direction sweep
Negative KICrack field is locally closing rather than openingCheck load state, residual stress, unloading condition, and sign convention
xEBSD example does not runGetGrainData not on path or data not prepared in expected formatAdd the required xEBSD helper functions and check the data structure
Pretty figure but physically absurd valuesInput field is not mechanically consistentCheck centring, rigid-body motion, filtering, cracks/faces, and boundary artefacts

Recommended workflow for a new dataset

1. Prepare the field map
- remove obvious artefacts
- correct rigid-body motion where needed
- mask crack faces or missing data consistently
2. Regularise the map
- square analysis window
- equal X and Y spacing
- defect centred in the field of view
3. Choose input mode
- DIC for displacement maps
- U for displacement-gradient maps
- F for deformation-gradient maps
4. Define material and units
- E, nu, or stiffness matrix
- plane stress or plane strain
- coordinate and stress units
5. Run M_J_KIII_2D
6. Inspect convergence
- choose the stable contour/domain region
- report mean and standard deviation
7. Optional direction sweep
- rotate the VCE direction
- identify maximum J or physically preferred propagation direction

Citation

If you use this toolbox, please cite:

@article{Koko2026DefectDescriptor,
title = {Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis},
author = {Koko, Abdalrhaman and Abdelnour, Alya and Becker, Thorsten H. and Marrow, T. James},
journal = {Engineering with Computers},
volume = {42},
pages = {21},
year = {2026},
doi = {10.1007/s00366-025-02262-5}
}

Paper: https://doi.org/10.1007/s00366-025-02262-5


Figure attribution

Figures in Data/366_2025_2262_Fig*_HTML.* are from:

Koko, A., Abdelnour, A., Becker, T. H. & Marrow, T. J. Bridging experiments and defects' mechanics: a data-driven toolbox for configurational force analysis.Engineering with Computers 42, 21 (2026). https://doi.org/10.1007/s00366-025-02262-5

The article is distributed under the Creative Commons Attribution 4.0 International License. If you reuse or adapt the figures, credit the original authors, cite the article, link the licence, and indicate whether changes were made.


License

This repository is released under the MIT License. See LICENSE.


Contributing

Contributions are welcome, especially for:

  • clearer input-data converters for CrossCourt, xEBSD, DVC, and other field-measurement pipelines;
  • improved plotting and output tables;
  • additional benchmark cases;
  • uncertainty propagation for noisy experimental maps;
  • finite-deformation extensions beyond the current small-strain implementation.

Before opening a pull request, test the validation desk and include a short description of the dataset, units, material model, and expected output.

About

This code decompose the Stress intesity factors from strain maps directly without the need for integration

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages