00001 // ------------------------------------------------------------------------- 00002 // AnModel.h - This header file contains the data structure definitions 00003 // for the analisys model class mechanism within FEMOOP. 00004 // ------------------------------------------------------------------------- 00005 // 00006 // Description: There are several conceptual operations which are common 00007 // to all types of analisys (e.g. the computation of [C] 00008 // matrix), these operations are defined below. 00009 // 00010 // Currently are implemented the models: 00011 // Plane 00012 // Plane Stress 00013 // Plane Strain 00014 // Axisymmetric 00015 // Polar Plane Stress 00016 // Polar Plane Strain 00017 // Solid 00018 // Truss3d 00019 // Beam3d 00020 // PlFrame 00021 // Plate 00022 // Thin Plate (Kirchhoff Theory) 00023 // Thick Plate (Reissner-Mindlin Theory) 00024 // Von Karman (+ Mindlin) 00025 // Marguerre (shallow shells) 00026 // Degenerated Shell 00027 // Degenerated Shell 2D (surface integration) 00028 // Degenerated Shell 3D (solid integration) 00029 // Axisymmetric Shell 00030 // Thin Axisymmetric Shell 00031 // Thick Axisymmetric Shell 1D (line integration) 00032 // Thick Axisymmetric Shell 2D (plane integration) 00033 // 00034 // ------------------------------------------------------------------------- 00035 // 00036 // Obs: The number of lines of [B] matrix is equal to the number of stress 00037 // components of each analysis model. 00038 // 00039 // ------------------------------------------------------------------------- 00040 // For matrix definitions see: 00041 // 00042 // [1] "Finite Element Procedures in Engineering Analyses", Bathe, K. J., 00043 // McGraw Hill, 1982. 00044 // 00045 // For invariants definitions see: 00046 // 00047 // [2] "The Finite Element Method", O. C. Zienkiewicz & R. L. Taylor, 00048 // Vol. 2, Fourth Edition, McGraw-Hill, 1991. 00049 // [3] "Plasticity in Reinforced Concrete", W. F. Chen, McGraw-Hill, New 00050 // York, 1984. 00051 // 00052 // ------------------------------------------------------------------------- 00053 // Main public methods: 00054 // ------------------------------------------------------------------------- 00055 // 00056 // virtual void CMatrix( double t, 00057 // double *param, 00058 // double **cmatrix ) 00059 // 00060 // t - thickness (for beams,plates and shells) ( in ) 00061 // param - list of elastic parameter of material ( in ) 00062 // cmatrix - stress-strain matrix ( out ) 00063 // 00064 // Returns [C] Matrix for each analisys model. 00065 // 00066 // ------------------------------------------------------------------------- 00067 // 00068 // virtual void InvCMatrix( double t, double *param, 00069 // double **invcmatrix ) 00070 // 00071 // t - thickness (for beams, plates and shells) ( in ) 00072 // param - list of elastic parameter of material ( in ) 00073 // nvcmatrix - inverse of stress-strain matrix ( out ) 00074 // 00075 // Returns Inv([C]) Matrix for each analisys model. 00076 // 00077 // ------------------------------------------------------------------------- 00078 // 00079 // virtual void DofGlobDir( int dir_glob[6] ) 00080 // 00081 // dir_glob[6] - vector of active directions ( out ) 00082 // 00083 // Returns active global directions of degrees of freedom for each 00084 // analisys model, e.g. for plane stress the directions 1 and 2 (u and v). 00085 // 00086 // ------------------------------------------------------------------------- 00087 // 00088 // virtual void NodalDispl( int num_nodes, 00089 // sNodeDispl *elem_displ, 00090 // double *nodal_displ ) 00091 // 00092 // num_nodes - number of element nodes ( in ) 00093 // elem_displ - structure with elem. displacements ( in ) 00094 // nodal_displ - array with displacements ( out ) 00095 // 00096 // Puts the displacements given by an array of (u,v,w) in an sequencial 00097 // array to be used in matrix calculations. 00098 // 00099 // ------------------------------------------------------------------------- 00100 // 00101 // virtual void MountBMatrix( int num_shp_nodes, 00102 // sNodeCoord *coord, 00103 // dShapeVal *shapefunc, 00104 // sDerivCart *deriv_xyz, 00105 // double *matparam, 00106 // double **b_matrix ) 00107 // 00108 // num_shp_nodes - number of nodes for interpolation ( in ) 00109 // coord - element coordinates ( in ) 00110 // shapefunc - shape function at Gauss points ( in ) 00111 // deriv_xyz - cartesian deriv.of shape functions ( in ) 00112 // matparam - material parameters ( in ) 00113 // b_matrix - strain-displacement matrix ( out ) 00114 // 00115 // This method mounts [B] for each analysis model. 00116 // 00117 // ------------------------------------------------------------------------- 00118 // 00119 // virtual void MountBlMatrix( int num_shp_nodes, 00120 // sNodeCoord *coord, 00121 // dShapeVal *shapefunc, 00122 // sDerivCart *deriv_xyz, 00123 // double *disp, 00124 // double **bl_matrix ) 00125 // 00126 // num_shp_nodes - number of nodes for interpolation ( in ) 00127 // coord - element coordinates ( in ) 00128 // shapefunc - shape function at Gauss points ( in ) 00129 // deriv_xyz - cartesian deriv.of shape functions ( in ) 00130 // disp - element displacemts ( in ) 00131 // bl_matrix - strain-displacement matrix ( out ) 00132 // 00133 // This method mounts [Bl] (used in nonlinear mechanics) for each 00134 // analysis model. 00135 // 00136 // ------------------------------------------------------------------------- 00137 // 00138 // virtual void MountBnlMatrix( int num_shp_nodes, 00139 // sNodeCoord *coord, 00140 // dShapeVal *shapefunc, 00141 // sDerivCart *deriv_xyz, 00142 // double **bnl_matrix ) 00143 // 00144 // num_shp_nodes - number of nodes for interpolation ( in ) 00145 // coord - element coordinates ( in ) 00146 // shapefunc - shape function at Gauss points ( in ) 00147 // deriv_xyz - cartesian deriv.of shape functions ( in ) 00148 // bnl_matrix - strain-displacement matrix ( out ) 00149 // 00150 // This method mounts matrix [Bnl] (used in nonlinear mechanics) for each 00151 // analysis model. In ref. [2] this matrix is called [G]. 00152 // 00153 // ------------------------------------------------------------------------- 00154 // 00155 // virtual void MountSMatrix( sTensor *stress, 00156 // double **s_matrix ) 00157 // 00158 // stress - stress tensor ( in ) 00159 // s_matrix - stress matrix ( out ) 00160 // 00161 // This method mounts s_matrix (used in nonlinear mechanics) for each 00162 // analysis model. 00163 // 00164 // ------------------------------------------------------------------------- 00165 // 00166 // virtual void StrainTMatrix( sPrincStrVec *pstrvec, double **tmatrix ) 00167 // 00168 // prcstrvec - principal strains directions ( in ) 00169 // tmatrix - rotation matrix ( out ) 00170 // 00171 // Evaluates the rotation matrix of principal strains axis to canonical 00172 // axis. 00173 // 00174 // ------------------------------------------------------------------------- 00175 // 00176 // virtual void StressTMatrix( sPrincStrVec *pstrvec, double **tmatrix ) 00177 // 00178 // prcstrvec - principal stress directions ( in ) 00179 // tmatrix - rotation matrix ( out ) 00180 // 00181 // Evaluates the rotation matrix of principal stress axis to canonical 00182 // axis. 00183 // 00184 // ------------------------------------------------------------------------- 00185 // 00186 // virtual void ComplianceMatrix( double **CompMatrix, 00187 // double *eparam, 00188 // double *cparam ) 00189 // 00190 // CompMatrix - Compliance matrix ( out ) 00191 // eparam - material elastic parameters ( in ) 00192 // cparam - material compliance parameters ( in ) 00193 // 00194 // Evaluates the compliance matrix for each analysis model. 00195 // 00196 // ------------------------------------------------------------------------- 00197 // 00198 // virtual double Rigidity( double t, 00199 // int num_map_nodes, 00200 // sNodeCoord *coord, 00201 // dShapeVal *mapfunc ) 00202 // 00203 // t - thickness ( in ) 00204 // num_map_nodes - number of map nodes ( in ) 00205 // coord - element nodes coordinates ( in ) 00206 // mapfunc - map functions values ( in ) 00207 // 00208 // Returns the rigidity coefficient for each analisys model, e.g. in 00209 // axisymmetric is the radius at the given Gauss point. 00210 // 00211 // ------------------------------------------------------------------------- 00212 // 00213 // virtual void VecTensor( double *vec, 00214 // sTensor *ten ) 00215 // 00216 // vec - array with stress components ( in ) 00217 // ten - informations in a "Tensor" data ( out ) 00218 // 00219 // This method puts informations given by an array into a 00220 // tensor data structure for each analysis model. 00221 // 00222 // ------------------------------------------------------------------------- 00223 // 00224 // virtual void TensorVec( sTensor *ten, 00225 // double *vec ) 00226 // 00227 // ten - "Tensor" with stress components ( in ) 00228 // vec - array with informations ( out ) 00229 // 00230 // This method puts informations given by a tensor data structure 00231 // into an array for each analysis model. 00232 // 00233 // ------------------------------------------------------------------------- 00234 // 00235 // virtual double MisesStress( sTensor *stress ) 00236 // 00237 // stress - given stress tensor ( in ) 00238 // 00239 // Evaluates the von Mises stress of a given stress tensor. 00240 // 00241 // ------------------------------------------------------------------------- 00242 // 00243 // virtual void PrincStress( sTensor *stress, 00244 // sPrincStr *prcstr, 00245 // sPrincStrVec *prcstrvec, 00246 // double *angle ) 00247 // 00248 // stress - given stress tensor ( in ) 00249 // prcstr - principal stresses ( out ) 00250 // prcstrvec - principal directions ( out ) 00251 // angle - angle of principal directions ( out ) 00252 // 00253 // Evaluates the principal stresses and directions of a given stress 00254 // tensor. 00255 // 00256 // ------------------------------------------------------------------------- 00257 // 00258 // virtual void PrincStrain( sTensor *strain, 00259 // sPrincStr *prcstr, 00260 // sPrincStrVec *prcstrvec, 00261 // double *angle ) 00262 // 00263 // strain - given strain tensor ( in ) 00264 // prcstr - principal strains ( out ) 00265 // prcstrvec - principal directions ( out ) 00266 // angle - angle of principal directions ( out ) 00267 // 00268 // Evaluates the principal strains and directions of a given strain 00269 // tensor. 00270 // 00271 // ------------------------------------------------------------------------- 00272 // 00273 // virtual void dPStressdSig( sPrincStrVec *prcstrvec, sTensor *dS1, 00274 // sTensor *dS2, sTensor *dS3 ) 00275 // 00276 // prcstrvec - principal directions ( in ) 00277 // dS1 - derivative of S1 ( out ) 00278 // dS2 - derivative of S2 ( out ) 00279 // dS3 - derivative of S3 ( out ) 00280 // 00281 // Evaluates the derivative of the principal stresses w.r.t. the 00282 // stress components. 00283 // 00284 // ------------------------------------------------------------------------- 00285 // 00286 // virtual double I1( sTensor *stress ) 00287 // 00288 // stress - stress tensor ( in ) 00289 // 00290 // Returns the first stress invariant of a given stress tensor. 00291 // 00292 // ------------------------------------------------------------------------- 00293 // 00294 // virtual double I2( sTensor *stress ) 00295 // 00296 // stress - stress tensor ( in ) 00297 // 00298 // Returns the second stress invariant of a given stress tensor. 00299 // 00300 // ------------------------------------------------------------------------- 00301 // 00302 // virtual double I3( sTensor *stress ) 00303 // 00304 // stress - stress tensor ( in ) 00305 // 00306 // Returns the third stress invariant of a given stress tensor. 00307 // 00308 // ------------------------------------------------------------------------- 00309 // 00310 // virtual double J2( sTensor *stress ) 00311 // 00312 // stress - stress tensor ( in ) 00313 // 00314 // Returns the second deviatoric stress invariant of a given stress 00315 // tensor. 00316 // 00317 // ------------------------------------------------------------------------- 00318 // 00319 // virtual double J3( sTensor *stress ) 00320 // 00321 // stress - stress tensor ( in ) 00322 // 00323 // Returns the third deviatoric stress invariant of a given stress 00324 // tensor. 00325 // 00326 // ------------------------------------------------------------------------- 00327 // 00328 // virtual double Theta( sTensor *stress ) 00329 // 00330 // stress - stress tensor ( in ) 00331 // 00332 // Returns the theta angle according to ref. [3] of a given stress tensor. 00333 // 00334 // Obs: The theta angle defined in [2] and the Theta angle defined in [3] 00335 // aren't the same, but they have the following relationship: 00336 // 00337 // Theta[3] = Theta[2] - PI/6 00338 // ------------------------------------------------------------------------- 00339 // 00340 // virtual void dI1dSig( sTensor *stress, sTensor *deriv ) 00341 // 00342 // stress - stress tensor ( in ) 00343 // deriv - derivative of I1 ( out ) 00344 // 00345 // Evaluates the derivative of the fisrt stress invariant w.r.t. the 00346 // stress components. 00347 // 00348 // ------------------------------------------------------------------------- 00349 // 00350 // virtual void dI2dSig( sTensor *stress, sTensor *deriv ) 00351 // 00352 // stress - stress tensor ( in ) 00353 // deriv - derivative of I2 ( out ) 00354 // 00355 // Evaluates the derivative of the second stress invariant w.r.t. the 00356 // stress components. 00357 // 00358 // ------------------------------------------------------------------------- 00359 // 00360 // virtual void dI3dSig( sTensor *stress, sTensor *deriv ) 00361 // 00362 // stress - stress tensor ( in ) 00363 // deriv - derivative of I3 ( out ) 00364 // 00365 // Evaluates the derivative of the third stress invariant w.r.t. the 00366 // stress components. 00367 // 00368 // ------------------------------------------------------------------------- 00369 // 00370 // virtual void dJ2dSig( sTensor *stress, sTensor *deriv ) 00371 // 00372 // stress - stress tensor ( in ) 00373 // deriv - derivative of J2 ( out ) 00374 // 00375 // Evaluates the derivative of the second invariant of deviatoric 00376 // stresses w.r.t. the stress components. 00377 // 00378 // ------------------------------------------------------------------------- 00379 // 00380 // virtual void dJ3dSig( sTensor *stress, sTensor *deriv ) 00381 // 00382 // stress - stress tensor ( in ) 00383 // deriv - derivative of J3 ( out ) 00384 // 00385 // Evaluates the derivative of the third invariant of deviatoric stresses 00386 // w.r.t. the stress components. 00387 // 00388 // ------------------------------------------------------------------------- 00389 // 00390 // virtual void dThetadSig( sTensor *stress, sTensor *deriv ) 00391 // 00392 // stress - stress tensor ( in ) 00393 // deriv - derivative of Theta ( out ) 00394 // 00395 // Evaluates the derivative of the theta angle w.r.t. the stress 00396 // components. 00397 // 00398 // ------------------------------------------------------------------------- 00399 // 00400 // virtual void GetSclLabels ( char ** labels ) 00401 // 00402 // labels - labels of the stress response at intg. pts. 00403 // ( out ) 00404 // Returns the labels associated with the stress response at integration 00405 // points for the analysis model. 00406 // 00407 // ------------------------------------------------------------------------- 00408 // 00409 // virtual void GetNodSclLabels ( char ** labels ) 00410 // 00411 // labels - labels of the stress response at nodes. 00412 // ( out ) 00413 // Returns the labels associated with the stress response at nodal 00414 // points for the analysis model. By default the nodal labels are 00415 // the same as the integration point labels. 00416 // 00417 // ------------------------------------------------------------------------- 00418 // 00419 // virtual void GetElmNodSclLabels ( char ** labels ) 00420 // 00421 // labels - labels of the stress response at nodes. ( out ) 00422 // 00423 // Returns the labels associated with the stress response at nodal 00424 // points, extrapolated from inside the element, for the analysis model. 00425 // By default the element nodal labels are the same as the integration 00426 // point labels. 00427 // 00428 // ------------------------------------------------------------------------- 00429 // 00430 // virtual int GetNumPrincVals ( void ) 00431 // 00432 // returns the number of principal values ( e.g. principal stresses, etc. ) 00433 // required for the analysis model. 00434 // 00435 // ------------------------------------------------------------------------- 00436 // 00437 // virtual void GetPrincLabels ( char ** labels ) 00438 // 00439 // labels - labels of the principal values at integ. pts. ( out ) 00440 // 00441 // ------------------------------------------------------------------------- 00442 // 00443 // $Author: evandro $ 00444 // $Revision: 1.4 $ 00445 // $Date: 2000/04/10 18:01:18 $ 00446 // $State: Exp $ 00447 // 00448 // ------------------------------------------------------------------------- 00449 00450 #ifndef _ANMODEL_H 00451 #define _ANMODEL_H 00452 00453 #include "gbldefs.h" 00454 00455 // ------------------------------------------------------------------------- 00456 // Forward declarations: 00457 // 00458 class cEigenProblem; 00459 00460 // ------------------------------------------------------------------------- 00461 // Anmodel types: 00462 // 00463 typedef enum _anmodeltype 00464 { 00465 PLANE_STRESS, 00466 PLANE_STRAIN, 00467 AXISYMMETRIC, 00468 POLAR_PLANE_STRESS, 00469 POLAR_PLANE_STRAIN, 00470 SOLID, 00471 TRUSS3D, 00472 BEAM3D, 00473 PLFRAME, 00474 TIMOSHENKO_BEAM, 00475 NL_TIMOSHENKO_BEAM, 00476 EULER_BEAM, 00477 THICK_PLATE, 00478 THIN_PLATE, 00479 VON_KARMAN, 00480 MARGUERRE, 00481 AXISYMMETRIC_THIN_SHELL, 00482 AXISYMMETRIC_THICK_SHELL, 00483 AXISYMMETRIC_THICK_SHELL_2D, 00484 DEG_SHELL_2D, 00485 DEG_SHELL_3D, 00486 WINKLER, 00487 WINKLER2D 00488 } eAnmType; 00489 00490 // ------------------------------------------------------------------------- 00491 // AnModel class: 00492 // 00493 class cAnModel 00494 { 00495 private: 00496 static cAnModel *AnmHead; 00497 cAnModel *next; 00498 cAnModel *prev; 00499 00500 protected: 00501 static eAnmType _eGblType; // Global Analysis Model 00502 static int _iNumAnModels; // Number of analysis models 00503 static int _iMaxStrCmp; // Maximum number of stress comps 00504 eAnmType _eType; // Analysis model type 00505 int _iNumDofNode; // Number of dof per node 00506 int _iNumStrCmp; // Number of stress components 00507 int _iDimBMatrix; // Dimension of B matrix 00508 int _iDimBnlMatrix; // Dimension of Bnl matrix 00509 double **_adPMatrix; // P matrix (J2) 00510 00511 public: 00512 static cAnModel *Read ( void ); 00513 static cAnModel *GetAddr ( eAnmType ); 00514 static cAnModel *GetAnmHead ( void ) { return AnmHead; } 00515 static int GetMaxStrCmp ( void ) { return _iMaxStrCmp; } 00516 static int GetNumTotAnm ( void ) { return _iNumAnModels; } 00517 static eAnmType GetGblAnmType ( void ) { return _eGblType; } 00518 cAnModel ( void ); 00519 virtual ~cAnModel ( void ); 00520 cAnModel *GetNextAnm ( void ) { return next; } 00521 eAnmType GetAnModelType ( void ) { return _eType; } 00522 double **GetPMatrixAddr ( void ) { return _adPMatrix; } 00523 int NumDofNode ( void ) { return _iNumDofNode; } 00524 int DimBMatrix ( void ) { return _iDimBMatrix; } 00525 int DimBnlMatrix ( void ) { return _iDimBnlMatrix; } 00526 virtual int NumStrCmp ( void ) { return _iDimBMatrix; } 00527 virtual int NumSclLabels ( void ) { return _iDimBMatrix; } 00528 virtual int NumNodSclLabels ( void ) { return _iDimBMatrix; } 00529 virtual int NumElmNodSclLabels( void ) { return _iDimBMatrix; } 00530 virtual int GetNumPrincVals ( void ) { return 0; } 00531 virtual void GetSclLabels ( char ** ) { } 00532 virtual void GetNodSclLabels ( char ** ); 00533 virtual void GetElmNodSclLabels( char ** ); 00534 virtual void GetPrincLabels ( char ** ) { } 00535 virtual void GetPrincVals ( sTensor *, double * ) { } 00536 virtual void DofGlobDir ( int [6] ) { } 00537 virtual void CMatrix ( double, double *, double ** ) { } 00538 virtual void InvCMatrix ( double, double *, double ** ) { } 00539 virtual void MountBMatrix ( int, sNodeCoord *, dShapeVal *, 00540 sDerivCart *, double *, double ** ){} 00541 virtual void MountBlMatrix ( int, sNodeCoord *, dShapeVal *, 00542 sDerivCart *, double *,double ** ){ } 00543 virtual void MountBnlMatrix ( int, sNodeCoord *, dShapeVal *, 00544 sDerivCart *, double ** ) { } 00545 virtual void MountSMatrix ( sTensor *, double ** ) { } 00546 virtual double Rigidity ( double, int, sNodeCoord *, 00547 dShapeVal * ) { return(1.0); } 00548 virtual void NodalDispl ( int, sNodeDispl *, double * ) { } 00549 virtual void ThermalStrain ( double, double, double, double * ); 00550 virtual void StrainTMatrix ( double, double ** ) { } 00551 virtual void StrainTMatrix ( sPrincStrVec *, double ** ) { } 00552 virtual void StressTMatrix ( sPrincStrVec *, double ** ) { } 00553 virtual void ComplianceMatrix( double **, double *, double * ) { } 00554 virtual void VecTensor ( double *, sTensor * ) { } 00555 virtual void TensorVec ( sTensor *, double * ) { } 00556 virtual void ElmNodVecTensor ( double *v, sTensor *t ) 00557 { VecTensor ( v, t ); } 00558 virtual void NodVecTensor ( double *v, sTensor *t ) 00559 { VecTensor ( v, t ); } 00560 virtual void NodTensorVec ( sTensor *t, double *v ) 00561 { TensorVec ( t, v ); } 00562 virtual void ElmNodTensorVec ( sTensor *t, double *v ) 00563 { TensorVec ( t, v ); } 00564 virtual double MisesStress ( sTensor * ); 00565 virtual void PrincStress ( sTensor *, sPrincStr *, 00566 sPrincStrVec *, double * ) { } 00567 virtual void PrincStrain ( sTensor *, sPrincStr *, 00568 sPrincStrVec *, double * ) { } 00569 virtual void DsaRigBodyVecs ( int, sNodeCoord *, sNodeCoord *, 00570 int *, int *, double **,double ** ){} 00571 virtual void DsaRigBodyMat ( double ** ) { } 00572 virtual double DsaDerRig ( double, int, sNodeCoord *, 00573 double * ) { return(0.0); } 00574 virtual void DsaDerBMatrix ( int, sNodeCoord *, double *, 00575 double *, sNodeCoord *, sDerivCart *, 00576 double ** ); 00577 virtual void DsaDerBlMatrix ( int, sNodeCoord *, double *, 00578 sDerivCart *, double *, sNodeCoord *, 00579 sDerivCart *, double ** ) { } 00580 virtual void DsaDerBnlMatrix ( int, sNodeCoord *, double *, 00581 sNodeCoord *, sDerivCart *, 00582 double ** ); 00583 virtual void dPStressdSig ( sPrincStrVec *, sTensor *, 00584 sTensor *, sTensor *); 00585 virtual double I1 ( sTensor * ); 00586 virtual double I2 ( sTensor * ); 00587 virtual double I3 ( sTensor * ); 00588 virtual double J2 ( sTensor * ); 00589 virtual double J3 ( sTensor * ); 00590 virtual double Theta ( sTensor * ); 00591 virtual void dI1dSig ( sTensor *, sTensor * ); 00592 virtual void dI2dSig ( sTensor *, sTensor * ); 00593 virtual void dI3dSig ( sTensor *, sTensor * ); 00594 virtual void dJ2dSig ( sTensor *, sTensor * ); 00595 virtual void dJ3dSig ( sTensor *, sTensor * ); 00596 virtual void dThetadSig ( sTensor *, sTensor * ); 00597 virtual void ITensor4 ( double * ) { } 00598 virtual void ITensor2 ( double * ) { } 00599 00600 private: 00601 static cAnModel *ProcessHeaderAnalysis ( void ); 00602 }; 00603 00604 #endif 00605