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.
shell_thick_element_3D3N.hpp
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: Peter Wilson
10 // contact: A.Winterstein[at]tum.de
11 //
12 
13 #pragma once
14 
15 
16 // System includes
17 #include <type_traits>
18 
19 // External includes
20 
21 // Project includes
23 #include "custom_utilities/shellt3_corotational_coordinate_transformation.hpp"
24 #include "custom_utilities/shellt3_local_coordinate_system.hpp"
25 
26 namespace Kratos
27 {
31 
35 
39 
43 
46 
58 /*
59 Shell formulation reference:
60 1. Bletzinger, K.U., Bischoff, M. and Ramm, E., 2000. A unified approach for
61  shear-locking-free triangular and rectangular shell finite elements.
62  Computers & Structures, 75(3), pp.321-334.
63 2. Rama, G., Marinkovic, D., Zehn, M., 2016. Efficient co-rotational
64  3-node shell element.
65  American Journal of Engineering and Applied Sciences, Volume 9, Issue 2,
66  Pages 420-431.
67 */
68 
69 template <ShellKinematics TKinematics>
70 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ShellThickElement3D3N : public
71  BaseShellElement<typename std::conditional<TKinematics==ShellKinematics::NONLINEAR_COROTATIONAL,
72  ShellT3_CorotationalCoordinateTransformation,
73  ShellT3_CoordinateTransformation>::type>
74 {
75 public:
76 
79 
81 
82  using BaseType = BaseShellElement<typename std::conditional<TKinematics==ShellKinematics::NONLINEAR_COROTATIONAL,
85 
87 
89 
91 
93 
95 
97 
99 
100  using Element::GetGeometry;
101 
103 
104  using Vector3Type = typename BaseType::Vector3Type;
105 
106  using CoordinateTransformationPointerType = typename BaseType::CoordinateTransformationPointerType;
107 
109 
112 
114 
117 
119  GeometryType::Pointer pGeometry);
120 
122  GeometryType::Pointer pGeometry,
123  PropertiesType::Pointer pProperties);
124 
125  ~ShellThickElement3D3N() override = default;
126 
128 
131 
132  // Basic
133 
141  Element::Pointer Create(
142  IndexType NewId,
143  GeometryType::Pointer pGeom,
144  PropertiesType::Pointer pProperties
145  ) const override;
146 
154  Element::Pointer Create(
155  IndexType NewId,
156  NodesArrayType const& ThisNodes,
157  PropertiesType::Pointer pProperties
158  ) const override;
159 
160  // More results calculation on integration points to interface with python
161 
163 
164  void CalculateOnIntegrationPoints(const Variable<double>& rVariable,
165  std::vector<double>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
166 
167  void CalculateOnIntegrationPoints(const Variable<Matrix>& rVariable,
168  std::vector<Matrix>& rOutput, const ProcessInfo& rCurrentProcessInfo) override;
169 
179  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
180 
182 
185 
187 
188 protected:
189 
192 
197  {
198  }
199 
201 
202 private:
203 
206 
207  class CalculationData
208  {
209 
210  public:
211 
212  // ---------------------------------------
213  // calculation-constant data
214  // ----------------------------------------
215  // these data are allocated and constructed
216  // at the beginning of the calculation
217 
221  double dA;
222  double hMean;
223  double TotalArea;
224 
225  std::vector< array_1d<double, 3> > gpLocations;
226 
227  MatrixType dNxy = ZeroMatrix(3, 2);
228  VectorType N = ZeroVector(3);
230  VectorType globalDisplacements = ZeroVector(18);
231  VectorType localDisplacements = ZeroVector(18);
233  bool CalculateRHS;
234  bool CalculateLHS;
236  const bool parabolic_composite_transverse_shear_strains = false;
237 
238  // ---------------------------------------
239  // Testing flags
240  // ---------------------------------------
241  // These should all be FALSE unless you are testing, or
242  // investigating the effects of element enhancements!
243 
244  const bool basicTriCST = false; // bool to use basic CST
245  // displacement-based shear formulation. This should be FALSE unless
246  // you are testing
247 
248  const bool ignore_shear_stabilization = false; // bool to
249  // ignore stabilizing the transverse shear part of the material
250  // matrix. This should be false unless you are testing
251 
252  const bool smoothedDSG = false; // bool to use smoothed DSG
253  // formulation according to [Nguyen-Thoi et al., 2013].
254  // This should be false unless you are testing
255 
256  const bool specialDSGc3 = false; // bool to use experimental
257  // DSGc3 formulation not yet complete.
258  // This should be false unless you are testing
259 
260  // ---------------------------------------
261  // calculation-variable data
262  // ---------------------------------------
263  // these data are updated during the
264  // calculations
265 
266  SizeType gpIndex;
267 
268  // ---------------------------------------
269  // calculation-variable data
270  // ---------------------------------------
271  // these data are updated during the
272  // calculations, but they are allocated
273  // only once(the first time they are used)
274  // to avoid useless re-allocations
275 
276  MatrixType B = ZeroMatrix(8, 18);
278  double h_e;
279  double alpha = 0.1; // modifier of shear material matrix stabilization parameter
280  // refer Lyly(1993)
281  double shearStabilisation;
282 
283  Matrix D = ZeroMatrix(8, 8);
285  VectorType generalizedStrains = ZeroVector(8);
287  VectorType generalizedStresses = ZeroVector(8);
289  ShellCrossSection::SectionParameters SectionParameters;
291  std::vector<VectorType> rlaminateStrains;
292 
293  std::vector<VectorType> rlaminateStresses;
294 
295  public:
296 
297  const ProcessInfo& CurrentProcessInfo;
298 
299  public:
300 
301  CalculationData(const CoordinateTransformationPointerType& pCoordinateTransformation,
302  const ProcessInfo& rCurrentProcessInfo);
303 
304  };
305 
307 
310  void CalculateStressesFromForceResultants
311  (VectorType& rstresses,
312  const double& rthickness);
313 
314  void CalculateLaminaStrains(CalculationData& data);
315 
316  void CalculateLaminaStresses(CalculationData& data);
317 
318  double CalculateTsaiWuPlaneStress(const CalculationData& data, const Matrix& rLamina_Strengths, const unsigned int& rCurrent_Ply);
319 
320  void CalculateVonMisesStress(const CalculationData& data, const Variable<double>& rVariable, double& rVon_Mises_Result);
321 
322  void CalculateShellElementEnergy(const CalculationData& data, const Variable<double>& rVariable, double& rEnergy_Result);
323 
324  void CheckGeneralizedStressOrStrainOutput(const Variable<Matrix>& rVariable, int& iJob, bool& bGlobal);
325 
326  void CalculateSectionResponse(CalculationData& data);
327 
328  void InitializeCalculationData(CalculationData& data);
329 
330  void CalculateDSGc3Contribution(CalculationData& data, MatrixType& rLeftHandSideMatrix);
331 
332  void CalculateSmoothedDSGBMatrix(CalculationData& data);
333 
334  void CalculateDSGShearBMatrix(Matrix& shearBMatrix, const double& a, const double& b, const double& c, const double& d, const double& A);
335 
336  void AddBodyForces(CalculationData& data, VectorType& rRightHandSideVector);
337 
338  void CalculateAll(MatrixType& rLeftHandSideMatrix,
339  VectorType& rRightHandSideVector,
340  const ProcessInfo& rCurrentProcessInfo,
341  const bool CalculateStiffnessMatrixFlag,
342  const bool CalculateResidualVectorFlag) override;
343 
344  bool TryCalculateOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable<Matrix>& rVariable,
345  std::vector<Matrix>& rValues,
346  const ProcessInfo& rCurrentProcessInfo);
347 
352  ShellCrossSection::SectionBehaviorType GetSectionBehavior() const override;
353 
355 
359 
362 
364 
367 
368  friend class Serializer;
369 
370  void save(Serializer& rSerializer) const override;
371 
372  void load(Serializer& rSerializer) override;
373 
375 
379 
383 
387 
388 };
389 
390 }
Definition: base_shell_element.h:54
PropertiesType & GetProperties()
Definition: element.h:1024
Vector VectorType
Definition: element.h:88
std::size_t SizeType
Definition: element.h:94
Properties PropertiesType
Definition: element.h:80
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: element.h:86
Matrix MatrixType
Definition: element.h:90
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: element.h:83
std::size_t IndexType
Definition: flags.h:74
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
SectionParameters.
Definition: shell_cross_section.hpp:101
SectionBehaviorType
Definition: shell_cross_section.hpp:68
ShellT3_CoordinateTransformation.
Definition: shellt3_coordinate_transformation.hpp:28
EICR ShellT3_CorotationalCoordinateTransformation.
Definition: shellt3_corotational_coordinate_transformation.hpp:46
ShellT3_LocalCoordinateSystem.
Definition: shellt3_local_coordinate_system.hpp:24
ShellThickElement3D3N.
Definition: shell_thick_element_3D3N.hpp:74
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ShellThickElement3D3N)
Quaternion< double > QuaternionType
Definition: shell_thick_element_3D3N.hpp:86
typename BaseType::Vector3Type Vector3Type
Definition: shell_thick_element_3D3N.hpp:104
ShellThickElement3D3N()
Definition: shell_thick_element_3D3N.hpp:196
typename BaseType::CoordinateTransformationPointerType CoordinateTransformationPointerType
Definition: shell_thick_element_3D3N.hpp:106
~ShellThickElement3D3N() override=default
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
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
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
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
array_1d< double, 3 > VectorType
Definition: solid_mechanics_application_variables.cpp:19
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
type
Definition: generate_gid_list_file.py:35
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
data
Definition: mesh_to_mdpa_converter.py:59
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
A
Definition: sensitivityMatrix.py:70
N
Definition: sensitivityMatrix.py:29
B
Definition: sensitivityMatrix.py:76