This project presents the OxCM contour method solver, structured on the legacy version of the FEniCS open-source computing platform, that provides a standardized way of solution to the linear elastic numerical model for the calculation of residual stresses corresponding to out-of-plane displacements, that appear as a result of the changes in the boundary conditions after non-contact cutting, by a single line command in the availability of a domain composed of tetrahedral mesh and experimentally collected and processed profilometry data. For more information see the citing paper given below and contact with the authors of this paper.
- dolfin
- numpy
- scipy
- click
Dolfin is the computational environment of legacy version of FEniCS that should be installed with its dependencies using the instructions given in this link:
https://fenicsproject.org/download/archive/The latest version of the OxCM contour method solver was tested by Docker Desktop 4.40.0:
https://docs.docker.com/desktop/Install the Docker Desktop on Windows, MAC with Intel chip or MAC with Apple silicon and pull official ubuntu image:
docker pull ubuntuGo to your shared folder and initiate the container:
docker run -ti -v $(pwd):/home ubuntuNote the <container_name> from 'Docker -> Containers' and exit the running container:
exitStart the container from 'Docker -> Containers' and initiate the same container:
docker exec -it <container-name> /bin/bashInstall prerequisites:
apt-get update
apt-get install sudo
apt-get install pip
apt-get install git
apt-get install python3-venvInstall dependencies:
apt-get install python3-numpy
apt-get install python3-scipy
apt-get install python3-clickInstall FEniCS on Ubuntu:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt update
sudo apt install fenicsCreate Python 3 environment for OxCM installation:
python3 -m venv --system-site-packages oxcm
source oxcm/bin/activateUse the package manager pip to install OxCM:
pip install git+https://github.com/fatihxuzun/OxCM.gitOxCM command line interface (CLI) relies on 5 parameters:
-
--degree, an integer value that define degree of function space
-
--young, a float value that define Young's modulus
-
--poisson, a float value that define Poisson's ratio
-
--mesh, a string value that define the mesh file in 'xml' format
-
--data, a string value that define the data file in any plain text file format
Mesh file and data file should be located in the user created project folder:
/myProjectFolder$
Running OxCM command line interface (CLI) using training files:
OxCM --degree 1 --young 200e3 --poisson 0.29 --mesh 'myMesh.xml' --data 'myData.txt'Outputs of the OxCM are ParaWiev plots of displacement, elastic strain and stress with a log file of CLI parameters:
- Displacement.vtu
- ElasticStrain.vtu
- Stress.vtu
- Parameters.log
The OxCM saves outputs to the results folder located in the project folder:
/myProjectFolder/results$
This solver has been developed as a part of the study that aims to understand the influence of processing conditions and geometric irregularities on the accuracy of the contour method residual stress quantifications. Please cite:
Uzun, F., Korsunsky, A.M. The OxCM contour method solver for residual stress evaluation. Engineering with Computers 40, 3059–3072 (2024). https://doi.org/10.1007/s00366-024-01959-3
Uzun, F., Korsunsky, A.M. Eigenstrain Tomography: Full-Field Residual Stress Reconstruction via Polycrystalline Diffraction Projections. Acta Materialia (2025). https://doi.org/10.1016/j.actamat.2025.121872
Uzun, F., Slim, M.F., Basoalto, H. et al. Application of strain tomography and contour method to residual stress analysis in additively manufactured CM247LC superalloy parts. Prog Addit Manuf (2025). https://doi.org/10.1007/s40964-025-01116-2
Uzun, F., Korsunsky, A.M. Reconstruction of residual stresses in additively manufactured Inconel 718 bridge structures using contour method. Int J Adv Manuf Technol 137, 4573–4582 (2025). https://doi.org/10.1007/s00170-025-15417-x
Uzun, F., Besnard, C., Vaughan, G. et al. A Critical Evaluation of Diffraction Strain Tomography and Contour Method by Assessing Residual Elastic Strains and Quench-Induced Cracking in a Carbon Steel Bar. Met. Mater. Int. (2025). https://doi.org/10.1007/s12540-025-01976-x
