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 #ifndef Isotropic_Elastic_CPP
00035 #define Isotropic_Elastic_CPP
00036
00037 #include "Isotropic_Elastic.h"
00038
00039 Isotropic_Elastic::Isotropic_Elastic(int E_in,
00040 int v_in,
00041 const stresstensor& initialStress,
00042 const straintensor& initialStrain)
00043 : ElasticState(initialStress, initialStrain),
00044 E_index(E_in),
00045 v_index(v_in)
00046 {
00047
00048 }
00049
00050
00051 ElasticState* Isotropic_Elastic::newObj()
00052 {
00053 ElasticState *Els = new Isotropic_Elastic(this->E_index,
00054 this->v_index,
00055 this->Stress,
00056 this->Strain);
00057 return Els;
00058 }
00059
00060
00061 const BJtensor& Isotropic_Elastic::getElasticStiffness(const MaterialParameter &MaterialParameter_in) const
00062 {
00063
00064 BJtensor I2("I", 2, def_dim_2);
00065
00066 BJtensor I_ijkl = I2("ij")*I2("kl");
00067 I_ijkl.null_indices();
00068 BJtensor I_ikjl = I_ijkl.transpose0110();
00069 BJtensor I_iljk = I_ijkl.transpose0111();
00070 BJtensor I4s = (I_ikjl+I_iljk)*0.5;
00071
00072 double E = getE(MaterialParameter_in);
00073 double v = getv(MaterialParameter_in);
00074
00075 if (E< 0.0 || v < -1.0 || v >= 0.5) {
00076 opserr << "Isotropic_Elastic: Invalid Input. " << endln;
00077 exit (1);
00078 }
00079
00080
00081 ElasticState::ElasticStiffness = I_ijkl*( E*v / ( (1.0+v)*(1.0 - 2.0*v) ) ) + I4s*( E / (1.0 + v) );
00082
00083 return ElasticState::ElasticStiffness;
00084 }
00085
00086
00087 double Isotropic_Elastic::getE(const MaterialParameter &MaterialParameter_in) const
00088 {
00089 if ( E_index > MaterialParameter_in.getNum_Material_Parameter() || E_index < 1) {
00090 opserr << "Isotropic_Elastic: Invalid Input. " << endln;
00091 exit (1);
00092 }
00093 else
00094 return MaterialParameter_in.getMaterial_Parameter(E_index - 1);
00095 }
00096
00097
00098
00099 double Isotropic_Elastic::getv(const MaterialParameter &MaterialParameter_in) const
00100 {
00101 if ( v_index > MaterialParameter_in.getNum_Material_Parameter() || v_index < 1) {
00102 opserr << "Isotropic_Elastic: Invalid Input. " << endln;
00103 exit (1);
00104 }
00105 else
00106 return MaterialParameter_in.getMaterial_Parameter(v_index - 1);
00107 }
00108
00109 #endif
00110