{"id":21594086,"url":"https://github.com/ornl/cabanapd","last_synced_at":"2025-07-08T23:04:17.213Z","repository":{"id":64015143,"uuid":"426729507","full_name":"ORNL/CabanaPD","owner":"ORNL","description":"Peridynamics with the Cabana library","archived":false,"fork":false,"pushed_at":"2025-06-25T22:07:37.000Z","size":570,"stargazers_count":23,"open_issues_count":38,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-25T23:20:39.167Z","etag":null,"topics":["cabana","computational-materials-science","computational-mechanics","high-performance-computing","kokkos","peridynamics"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ORNL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-11-10T18:15:51.000Z","updated_at":"2025-06-25T22:07:41.000Z","dependencies_parsed_at":"2023-10-11T19:06:06.256Z","dependency_job_id":"750b6260-5b40-4f23-bfaf-b2b1537793e2","html_url":"https://github.com/ORNL/CabanaPD","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ORNL/CabanaPD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORNL%2FCabanaPD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORNL%2FCabanaPD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORNL%2FCabanaPD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORNL%2FCabanaPD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORNL","download_url":"https://codeload.github.com/ORNL/CabanaPD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORNL%2FCabanaPD/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264363749,"owners_count":23596502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cabana","computational-materials-science","computational-mechanics","high-performance-computing","kokkos","peridynamics"],"created_at":"2024-11-24T17:15:58.618Z","updated_at":"2025-07-08T23:04:17.207Z","avatar_url":"https://github.com/ORNL.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CabanaPD\n\nPeridynamics with the Cabana library\n\n## Dependencies\nCabanaPD has the following dependencies:\n\n|Dependency | Version  | Required | Details|\n|---------- | -------  |--------  |------- |\n|CMake      | 3.11+    | Yes      | Build system\n|Cabana     | f99c7db9 | Yes      | Performance portable particle algorithms\n|GTest      | 1.10+    | No       | Unit test framework\n\nCabana must be built with the following in order to work with CabanaPD:\n|Cabana Dependency | Version | Required | Details|\n|---------- | ------- |--------  |------- |\n|CMake      | 3.16+   | Yes      | Build system\n|MPI        | GPU-Aware if CUDA/HIP enabled | Yes | Message Passing Interface\n|Kokkos     | 3.7.0+  | Yes      | Performance portable on-node parallelism\n|HDF5       | master  | No       | Particle output\n|SILO       | master  | No       | Particle output\n\nThe underlying parallel programming models are available on most systems, as is\nCMake. Those must be installed first, if not available. Kokkos and Cabana are\navailable on some systems or can be installed with `spack` (see\nhttps://spack.readthedocs.io/en/latest/getting_started.html):\n\n```\nspack install cabana@master+grid+hdf5\n```\n\nAlternatively, Kokkos can be built locally, followed by Cabana:\nhttps://github.com/ECP-CoPA/Cabana/wiki/1-Build-Instructions\n\nBuild instructions are available for both CPU and GPU. Note that Cabana must be\ncompiled with MPI and the Grid sub-package.\n\n## Obtaining CabanaPD\n\nClone the master branch:\n\n```\ngit clone https://github.com/ORNL/CabanaPD.git\n```\n\n## Build and install\n### CPU Build\n\nAfter building Kokkos and Cabana for CPU, the following script will build and install CabanaPD:\n\n```\n#Change directory as needed\nexport CABANA_DIR=$HOME/Cabana/build/install\n\ncd ./CabanaPD\nmkdir build\ncd build\npwd\ncmake \\\n    -D CMAKE_PREFIX_PATH=\"$CABANA_DIR\" \\\n    -D CMAKE_INSTALL_PREFIX=install \\\n    .. ;\nmake install\n```\n\n### CUDA Build\n\nAfter building Kokkos and Cabana for Cuda:\nhttps://github.com/ECP-CoPA/Cabana/wiki/Build-CUDA\n\nThe CUDA build script is identical to that above, but again note that Kokkos\nmust be compiled with the CUDA backend. \n\nNote that the same compiler should be used for Kokkos, Cabana, and CabanaPD.\n\n### HIP Build\n\nAfter building Kokkos and Cabana for HIP:\nhttps://github.com/ECP-CoPA/Cabana/wiki/Build-HIP-and-SYCL#HIP\n\nThe HIP build script is identical to that above, except that `hipcc` compiler\nmust be used:\n\n```\n-D CMAKE_CXX_COMPILER=hipcc\n```\n\nNote that `hipcc` should be used for Kokkos, Cabana, and CabanaPD.\n\n## Tests\n\nUnit tests can be built by updating the CabanaPD CMake configuration in the\nscript above with:\n\n```\n-D CabanaPD_ENABLE_TESTING=ON\n```\n\nGTest is required for CabanaPD unit tests, with build instructions\n[here](https://github.com/google/googletest). If tests are enabled, you can run\nthe CabanaPD unit test suite with:\n\n```\ncd CabanaPD/build\nctest\n```\n\n## Features\n\nCabanaPD currently includes the following:\n  - Force models\n    - PD Bond-based (pairwise): prototype microelastic brittle (PMB)\n    - PD State-based (many-body): linear peridynamic solid (LPS)\n    - DEM contact: normal repulsion, Hertzian \n    - Hybrid DEM-PD\n - Mechanical response:\n   - Elastic only (no failure)\n   - Brittle fracture\n   - Elastic-perfectly plastic (bond-based only)\n - Thermomechanics (bond-based only)\n   - Optional heat transfer\n - Time integration\n   - Velocity Verlet\n - Pre-crack creation\n - Particle boundary conditions\n   - Body terms which apply to all particles\n - Grid-based particle generation supporting custom geometry\n - Output options\n   - Total strain energy density\n   - Per particle output using HDF5 or SILO\n     - Base fields: position (reference or current), velocity, force\n     - Strain energy density, damage\n\n## Examples\n\nOnce built and installed, CabanaPD `examples/` can be run. Timing and energy\ninformation is output to file and particle output is written to files (if enabled within Cabana) that can be visualized with Paraview and similar applications. \nNew examples can be created by using any of the current cases as a template. All inputs are specified in the example JSON files within the relevant `inputs/` subdirectory.\n\n### Mechanics\nExamples which only include mechanics and fracture are within `examples/mechanics`.\n\nThe first example is an elastic wave propagating through a cube from an initial Gaussian radial displacement profile from [1]. Assuming the build paths above, the example can be run with:\n\n```\n./CabanaPD/build/install/bin/ElasticWave CabanaPD/examples/mechanics/inputs/elastic_wave.json\n```\n\nThe next example is the Kalthoff-Winkler experiment [2], where an impactor\ncauses crack propagation at an angle from two pre-notches on a steel plate. The\nexample can be run with:\n\n```\n./CabanaPD/build/install/bin/KalthoffWinkler CabanaPD/examples/mechanics/inputs/kalthoff_winkler.json\n```\n\nAnother example is crack branching in a pre-notched soda-lime glass plate due to traction loading [3]. The example can be run with:\n\n```\n./CabanaPD/build/install/bin/CrackBranching CabanaPD/examples/mechanics/inputs/crack_branching.json\n```\n\nA similar case, but with multiple random pre-notches, can be run with:\n\n```\n./CabanaPD/build/install/bin/RandomCracks CabanaPD/examples/mechanics/inputs/random_cracks.json\n```\n\nThe next example is a fragmenting cylinder due to internal pressure [4]. The example can be run with:\n\n```\n./CabanaPD/build/install/bin/FragmentingCylinder CabanaPD/examples/mechanics/inputs/fragmenting_cylinder.json\n```\n\nAn example highlighting plasticity simulates a tensile test based on an ASTM standard dogbone specimen:\n\n```\n./CabanaPD/build/install/bin/DogboneTensileTest CabanaPD/examples/mechanics/inputs/dogbone_tensile_test.json\n```\nAn example demonstrating the peridynamic stress tensor computation simulates a square plate under tension with a circular hole at its center [5].\n\n```\n./CabanaPD/build/install/bin/PlateWithHole CabanaPD/examples/mechanics/inputs/plate_with_hole.json\n```\n\n### Thermomechanics\nExamples which demonstrate temperature-dependent mechanics and fracture are within `examples/thermomechanics`.\n\nThe first example is thermoelastic deformation in a homogeneous plate due to linear thermal loading [6]. The example can be run with:\n\n```\n./CabanaPD/build/install/bin/ThermalDeformation CabanaPD/examples/thermomechanics/thermal_deformation.json\n```\n\nThe second example is crack initiation and propagation in an alumina ceramic plate due to a thermal shock caused by water quenching [7]. The example can be run with:\n\n```\n./CabanaPD/build/install/bin/ThermalCrack CabanaPD/examples/thermomechanics/thermal_crack.json\n```\n\n### Thermomechanics with heat transfer\nExamples with heat transfer are within `examples/thermomechanics`.\n\nThe first example is pseudo-1d heat transfer (no mechanics) in a cube. The example can be run with: \n```\n./CabanaPD/build/install/bin/ThermalDeformationHeatTransfer CabanaPD/examples/thermomechanics/heat_transfer.json\n```\nThe same example with fully coupled thermomechanics can be run (with a much smaller timestep) using `thermal_deformation_heat_transfer.json`.\n\nThe second example is pseudo-1d heat transfer (no mechanics) in a pre-notched cube. The example can be run with: \n```\n./CabanaPD/build/install/bin/ThermalDeformationHeatTransferPrenotched CabanaPD/examples/thermomechanics/heat_transfer.json\n```\n## Visualizing with Paraview\n\nAs mentioned above, the simulation results can be visualized with Paraview or similar applications.  \n\n### How to Install\n\nThe installation instructions can be found [here](https://www.paraview.org/download/). Ensure you select the appropriate version based on your operating system.\n\n### Importing Files\n\nOnce Paraview is installed, the following simulation output file group should be imported to view the results: `particles_..xmf` for HDF5 or `particles_..silo` for SILO. \n\nIf shown the option to select a reader type, select `XDMF Reader` in the \"Open Data With ...\" window for HDF5. \n\n### Viewing Results\n\nBelow are some basic guidelines for how to perform the initial steps in order to view and analyze the results. A more in-depth tutorial for Paraview can be found [here](https://docs.paraview.org/en/latest/Tutorials/SelfDirectedTutorial/index.html).\n\n1. Select `Apply` in the lower left-hand Properties window. This will load your simulation data.\n\n2. In the Properties window, under Representation, `Surface` will be selected by default as the geometry representation. Change this to `Point Gaussian`. \n\n3. Different output fields can be selected within the Coloring menu below Representation. \n\n4. To control the size of the visualized points, scroll down within the Properties window until the Point Gaussian menu and choose a value for Gaussian Radius.\n\n## References\n\n[1] P. Seleson and D.J. Littlewood, Numerical tools for improved convergence\nof meshfree peridynamic discretizations, in Handbook of Nonlocal Continuum\nMechanics for Materials and Structures, G. Voyiadjis, ed., Springer, Cham,\n2018.\n\n[2] J.F. Kalthoff and S. Winkler, Failure mode transition at high rates of shear\nloading, in Impact Loading and Dynamic Behavior of Materials, C.Y. Chiem, H.-D.\nKunze, and L.W. Meyer, eds., Vol 1, DGM Informationsgesellschaft Verlag (1988)\n185-195.\n\n[3] F. Bobaru and G. Zhang, Why do cracks branch? A peridynamic investigation of dynamic brittle fracture, International Journal of Fracture 196 (2015): 59–98.\n\n[4] D.J. Littlewood, M.L. Parks, J.T. Foster, J.A. Mitchell, and P. Diehl, The peridigm meshfree peridynamics code, Journal of Peridynamics and Nonlocal Modeling 6 (2024): 118–148.  \n\n[5] A.S. Fallah, I.N. Giannakeas, R. Mella, M.R. Wenman, Y. Safa, and H. Bahai, On the computational derivation of bond-based peridynamic stress tensor, Journal of Peridynamics and Nonlocal Modeling 2 (2020): 352–378. \n\n[6] D. He, D. Huang, and D. Jiang, Modeling and studies of fracture in functionally graded materials under thermal shock loading using peridynamics, Theoretical and Applied Fracture Mechanics 111 (2021): 102852.\n\n[7] C.P. Jiang, X.F. Wu, J. Li, F. Song, Y.F. Shao, X.H. Xu, and P. Yan, A study of the mechanism of formation and numerical simulations of crack patterns in ceramics subjected to thermal shock, Acta Materialia 60 (2012): 4540–4550.\n\n## Contributing\n\nWe encourage you to contribute to CabanaPD! Please check the\n[guidelines](CONTRIBUTING.md) on how to do so.\n\n## Citing CabanaPD\n\nIf you use CabanaPD in your work, please cite the [Zenodo release](https://zenodo.org/record/7087781#.Y309w7LMLKI).\n\n## License\n\nCabanaPD is distributed under an [open source 3-clause BSD license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fornl%2Fcabanapd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fornl%2Fcabanapd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fornl%2Fcabanapd/lists"}