11#ifndef MATERIAL_PARTILCE_MATERIAL_H
12#define MATERIAL_PARTILCE_MATERIAL_H
71 const double &K,
const double &G) {
74 return plane_strain ? K + G / 3. : 9. * K * G / (3. * K + 4. * G);
147 virtual std::pair<double, double>
149 const bool &break_bonds)
const = 0;
161 virtual std::pair<double, double>
162 getBondEF(
const double &r,
const double &s,
bool &fs,
const double
163 &mx,
const double &thetax)
const = 0;
189 virtual double getSc(
const double &r)
const = 0;
223 virtual double getInfFn(
const double &r)
const = 0;
259 virtual std::string
printStr(
int nt,
int lvl)
const {
262 std::ostringstream oss;
263 oss << tabS <<
"------- particle::Material --------" << std::endl
265 oss << tabS <<
"Abstract class of peridynamic materials" << std::endl;
266 oss << tabS <<
"See RnpMaterial and PmbMaterial for implementation"
268 oss << tabS << std::endl;
279 virtual void print(
int nt,
int lvl)
const { std::cout <<
printStr(nt, lvl); }
309 if (dimension != dim)
317 if (influence_fn ==
nullptr)
318 influence_fn = std::make_shared<material::ConstInfluenceFn>(
322 if (influence_fn ==
nullptr)
323 influence_fn = std::make_shared<material::LinearInfluenceFn>(
327 if (influence_fn ==
nullptr)
328 influence_fn = std::make_shared<material::GaussianInfluenceFn>(
332 throw std::runtime_error(
334 <<
"Error: Influence function type = "
336 <<
" is invalid.\n");
344 d_invFactor = std::pow(horizon, 4) * 4. * M_PI / 3.;
387 std::pair<double, double>
getBondEF(
const double &r,
const double &s,
389 const bool &break_bonds)
const override {
397 return std::make_pair(
416 std::pair<double, double>
417 getBondEF(
const double &r,
const double &s,
bool &fs,
const double
418 &mx,
const double &thetax)
const override {
442 return dx.
dot(du) / dx.
dot(dx);
451 double getSc(
const double &r)
const override {
452 return d_rbar / std::sqrt(r);
466 return std::numeric_limits<double>::max();
496 return getGlobalMoment(i);
524 data.d_Gc = 4. * M *
d_C / M_PI;
526 }
else if (dim == 3) {
549 std::string
printStr(
int nt,
int lvl)
const override {
552 std::ostringstream oss;
553 oss << tabS <<
"------- particle::RnpMaterial --------" << std::endl
555 oss << tabS <<
"State active = " << 0 << std::endl;
556 oss << tabS <<
"Horizon = " <<
d_horizon << std::endl;
557 oss << tabS <<
"Influence fn address = " << influence_fn.get() << std::endl;
558 oss << tabS <<
"Influence fn info: " << std::endl;
559 oss << influence_fn->printStr(nt + 1, lvl);
560 oss << tabS <<
"Peridynamic parameters: " << std::endl;
561 oss << tabS <<
" C = " <<
d_C << std::endl;
562 oss << tabS <<
" beta = " <<
d_beta << std::endl;
563 oss << tabS <<
" r_bar = " <<
d_rbar << std::endl;
564 oss << tabS <<
" inv_factor = " <<
d_invFactor << std::endl;
565 oss << tabS <<
" factor_Sc = " <<
d_factorSc << std::endl;
567 oss << tabS << std::endl;
578 void print(
int nt,
int lvl)
const override {
600 if (dim == 2 && !is_plane_strain) {
601 throw std::runtime_error(
603 <<
"Error: RNP calibration needs nu = 1/4, which in 2D means plane "
604 "strain. Set Is_Plane_Strain = true.\n");
608 throw std::runtime_error(
610 <<
"Error: Require either Young's modulus E or Bulk modulus K"
611 " to compute the RNP bond-based peridynamic parameters.\n");
615 std::cout <<
"Warning: Both Young's modulus E and Bulk modulus K are "
617 std::cout <<
"Warning: To compute the RNP bond-based peridynamic "
618 "parameters, we only require one of those.\n";
620 <<
"Warning: Selecting Young's modulus to compute parameters.\n";
625 throw std::runtime_error(
627 <<
"Error: Require either critical energy release rate Gc or "
628 "critical stress intensity factor KIc to compute the RNP "
629 "bond-based peridynamic parameters.\n");
632 std::cout <<
"Warning: Both critical energy release rate Gc and critical "
633 "stress intensity factor KIc are provided.\n";
634 std::cout <<
"Warning: To compute the RNP bond-based peridynamic "
635 "parameters, we only require one of those.\n";
636 std::cout <<
"Warning: Selecting critical energy release rate Gc to "
637 "compute parameters.\n";
643 std::cout <<
"Warning: RNP bond-based model fixes nu = 1/4; ignoring "
680 }
else if (dim == 3) {
745 if (dimension != dim)
753 if (influence_fn ==
nullptr)
754 influence_fn = std::make_shared<material::ConstInfluenceFn>(
758 if (influence_fn ==
nullptr)
759 influence_fn = std::make_shared<material::LinearInfluenceFn>(
763 if (influence_fn ==
nullptr)
764 influence_fn = std::make_shared<material::GaussianInfluenceFn>(
768 throw std::runtime_error(
770 <<
"Error: Influence function type = "
772 <<
" is invalid.\n");
804 std::pair<double, double>
getBondEF(
const double &r,
const double &s,
806 const bool &break_bonds)
const override {
809 return std::make_pair(
getInfFn(r) * 0.25 *
d_c * s *
821 return std::make_pair(
getInfFn(r) * 0.25 *
d_c * s *
825 return std::make_pair(
839 std::pair<double, double>
840 getBondEF(
const double &r,
const double &s,
bool &fs,
const double
841 &mx,
const double &thetax)
const override {
855 return (dx + du) / (dx + du).length();
865 return ((dx + du).length() - dx.
length()) / dx.
length();
874 double getSc(
const double &r)
const override {
return d_s0; };
902 return getGlobalMoment(i);
922 data.d_nu = (dim == 2 && !is_plane_strain) ? 1. / 3. : 0.25;
928 data.d_E = is_plane_strain ? 5. * M_PI * std::pow(h, 3) * c / 48.
929 : M_PI * std::pow(h, 3) * c / 9.;
932 }
else if (dim == 3) {
933 data.d_K = M_PI * std::pow(h, 4) * c / 18.;
935 data.d_Gc = M_PI * c *
d_s0 *
d_s0 * std::pow(h, 5) / 10.;
951 std::string
printStr(
int nt,
int lvl)
const override {
954 std::ostringstream oss;
955 oss << tabS <<
"------- particle::PmbMaterial --------" << std::endl
957 oss << tabS <<
"State active = " << 0 << std::endl;
958 oss << tabS <<
"Horizon = " <<
d_horizon << std::endl;
959 oss << tabS <<
"Influence fn address = " << influence_fn.get() << std::endl;
960 oss << tabS <<
"Influence fn info: " << std::endl;
961 oss << influence_fn->printStr(nt + 1, lvl);
962 oss << tabS <<
"Peridynamic parameters: " << std::endl;
963 oss << tabS <<
" c = " <<
d_c << std::endl;
964 oss << tabS <<
" s0 = " <<
d_s0 << std::endl;
965 oss << tabS << std::endl;
976 void print(
int nt,
int lvl)
const override {
1000 throw std::runtime_error(
1002 <<
"Error: Require either Young's modulus E or Bulk modulus K"
1003 " to compute the PMB bond-based peridynamic parameters.\n");
1007 std::cout <<
"Warning: Both Young's modulus E and Bulk modulus K are "
1009 std::cout <<
"Warning: Selecting Young's modulus E for PMB calibration.\n";
1014 throw std::runtime_error(
1016 <<
"Error: Require either critical energy release rate Gc or "
1017 "critical stress intensity factor KIc to compute the PMB "
1018 "bond-based peridynamic parameters.\n");
1021 std::cout <<
"Warning: Both Gc and KIc provided; selecting Gc.\n";
1026 const double nu_pmb = (dim == 2 && !is_plane_strain) ? 1. / 3. : 0.25;
1029 std::cout <<
"Warning: PMB bond-based model fixes nu = " << nu_pmb
1057 throw std::runtime_error(
1059 <<
"Error: PMB parameters from E and Gc need a constant influence "
1060 "function. Set Influence_Function Type = 0.\n");
1065 throw std::runtime_error(
1067 <<
"Error: PMB influence scale must be > 0.\n");
1077 d_c = is_plane_strain ? 48. * E / (5. * M_PI * std::pow(h, 3))
1078 : 9. * E / (M_PI * std::pow(h, 3));
1079 d_s0 = std::sqrt(4. * Gc / (
d_c * std::pow(h, 4)));
1080 }
else if (dim == 3) {
1082 d_s0 = std::sqrt(10. * Gc / (M_PI *
d_c * std::pow(h, 5)));
1084 throw std::runtime_error(
1086 <<
"Error: PMB computeParameters: unsupported dim=" << dim
1134 if (dimension != dim)
1142 if (influence_fn ==
nullptr)
1143 influence_fn = std::make_shared<material::ConstInfluenceFn>(
1147 if (influence_fn ==
nullptr)
1148 influence_fn = std::make_shared<material::LinearInfluenceFn>(
1152 if (influence_fn ==
nullptr)
1153 influence_fn = std::make_shared<material::GaussianInfluenceFn>(
1157 throw std::runtime_error(
1159 <<
"Error: Influence function type = "
1161 <<
" is invalid.\n");
1186 std::pair<double, double>
getBondEF(
const double &r,
const double &s,
1188 const bool &break_bonds)
const override {
1190 return std::make_pair(
getInfFn(r) * 0.5 *
d_c * s *
1205 std::pair<double, double>
1206 getBondEF(
const double &r,
const double &s,
bool &fs,
const double
1207 &mx,
const double &thetax)
const override {
1221 return (dx + du) / (dx + du).length();
1231 return ((dx + du).length() - dx.
length()) / dx.
length();
1240 double getSc(
const double &r)
const override {
return std::numeric_limits<double>::max(); };
1268 return getGlobalMoment(i);
1289 if (dim == 2 && !is_plane_strain)
1290 data.d_nu = 1.0 / 3.0;
1295 if (dim == 2 && !is_plane_strain) {
1296 data.d_E =
d_c * (M_PI * std::pow(h, 3.0)) / 9.0;
1297 }
else if (dim == 2 && is_plane_strain) {
1298 data.d_E =
d_c * (5.0 * M_PI * std::pow(h, 3.0)) / 48.0;
1299 }
else if (dim == 3) {
1300 data.d_K =
d_c * (M_PI * std::pow(h, 4.0)) / 18.0;
1322 std::ostringstream oss;
1323 oss << tabS <<
"------- particle::PdElastic --------" << std::endl
1325 oss << tabS <<
"State active = " << 0 << std::endl;
1326 oss << tabS <<
"Horizon = " <<
d_horizon << std::endl;
1327 oss << tabS <<
"Influence fn address = " << influence_fn.get() << std::endl;
1328 oss << tabS <<
"Influence fn info: " << std::endl;
1329 oss << influence_fn->printStr(nt + 1, lvl);
1330 oss << tabS <<
"Peridynamic parameters: " << std::endl;
1331 oss << tabS <<
" c = " <<
d_c << std::endl;
1332 oss << tabS << std::endl;
1343 void print(
int nt,
int lvl)
const override {
1361 throw std::runtime_error(
1363 <<
"Error: Require either Young's modulus E or Bulk modulus K"
1364 " to compute the PdElastic parameters.\n");
1368 std::cout <<
"Warning: Both E and K provided; selecting E for PdElastic.\n";
1385 double J_scale = 1.0;
1390 J_scale = std::max(
getMoment(0), 1.0e-30);
1395 d_c = 72.0 * kappa / (5.0 * M_PI * std::pow(h, 3.0));
1397 d_c = 18.0 * kappa / (M_PI * std::pow(h, 4.0));
1399 throw std::runtime_error(
1401 <<
"Error: PdElastic computeParameters: unsupported dim=" << dim
1444 if (dimension != dim)
1452 if (influence_fn ==
nullptr)
1453 influence_fn = std::make_shared<material::ConstInfluenceFn>(
1457 if (influence_fn ==
nullptr)
1458 influence_fn = std::make_shared<material::LinearInfluenceFn>(
1462 if (influence_fn ==
nullptr)
1463 influence_fn = std::make_shared<material::GaussianInfluenceFn>(
1467 throw std::runtime_error(
1469 <<
"Error: Influence function type = "
1471 <<
" is invalid.\n");
1481 d_kappa = getModelBulkModulus(dim, is_plane_strain,
d_K,
d_G);
1500 std::pair<double, double>
getBondEF(
const double &r,
const double &s,
1502 const bool &break_bonds)
const override {
1525 std::pair<double, double>
1526 getBondEF(
const double &r,
const double &s,
bool &fs,
const double
1527 &mx,
const double &thetax)
const override {
1533 double change_length = s * r;
1537 double e_dev = change_length - thetax * r /
d_dim;
1539 return {0.5 * alpha * J * e_dev * e_dev,
1540 J * (r * thetax * factor + change_length * alpha)};
1550 return 0.5 *
d_kappa * thetax * thetax;
1562 return (dx + du) / (dx + du).length();
1572 return ((dx + du).length() - dx.
length()) / dx.
length();
1581 double getSc(
const double &r)
const override {
return d_s0; };
1609 return getGlobalMoment(i);
1662 std::ostringstream oss;
1663 oss << tabS <<
"------- particle::PdState --------" << std::endl
1665 oss << tabS <<
"State active = " << 1 << std::endl;
1666 oss << tabS <<
"Horizon = " <<
d_horizon << std::endl;
1667 oss << tabS <<
"Influence fn address = " << influence_fn.get() << std::endl;
1668 oss << tabS <<
"Influence fn info: " << std::endl;
1669 oss << influence_fn->printStr(nt + 1, lvl);
1670 oss << tabS <<
"Peridynamic parameters: " << std::endl;
1671 oss << tabS <<
" K = " <<
d_K << std::endl;
1672 oss << tabS <<
" G = " <<
d_G << std::endl;
1673 oss << tabS <<
" s0 = " <<
d_s0 << std::endl;
1674 oss << tabS << std::endl;
1685 void print(
int nt,
int lvl)
const override {
1706 bool found_E =
false;
1707 bool found_K =
false;
1708 bool found_G =
false;
1709 bool found_nu =
false;
1710 size_t num_props = 0;
1728 if (num_props != 2) {
1729 std::ostringstream oss;
1730 oss <<
"Error: Require two different elastic properties for the "
1731 "PdState material. Pairs supported are (E, K), (E, G), "
1732 "(E, nu), (K, G).\n";
1733 oss << deck.
printStr(0, 0) <<
"\n";
1734 throw std::runtime_error(
1741 throw std::runtime_error(
1743 <<
"Error: Require either critical energy release rate Gc or "
1744 "critical stress intensity factor KIc to compute the RNP "
1745 "bond-based peridynamic parameters.\n");
1748 std::cout <<
"Warning: Both critical energy release rate Gc and critical "
1749 "stress intensity factor KIc are provided.\n";
1750 std::cout <<
"Warning: To compute the RNP bond-based peridynamic "
1751 "parameters, we only require one of those.\n";
1752 std::cout <<
"Warning: Selecting critical energy release rate Gc to "
1753 "compute parameters.\n";
1758 if (found_E and found_G)
1762 if (found_E and found_K)
1767 if (found_G and found_K)
1818 d_kappa = getModelBulkModulus(dim, is_plane_strain,
d_K,
d_G);
1822 throw std::runtime_error(
1824 <<
"Error: PDState critical stretch from Gc needs a constant "
1825 "influence function. Set Influence_Function Type = 0.\n");
1827 if (dim != 2 && dim != 3) {
1828 throw std::runtime_error(
1830 <<
"Error: PdState computeParameters: unsupported dim=" << dim
1847 return (6.0 *
d_G / M_PI +
1848 16.0 * (
d_kappa - 2.0 *
d_G) / (9.0 * M_PI * M_PI)) *
1850 return (3. *
d_G + std::pow(3. / 4., 4) * (
d_K - 5. *
d_G / 3.)) *
Collection of methods and database related to peridynamic material.
virtual void print(int nt, int lvl) const
Prints the information about the object.
bool isPlaneStrain() const
Returns plane-strain condition.
virtual double getDilatationEnergyDensity(const double &thetax) const
Returns the dilatational part of the strain energy density.
virtual double getHorizon() const =0
Returns horizon.
Material(std::string name="")
Constructor.
virtual std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const double &mx, const double &thetax) const =0
Returns energy and force between bond due to state-based model.
virtual void print() const
Prints the information about the object.
virtual double getMoment(const size_t &i) const =0
Returns the moment of influence function.
virtual ~Material()
Destructor.
virtual double getDensity() const =0
Returns the density of the material.
virtual std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const bool &break_bonds) const =0
Returns energy and force between bond due to pairwise interaction.
virtual bool isStateActive() const =0
Returns true if state-based potential is active.
virtual inp::MatData computeMaterialProperties(const size_t &dim) const =0
Computes elastic and fracture material properties and returns the data.
std::string name()
Returns name of the material.
std::string d_name
Name of the material.
virtual util::Point getBondForceDirection(const util::Point &dx, const util::Point &du) const =0
Returns the unit vector along which bond-force acts.
size_t getDimension() const
Returns dimension of the problem.
virtual double getS(const util::Point &dx, const util::Point &du) const =0
Returns the bond strain.
virtual double getInfFn(const double &r) const =0
Returns the value of influence function.
virtual double getBreakSc(const double &r) const
Returns bond strain beyond which the bond is marked broken.
virtual std::string printStr(int nt, int lvl) const
Returns the string containing printable information about the object.
virtual double getSc(const double &r) const =0
Returns critical bond strain.
A class providing methods to compute energy density and force of peridynamic material.
util::Point getBondForceDirection(const util::Point &dx, const util::Point &du) const override
Returns the unit vector along which bond-force acts.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const bool &break_bonds) const override
Returns energy and force between bond due to pairwise interaction.
double getMoment(const size_t &i) const override
Returns the moment of influence function.
double getDensity() const override
Returns the density of the material.
std::string printStr(int nt, int lvl) const override
Returns the string containing printable information about the object.
double getS(const util::Point &dx, const util::Point &du) const override
Returns the bond strain.
PdElastic(inp::MaterialDeck &deck, const size_t &dim, const double &horizon)
Constructor.
inp::MatData computeMaterialProperties(const size_t &dim) const override
Computes elastic and fracture material properties and returns the data.
double getSc(const double &r) const override
Returns critical bond strain.
double getHorizon() const override
Returns horizon.
bool isStateActive() const override
Returns true if state-based potential is active.
double getInfFn(const double &r) const override
Returns the value of influence function.
void print() const override
Prints the information about the object.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const double &mx, const double &thetax) const override
Returns energy and force between bond due to state-based model.
void print(int nt, int lvl) const override
Prints the information about the object.
void computeParameters(inp::MaterialDeck &deck, const size_t &dim)
Compute material model parameters.
A class providing methods to compute energy density and force of peridynamic material.
double getS(const util::Point &dx, const util::Point &du) const override
Returns the bond strain.
double getCriticalStretchDensity(const size_t &dim) const
Returns Gc / s0^2 for the state-based model.
std::string printStr(int nt, int lvl) const override
Returns the string containing printable information about the object.
void print(int nt, int lvl) const override
Prints the information about the object.
double getSc(const double &r) const override
Returns critical bond strain.
inp::MatData computeMaterialProperties(const size_t &dim) const override
Computes elastic and fracture material properties and returns the data.
double d_kappa
Bulk modulus used by the model (K in 3D, in-plane in 2D)
void computeParameters(inp::MaterialDeck &deck, const size_t &dim)
Compute material model parameters.
void print() const override
Prints the information about the object.
double getDensity() const override
Returns the density of the material.
double getHorizon() const override
Returns horizon.
util::Point getBondForceDirection(const util::Point &dx, const util::Point &du) const override
Returns the unit vector along which bond-force acts.
double getMoment(const size_t &i) const override
Returns the moment of influence function.
double d_dim
Dimension, as a double.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const double &mx, const double &thetax) const override
Returns energy and force between bond due to state-based model.
double getDilatationEnergyDensity(const double &thetax) const override
Returns the dilatational part of the strain energy density.
PdState(inp::MaterialDeck &deck, const size_t &dim, const double &horizon)
Constructor.
double getInfFn(const double &r) const override
Returns the value of influence function.
double d_alphaFactor
d(d+2): 15 in 3D, 8 in 2D
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const bool &break_bonds) const override
Returns energy and force between bond due to pairwise interaction.
bool isStateActive() const override
Returns true if state-based potential is active.
double d_s0
Critical stretch.
A class providing methods to compute energy density and force of peridynamic material.
void computeParameters(inp::MaterialDeck &deck, const size_t &dim)
Compute material model parameters.
double getMoment(const size_t &i) const override
Returns the moment of influence function.
void print(int nt, int lvl) const override
Prints the information about the object.
double d_s0
Critical stretch.
double getDensity() const override
Returns the density of the material.
double getS(const util::Point &dx, const util::Point &du) const override
Returns the bond strain.
double getInfFn(const double &r) const override
Returns the value of influence function.
double d_Jscale
Constant influence value a0 that c was divided by.
bool isStateActive() const override
Returns true if state-based potential is active.
double getHorizon() const override
Returns horizon.
PmbMaterial(inp::MaterialDeck &deck, const size_t &dim, const double &horizon)
Constructor.
void print() const override
Prints the information about the object.
util::Point getBondForceDirection(const util::Point &dx, const util::Point &du) const override
Returns the unit vector along which bond-force acts.
double d_c
Micromodulus c (divided by the constant influence value)
inp::MatData computeMaterialProperties(const size_t &dim) const override
Computes elastic and fracture material properties and returns the data.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const double &mx, const double &thetax) const override
Returns energy and force between bond due to state-based model.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const bool &break_bonds) const override
Returns energy and force between bond due to pairwise interaction.
double getSc(const double &r) const override
Returns critical bond strain.
std::string printStr(int nt, int lvl) const override
Returns the string containing printable information about the object.
A class providing methods to compute energy density and force of peridynamic material.
double getHorizon() const override
Returns horizon.
double getInfFn(const double &r) const override
Returns the value of influence function.
double getBreakSc(const double &r) const override
Returns bond strain beyond which the bond is marked broken.
void print(int nt, int lvl) const override
Prints the information about the object.
util::Point getBondForceDirection(const util::Point &dx, const util::Point &du) const override
Returns the unit vector along which bond-force acts.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const bool &break_bonds) const override
Returns energy and force between bond due to pairwise interaction.
double d_invFactor
Inverse of factor = .
double getDensity() const override
Returns the density of the material.
RnpMaterial(inp::MaterialDeck &deck, const size_t &dim, const double &horizon)
Constructor.
std::pair< double, double > getBondEF(const double &r, const double &s, bool &fs, const double &mx, const double &thetax) const override
Returns energy and force between bond due to state-based model.
double getS(const util::Point &dx, const util::Point &du) const override
Returns the bond strain.
void computeParameters(inp::MaterialDeck &deck, const size_t &dim)
Compute material model parameters.
void print() const override
Prints the information about the object.
std::string printStr(int nt, int lvl) const override
Returns the string containing printable information about the object.
double getMoment(const size_t &i) const override
Returns the moment of influence function.
bool d_irrevBondBreak
Flag which indicates if the breaking of bond is irreversible.
double d_rbar
Inflection point of nonlinear function = .
bool isStateActive() const override
Returns true if state-based potential is active.
double d_factorSc
Factor to multiply to critical strain to check if bond is fractured.
inp::MatData computeMaterialProperties(const size_t &dim) const override
Computes elastic and fracture material properties and returns the data.
double getSc(const double &r) const override
Returns critical bond strain.
Collects a message with stream syntax for use in an exception.
std::string str() const
The message built so far.
bool is_plane_strain
Is plane-stress condition active.
double getGlobalInfFn(const double &r)
Returns the value of influence function.
double getGlobalMoment(const size_t &i)
Returns the moment of influence function.
size_t dimension
Dimension of the domain.
std::shared_ptr< material::BaseInfluenceFn > influence_fn
Store pointer to influence function globally.
double getModelBulkModulus(const size_t &dim, const bool &plane_strain, const double &K, const double &G)
Returns the bulk modulus the model works with, from table K and G.
std::string getTabS(int nt)
Returns tab spaces of a given size.
bool isGreater(const double &a, const double &b)
Returns true if a > b.
bool isLess(const double &a, const double &b)
Returns true if a < b.
Structure for elastic properties and fracture properties.
double toGc(double KIc, double nu, double E)
Compute critical energy release rate Gc from critical stress-intensity factor KIc,...
double toLambdaE(double E, double nu)
Compute Lame first parameter lambda from Young's modulus E and Poisson's ratio nu.
double d_mu
Lame second parameter.
double toKIc(double Gc, double nu, double E)
Compute critical stress-intensity factor KIc from critical energy release rate Gc,...
double d_KIc
Critical stress intensity factor.
double toK(double E, double nu)
Compute Bulk modulus K from Young's modulus K and Poisson's ratio nu.
double d_lambda
Lame first parameter.
double toGE(double E, double nu)
Compute shear modulus from Young's modulus E and Poisson's ratio nu.
double d_nu
Poisson's ratio.
double d_G
Shear modulus or Lame second parameter.
double d_E
Young's elastic modulus.
double d_Gc
Critical energy release rate.
double toE(double K, double nu)
Compute Young's modulus E from Bulk modulus K and Poisson's ratio nu.
Structure to read and store material related data.
bool d_isPlaneStrain
Indicates if the 2-d simulation is of plane-strain type (thick material) or plane-stress type (thin m...
size_t d_influenceFnType
Type of influence function.
std::vector< double > d_bondPotentialParams
List of parameters for pairwise potential.
bool d_computeParamsFromElastic
Compute Peridynamic material properties from elastic properties.
inp::MatData d_matData
List of elastic and fracture properties.
std::vector< double > d_influenceFnParams
List of parameters for influence function.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
A structure to represent 3d vectors.
double dot(const Point &b) const
Computes the dot product of this vector with another point.
double length() const
Computes the Euclidean length of the vector.