PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
material Namespace Reference

Data Structures

class  BaseInfluenceFn
 A base class for computing influence function. More...
 
class  ConstInfluenceFn
 A class to implement constant influence function. More...
 
class  GaussianInfluenceFn
 A class to implement Gaussian influence function. More...
 
class  LinearInfluenceFn
 A class to implement linear influence function. More...
 
class  Material
 Collection of methods and database related to peridynamic material. More...
 
class  PdElastic
 A class providing methods to compute energy density and force of peridynamic material. More...
 
class  PdState
 A class providing methods to compute energy density and force of peridynamic material. More...
 
class  PmbMaterial
 A class providing methods to compute energy density and force of peridynamic material. More...
 
class  RnpMaterial
 A class providing methods to compute energy density and force of peridynamic material. More...
 

Functions

void computeStateMx (data::ModelData *model, bool compute_in_parallel=false)
 Computes the moment \( m_x \) term in state-based peridynamic formulation.
 
void computeStateThetax (data::ModelData *model, bool compute_in_parallel=false)
 
void computeHydrostaticStrain (data::ModelData *model, bool compute_in_parallel=false)
 
void updateBondFractureData (data::ModelData *model, bool compute_in_parallel=false)
 
Conversion methods
double toNu (double lambda, double mu)
 Compute Poisson's ratio from Lame parameters.
 
double toNuEG (double E, double G)
 Compute Poisson's ratio from Young's and Shear modulus.
 
double toE (double K, double nu)
 Compute Young's modulus E from Bulk modulus K and Poisson's ratio nu.
 
double toK (double E, double nu)
 Compute Bulk modulus K from Young's modulus K and Poisson's ratio nu.
 
double toLambdaE (double E, double nu)
 Compute Lame first parameter lambda from Young's modulus E and Poisson's ratio nu.
 
double toLambdaK (double K, double nu)
 Compute Lame first parameter lambda from Bulk modulus K and Poisson's ratio nu.
 
double toGE (double E, double nu)
 Compute shear modulus from Young's modulus E and Poisson's ratio nu.
 
double toGK (double K, double nu)
 Compute shear modulus from Bulk modulus K and Poisson's ratio nu.
 
double toELambda (double lambda, double nu)
 Compute Young's modulus E from Lame first parameter lambda and Poisson's ratio nu.
 
double toGc (double KIc, double nu, double E)
 Compute critical energy release rate Gc from critical stress-intensity factor KIc, Poisson's ratio nu, and Young's modulus E.
 
double toKIc (double Gc, double nu, double E)
 Compute critical stress-intensity factor KIc from critical energy release rate Gc, Poisson's ratio \( nu\), and Young's modulus E.
 

Function Documentation

◆ computeHydrostaticStrain()

void material::computeHydrostaticStrain ( data::ModelData model,
bool  compute_in_parallel = false 
)

Definition at line 295 of file materialUtil.cpp.

295 {
296
297 model->d_thetaX.resize(model->d_x.size());
298 if (!compute_in_parallel) {
299 for (size_t i = 0; i < model->d_x.size(); i++) {
300 const auto &pti = model->getPtId(i);
301 const auto &particle = model->getParticleFromAllList(pti);
302
303 auto thetax = computeHydrostaticStrainI(i, model->d_xRef, model->d_u,
304 model->d_vol,
305 model->d_neighPd, model->d_neighPdSqdDist,
306 particle->getMeshSize(),
307 particle->getMaterial(),
308 model->d_fracture_p.get(),
309 particle->getDimension());
310
311 model->setThetax(i, thetax);
312 }
313 } else {
314
315 tf::Executor executor(util::parallel::getNThreads());
316 tf::Taskflow taskflow;
317
318 taskflow.for_each_index(
319 (std::size_t) 0, model->d_x.size(), (std::size_t) 1, [model](std::size_t i) {
320 const auto &pti = model->getPtId(i);
321 const auto &particle = model->getParticleFromAllList(pti);
322
323 auto thetax = computeHydrostaticStrainI(i,
324 model->d_xRef,
325 model->d_u,
326 model->d_vol,
327 model->d_neighPd, model->d_neighPdSqdDist,
328 particle->getMeshSize(),
329 particle->getMaterial(),
330 model->d_fracture_p.get(),
331 particle->getDimension());
332
333 model->setThetax(i, thetax);
334 }
335 ); // for_each
336
337 executor.run(taskflow).get();
338 }
339
340}
std::vector< util::Point > d_x
Current positions of the nodes.
Definition modelData.h:745
std::vector< util::Point > d_xRef
reference positions of the nodes
Definition modelData.h:742
std::vector< util::Point > d_u
Displacement of the nodes.
Definition modelData.h:748
size_t & getPtId(size_t i)
Get particle id given the location in particle list.
Definition modelData.h:187
std::vector< std::vector< float > > d_neighPdSqdDist
Square distance neighbor data for peridynamic forces.
Definition modelData.h:773
std::unique_ptr< geometry::Fracture > d_fracture_p
Fracture state of bonds.
Definition modelData.h:736
std::vector< double > d_thetaX
Dilation.
Definition modelData.h:802
std::vector< std::vector< size_t > > d_neighPd
Neighbor data for peridynamic forces.
Definition modelData.h:770
void setThetax(size_t i, const double &thetax)
Set volumetric deformation (thetax) of the node.
Definition modelData.h:579
std::vector< double > d_vol
Nodal volumes.
Definition modelData.h:760
const particle::BaseParticle * getParticleFromAllList(size_t i) const
Get pointer to base particle.
Definition modelData.h:86
double computeHydrostaticStrainI(size_t i, const std::vector< util::Point > &nodes, const std::vector< util::Point > &nodes_disp, const std::vector< double > &nodal_vol, const std::vector< std::vector< size_t > > &neighbors, const std::vector< std::vector< float > > &neighbors_sq_dist, const double &mesh_size, const material::Material *material, const geometry::Fracture *fracture, size_t dim)
Collection of methods and data related to particle object.
Definition modelData.h:36
unsigned int getNThreads()
Get number of threads to be used by taskflow.

References anonymous_namespace{materialUtil.cpp}::computeHydrostaticStrainI(), data::ModelData::d_fracture_p, data::ModelData::d_neighPd, data::ModelData::d_neighPdSqdDist, data::ModelData::d_thetaX, data::ModelData::d_u, data::ModelData::d_vol, data::ModelData::d_x, data::ModelData::d_xRef, util::parallel::getNThreads(), data::ModelData::getParticleFromAllList(), data::ModelData::getPtId(), and data::ModelData::setThetax().

Here is the call graph for this function:

◆ computeStateMx()

void material::computeStateMx ( data::ModelData model,
bool  compute_in_parallel = false 
)

Computes the moment \( m_x \) term in state-based peridynamic formulation.

Definition at line 213 of file materialUtil.cpp.

213 {
214
215 model->d_mX.resize(model->d_x.size());
216 if (!compute_in_parallel) {
217 for (size_t i = 0; i < model->d_x.size(); i++) {
218 const auto &pti = model->getPtId(i);
219 const auto &particle = model->getParticleFromAllList(pti);
220 auto mx = computeStateMxI(i, model->d_xRef, model->d_vol,
221 model->d_neighPd, model->d_neighPdSqdDist,
222 particle->getMeshSize(),
223 particle->getMaterial());
224
225 model->setMx(i, mx);
226 }
227 } else {
228
229 tf::Executor executor(util::parallel::getNThreads());
230 tf::Taskflow taskflow;
231
232 taskflow.for_each_index(
233 (std::size_t) 0, model->d_x.size(), (std::size_t) 1, [model](std::size_t i) {
234 const auto &pti = model->getPtId(i);
235 const auto &particle = model->getParticleFromAllList(pti);
236 auto mx = computeStateMxI(i, model->d_xRef, model->d_vol,
237 model->d_neighPd, model->d_neighPdSqdDist,
238 particle->getMeshSize(),
239 particle->getMaterial());
240
241 model->setMx(i, mx);
242 }
243 ); // for_each
244
245 executor.run(taskflow).get();
246 }
247}
std::vector< double > d_mX
Weighted volume.
Definition modelData.h:808
void setMx(size_t i, const double &mx)
Set weighted-volume (mx) of the node.
Definition modelData.h:548
double computeStateMxI(size_t i, const std::vector< util::Point > &nodes, const std::vector< double > &nodal_vol, const std::vector< std::vector< size_t > > &neighbors, const std::vector< std::vector< float > > &neighbors_sq_dist, const double &mesh_size, const material::Material *material)

References anonymous_namespace{materialUtil.cpp}::computeStateMxI(), data::ModelData::d_mX, data::ModelData::d_neighPd, data::ModelData::d_neighPdSqdDist, data::ModelData::d_vol, data::ModelData::d_x, data::ModelData::d_xRef, util::parallel::getNThreads(), data::ModelData::getParticleFromAllList(), data::ModelData::getPtId(), and data::ModelData::setMx().

Referenced by PeriDEMModel::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeStateThetax()

void material::computeStateThetax ( data::ModelData model,
bool  compute_in_parallel = false 
)

Definition at line 249 of file materialUtil.cpp.

249 {
250
251 model->d_thetaX.resize(model->d_x.size());
252 if (!compute_in_parallel) {
253 for (size_t i = 0; i < model->d_x.size(); i++) {
254 const auto &pti = model->getPtId(i);
255 const auto &particle = model->getParticleFromAllList(pti);
256
257 auto thetax = computeStateThetaxI(i, model->d_xRef, model->d_u,
258 model->d_vol,
259 model->d_neighPd, model->d_neighPdSqdDist,
260 particle->getMeshSize(),
261 particle->getMaterial(),
262 model->d_fracture_p.get(),
263 model->d_mX);
264
265 model->setThetax(i, thetax);
266
267 }
268
269 } else {
270
271 tf::Executor executor(util::parallel::getNThreads());
272 tf::Taskflow taskflow;
273
274 taskflow.for_each_index(
275 (std::size_t) 0, model->d_x.size(), (std::size_t) 1, [model](std::size_t i) {
276 const auto &pti = model->getPtId(i);
277 const auto &particle = model->getParticleFromAllList(pti);
278
279 auto thetax = computeStateThetaxI(i, model->d_xRef, model->d_u,
280 model->d_vol,
281 model->d_neighPd, model->d_neighPdSqdDist,
282 particle->getMeshSize(),
283 particle->getMaterial(),
284 model->d_fracture_p.get(),
285 model->d_mX);
286
287 model->setThetax(i, thetax);
288 }
289 ); // for_each
290
291 executor.run(taskflow).get();
292 }
293}
double computeStateThetaxI(size_t i, const std::vector< util::Point > &nodes, const std::vector< util::Point > &nodes_disp, const std::vector< double > &nodal_vol, const std::vector< std::vector< size_t > > &neighbors, const std::vector< std::vector< float > > &neighbors_sq_dist, const double &mesh_size, const material::Material *material, const geometry::Fracture *fracture, const std::vector< double > &mx)

References anonymous_namespace{materialUtil.cpp}::computeStateThetaxI(), data::ModelData::d_fracture_p, data::ModelData::d_mX, data::ModelData::d_neighPd, data::ModelData::d_neighPdSqdDist, data::ModelData::d_thetaX, data::ModelData::d_u, data::ModelData::d_vol, data::ModelData::d_x, data::ModelData::d_xRef, util::parallel::getNThreads(), data::ModelData::getParticleFromAllList(), data::ModelData::getPtId(), and data::ModelData::setThetax().

Here is the call graph for this function:

◆ toE()

double material::toE ( double  K,
double  nu 
)
inline

Compute Young's modulus E from Bulk modulus K and Poisson's ratio nu.

Parameters
KBulk modulus
nuPoisson's ratio
Returns
E Young's modulus

Definition at line 51 of file materialUtil.h.

51{ return K * (3. * (1. - 2. * nu)); }

Referenced by anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), and getInputJson().

Here is the caller graph for this function:

◆ toELambda()

double material::toELambda ( double  lambda,
double  nu 
)
inline

Compute Young's modulus E from Lame first parameter lambda and Poisson's ratio nu.

Parameters
lambdaLame first parameter
nuPoisson's ratio
Returns
E Young's modulus

Definition at line 106 of file materialUtil.h.

106 {
107 return lambda * (1. + nu) * (1. - 2. * nu) / nu;
108 }

◆ toGc()

double material::toGc ( double  KIc,
double  nu,
double  E 
)
inline

Compute critical energy release rate Gc from critical stress-intensity factor KIc, Poisson's ratio nu, and Young's modulus E.

Below conversion from KIc to Gc assumes plane-stress condition. For plane-stress condition, we need to modify the Young's modulus \( E\) to \( \frac{E}{1 - \nu^2} \) where \( \nu\) is the Poisson's ratio.

Parameters
KIcCritical stress-intensity factor
nuPoisson's ratio
EYoung's modulus
Returns
Gc Critical energy release rate

Definition at line 123 of file materialUtil.h.

123{ return KIc * KIc / E; }

Referenced by anonymous_namespace{main.cpp}::buildInputJson().

Here is the caller graph for this function:

◆ toGE()

double material::toGE ( double  E,
double  nu 
)
inline

Compute shear modulus from Young's modulus E and Poisson's ratio nu.

Parameters
EYoung's modulus
nuPoisson's ratio
Returns
G Shear modulus

Definition at line 87 of file materialUtil.h.

87{ return E / (2. * (1. + nu)); }

Referenced by anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), and getInputJson().

Here is the caller graph for this function:

◆ toGK()

double material::toGK ( double  K,
double  nu 
)
inline

Compute shear modulus from Bulk modulus K and Poisson's ratio nu.

Parameters
KBulk modulus
nuPoisson's ratio
Returns
G Shear modulus

Definition at line 95 of file materialUtil.h.

95 {
96 return 3. * K * (1. - 2. * nu) / (2. * (1. + nu));
97 }

◆ toK()

double material::toK ( double  E,
double  nu 
)
inline

Compute Bulk modulus K from Young's modulus K and Poisson's ratio nu.

Parameters
EYoung's modulus
nuPoisson's ratio
Returns
K Bulk modulus

Definition at line 59 of file materialUtil.h.

59{ return E / (3. * (1. - 2. * nu)); }

◆ toKIc()

double material::toKIc ( double  Gc,
double  nu,
double  E 
)
inline

Compute critical stress-intensity factor KIc from critical energy release rate Gc, Poisson's ratio \( nu\), and Young's modulus E.

Below conversion from Gc to KIc assumes plane-stress condition. For plane-stress condition, we need to modify the Young's modulus \( E\) to \( \frac{E}{1 - \nu^2} \) where \( \nu\) is the Poisson's ratio.

Parameters
GcCritical energy release rate
nuPoisson's ratio
EYoung's modulus
Returns
KIc Critical stress-intensity factor

Definition at line 138 of file materialUtil.h.

138{ return std::sqrt(Gc * E); }

◆ toLambdaE()

double material::toLambdaE ( double  E,
double  nu 
)
inline

Compute Lame first parameter lambda from Young's modulus E and Poisson's ratio nu.

Parameters
EYoung's modulus
nuPoisson's ratio
Returns
lambda Lame first parameter

Definition at line 68 of file materialUtil.h.

68 {
69 return E * nu / ((1. + nu) * (1. - 2. * nu));
70 }

◆ toLambdaK()

double material::toLambdaK ( double  K,
double  nu 
)
inline

Compute Lame first parameter lambda from Bulk modulus K and Poisson's ratio nu.

Parameters
KBulk modulus
nuPoisson's ratio
Returns
lambda Lame first parameter

Definition at line 79 of file materialUtil.h.

79{ return 3. * K * nu / (1. + nu); }

◆ toNu()

double material::toNu ( double  lambda,
double  mu 
)
inline

Compute Poisson's ratio from Lame parameters.

Parameters
lambdaLame first parameter
muLame second parameter
Returns
nu Poisson's ratio

Definition at line 35 of file materialUtil.h.

35{ return lambda * 0.5 / (lambda + mu); }

◆ toNuEG()

double material::toNuEG ( double  E,
double  G 
)
inline

Compute Poisson's ratio from Young's and Shear modulus.

Parameters
EYoungs modulus
GShear modulus
Returns
nu Poisson's ratio

Definition at line 43 of file materialUtil.h.

43{ return E * 0.5 / G - 1.; }

◆ updateBondFractureData()

void material::updateBondFractureData ( data::ModelData model,
bool  compute_in_parallel = false 
)

Definition at line 342 of file materialUtil.cpp.

342 {
343
344 if (!compute_in_parallel) {
345 for (size_t i = 0; i < model->d_x.size(); i++) {
346 const auto &pti = model->getPtId(i);
347 const auto &particle = model->getParticleFromAllList(pti);
348
349 updateBondFractureDataI(i, model->d_xRef, model->d_neighPd, model->d_u,
350 particle->getMaterial(),
351 model->d_fracture_p.get());
352 }
353 } else {
354
355 tf::Executor executor(util::parallel::getNThreads());
356 tf::Taskflow taskflow;
357
358 taskflow.for_each_index(
359 (std::size_t) 0, model->d_x.size(), (std::size_t) 1, [model](std::size_t i) {
360 const auto &pti = model->getPtId(i);
361 const auto &particle = model->getParticleFromAllList(pti);
362
363 updateBondFractureDataI(i,
364 model->d_xRef,
365 model->d_neighPd,
366 model->d_u,
367 particle->getMaterial(),
368 model->d_fracture_p.get());
369 }
370 ); // for_each
371
372 executor.run(taskflow).get();
373 }
374}
void updateBondFractureDataI(size_t i, const std::vector< util::Point > &nodes, const std::vector< std::vector< size_t > > &neighbors, const std::vector< util::Point > &nodes_disp, const material::Material *material, geometry::Fracture *fracture)

References data::ModelData::d_fracture_p, data::ModelData::d_neighPd, data::ModelData::d_u, data::ModelData::d_x, data::ModelData::d_xRef, util::parallel::getNThreads(), data::ModelData::getParticleFromAllList(), data::ModelData::getPtId(), and anonymous_namespace{materialUtil.cpp}::updateBondFractureDataI().

Here is the call graph for this function: