00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <stdio.h>
00042 #include <stdlib.h>
00043 #include <math.h>
00044
00045 #include <ID.h>
00046 #include <Vector.h>
00047 #include <Matrix.h>
00048 #include <Element.h>
00049 #include <Node.h>
00050 #include <NDMaterial.h>
00051
00052 class BrickUP : public Element {
00053
00054 public :
00055
00056
00057 BrickUP( ) ;
00058
00059
00060 BrickUP( int tag,
00061 int node1,
00062 int node2,
00063 int node3,
00064 int node4,
00065 int node5,
00066 int node6,
00067 int node7,
00068 int node8,
00069 NDMaterial &theMaterial,double bulk, double rhof,
00070 double perm1, double perm2, double perm3,
00071 double b1 = 0.0, double b2 = 0.0, double b3 = 0.0) ;
00072
00073
00074 virtual ~BrickUP( ) ;
00075
00076 const char *getClassType(void) const {return "BrickUP";};
00077
00078
00079 void setDomain( Domain *theDomain ) ;
00080
00081
00082 int getNumExternalNodes( ) const ;
00083
00084
00085 const ID &getExternalNodes( ) ;
00086 Node **getNodePtrs(void);
00087
00088
00089 int getNumDOF( ) ;
00090
00091
00092 int commitState( ) ;
00093
00094
00095 int revertToLastCommit( ) ;
00096
00097
00098 int revertToStart( ) ;
00099
00100
00101 void Print( OPS_Stream &s, int flag ) ;
00102
00103
00104 const Matrix &getTangentStiff( ) ;
00105 const Matrix &getInitialStiff( ) ;
00106 const Matrix &getDamp(void);
00107 const Matrix &getMass( ) ;
00108
00109 void zeroLoad( ) ;
00110 int addLoad(ElementalLoad *theLoad, double loadFactor);
00111 int addInertiaLoadToUnbalance(const Vector &accel);
00112
00113
00114 const Vector &getResistingForce( ) ;
00115
00116
00117 const Vector &getResistingForceIncInertia( ) ;
00118
00119
00120 int sendSelf (int commitTag, Channel &theChannel);
00121 int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00122 &theBroker);
00123
00124 Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00125 int getResponse(int responseID, Information &eleInformation);
00126
00127
00128 int displaySelf(Renderer &theViewer, int displayMode, float fact);
00129
00130
00131
00132 friend class PyLiq1;
00133 friend class TzLiq1;
00134
00135 private :
00136
00137
00138 static Matrix stiff ;
00139 static Vector resid ;
00140 static Matrix mass ;
00141 static Matrix damp ;
00142
00143
00144 static const double root3 ;
00145 static const double one_over_root3 ;
00146 static const double sg[2] ;
00147 static const double wg[8] ;
00148
00149
00150
00151 ID connectedExternalNodes ;
00152 Node *nodePointers[8] ;
00153
00154
00155
00156 NDMaterial *materialPointers[8] ;
00157
00158
00159
00160 static double xl[][8] ;
00161 double b[3];
00162 double rho;
00163 double kc;
00164 double perm[3];
00165
00166
00167 void formInertiaTerms( int tangFlag ) ;
00168
00169
00170 void formDampingTerms( int tangFlag ) ;
00171
00172
00173 void formResidAndTangent( int tang_flag ) ;
00174
00175
00176 double mixtureRho(int ipt);
00177
00178
00179 void computeBasis( ) ;
00180
00181
00182 const Matrix& computeBbar( int node,
00183 const double shp[4][8],
00184 const double shpBar[4][8] ) ;
00185
00186
00187 const Matrix& computeB( int node, const double shp[4][8] ) ;
00188
00189
00190 Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00191
00192 Vector *load;
00193 Matrix *Ki;
00194 } ;
00195
00196
00197
00198
00199
00200
00201