KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
solid_shell_element_sprism_3D6N.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Vicente Mataix Ferrandiz
10 //
11 
12 #pragma once
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
19 #include "custom_elements/base_solid_element.h"
22 
23 namespace Kratos
24 {
27 
31 
35 
39 
43 
56 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) SolidShellElementSprism3D6N
57  : public BaseSolidElement
58 {
59 public:
60 
63 
67  KRATOS_DEFINE_LOCAL_FLAG( COMPUTE_RHS_VECTOR );
68  KRATOS_DEFINE_LOCAL_FLAG( COMPUTE_LHS_MATRIX );
69  KRATOS_DEFINE_LOCAL_FLAG( COMPUTE_RHS_VECTOR_WITH_COMPONENTS );
70  KRATOS_DEFINE_LOCAL_FLAG( COMPUTE_LHS_MATRIX_WITH_COMPONENTS );
71  KRATOS_DEFINE_LOCAL_FLAG( EAS_IMPLICIT_EXPLICIT ); // True means implicit
72  KRATOS_DEFINE_LOCAL_FLAG( TOTAL_UPDATED_LAGRANGIAN ); // True means total lagrangian
73  KRATOS_DEFINE_LOCAL_FLAG( QUADRATIC_ELEMENT ); // True means quadratic in-plane behaviour
74  KRATOS_DEFINE_LOCAL_FLAG( EXPLICIT_RHS_COMPUTATION ); // True means elastic behaviour for stabilization
75 
78 
80  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
81 
84 
87 
89  typedef Node NodeType;
90 
93 
95  typedef std::size_t IndexType;
96 
98  typedef std::size_t SizeType;
99 
100  // The vector containing the weak pointers to the nodes
102 
105 
109 
113  enum class Configuration {INITIAL = 0, CURRENT = 1};
114 
118  enum class GeometricLevel {LOWER = 0, CENTER = 5, UPPER = 9};
119 
127  enum class OrthogonalBaseApproach {X = 0, Y = 1, Z = 2};
128 
132 
133  /* A private default constructor necessary for serialization */
135 
136  /* Constructor using an array of nodes */
137  SolidShellElementSprism3D6N(IndexType NewId, GeometryType::Pointer pGeometry);
138 
139  /* Constructor using an array of nodes with properties */
140  SolidShellElementSprism3D6N(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
141 
142  /* Copy constructor */
144 
145  /* Destructor */
146  ~SolidShellElementSprism3D6N() override;
147 
152  /* Assignment operator */
154 
158 
166  Element::Pointer Create(
167  IndexType NewId,
168  GeometryType::Pointer pGeom,
169  PropertiesType::Pointer pProperties
170  ) const override;
171 
179  Element::Pointer Create(
180  IndexType NewId,
181  NodesArrayType const& ThisNodes,
182  PropertiesType::Pointer pProperties
183  ) const override;
184 
191  Element::Pointer Clone(
192  IndexType NewId,
193  NodesArrayType const& ThisNodes
194  ) const override;
195 
201  void EquationIdVector(
202  EquationIdVectorType& rResult,
203  const ProcessInfo& rCurrentProcessInfo
204  ) const override;
205 
211  void GetDofList(
212  DofsVectorType& rElementalDofList,
213  const ProcessInfo& rCurrentProcessInfo
214  ) const override;
215 
221  void GetValuesVector(
222  Vector& rValues,
223  int Step = 0
224  ) const override;
225 
231  void GetFirstDerivativesVector(
232  Vector& rValues,
233  int Step = 0
234  ) const override;
235 
241  void GetSecondDerivativesVector(
242  Vector& rValues,
243  int Step = 0
244  ) const override;
245 
252  void CalculateRightHandSide(
253  VectorType& rRightHandSideVector,
254  const ProcessInfo& rCurrentProcessInfo
255  ) override;
256 
263  void CalculateLeftHandSide(
264  MatrixType& rLeftHandSideMatrix,
265  const ProcessInfo& rCurrentProcessInfo
266  ) override;
267 
276  void CalculateLocalSystem(
277  MatrixType& rLeftHandSideMatrix,
278  VectorType& rRightHandSideVector,
279  const ProcessInfo& rCurrentProcessInfo
280  ) override;
281 
288  void CalculateMassMatrix(
289  MatrixType& rMassMatrix,
290  const ProcessInfo& rCurrentProcessInfo
291  ) override;
292 
299  void CalculateDampingMatrix(
300  MatrixType& rDampingMatrix,
301  const ProcessInfo& rCurrentProcessInfo
302  ) override;
303 
313  void CalculateDampingMatrix(
314  MatrixType& rDampingMatrix,
315  const MatrixType& rStiffnessMatrix,
316  const MatrixType& rMassMatrix,
317  const ProcessInfo& rCurrentProcessInfo
318  );
319 
327  const Variable<bool>& rVariable,
328  std::vector<bool>& rOutput,
329  const ProcessInfo& rCurrentProcessInfo
330  ) override;
331 
339  const Variable<int>& rVariable,
340  std::vector<int>& rOutput,
341  const ProcessInfo& rCurrentProcessInfo
342  ) override;
343 
351  const Variable<double>& rVariable,
352  std::vector<double>& rOutput,
353  const ProcessInfo& rCurrentProcessInfo
354  ) override;
355 
363  const Variable<array_1d<double, 3>>& rVariable,
364  std::vector<array_1d<double, 3>>& rOutput,
365  const ProcessInfo& rCurrentProcessInfo
366  ) override;
367 
375  const Variable<array_1d<double, 6>>& rVariable,
376  std::vector<array_1d<double, 6>>& rOutput,
377  const ProcessInfo& rCurrentProcessInfo
378  ) override;
379 
387  const Variable<Vector>& rVariable,
388  std::vector<Vector>& rOutput,
389  const ProcessInfo& rCurrentProcessInfo
390  ) override;
391 
399  const Variable<Matrix >& rVariable,
400  std::vector< Matrix >& rOutput,
401  const ProcessInfo& rCurrentProcessInfo
402  ) override;
403 
404 
405  //************* ON INTEGRATION POINTS *************//
423  const Variable<double>& rVariable,
424  const std::vector<double>& rValues,
425  const ProcessInfo& rCurrentProcessInfo
426  ) override;
427 
435  const Variable<Vector>& rVariable,
436  const std::vector<Vector>& rValues,
437  const ProcessInfo& rCurrentProcessInfo
438  ) override;
439 
447  const Variable<Matrix>& rVariable,
448  const std::vector<Matrix>& rValues,
449  const ProcessInfo& rCurrentProcessInfo
450  ) override;
451 
459  const Variable<ConstitutiveLaw::Pointer>& rVariable,
460  const std::vector<ConstitutiveLaw::Pointer>& rValues,
461  const ProcessInfo& rCurrentProcessInfo
462  ) override;
463 
464  //****************** CHECK VALUES *****************//
472  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
473 
477 
478  // Turn back information as a string.
479  std::string Info() const override
480  {
481  std::stringstream buffer;
482  buffer << "SPRISM Element #" << Id();
483  return buffer.str();
484  }
485 
487  void PrintInfo(std::ostream& rOStream) const override
488  {
489  rOStream << "SPRISM Element #" << Id();
490  }
491 
493  void PrintData(std::ostream& rOStream) const override
494  {
495  GetGeometry().PrintData(rOStream);
496  }
497 
498  //*********** STARTING - ENDING METHODS **********//
499 
504  void InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
505 
510  void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
511 
516  void InitializeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override;
517 
522  void FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override;
523 
528  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
529 
530 protected:
531 
533 
539  {
540  /* Declare cartesian derivatives (reference configuration) */
541  /* In-plane components */
543 
544  /* Transversal components */
545  // Central node
547  // Gauss nodes
549 
550  /* Inverse of the Jaconians */
553 
557  void clear()
558  {
559  for (IndexType i = 0; i < 6; i++) {
560  noalias(InPlaneCartesianDerivativesGauss[i]) = ZeroMatrix(2, 4);
561  noalias(TransversalCartesianDerivativesGauss[i]) = ZeroMatrix(6, 1);
562  }
563 
564  noalias(TransversalCartesianDerivativesCenter) = ZeroMatrix(6, 1);
565 
566  noalias(JInvPlaneLower) = ZeroMatrix(2, 2);
567  noalias(JInvPlaneUpper) = ZeroMatrix(2, 2);
568  }
569  };
570 
576  {
577  /* Declaring operators */
583 
584  /* Components of Cauchy tensor C*/
589  double CNormal; // Transverse normal
590 
594  void clear()
595  {
596  noalias(BMembraneLower) = ZeroMatrix(3, 18);
597  noalias(BMembraneUpper) = ZeroMatrix(3, 18);
598  noalias(BShearLower) = ZeroMatrix(2, 18);
599  noalias(BShearUpper) = ZeroMatrix(2, 18);
600  noalias(BNormal) = ZeroMatrix(1, 18);
601 
602  noalias(CMembraneLower) = ZeroMatrix(3, 1);
603  noalias(CMembraneUpper) = ZeroMatrix(3, 1);
604  noalias(CShearLower) = ZeroMatrix(2, 1);
605  noalias(CShearUpper) = ZeroMatrix(2, 1);
606  CNormal = 0.0;
607  }
608  };
609 
615  {
616  /* The PK2 components*/
621  double SNormal;
622 
626  void clear()
627  {
628  noalias(SMembraneLower) = ZeroVector(3);
629  noalias(SMembraneUpper) = ZeroVector(3);
630  noalias(SShearLower) = ZeroVector(2);
631  noalias(SShearUpper) = ZeroVector(2);
632  SNormal = 0.0;
633  }
634  };
635 
641  {
643  };
644 
650  {
652  };
653 
659  {
661  };
662 
668  {
669  /* The EAS components*/
670  double mRHSAlpha;
671  double mStiffAlpha;
673 
677  void clear()
678  {
679  mRHSAlpha = 0.0;
680  mStiffAlpha = 0.0;
681  noalias(mHEAS) = ZeroMatrix(1, 36);
682  }
683  };
684 
685 
686  /* Parameters to be used in the Element as they are. Direct interface to Parameters Struct */
688  {
689  private:
690  // Variables including all integration points
691  const Matrix* pNcontainer;
693 
694  public:
696 
697  // General variables for large displacement use
705  double detF;
706  double detF0;
707  double detFT;
709  double detJ;
710 
711  // Standard prism shape functions
714 
715  // Variables including all integration points
718 
722  void SetShapeFunctions(const Matrix& rNcontainer)
723  {
724  pNcontainer=&rNcontainer;
725  }
726 
728  {
729  pDN_De=&rDN_De;
730  }
731 
736  {
737  return *pNcontainer;
738  }
739 
741  {
742  return *pDN_De;
743  }
744  };
745 
754  {
755  private:
756  /* For calculation local system with compacted LHS and RHS */
757  MatrixType *mpLeftHandSideMatrix;
758  VectorType *mpRightHandSideVector;
759 
760  /* For calculation local system with LHS and RHS components */
761  std::vector<MatrixType> *mpLeftHandSideMatrices;
762  std::vector<VectorType> *mpRightHandSideVectors;
763 
764  /* LHS variable components */
765  const std::vector< Variable< MatrixType > > *mpLeftHandSideVariables;
766 
767  /* RHS variable components */
768  const std::vector< Variable< VectorType > > *mpRightHandSideVariables;
769 
770  public:
771  /* Calculation flags */
773 
777  void SetLeftHandSideMatrix( MatrixType& rLeftHandSideMatrix ) { mpLeftHandSideMatrix = &rLeftHandSideMatrix; }
778  void SetLeftHandSideMatrices( std::vector<MatrixType>& rLeftHandSideMatrices ) { mpLeftHandSideMatrices = &rLeftHandSideMatrices; }
779  void SetLeftHandSideVariables(const std::vector< Variable< MatrixType > >& rLeftHandSideVariables ) { mpLeftHandSideVariables = &rLeftHandSideVariables; }
780 
781  void SetRightHandSideVector( VectorType& rRightHandSideVector ) { mpRightHandSideVector = &rRightHandSideVector; }
782  void SetRightHandSideVectors( std::vector<VectorType>& rRightHandSideVectors ) { mpRightHandSideVectors = &rRightHandSideVectors; }
783  void SetRightHandSideVariables(const std::vector< Variable< VectorType > >& rRightHandSideVariables ) { mpRightHandSideVariables = &rRightHandSideVariables; }
784 
788  MatrixType& GetLeftHandSideMatrix() { return *mpLeftHandSideMatrix; }
789  std::vector<MatrixType>& GetLeftHandSideMatrices() { return *mpLeftHandSideMatrices; }
790  const std::vector< Variable< MatrixType > >& GetLeftHandSideVariables() { return *mpLeftHandSideVariables; }
791 
792  VectorType& GetRightHandSideVector() { return *mpRightHandSideVector; }
793  std::vector<VectorType>& GetRightHandSideVectors() { return *mpRightHandSideVectors; }
794  const std::vector< Variable< VectorType > >& GetRightHandSideVariables() { return *mpRightHandSideVariables; }
795  };
796 
798 
801 
805 
806  /* Finalize and Initialize label*/
808 
809  /* Auxiliary vector of matrices container used for different pourposes in TL and UL */
810  std::vector< Matrix > mAuxContainer;
812 
813  /* Elemental flags */
815 
819 
825  void CalculateElementalSystem(
826  LocalSystemComponents& rLocalSystem,
827  const ProcessInfo& rCurrentProcessInfo
828  );
829 
835  void PrintElementCalculation(
836  LocalSystemComponents& rLocalSystem,
837  GeneralVariables& rVariables
838  );
839 
843 
850  bool HasNeighbour(
851  const IndexType Index,
852  const NodeType& NeighbourNode
853  ) const ;
854 
860  std::size_t NumberOfActiveNeighbours(const GlobalPointersVector< NodeType >& pNeighbourNodes) const;
861 
865  void GetNodalCoordinates(
866  BoundedMatrix<double, 12, 3 >& NodesCoord,
867  const GlobalPointersVector< NodeType >& pNeighbourNodes,
868  const Configuration ThisConfiguration
869  ) const;
870 
874  void CalculateCartesianDerivatives(CartesianDerivatives& rCartesianDerivatives);
875 
879  void CalculateCommonComponents(
880  CommonComponents& rCommonComponents,
881  const CartesianDerivatives& rCartesianDerivatives
882  );
883 
889  void CalculateLocalCoordinateSystem(
890  OrthogonalBase& ThisOrthogonalBase,
891  const OrthogonalBaseApproach ThisOrthogonalBaseApproach,
892  const double ThisAngle
893  );
894 
898  void CalculateIdVector(array_1d<IndexType, 18 >& rIdVector);
899 
905  void ComputeLocalDerivatives(
906  BoundedMatrix<double, 6, 3 >& LocalDerivativePatch,
907  const array_1d<double, 3>& rLocalCoordinates
908  );
909 
915  void ComputeLocalDerivativesQuadratic(
916  BoundedMatrix<double, 4, 2 >& rLocalDerivativePatch,
917  const IndexType NodeGauss
918  );
919 
928  void CalculateJacobianCenterGauss(
930  std::vector< Matrix >& Jinv,
931  Vector& detJ,
932  const IndexType rPointNumber,
933  const double ZetaGauss
934  );
935 
944  void CalculateJacobian(
945  double& detJ,
947  BoundedMatrix<double, 6, 3 >& LocalDerivativePatch,
948  const BoundedMatrix<double, 12, 3 >& NodesCoord,
949  const array_1d<double, 3>& rLocalCoordinates
950  );
951 
960  void CalculateJacobianAndInv(
963  BoundedMatrix<double, 6, 3 >& LocalDerivativePatch,
964  const BoundedMatrix<double, 3, 6 >& NodesCoord,
965  const array_1d<double, 3>& rLocalCoordinates
966  );
967 
975  void CalculateJacobianAndInv(
978  const BoundedMatrix<double, 3, 6 >& NodesCoord,
979  const array_1d<double, 3>& rLocalCoordinates
980  );
981 
987  void CalculateCartesianDerivativesOnCenterPlane(
988  BoundedMatrix<double, 2, 4 >& CartesianDerivativesCenter,
989  const OrthogonalBase& ThisOrthogonalBase,
990  const GeometricLevel Part
991  );
992 
1000  void CalculateCartesianDerOnGaussPlane(
1001  BoundedMatrix<double, 2, 4 > & InPlaneCartesianDerivativesGauss,
1002  const BoundedMatrix<double, 12, 3 > & NodesCoord,
1003  const OrthogonalBase& ThisOrthogonalBase,
1004  const IndexType NodeGauss,
1005  const GeometricLevel Part
1006  );
1007 
1014  void CalculateCartesianDerOnGaussTrans(
1015  BoundedMatrix<double, 6, 1 > & TransversalCartesianDerivativesGauss,
1016  const BoundedMatrix<double, 12, 3 > & NodesCoord,
1017  const OrthogonalBase& ThisOrthogonalBase,
1018  const array_1d<double, 3>& rLocalCoordinates
1019  );
1020 
1027  void CalculateCartesianDerOnCenterTrans(
1028  CartesianDerivatives& rCartesianDerivatives,
1029  const BoundedMatrix<double, 12, 3 >& NodesCoord,
1030  const OrthogonalBase& ThisOrthogonalBase,
1031  const GeometricLevel Part
1032  );
1033 
1042  void CalculateInPlaneGradientFGauss(
1043  BoundedMatrix<double, 3, 2 >& InPlaneGradientFGauss,
1044  const BoundedMatrix<double, 2, 4 >& InPlaneCartesianDerivativesGauss,
1045  const BoundedMatrix<double, 12, 3 >& NodesCoord,
1046  const IndexType NodeGauss,
1047  const GeometricLevel Part
1048  );
1049 
1056  void CalculateTransverseGradientF(
1057  array_1d<double, 3 >& TransverseGradientF,
1058  const BoundedMatrix<double, 6, 1 >& TransversalCartesianDerivativesGauss,
1059  const BoundedMatrix<double, 12, 3 >& NodesCoord
1060  );
1061 
1068  void CalculateTransverseGradientFinP(
1069  TransverseGradientIsoParametric& rTransverseGradientIsoParametric,
1070  const BoundedMatrix<double, 12, 3 >& NodesCoord,
1071  const GeometricLevel Part
1072  );
1073 
1082  void CalculateAndAddBMembrane(
1083  BoundedMatrix<double, 3, 18 >& BMembrane,
1084  BoundedMatrix<double, 3, 1 >& CMembrane,
1085  const BoundedMatrix<double, 2, 4 >& InPlaneCartesianDerivativesGauss,
1086  const BoundedMatrix<double, 3, 2 >& InPlaneGradientFGauss,
1087  const IndexType NodeGauss
1088  );
1089 
1096  void CalculateAndAddMembraneKgeometric(
1097  BoundedMatrix<double, 36, 36 >& Kgeometricmembrane,
1098  const CartesianDerivatives& rCartesianDerivatives,
1099  const array_1d<double, 3 >& SMembrane,
1100  const GeometricLevel Part
1101  );
1102 
1112  void CalculateAndAddBShear(
1115  const CartesianDerivatives& rCartesianDerivatives,
1116  const TransverseGradient& rTransverseGradient,
1117  const TransverseGradientIsoParametric& rTransverseGradientIsoParametric,
1118  const GeometricLevel Part
1119  );
1120 
1128  void CalculateAndAddShearKgeometric(
1129  BoundedMatrix<double, 36, 36 >& Kgeometricshear,
1130  const CartesianDerivatives& rCartesianDerivatives,
1131  const array_1d<double, 2 >& SShear,
1132  const GeometricLevel Part
1133  );
1134 
1141  void CalculateAndAddBNormal(
1143  double& CNormal,
1144  const BoundedMatrix<double, 6, 1 >& TransversalCartesianDerivativesGaussCenter,
1145  const array_1d<double, 3 >& TransversalDeformationGradientF
1146  );
1147 
1154  void CalculateAndAddNormalKgeometric(
1155  BoundedMatrix<double, 36, 36 >& Kgeometricnormal,
1156  const BoundedMatrix<double, 6, 1 >& TransversalCartesianDerivativesGaussCenter,
1157  const double SNormal
1158  );
1159 
1164  BoundedMatrix<double, 36, 1 > GetVectorCurrentPosition();
1165 
1170  BoundedMatrix<double, 36, 1 > GetVectorPreviousPosition();
1171 
1179  void IntegrateStressesInZeta(
1180  GeneralVariables& rVariables,
1181  StressIntegratedComponents& rIntegratedStress,
1182  const double AlphaEAS,
1183  const double ZetaGauss,
1184  const double IntegrationWeight
1185  );
1186 
1194  void IntegrateEASInZeta(
1195  GeneralVariables& rVariables,
1196  EASComponents& rEAS,
1197  const double ZetaGauss,
1198  const double IntegrationWeight
1199  );
1200 
1209  void CalculateAndAddLHS(
1210  LocalSystemComponents& rLocalSystem,
1211  GeneralVariables& rVariables,
1212  ConstitutiveLaw::Parameters& rValues,
1213  const StressIntegratedComponents& rIntegratedStress,
1214  const CommonComponents& rCommonComponents,
1215  const CartesianDerivatives& rCartesianDerivatives,
1216  const EASComponents& rEAS,
1217  double& AlphaEAS
1218  );
1219 
1228  void CalculateAndAddRHS(
1229  LocalSystemComponents& rLocalSystem,
1230  GeneralVariables& rVariables,
1231  Vector& rVolumeForce,
1232  const StressIntegratedComponents& rIntegratedStress,
1233  const CommonComponents& rCommonComponents,
1234  const EASComponents& rEAS,
1235  double& AlphaEAS
1236  );
1237 
1244  void CalculateAndAddKuum(
1245  MatrixType& rLeftHandSideMatrix,
1246  GeneralVariables& rVariables,
1247  const double IntegrationWeight
1248  );
1249 
1254  void CalculateAndAddKuug(
1255  MatrixType& rLeftHandSideMatrix,
1256  const StressIntegratedComponents& rIntegratedStress,
1257  const CartesianDerivatives& rCartesianDerivatives
1258  );
1259 
1265  void ApplyEASLHS(
1266  MatrixType& rLeftHandSideMatrix,
1267  const EASComponents& rEAS
1268  );
1269 
1276  void ApplyEASRHS(
1278  const EASComponents& rEAS,
1279  double& AlphaEAS
1280  );
1281 
1288  void CalculateAndAddExternalForces(
1289  VectorType& rRightHandSideVector,
1290  GeneralVariables& rVariables,
1291  Vector& rVolumeForce
1292  );
1293 
1299  void CalculateAndAddInternalForces(
1300  VectorType& rRightHandSideVector,
1301  const StressIntegratedComponents& rIntegratedStress,
1302  const CommonComponents& rCommonComponents,
1303  const EASComponents& rEAS,
1304  double& AlphaEAS
1305  );
1306 
1313  void SetGeneralVariables(
1314  GeneralVariables& rVariables,
1315  ConstitutiveLaw::Parameters& rValues,
1316  const IndexType rPointNumber
1317  );
1318 
1325  void InitializeSystemMatrices(
1326  MatrixType& rLeftHandSideMatrix,
1327  VectorType& rRightHandSideVector,
1328  Flags& rCalculationFlags
1329  );
1330 
1335  void CalculateDeltaPosition(Matrix & rDeltaPosition);
1336 
1345  void CalculateKinematics(
1346  GeneralVariables& rVariables,
1347  const CommonComponents& rCommonComponents,
1348  const GeometryType::IntegrationPointsArrayType& rIntegrationPoints,
1349  const IndexType rPointNumber,
1350  const double AlphaEAS,
1351  const double ZetaGauss
1352  );
1353 
1360  void CbartoFbar(
1361  GeneralVariables& rVariables,
1362  const int rPointNumber
1363  );
1364 
1371  void CalculateDeformationMatrix(
1372  Matrix& rB,
1373  const CommonComponents& rCommonComponents,
1374  const double ZetaGauss,
1375  const double AlphaEAS
1376  );
1377 
1382  void InitializeGeneralVariables(GeneralVariables & rVariables);
1383 
1389  void FinalizeStepVariables(
1390  GeneralVariables & rVariables,
1391  const IndexType rPointNumber
1392  );
1393 
1399  void GetHistoricalVariables(
1400  GeneralVariables& rVariables,
1401  const IndexType rPointNumber
1402  );
1403 
1409  void CalculateVolumeChange(
1410  double& rVolumeChange,
1411  GeneralVariables& rVariables
1412  );
1413 
1420  void CalculateVolumeForce(
1421  Vector& rVolumeForce,
1422  GeneralVariables& rVariables,
1423  const double IntegrationWeight
1424  );
1425 
1436 
1437 private:
1438 
1450 
1458  template<class TType>
1459  void GetValueOnConstitutiveLaw(
1460  const Variable<TType>& rVariable,
1461  std::vector<TType>& rOutput
1462  )
1463  {
1464  const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( this->GetIntegrationMethod() );
1465 
1466  for ( IndexType point_number = 0; point_number <integration_points.size(); ++point_number ) {
1467  mConstitutiveLawVector[point_number]->GetValue( rVariable,rOutput[point_number]);
1468  }
1469  }
1470 
1479  template<class TType>
1480  void CalculateOnConstitutiveLaw(
1481  const Variable<TType>& rVariable,
1482  std::vector<TType>& rOutput,
1483  const ProcessInfo& rCurrentProcessInfo
1484  )
1485  {
1486  /* Create and initialize element variables: */
1487  GeneralVariables general_variables;
1488  this->InitializeGeneralVariables(general_variables);
1489 
1490  /* Create constitutive law parameters: */
1491  ConstitutiveLaw::Parameters Values(GetGeometry(),GetProperties(),rCurrentProcessInfo);
1492 
1493  /* Set constitutive law flags: */
1494  Flags &ConstitutiveLawOptions = Values.GetOptions();
1495 
1496  ConstitutiveLawOptions.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN, false);
1497  ConstitutiveLawOptions.Set(ConstitutiveLaw::COMPUTE_STRESS);
1498 
1499  /* Reading integration points */
1500  const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( this->GetIntegrationMethod() );
1501 
1502  double& alpha_eas = this->GetValue(ALPHA_EAS);
1503 
1504  /* Calculate the cartesian derivatives */
1505  CartesianDerivatives this_cartesian_derivatives;
1506  this->CalculateCartesianDerivatives(this_cartesian_derivatives);
1507 
1508  /* Calculate common components (B, C) */
1509  CommonComponents common_components;
1510  common_components.clear();
1511  this->CalculateCommonComponents(common_components, this_cartesian_derivatives);
1512 
1513  // Reading integration points
1514  for ( IndexType point_number = 0; point_number < integration_points.size(); ++point_number ) {
1515  const double zeta_gauss = 2.0 * integration_points[point_number].Z() - 1.0;
1516 
1517  // Compute element kinematics C, F ...
1518  this->CalculateKinematics(general_variables, common_components, integration_points, point_number, alpha_eas, zeta_gauss);
1519 
1520  // To take in account previous step writing
1521  if( mFinalizedStep )
1522  this->GetHistoricalVariables(general_variables,point_number);
1523 
1524  // Set general variables to constitutivelaw parameters
1525  this->SetGeneralVariables(general_variables,Values,point_number);
1526 
1527  rOutput[point_number] = mConstitutiveLawVector[point_number]->CalculateValue( Values, rVariable, rOutput[point_number] );
1528  }
1529  }
1530 
1538  friend class Serializer;
1539 
1543  void save(Serializer& rSerializer) const override;
1544 
1545  void load(Serializer& rSerializer) override;
1546 
1547  // Constructor
1548 
1549 }; // class SolidShellElementSprism3D6N.
1550 
1558 
1559 } // namespace Kratos.
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This is base class used to define the solid elements.
Definition: base_solid_element.h:67
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
Definition: flags.h:58
std::size_t IndexType
Definition: flags.h:74
IntegrationMethod
Definition: geometry_data.h:76
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
This class defines the node.
Definition: node.h:65
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
This is a triangular prism solid element for the analysis of thin/thick shells undergoing large elast...
Definition: solid_shell_element_sprism_3D6N.h:58
Flags mELementalFlags
Definition: solid_shell_element_sprism_3D6N.h:814
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_RHS_VECTOR)
Flags related to the element computation.
Node NodeType
This is the definition of the node.
Definition: solid_shell_element_sprism_3D6N.h:89
GlobalPointersVector< NodeType > WeakPointerVectorNodesType
Definition: solid_shell_element_sprism_3D6N.h:101
OrthogonalBaseApproach
To differtiate between the different possible orthogonal bases.
Definition: solid_shell_element_sprism_3D6N.h:127
GeometricLevel
To differtiate between center, lower part and upper part.
Definition: solid_shell_element_sprism_3D6N.h:118
KRATOS_DEFINE_LOCAL_FLAG(TOTAL_UPDATED_LAGRANGIAN)
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: solid_shell_element_sprism_3D6N.h:77
BaseSolidElement BaseType
The base element type.
Definition: solid_shell_element_sprism_3D6N.h:92
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: solid_shell_element_sprism_3D6N.h:487
std::string Info() const override
Turn back information as a string.
Definition: solid_shell_element_sprism_3D6N.h:479
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: solid_shell_element_sprism_3D6N.h:80
std::size_t SizeType
The definition of the sizetype.
Definition: solid_shell_element_sprism_3D6N.h:98
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: solid_shell_element_sprism_3D6N.h:493
KRATOS_DEFINE_LOCAL_FLAG(EXPLICIT_RHS_COMPUTATION)
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_LHS_MATRIX)
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_LHS_MATRIX_WITH_COMPONENTS)
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_RHS_VECTOR_WITH_COMPONENTS)
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SolidShellElementSprism3D6N)
Counted pointer of SolidShellElementSprism3D6N.
bool mFinalizedStep
Definition: solid_shell_element_sprism_3D6N.h:807
std::size_t IndexType
The definition of the index type.
Definition: solid_shell_element_sprism_3D6N.h:95
std::vector< Matrix > mAuxContainer
Definition: solid_shell_element_sprism_3D6N.h:810
KRATOS_DEFINE_LOCAL_FLAG(QUADRATIC_ELEMENT)
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: solid_shell_element_sprism_3D6N.h:83
Configuration
This enum is defined in oder to difereniate between initial (TL) and current (UL) configuration.
Definition: solid_shell_element_sprism_3D6N.h:113
KRATOS_DEFINE_LOCAL_FLAG(EAS_IMPLICIT_EXPLICIT)
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: solid_shell_element_sprism_3D6N.h:86
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
void SetValuesOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const std::vector< TDataType > &values, const ProcessInfo &rCurrentProcessInfo)
Definition: add_mesh_to_python.cpp:185
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
def Index()
Definition: hdf5_io_tools.py:38
def load(f)
Definition: ode_solve.py:307
J
Definition: sensitivityMatrix.py:58
integer i
Definition: TensorModule.f:17
Definition: constitutive_law.h:189
Here the cartesian derivatives are defined.
Definition: solid_shell_element_sprism_3D6N.h:539
BoundedMatrix< double, 2, 2 > JInvPlaneUpper
Definition: solid_shell_element_sprism_3D6N.h:552
array_1d< BoundedMatrix< double, 2, 4 >, 6 > InPlaneCartesianDerivativesGauss
Definition: solid_shell_element_sprism_3D6N.h:542
BoundedMatrix< double, 2, 2 > JInvPlaneLower
Definition: solid_shell_element_sprism_3D6N.h:551
BoundedMatrix< double, 6, 1 > TransversalCartesianDerivativesCenter
Definition: solid_shell_element_sprism_3D6N.h:546
void clear()
Reset components.
Definition: solid_shell_element_sprism_3D6N.h:557
array_1d< BoundedMatrix< double, 6, 1 >, 6 > TransversalCartesianDerivativesGauss
Definition: solid_shell_element_sprism_3D6N.h:548
Common Components defined in order to compute the Cauchy tensor and the deformation matrix.
Definition: solid_shell_element_sprism_3D6N.h:576
BoundedMatrix< double, 3, 1 > CMembraneLower
Transverse normal.
Definition: solid_shell_element_sprism_3D6N.h:585
BoundedMatrix< double, 3, 18 > BMembraneUpper
Membrane (lower)
Definition: solid_shell_element_sprism_3D6N.h:579
double CNormal
Transverse shear (upper)
Definition: solid_shell_element_sprism_3D6N.h:589
BoundedMatrix< double, 2, 18 > BShearLower
Membrane (upper)
Definition: solid_shell_element_sprism_3D6N.h:580
BoundedMatrix< double, 2, 1 > CShearLower
Membrane (upper)
Definition: solid_shell_element_sprism_3D6N.h:587
BoundedMatrix< double, 3, 18 > BMembraneLower
Definition: solid_shell_element_sprism_3D6N.h:578
BoundedMatrix< double, 3, 1 > CMembraneUpper
Membrane (lower)
Definition: solid_shell_element_sprism_3D6N.h:586
BoundedMatrix< double, 2, 18 > BShearUpper
Transverse shear (lower)
Definition: solid_shell_element_sprism_3D6N.h:581
BoundedMatrix< double, 1, 18 > BNormal
Transverse shear (upper)
Definition: solid_shell_element_sprism_3D6N.h:582
BoundedMatrix< double, 2, 1 > CShearUpper
Transverse shear (lower)
Definition: solid_shell_element_sprism_3D6N.h:588
void clear()
Definition: solid_shell_element_sprism_3D6N.h:594
EAS Components.
Definition: solid_shell_element_sprism_3D6N.h:668
BoundedMatrix< double, 1, 36 > mHEAS
Definition: solid_shell_element_sprism_3D6N.h:672
double mRHSAlpha
Definition: solid_shell_element_sprism_3D6N.h:670
void clear()
Definition: solid_shell_element_sprism_3D6N.h:677
double mStiffAlpha
Definition: solid_shell_element_sprism_3D6N.h:671
Definition: solid_shell_element_sprism_3D6N.h:688
double detF
FT = F0 * F ( total F )
Definition: solid_shell_element_sprism_3D6N.h:705
Vector StressVector
Strain tensor.
Definition: solid_shell_element_sprism_3D6N.h:700
void SetShapeFunctions(const Matrix &rNcontainer)
Definition: solid_shell_element_sprism_3D6N.h:722
Vector N
Volume variation, sqrt(det(C))
Definition: solid_shell_element_sprism_3D6N.h:712
Matrix DN_DX
Definition: solid_shell_element_sprism_3D6N.h:713
Vector C
Deformation gradient determinant in the reference configuration.
Definition: solid_shell_element_sprism_3D6N.h:708
const GeometryType::ShapeFunctionsGradientsType & GetShapeFunctionsGradients()
Definition: solid_shell_element_sprism_3D6N.h:740
Matrix FT
Deformation gradient (F) in the reference configuration, ( historical F )
Definition: solid_shell_element_sprism_3D6N.h:704
Vector StrainVector
Constitutive matrix.
Definition: solid_shell_element_sprism_3D6N.h:699
void SetShapeFunctionsGradients(const GeometryType::ShapeFunctionsGradientsType &rDN_De)
Definition: solid_shell_element_sprism_3D6N.h:727
GeometryType::JacobiansType J
Definition: solid_shell_element_sprism_3D6N.h:716
double detFT
Deformation gradient determinant in the reference configuration.
Definition: solid_shell_element_sprism_3D6N.h:707
GeometryType::JacobiansType j
Definition: solid_shell_element_sprism_3D6N.h:717
double detJ
The Cauchy tensor components.
Definition: solid_shell_element_sprism_3D6N.h:709
Matrix F
Deformation matrix.
Definition: solid_shell_element_sprism_3D6N.h:702
double detF0
Deformation gradient determinant in the current configuration.
Definition: solid_shell_element_sprism_3D6N.h:706
Matrix B
Stress tensor.
Definition: solid_shell_element_sprism_3D6N.h:701
const Matrix & GetShapeFunctions()
Definition: solid_shell_element_sprism_3D6N.h:735
Matrix ConstitutiveMatrix
Definition: solid_shell_element_sprism_3D6N.h:698
StressMeasureType StressMeasure
Definition: solid_shell_element_sprism_3D6N.h:695
Matrix F0
Deformation gradient (F) from the reference to the current configuration ( Delta F )
Definition: solid_shell_element_sprism_3D6N.h:703
Definition: solid_shell_element_sprism_3D6N.h:754
VectorType & GetRightHandSideVector()
Definition: solid_shell_element_sprism_3D6N.h:792
std::vector< MatrixType > & GetLeftHandSideMatrices()
Definition: solid_shell_element_sprism_3D6N.h:789
void SetLeftHandSideMatrix(MatrixType &rLeftHandSideMatrix)
Definition: solid_shell_element_sprism_3D6N.h:777
void SetRightHandSideVector(VectorType &rRightHandSideVector)
Definition: solid_shell_element_sprism_3D6N.h:781
MatrixType & GetLeftHandSideMatrix()
Definition: solid_shell_element_sprism_3D6N.h:788
void SetLeftHandSideVariables(const std::vector< Variable< MatrixType > > &rLeftHandSideVariables)
Definition: solid_shell_element_sprism_3D6N.h:779
void SetRightHandSideVectors(std::vector< VectorType > &rRightHandSideVectors)
Definition: solid_shell_element_sprism_3D6N.h:782
const std::vector< Variable< VectorType > > & GetRightHandSideVariables()
Definition: solid_shell_element_sprism_3D6N.h:794
void SetRightHandSideVariables(const std::vector< Variable< VectorType > > &rRightHandSideVariables)
Definition: solid_shell_element_sprism_3D6N.h:783
const std::vector< Variable< MatrixType > > & GetLeftHandSideVariables()
Definition: solid_shell_element_sprism_3D6N.h:790
Flags CalculationFlags
Definition: solid_shell_element_sprism_3D6N.h:772
void SetLeftHandSideMatrices(std::vector< MatrixType > &rLeftHandSideMatrices)
Definition: solid_shell_element_sprism_3D6N.h:778
std::vector< VectorType > & GetRightHandSideVectors()
Definition: solid_shell_element_sprism_3D6N.h:793
OrthogonalBase.
Definition: solid_shell_element_sprism_3D6N.h:641
array_1d< double, 3 > Veta
Definition: solid_shell_element_sprism_3D6N.h:642
Stress integrated Components used during the integration.
Definition: solid_shell_element_sprism_3D6N.h:615
array_1d< double, 2 > SShearUpper
Transverse shear (lower)
Definition: solid_shell_element_sprism_3D6N.h:620
array_1d< double, 2 > SShearLower
Membrane (upper)
Definition: solid_shell_element_sprism_3D6N.h:619
void clear()
Transverse normal.
Definition: solid_shell_element_sprism_3D6N.h:626
array_1d< double, 3 > SMembraneUpper
Membrane (lower)
Definition: solid_shell_element_sprism_3D6N.h:618
double SNormal
Transverse shear (upper)
Definition: solid_shell_element_sprism_3D6N.h:621
array_1d< double, 3 > SMembraneLower
Definition: solid_shell_element_sprism_3D6N.h:617
TransverseGradient.
Definition: solid_shell_element_sprism_3D6N.h:650
array_1d< double, 3 > F0
Definition: solid_shell_element_sprism_3D6N.h:651
TransverseGradientIsoParametric.
Definition: solid_shell_element_sprism_3D6N.h:659
array_1d< double, 3 > Feta
Definition: solid_shell_element_sprism_3D6N.h:660