14 #ifndef MPM_MATERIAL_H 15 #define MPM_MATERIAL_H 21 #include "temperature.h" 53 class Temperature *
temp = NULL;
61 Mat(
string,
int,
class EOS *,
class Strength *,
class Damage *,
63 Mat(
string,
int,
double,
double,
double);
82 void add_strength(vector<string>);
83 int find_strength(
string);
84 void add_EOS(vector<string>);
86 void add_material(vector<string>);
87 int find_material(
string);
88 void add_damage(vector<string>);
89 int find_damage(
string);
90 void add_temperature(vector<string>);
91 int find_temperature(
string);
93 typedef Strength *(*StrengthCreator)(
MPM *,vector<string>);
94 typedef map<string,StrengthCreator> StrengthCreatorMap;
95 StrengthCreatorMap *strength_map;
97 typedef EOS *(*EOSCreator)(MPM *,vector<string>);
98 typedef map<string,EOSCreator> EOSCreatorMap;
99 EOSCreatorMap *EOS_map;
101 typedef Damage *(*DamageCreator)(MPM *,vector<string>);
102 typedef map<string,DamageCreator> DamageCreatorMap;
103 DamageCreatorMap *damage_map;
105 typedef Temperature *(*TemperatureCreator)(MPM *,vector<string>);
106 typedef map<string,TemperatureCreator> TemperatureCreatorMap;
107 TemperatureCreatorMap *temperature_map;
117 template <
typename T>
static Strength *strength_creator(MPM *,vector<string>);
118 template <
typename T>
static EOS *EOS_creator(MPM *,vector<string>);
119 template <
typename T>
static Damage *damage_creator(MPM *,vector<string>);
120 template <
typename T>
static Temperature *temperature_creator(MPM *,vector<string>);
122 const map<string, string> usage = {{
"rigid",
"Usage: material(material-ID, \033[1;32mrigid\033[0m)\n"},
123 {
"linear",
"Usage: material(material-ID, \033[1;32mlinear\033[0m, rho, E, nu, optional: damage-ID)\n"},
124 {
"neo-hookean",
"Usage: material(material-ID, \033[1;32mneo-hookean\033[0m, rho, E, nu, optional: damage-ID)\n"},
125 {
"eos-strength",
"Usage: material(material-ID, \033[1;32meos-strength\033[0m, eos-ID, strength-ID, optional: damage-ID, optional: temperature-ID)\n"}};
126 const map<string, int> Nargs = {{
"rigid", 2},
129 {
"eos-strength", 4}};
double lambda
1st Lame parameter
Definition: material.h:59
class EOS * eos
Pointer to the EOS.
Definition: material.h:50
int type
Either RIGID, LINEAR, NEO_HOOKEAN, or SHOCK with values from Material::constitutive_model.
Definition: material.h:48
vector< class EOS * > EOSs
List of defined Equations of State.
Definition: material.h:74
vector< class Damage * > damages
List of defined Damage laws.
Definition: material.h:76
string id
Identification name of the material.
Definition: material.h:47
double nu
Poisson's ratio .
Definition: material.h:56
string id
Identification name of the material.
Definition: material.h:72
class Strength * strength
Pointer to the Strength (flow stress rule)
Definition: material.h:51
double signal_velocity
Signal velocity in the reference state .
Definition: material.h:60
class Damage * damage
Pointer to the Damage law.
Definition: material.h:52
Definition: material.h:70
vector< Mat > materials
List of defined materials.
Definition: material.h:73
vector< class Strength * > strengths
List of defined Strengths.
Definition: material.h:75
constitutive_model
Definition: material.h:109
double rho0
Density in the reference state .
Definition: material.h:54
Definition: material.h:45
Definition: pointers.h:29
vector< class Temperature * > temperatures
List of defined Temperature laws.
Definition: material.h:77
bool rigid
True if the material is rigid, false otherwise.
Definition: material.h:49
Mat(string, int, class EOS *, class Strength *, class Damage *, class Temperature *)
Creates an elasto-plastic material.
Definition: material.cpp:419
double G
Shear modulus.
Definition: material.h:57
double E
Young's modulus.
Definition: material.h:55
double K
Bulk modulus.
Definition: material.h:58
class Temperature * temp
Pointer to the Temperature law.
Definition: material.h:53