- Install prerequisites
- Create a project
- open visual studio 2022 → Create a new project
- in language dropdown menu, pick Fortran
- select Empty Project, which should have the Fortran tag at the bottom
- type the project name, choose the location, click Create
- Add your .f90 source files
- in Solution Explorer, right click on Source Files → Add → Existing Item... → select all .f90 source files
- Enable openMP parallelization
- select Project from the top menu
- select your project name Properties
- go to Configuration Properties → Fortran → Language
- In OpenMP Support dropdown menu, select Generate Parallel Code
- Build and run
- decompress the *.zip file in pd_input folder
- put the *.dat input files (e.g. pwh_node.dat and pwh_elmt.dat) in the same folder with the *.sln and *.vfproj files
- click on Start to start compiling and running
- Install prerequisites
- install GNU fortran
sudo apt-get install gfortran
- Build and run
- decompress the *.zip file in pd_input folder
- use
Makefileto compile and run - to get help, type
make helpor simplymake
============================================== BA-PD Build & Run Help ============================================== Usage: make <PROGRAM> <MODEL> [OMP=<flag>] [OMP_NUM_THREADS=N] Programs (case-insensitive): pwh Build/Run the 'pwh' program bar3d Build/Run the 'bar3d' program Models (case-insensitive): CPD, BHPD, HPPD, BCPD, LMPD, NSPD Examples: make pwh CPD # Build & run bin/pwh_CPD make bar3d nspd # Build & run bin/bar3d_NSPD make pwh CPD OMP=-fopenmp # Override OpenMP compile flag OMP_NUM_THREADS=8 make pwh CPD # Run with 8 threads Utility Targets: make help # Show this help message make clean # Remove object files & module files make veryclean # Remove all build artifacts, bin/, and lib/ make lib # Build only the static library (no executable) Notes: - Input files are automatically copied from pd_input/ pwh_*: pwh_node.dat, pwh_elmt.dat bar3d_*: bar3D_node.dat, bar3D_elmt.dat - Program is case-insensitive for PROGRAM and MODEL. - Defaults to 4 OpenMP threads if OMP_NUM_THREADS is not set.
For a given bond
the unified force density state based on the unified bond-associated deformation gradient is obtained based on the work conjugate relation as
The equation of motion for the unified framework of bond-associated material correspondence models is the same as that for the conventional model proposed by Silling et al. (2007), which writes
This code is organized into modular components so physics models, numerics, and I/O stay decoupled and easy to maintain. The structure of some main modules is presented in the following picture:
Overview of key modules with variable and subroutine listings
Brief description on each module
module_const: Numerical and physical constants/macros in one place.module_math: Small, reusable math utilities.module_dat: Centralized, shared data structures and global parameters.moudle_preprocess: Build the computational mesh and topology.module_model_XXXX: this stands formodule_model_CPD,module_model_BHPD,module_model_HPPD,module_model_BCPD,module_model_LMPD, andmodule_model_NSPD. Each module implements a particular peridynamics bond-associated material correspondence model.module_constitutive_law: Compute the stress measure (i.e. PK1 stress) based on the input deformation measure (i.e. deformation gradient).module_int_halfstep: This module contains the half-step algorithm for the integration of the equations of motionmodule_output: All output in one place.
The source code developed for this study will be made publicly available and distributed under the terms of the MIT License, which permits reuse, modification, and distribution. We encourage researchers to use and build upon this code for their own work. If you do so, we kindly ask that you acknowledge this contribution by citing our paper.


