Implementation of Linear Viscoelasticity Model in Pdlammps

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Implementation of linear viscoelasticity model

in PDLAMMPS
R. Rahman and J.T. Foster
Center for Simulation, Visualization and
Real-time prediction (SiViRt)
The University of Texas at San Antonio
San Antonio, TX 78249
Email: [email protected],
[email protected]
September 12, 2014

1 Introduction
In this documentation the discussion is focused on implementation of linear
viscoelasticity model in PDLAMMPS [PLPS08],[Pli95]. The peridynamic
viscoelasticity formulation (and its time integration) used in this work was
developed by John Mitchell at Sandia National Lab [Mit11]. In the PD-
LAMMPS a new pair-peri-style is added in order to incorporate the viscoelas-
ticity. The new source codes pair-peri-ves.cpp and pair-peri-ves.h are introduced. Besi
peri-neigh.h are modified for introducing viscoelasticity.

2 Algorithm and implementation


In order to include the viscoelasticity the total extension state can be de-
composed into two parts [Mit11] 1 :
1
For detail please see the document on implementation of viscoelasticity in state based
peridynamics model [Mit11].

1
Total extension: e (Y ) = ei (Y ) + ed (Y ) (1)
θ (Y ) |X|
Volumetric extension: ei (Y ) = (2)
3
θ (Y ) |X|
Deviatoric extension: ed (Y ) = |Y | − |X| − (3)
3
Here, |Y |, |X| and θ are the reference state, defromation state and dilation
state, respectively. The deviatoric extension ca be written as:

ed (Y ) = ede (Y ) + edb(i) (Y ) (4)


Here, ede (Y ) and edb(i) are the elastic and back parts of the deviatoric
extension. Considering viscoelastic effect the peridynamic force state can be
written as:
3p
t = ti + td = − ωx + (α∞ + αi ) ed − αi ωedb (5)
m
p, k, αi , ti and td are hydrostatic pressure, bulk modulus, elastic properties
volumetric and deviatoric scalar force states, respectively. α∞ + αi = 15µ m
;
where, µ, m are the shear modulus and weighted volume, respectively. The
1
influence function: ω hξi = kξk , kξk is the scalar reference state. At the
current or tn+1 timestep the scalar force state based on LPS is:
 
i θ (i) θ (i)
tn+1 = 3k ω+ + ω− eν (xj − xi ) Vj (6)
m (i) m (i)
Based on viscoelasticity the deviatoric scale force state can be written as:

 
ω+ ω−
tdn+1 = 15 (1 − λ) µ + eν (xj − xi ) Vj
m (i) m (i)
 
ω+ ω−
e − edb

+ 15µλ + n+1 ν (xj − xi ) Vj (7)
m (i) m (i)

Here, Vj , edb
n+1 , ν (xj − xi ) are volume fraction, back extension at current
timestep and particle volume scaling factor, respectively. λ varies within zero
to one. The back extension at current state can be calculated as 2 [Mit11]:
2
https://software.sandia.gov/trac/peridigm/

2
edb d db
n+1 = (1 − decay) en + decay · en + β∆e
d
(8)
∆ed = edn+1 − edn (9)
 
dt
decay = exp − (10)
τb
τb
β = 1 − (1 − decay) (11)
dt
At any current timestep (i.e. n + 1), for a bond between ith and j th PD
nodes, the deviatoric extension is stored on the fly. The value is stored in
deviatorextension[i][j]. Similarly, the back extension is also stored in
deviatorBackextension[i][j]. Both of the arrays initialized with zero.
In the fix_peri_neigh.cpp an integer flag based switch is used in order
to trigger the LPS, PMB or VES (Viscoelastic solid) models. The class
FixPeriNeigh looks like:

FixPeriNeigh::FixPeriNeigh(LAMMPS *lmp,int narg, char **arg) :


Fix(lmp, narg, arg)
{

//Get the pair information


Pair *anypair01 = force->pair_match("peri/pmb",1);
Pair *anypair02 = force->pair_match("peri/lps",1);
Pair *anypair03 = force->pair_match("peri/ves",1);

isPMB = 0; //Check if PMB


isLPS = 0; //Check if LPS
isVES = 0; //Check if VES

//Select the flag based on which model is being used


if (anypair01 != NULL)
{
isPMB=1;
}
else if (anypair02 != NULL)
{
isLPS=1;

3
}
else
{
isVES=1;
}

restart_global = 1;
restart_peratom = 1;
first = 1;

// perform initial allocation of atom-based arrays


// register with atom class
// set maxpartner = 1 as placeholder

maxpartner = 1;
npartner = NULL;
partner = NULL;
if (isVES == 1){
deviatorextention = NULL;
deviatorBackextention = NULL;
}
r0 = NULL;
vinter = NULL;
wvolume = NULL;

grow_arrays(atom->nmax);
atom->add_callback(0);
atom->add_callback(1);

// initialize npartner to 0 so atom migration is OK the 1st time

int nlocal = atom->nlocal;


for (int i = 0; i < nlocal; i++) npartner[i] = 0;

// set comm sizes needed by this fix

comm_forward = 1;
}

4
There are three integer flags isPMB , isLPS, isVES .PMB, LPS and VES
stand for bond based PD model, linear peridynamic solid and viscoelastic
peridynamic solid, respectively. Based on the input file any one of these flags
are set to one based on:

Pair *anypair01 = force->pair_match("peri/pmb",1);


Pair *anypair02 = force->pair_match("peri/lps",1);
Pair *anypair03 = force->pair_match("peri/ves",1);

The stored values are used in:

PairPeriVES::compute(int eflag, int vflag)

double PairPeriVES::single(int i, int j, int itype, int jtype,


double rsq, double factor_coul,
double factor_lj,double &fforce)

At any current step the total scalar force state t is calculated and the
current deviatoric extension and back extension are stored in order to use
in next step. λ and time constant τb are material dependent parameters.
These are defined in the LAMMPS input script. This will be discussed in
the next section. The new LAMMPS pair style {pair_peri_ves}is defined
with addition arguments in the input file (λ and τb ):

void PairPeriVES::settings(int narg, char **arg)


{
if (narg) error->all(FLERR,"Illegal pair_style command");
}

/* ----------------------------------------------------------------------
set coeffs for one or more type pairs
------------------------------------------------------------------------- */

void PairPeriVES::coeff(int narg, char **arg)


{
if (narg != 9) error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();

5
int ilo,ihi,jlo,jhi;
force->bounds(arg[0],atom->ntypes,ilo,ihi);
force->bounds(arg[1],atom->ntypes,jlo,jhi);

double bulkmodulus_one = atof(arg[2]);


double shearmodulus_one = atof(arg[3]);
double cut_one = atof(arg[4]);
double s00_one = atof(arg[5]);
double alpha_one = atof(arg[6]);
double mlambdai_one = atof(arg[7]); // New
double mtaui_one = atof(arg[8]); //New

int count = 0;
for (int i = ilo; i <= ihi; i++) {
for (int j = MAX(jlo,i); j <= jhi; j++) {
bulkmodulus[i][j] = bulkmodulus_one;
shearmodulus[i][j] = shearmodulus_one;
cut[i][j] = cut_one;
s00[i][j] = s00_one;
alpha[i][j] = alpha_one;
m_lambdai[i][j] = mlambdai_one; // New
m_taubi[i][j] = mtaui_one; // New
setflag[i][j] = 1;
count++;
}
}

if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");


}

3 LAMMPS command for PD VES


There is no significant change in the LAMMPS input script for viscoelastic
model. For PD VES the LAMMPS commands are:

pair_style peri/ves
pair_coeff i j Bulk_modulus Shear_modulus s00 alpha lambda tau

6
The LAMMPS compilation with the VES is same. The updated Install.sh
should be used.

4 Conclusion
The LAMMPS implementation of peridynamic viscoelastic model is still
in beta phase. Any bug or issue can be informed to the authors through
[email protected] .

5 Acknowledgment
The authors are thankful to Steve Plimpton and S. M. Raiyan Kabir for
their useful suggestion regarding the code development for PDLAMMPS im-
plementation of viscoelasticity.

References
[Mit11] John A. Mitchell. A nonlocal, ordinary, state-based viscoelas-
ticity model for peridynamics. Technical Report SAND2011-
8064, Sandia National Laboratories, May 2011. Available at
https://cfwebprod.sandia.gov/cfdocs/CompResearch/docs/SAND2011-Viscoelast

[Pli95] S. Plimpton. Fast parallel algorithms for short-range


molecular dynamics. J Comp Phys, 117:1–19, 1995.
http://lammps.sandia.gov.

[PLPS08] Michael L. Parks, Richard B. Lehoucq, Steven J. Plimpton, and


Stewart A. Silling. Implementing peridynamics in molecular dy-
namics code. Computer physics communication, 179:777–783,
2008.

You might also like