00001 // ------------------------------------------------------------------------- 00002 // ShpCurve.h - Definitions of curve shape class. 00003 // ------------------------------------------------------------------------- 00004 // Description: 00005 // 00006 // This class is intended to deal with curved area shapes in space. Thus, 00007 // each derived shape has two parametric coordinates (r,s) which are mapped 00008 // on three cartesian coordinates (x,y,z). This class is used in the compu- 00009 // tation of equivalent forces in the loaded faces of solid elements. 00010 // 00011 // ------------------------------------------------------------------------- 00012 // Public methods: 00013 // ------------------------------------------------------------------------- 00014 // 00015 // void DerivXYZ( double **invjac, 00016 // sDerivNat *derivshp_rst, 00017 // sDerivCart *deriv_xyz ) 00018 // 00019 // invjac - inverse of the jacobian matrix ( in ) 00020 // derivshp_rst - local shape functions derivatives ( in ) 00021 // deriv_xyz - global shape functions derivatives ( out ) 00022 // 00023 // - - - - 00024 // | dN/dx | | dN/dr | 00025 // | | | | 00026 // | dN/dy | = [invjac] * | dN/ds | 00027 // | | | | 00028 // | dN/dz | | 0 | , where dN/dt = 0. 00029 // - - - - 00030 // 00031 // This method evaluates the global shape functions derivatives at a given 00032 // integration point. 00033 // 00034 // ------------------------------------------------------------------------- 00035 // 00036 // void Jacobian( sDerivNat *derivmap_rst, 00037 // double *mapfunc, 00038 // sNodeCoord *coord, 00039 // double *detjac, 00040 // double **jac ) 00041 // double **invjac ) 00042 // 00043 // derivmap_rst - local map functions derivatives ( in ) 00044 // mapfunc - local map functions ( in ) 00045 // coord - nodal coordinates ( in ) 00046 // detjac - determinant of the jacobian matrix ( out ) 00047 // jac - jacobian matrix ( out ) 00048 // invjac - inverse of the jacobian matrix ( out ) 00049 // 00050 // This method evaluates the jacobian matrix, its inverse and its 00051 // determinant. The Jacobian matrix is computed as follows: 00052 // The first two rows are the derivatives of the position vector w.r.t. 00053 // the parametric coordinates. It should be noted that vectors, 00054 // (dx/dr,dy/dr,dz/dr) and (dx/ds,dy/ds,dz/ds), are tangent to the 00055 // element surface. 00056 // The third row is obtained by the cross product of the first two rows 00057 // and represents the normal vector. 00058 // The returned determinant is computed as the length of the normal 00059 // vector and represents the infinitesimal area in parametric 00060 // coordinates. 00061 // 00062 // - - 00063 // | dx/dr dy/dr dz/dr | 00064 // | | 00065 // [jac] = | dx/ds dy/ds dz/ds | 00066 // | | 00067 // | n1 n2 n3 | 00068 // - - 00069 // where, 00070 // 00071 // n1 = (dy/dr * dz/ds) - (dz/dr * dy/ds) 00072 // n2 = (dz/dr * dx/ds) - (dx/dr * dz/ds) 00073 // n3 = (dx/dr * dy/ds) - (dy/dr * dx/ds) 00074 // 00075 // det_jac = sqrt( n1*n1 + n2*n2 + n3*n3 ) 00076 // 00077 // ------------------------------------------------------------------------- 00078 // 00079 // void LocalSys( sDerivNat *derivmap_rst, 00080 // sNodeCoord *coord, 00081 // double **rot ) 00082 // 00083 // derivmap_rst - local map functions derivatives ( in ) 00084 // coord - element coordinates ( in ) 00085 // rot - rotation matrix ( out ) 00086 // 00087 // This method computes the rotation matrix of a local system of coordina- 00088 // tes evaluated at a point on the area. The rotation matrix is formed as 00089 // follows: 00090 // Each column of the rotation matrix is formed by the coordinates of 00091 // each local system unity vector in the global system. 00092 // The non-normalized coordinates of the local system directions 00093 // are considered as: 00094 // 00095 // v1 = ( dx/dr, dy/dr, dz/dr ) 00096 // v2 = ( dx/ds, dy/ds, dz/ds ) 00097 // v3 = ( n1 , n2 , n3 ) 00098 // 00099 // where, 00100 // n1 = (dy/dr * dz/ds) - (dz/dr * dy/ds) 00101 // n2 = (dz/dr * dx/ds) - (dx/dr * dz/ds) 00102 // n3 = (dx/dr * dy/ds) - (dy/dr * dx/ds) 00103 // 00104 // ------------------------------------------------------------------------- 00105 // 00106 // $Author: joaquim $ 00107 // $Revision: 1.2 $ 00108 // $Date: 1998/02/16 20:21:11 $ 00109 // $State: Exp $ 00110 // 00111 // ------------------------------------------------------------------------- 00112 00113 #ifndef _SHPCURVE_H 00114 #define _SHPCURVE_H 00115 00116 #include "shpplane.h" 00117 #include "shptria3.h" 00118 #include "shptria6.h" 00119 #include "shpquad4.h" 00120 #include "shpquad8.h" 00121 00122 // ------------------------------------------------------------------------ 00123 // Curve Shape class 00124 // 00125 class cCurveShape : public virtual cPlaneShape 00126 { 00127 public: 00128 cCurveShape( void ); 00129 virtual ~cCurveShape( void ); 00130 virtual void Jacobian ( sDerivNat *, double *, sNodeCoord *, 00131 double *, double **, double ** ); 00132 virtual void DerivXYZ ( double **, sDerivNat *, sDerivCart * ); 00133 virtual void LocalSys ( sDerivNat *, sNodeCoord *, double ** ); 00134 virtual void GetTangent ( sNodeCoord *, sDerivNat *, sVector *, 00135 double *); 00136 virtual void DsaDerivXYZ( sNodeCoord *, sDerivNat *, sDerivNat *, 00137 double *, sDerivCart *, sNodeCoord *, 00138 double *, sDerivCart *); 00139 }; 00140 00141 // ------------------------------------------------------------------------- 00142 // Curve Tria3 Shape class: 00143 // 00144 class cShapeTria3Crv : public virtual cCurveShape, 00145 public virtual cShapeTria3 00146 { 00147 public: 00148 cShapeTria3Crv( void ); 00149 virtual ~cShapeTria3Crv( void ); 00150 virtual int GetEdge ( int *, eShapeType *, int *, int * ); 00151 virtual int GetFace ( int *, eShapeType *, int *, int * ); 00152 }; 00153 00154 // ------------------------------------------------------------------------- 00155 // Curve Tria6 Shape class: 00156 // 00157 class cShapeTria6Crv : public virtual cCurveShape, 00158 public virtual cShapeTria6 00159 { 00160 public: 00161 cShapeTria6Crv( void ); 00162 virtual ~cShapeTria6Crv( void ); 00163 virtual int GetEdge ( int *, eShapeType *, int *, int * ); 00164 virtual int GetFace ( int *, eShapeType *, int *, int * ); 00165 }; 00166 00167 // ------------------------------------------------------------------------- 00168 // Curve Quad4 Shape class: 00169 // 00170 class cShapeQuad4Crv : public virtual cCurveShape, 00171 public virtual cShapeQuad4 00172 { 00173 public: 00174 cShapeQuad4Crv( void ); 00175 virtual ~cShapeQuad4Crv( void ); 00176 virtual int GetEdge ( int *, eShapeType *, int *, int * ); 00177 virtual int GetFace ( int *, eShapeType *, int *, int * ); 00178 }; 00179 00180 // ------------------------------------------------------------------------- 00181 // Curve Quad8 Shape class: 00182 // 00183 class cShapeQuad8Crv : public virtual cCurveShape, 00184 public virtual cShapeQuad8 00185 { 00186 public: 00187 cShapeQuad8Crv( void ); 00188 virtual ~cShapeQuad8Crv( void ); 00189 virtual int GetEdge ( int *, eShapeType *, int *, int * ); 00190 virtual int GetFace ( int *, eShapeType *, int *, int * ); 00191 }; 00192 00193 #endif 00194