00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef PressureDependent_Elastic_CPP
00044 #define PressureDependent_Elastic_CPP
00045
00046 #include "PressureDependent_Elastic.h"
00047
00048 PressureDependent_Elastic::PressureDependent_Elastic(int E0_in,
00049 int v_in,
00050 int m_in,
00051 int p_ref_in,
00052 int k_cut_in,
00053 const stresstensor& initialStress,
00054 const straintensor& initialStrain)
00055 : ElasticState(initialStress, initialStrain),
00056 E0_index(E0_in),
00057 v_index(v_in),
00058 m_index(m_in),
00059 p_ref_index(p_ref_in),
00060 k_cut_index(k_cut_in)
00061 {
00062
00063 }
00064
00065
00066 ElasticState* PressureDependent_Elastic::newObj()
00067 {
00068 ElasticState * Els = new PressureDependent_Elastic(this->E0_index,
00069 this->v_index,
00070 this->m_index,
00071 this->p_ref_index,
00072 this->k_cut_index,
00073 this->Stress,
00074 this->Strain);
00075 return Els;
00076 }
00077
00078
00079 const BJtensor& PressureDependent_Elastic::getElasticStiffness (const MaterialParameter &MaterialParameter_in) const
00080 {
00081
00082 BJtensor I2("I", 2, def_dim_2);
00083
00084 BJtensor I_ijkl = I2("ij")*I2("kl");
00085 I_ijkl.null_indices();
00086 BJtensor I_ikjl = I_ijkl.transpose0110();
00087 BJtensor I_iljk = I_ijkl.transpose0111();
00088 BJtensor I4s = (I_ikjl+I_iljk)*0.5;
00089
00090 double E0 = getE0(MaterialParameter_in);
00091 double v = getv(MaterialParameter_in);
00092 if (v >= 0.5 || v < -1.0) {
00093 opserr << "Warning!! PressureDependent_Elastic: Invalid possoin's ratio. " << endln;
00094 exit (1);
00095 }
00096 double m = getm(MaterialParameter_in);
00097 double p_ref = getp_ref(MaterialParameter_in);
00098 if ( p_ref <= 0.0) {
00099 opserr << "Warning!! PressureDependent_Elastic: Invalid reference pressure. " << endln;
00100 exit (1);
00101 }
00102 double k_cut = getk_cut(MaterialParameter_in);
00103
00104 double p = this->getStress().p_hydrostatic();
00105
00106 double E_cut = E0 * k_cut;
00107 double E_cal = E0 * pow((p/p_ref), m);
00108 double E = (E_cal > E_cut) ? E_cal : E_cut;
00109
00110 double K = E / ( 3.0*(1.0-2.0*v) ) ;
00111 double G = E / ( 2.0*(1.0+v) );
00112
00113
00114 ElasticState::ElasticStiffness = I_ijkl *(K - 2.0*G/3.0) + I4s *(2.0*G);
00115
00116 return ElasticState::ElasticStiffness;
00117 }
00118
00119
00120 double PressureDependent_Elastic::getE0(const MaterialParameter &MaterialParameter_in) const
00121 {
00122 if ( E0_index > MaterialParameter_in.getNum_Material_Parameter() || E0_index < 2) {
00123 opserr << "PressureDependent_Elastic: Invalid Input. " << endln;
00124 exit (1);
00125 }
00126 else
00127 return MaterialParameter_in.getMaterial_Parameter(E0_index - 1);
00128 }
00129
00130
00131 double PressureDependent_Elastic::getv(const MaterialParameter &MaterialParameter_in) const
00132 {
00133 if ( v_index > MaterialParameter_in.getNum_Material_Parameter() || v_index < 2) {
00134 opserr << "PressureDependent_Elastic: Invalid Input. " << endln;
00135 exit (1);
00136 }
00137 else
00138 return MaterialParameter_in.getMaterial_Parameter(v_index - 1);
00139 }
00140
00141
00142 double PressureDependent_Elastic::getm(const MaterialParameter &MaterialParameter_in) const
00143 {
00144 if ( m_index > MaterialParameter_in.getNum_Material_Parameter() || m_index < 2) {
00145 opserr << "PressureDependent_Elastic: Invalid Input. " << endln;
00146 exit (1);
00147 }
00148 else
00149 return MaterialParameter_in.getMaterial_Parameter(m_index - 1);
00150 }
00151
00152
00153 double PressureDependent_Elastic::getp_ref(const MaterialParameter &MaterialParameter_in) const
00154 {
00155 if ( p_ref_index > MaterialParameter_in.getNum_Material_Parameter() || p_ref_index < 2) {
00156 opserr << "PressureDependent_Elastic: Invalid Input. " << endln;
00157 exit (1);
00158 }
00159 else
00160 return MaterialParameter_in.getMaterial_Parameter(p_ref_index - 1);
00161 }
00162
00163
00164 double PressureDependent_Elastic::getk_cut(const MaterialParameter &MaterialParameter_in) const
00165 {
00166 if ( k_cut_index > MaterialParameter_in.getNum_Material_Parameter() || k_cut_index < 2) {
00167 opserr << "PressureDependent_Elastic: Invalid Input. " << endln;
00168 exit (1);
00169 }
00170 else
00171 return MaterialParameter_in.getMaterial_Parameter(k_cut_index - 1);
00172 }
00173
00174 #endif
00175