11#ifndef INP_MATERIALDECK_H
12#define INP_MATERIALDECK_H
85 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
88 std::ostringstream oss;
89 oss << tabS <<
"------- MatData --------" << std::endl << std::endl;
90 oss << tabS <<
"Young's modulus = " <<
d_E << std::endl;
91 oss << tabS <<
"Shear modulus = " <<
d_G << std::endl;
92 oss << tabS <<
"Bulk modulus = " <<
d_K << std::endl;
93 oss << tabS <<
"Poisson ratio = " <<
d_nu << std::endl;
94 oss << tabS <<
"Lame parameter Lambda = " <<
d_lambda << std::endl;
95 oss << tabS <<
"Lame parameter Mu = " <<
d_mu << std::endl;
96 oss << tabS <<
"Critical stress intensity factor = " <<
d_KIc << std::endl;
97 oss << tabS <<
"Critical energy release rate = " <<
d_Gc << std::endl;
98 oss << tabS << std::endl;
109 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); }
122 double toNu(
double lambda,
double mu) {
return lambda * 0.5 / (lambda + mu); }
130 double toNuEG(
double E,
double G) {
return E * 0.5 / G - 1.; }
138 double toE(
double K,
double nu) {
return K * (3. * (1. - 2. * nu)); }
146 double toK(
double E,
double nu) {
return E / (3. * (1. - 2. * nu)); }
156 return E * nu / ((1. + nu) * (1. - 2. * nu));
166 double toLambdaK(
double K,
double nu) {
return 3. * K * nu / (1. + nu); }
174 double toGE(
double E,
double nu) {
return E / (2. * (1. + nu)); }
182 double toGK(
double K,
double nu) {
183 return 3. * K * (1. - 2. * nu) / (2. * (1. + nu));
194 return lambda * (1. + nu) * (1. - 2. * nu) / nu;
210 double toGc(
double KIc,
double nu,
double E) {
return KIc * KIc / E; }
225 double toKIc(
double Gc,
double nu,
double E) {
return std::sqrt(Gc * E); }
331 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
334 std::ostringstream oss;
335 oss << tabS <<
"------- MaterialDeck --------" << std::endl << std::endl;
339 oss << tabS <<
"Bond potential params = ["
344 oss << tabS <<
"State potential params = ["
349 oss << tabS <<
"Influence function params = ["
355 oss << tabS <<
"State contribution from broken bond enabled = "
358 oss << tabS <<
"Compute parameters from elastic properties = "
361 oss << tabS <<
"Density = " <<
d_density << std::endl;
362 oss << tabS <<
"Horizon = " <<
d_horizon << std::endl;
365 oss << tabS << std::endl;
376 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); }
Collection of methods and database related to input.
std::string getTabS(int nt)
Returns tab spaces of given size.
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.
void print(int nt=0, int lvl=0) const
Prints the information about the object.
double d_mu
Lame second parameter.
double toGK(double K, double nu)
Compute shear modulus from Bulk modulus K and Poisson's ratio nu.
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.
MatData(const MatData &md)
Copy constructor.
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 toNu(double lambda, double mu)
Compute Poisson's ratio from Lame parameters.
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 toELambda(double lambda, double nu)
Compute Young's modulus E from Lame first parameter lambda 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 toNuEG(double E, double G)
Compute Poisson's ratio from Young's and Shear modulus.
double d_E
Young's elastic modulus.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
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...
double d_density
Density of material.
size_t d_bondPotentialType
Type of pairwise (bond-based) potential.
double d_horizonMeshRatio
Horizon to mesh ratio.
size_t d_influenceFnType
Type of influence function.
std::vector< double > d_bondPotentialParams
List of parameters for pairwise potential.
MaterialDeck()
Constructor.
std::string d_materialType
Material type.
double d_horizon
Horizon for peridynamic interaction.
bool d_stateContributionFromBrokenBond
Flag for contribution to hydrostatic force from the broken bond.
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.
size_t d_statePotentialType
Type of hydrostatic (state-based) potential.
std::vector< double > d_statePotentialParams
List of parameters for hydrostatic potential.
bool d_irreversibleBondBreak
Flag for irreversible breaking of bonds.
double d_checkScFactor
Factor to check if bond is broken.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
void print(int nt=0, int lvl=0) const
Prints the information about the object.
MaterialDeck(const MaterialDeck &md)
Copy constructor.