Skip to content

XuanHu0222/unified-BA-PD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Unified Framework of Bond-Associated Peridynamic Material Correspondence Models

How to Run the Code

A. Windows (Visual Studio + intel fortran)

  1. Install prerequisites
  2. Create a project
    • open visual studio 2022Create 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
  3. Add your .f90 source files
    • in Solution Explorer, right click on Source FilesAddExisting Item... → select all .f90 source files
  4. Enable openMP parallelization
    • select Project from the top menu
    • select your project name Properties
    • go to Configuration PropertiesFortranLanguage
    • In OpenMP Support dropdown menu, select Generate Parallel Code
  5. 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

B. Linux (Ubuntu + GNU fortran)

  1. Install prerequisites
    • install GNU fortran
        sudo apt-get install gfortran
  2. Build and run
    • decompress the *.zip file in pd_input folder
    • use Makefile to compile and run
    • to get help, type make help or simply make
        ==============================================
                    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. 
    

Theory

A. Unified bond-associated deformation gradient

For a given bond $\boldsymbol\xi$, the generalized bond-associated deformation gradient has the following expression:

deformation_gradient

B. Unified bond force density state

the unified force density state based on the unified bond-associated deformation gradient is obtained based on the work conjugate relation as

force_state

C. Governing Equation

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

governing_equation

Code Structure

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: class description 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 for module_model_CPD, module_model_BHPD, module_model_HPPD, module_model_BCPD, module_model_LMPD, and module_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 motion
  • module_output: All output in one place.

Code Availability and Licensing

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.

Xuan Hu, Hailong Chen, Shaofan Li, A unified framework of bond-associated peridynamic material correspondence models: Formulation and evaluation. Computer Methods in Applied Mechanics and Engineering 443 (2025): 118340

About

the unified framework for bond-associated peridynamics material correspondence model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors