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
00031 #include <ElasticPlateSection.h>
00032 #include <Matrix.h>
00033 #include <Vector.h>
00034 #include <Channel.h>
00035 #include <FEM_ObjectBroker.h>
00036
00037
00038 const double ElasticPlateSection::five6 = 5.0/6.0 ;
00039
00040
00041 Vector ElasticPlateSection::stress(5) ;
00042 Matrix ElasticPlateSection::tangent(5,5) ;
00043 ID ElasticPlateSection::array(5) ;
00044
00045
00046
00047 ElasticPlateSection::ElasticPlateSection( ) :
00048 SectionForceDeformation( 0, SEC_TAG_ElasticPlateSection ),
00049 strain(5)
00050 { }
00051
00052
00053
00054
00055 ElasticPlateSection::ElasticPlateSection( int tag,
00056 double young,
00057 double poisson,
00058 double thickness ) :
00059 SectionForceDeformation( tag, SEC_TAG_ElasticPlateSection ),
00060 strain(5)
00061 {
00062 this->E = young ;
00063 this->nu = poisson ;
00064 this->h = thickness ;
00065 }
00066
00067
00068
00069
00070 ElasticPlateSection::~ElasticPlateSection( )
00071 { }
00072
00073
00074
00075
00076 SectionForceDeformation* ElasticPlateSection::getCopy( )
00077 {
00078 ElasticPlateSection *clone ;
00079
00080 clone = new ElasticPlateSection( ) ;
00081
00082 *clone = *this ;
00083
00084 return clone ;
00085 }
00086
00087
00088
00089
00090 int ElasticPlateSection::getOrder( ) const
00091 {
00092 return 5 ;
00093 }
00094
00095
00096
00097 const ID& ElasticPlateSection::getType( )
00098 {
00099 return array ;
00100 }
00101
00102
00103
00104
00105 int ElasticPlateSection::commitState( )
00106 {
00107 return 0 ;
00108 }
00109
00110
00111
00112
00113 int ElasticPlateSection::revertToLastCommit( )
00114 {
00115 return 0 ;
00116 }
00117
00118
00119 int ElasticPlateSection::revertToStart( )
00120 {
00121 return 0 ;
00122 }
00123
00124
00125
00126 int ElasticPlateSection ::
00127 setTrialSectionDeformation( const Vector &strain_from_element)
00128 {
00129 this->strain = strain_from_element ;
00130
00131 return 0 ;
00132 }
00133
00134
00135
00136 const Vector& ElasticPlateSection::getSectionDeformation( )
00137 {
00138 return this->strain ;
00139 }
00140
00141
00142
00143 const Vector& ElasticPlateSection::getStressResultant( )
00144 {
00145 double D = E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ;
00146
00147 double G = 0.5 * E / ( 1.0 + nu ) ;
00148
00149 G *= five6 ;
00150 G *= h ;
00151
00152
00153 stress(0) = -( D*strain(0) + nu*D*strain(1) ) ;
00154
00155 stress(1) = -( nu*D*strain(0) + D*strain(1) ) ;
00156
00157 stress(2) = -0.5*D*( 1.0 - nu )*strain(2) ;
00158
00159 stress(3) = G*strain(3) ;
00160
00161 stress(4) = G*strain(4) ;
00162
00163
00164 return this->stress ;
00165 }
00166
00167
00168
00169 const Matrix& ElasticPlateSection::getSectionTangent( )
00170 {
00171
00172 double D = E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ;
00173
00174 double G = 0.5 * E / ( 1.0 + nu ) ;
00175
00176
00177 tangent.Zero() ;
00178
00179 tangent(0,0) = -D ;
00180 tangent(1,1) = -D ;
00181
00182 tangent(0,1) = -nu*D ;
00183 tangent(1,0) = tangent(0,1) ;
00184
00185 tangent(2,2) = -0.5 * D * ( 1.0 - nu ) ;
00186
00187 tangent(3,3) = five6*G*h ;
00188
00189 tangent(4,4) = tangent(3,3) ;
00190
00191
00192 return this->tangent ;
00193 }
00194
00195
00196 const Matrix& ElasticPlateSection::getInitialTangent( )
00197 {
00198
00199 double D = E * (h*h*h) / 12.0 / ( 1.0 - nu*nu ) ;
00200
00201 double G = 0.5 * E / ( 1.0 + nu ) ;
00202
00203
00204 tangent.Zero() ;
00205
00206 tangent(0,0) = -D ;
00207 tangent(1,1) = -D ;
00208
00209 tangent(0,1) = -nu*D ;
00210 tangent(1,0) = tangent(0,1) ;
00211
00212 tangent(2,2) = -0.5 * D * ( 1.0 - nu ) ;
00213
00214 tangent(3,3) = five6*G*h ;
00215
00216 tangent(4,4) = tangent(3,3) ;
00217
00218
00219 return this->tangent ;
00220 }
00221
00222
00223 void ElasticPlateSection::Print( OPS_Stream &s, int flag )
00224 {
00225 s << "ElasticPlateSection: \n " ;
00226 s << " Young's Modulus E = " << E << endln ;
00227 s << " Poisson's Ratio nu = " << nu << endln ;
00228 s << " Thickness h = " << h << endln ;
00229
00230 return ;
00231 }
00232
00233
00234 int
00235 ElasticPlateSection::sendSelf(int cTag, Channel &theChannel)
00236 {
00237 int res = 0;
00238 static Vector data(4);
00239 data(0) = this->getTag();
00240 data(1) = E;
00241 data(2) = nu;
00242 data(3) = h;
00243
00244 res = theChannel.sendVector(this->getDbTag(), cTag, data);
00245 if (res < 0)
00246 opserr << "ElasticPlateSection::sendSelf() - failed to send data\n";
00247
00248 return res;
00249 }
00250
00251
00252 int
00253 ElasticPlateSection::recvSelf(int cTag, Channel &theChannel, FEM_ObjectBroker &theBroker)
00254 {
00255 int res = 0;
00256 static Vector data(4);
00257 res = theChannel.recvVector(this->getDbTag(), cTag, data);
00258 if (res < 0)
00259 opserr << "ElasticPlateSection::recvSelf() - failed to recv data\n";
00260 else {
00261 this->setTag(data(0));
00262 E = data(1);
00263 nu = data(2);
00264 h = data(3);
00265 }
00266
00267 return res;
00268 }