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.
control_module_fem_dem_utilities.hpp
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ignasi de Pouplana
11 //
12 
13 
14 #ifndef KRATOS_CONTROL_MODULE_FEM_DEM_UTILITIES
15 #define KRATOS_CONTROL_MODULE_FEM_DEM_UTILITIES
16 
17 // /* External includes */
18 
19 // System includes
20 
21 // Project includes
22 #include "includes/variables.h"
23 
24 /* System includes */
25 #include <limits>
26 #include <iostream>
27 #include <iomanip>
28 
29 /* External includes */
30 #ifdef _OPENMP
31 #include <omp.h>
32 #endif
33 
34 /* Project includes */
35 #include "geometries/geometry.h"
36 #include "includes/define.h"
37 #include "includes/model_part.h"
38 
39 #include "includes/table.h"
41 
42 // Application includes
44 
46 
47 
48 namespace Kratos
49 {
51 {
52 public:
53 
55 
58 
60 
62  ModelPart& rDemModelPart,
63  Parameters& rParameters
64  ) :
65  mrFemModelPart(rFemModelPart),
66  mrDemModelPart(rDemModelPart)
67 {
69 
70  Parameters default_parameters( R"(
71  {
72  "imposed_direction" : 2,
73  "alternate_axis_loading": false,
74  "target_stress_table_id" : 0,
75  "initial_velocity" : 0.0,
76  "limit_velocity" : 1.0,
77  "velocity_factor" : 1.0,
78  "compression_length" : 1.0,
79  "young_modulus" : 1.0e7,
80  "stress_increment_tolerance": 100.0,
81  "update_stiffness": true,
82  "start_time" : 0.0,
83  "stress_averaging_time": 1.0e-5
84  } )" );
85 
86  // Now validate agains defaults -- this also ensures no type mismatch
87  rParameters.ValidateAndAssignDefaults(default_parameters);
88 
89  mImposedDirection = rParameters["imposed_direction"].GetInt();
90  mTargetStressTableId = rParameters["target_stress_table_id"].GetInt();
91  mVelocity = rParameters["initial_velocity"].GetDouble();
92  if (mImposedDirection == 0) {
93  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_X_VALUE");
94  mrDemModelPart[DemVelocityVar] = mVelocity;
95  } else if (mImposedDirection == 1) {
96  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Y_VALUE");
97  mrDemModelPart[DemVelocityVar] = mVelocity;
98  } else {
99  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Z_VALUE");
100  mrDemModelPart[DemVelocityVar] = mVelocity;
101  }
102  mLimitVelocity = rParameters["limit_velocity"].GetDouble();
103  mVelocityFactor = rParameters["velocity_factor"].GetDouble();
104  mStartTime = rParameters["start_time"].GetDouble();
105  mStressIncrementTolerance = rParameters["stress_increment_tolerance"].GetDouble();
106  mUpdateStiffness = rParameters["update_stiffness"].GetBool();
107  mReactionStressOld = 0.0;
108  mStiffness = rParameters["young_modulus"].GetDouble()/rParameters["compression_length"].GetDouble(); // mStiffness is actually a stiffness over an area
109  mStressAveragingTime = rParameters["stress_averaging_time"].GetDouble();
110  mVectorOfLastStresses.resize(0);
111 
112  mAlternateAxisLoading = rParameters["alternate_axis_loading"].GetBool();
113  mXCounter = 1;
114  mYCounter = 2;
115  mZCounter = 3;
116 
117  // Initialize Variables
118  mrDemModelPart.GetProcessInfo().SetValue(TARGET_STRESS_Z,0.0);
119  int NNodes = static_cast<int>(mrFemModelPart.Nodes().size());
120  ModelPart::NodesContainerType::iterator it_begin = mrFemModelPart.NodesBegin();
121  array_1d<double,3> zero_vector = ZeroVector(3);
122  #pragma omp parallel for
123  for(int i = 0; i<NNodes; i++) {
124  ModelPart::NodesContainerType::iterator it = it_begin + i;
125  it->SetValue(TARGET_STRESS,zero_vector);
126  it->SetValue(REACTION_STRESS,zero_vector);
127  it->SetValue(LOADING_VELOCITY,zero_vector);
128  }
129  NNodes = static_cast<int>(mrDemModelPart.Nodes().size());
130  it_begin = mrDemModelPart.NodesBegin();
131  #pragma omp parallel for
132  for(int i = 0; i<NNodes; i++) {
133  ModelPart::NodesContainerType::iterator it = it_begin + i;
134  it->SetValue(TARGET_STRESS,zero_vector);
135  it->SetValue(REACTION_STRESS,zero_vector);
136  it->SetValue(LOADING_VELOCITY,zero_vector);
137  }
138 
139  mApplyCM = false;
140 
141  KRATOS_CATCH("");
142 }
143 
145 
147 
148 //***************************************************************************************************************
149 //***************************************************************************************************************
150 
151 // Before FEM and DEM solution
153 {
154  KRATOS_TRY;
155 
156  const int NNodes = static_cast<int>(mrFemModelPart.Nodes().size());
157  ModelPart::NodesContainerType::iterator it_begin = mrFemModelPart.NodesBegin();
158 
159  if (mImposedDirection == 0) {
160  // X direction
161  #pragma omp parallel for
162  for(int i = 0; i<NNodes; i++) {
163  ModelPart::NodesContainerType::iterator it = it_begin + i;
164  it->Fix(DISPLACEMENT_X);
165  it->FastGetSolutionStepValue(DISPLACEMENT_X) = 0.0;
166  }
167  } else if (mImposedDirection == 1) {
168  // Y direction
169  #pragma omp parallel for
170  for(int i = 0; i<NNodes; i++) {
171  ModelPart::NodesContainerType::iterator it = it_begin + i;
172  it->Fix(DISPLACEMENT_Y);
173  it->FastGetSolutionStepValue(DISPLACEMENT_Y) = 0.0;
174  }
175  } else if (mImposedDirection == 2) {
176  // Z direction
177  #pragma omp parallel for
178  for(int i = 0; i<NNodes; i++) {
179  ModelPart::NodesContainerType::iterator it = it_begin + i;
180  it->Fix(DISPLACEMENT_Z);
181  it->FastGetSolutionStepValue(DISPLACEMENT_Z) = 0.0;
182  }
183  }
184 
185  KRATOS_CATCH("");
186 }
187 
188 // Before FEM and DEM solution
190 {
191  const double CurrentTime = mrFemModelPart.GetProcessInfo()[TIME];
192  const double DeltaTime = mrFemModelPart.GetProcessInfo()[DELTA_TIME];
193  const int NNodes = static_cast<int>(mrFemModelPart.Nodes().size());
194  ModelPart::NodesContainerType::iterator it_begin = mrFemModelPart.NodesBegin();
195  TableType::Pointer pTargetStressTable = mrFemModelPart.pGetTable(mTargetStressTableId);
196 
197  double ReactionStress = CalculateReactionStress();
198  ReactionStress = UpdateVectorOfHistoricalStressesAndComputeNewAverage(ReactionStress);
199 
200  // Check whether this is a loading step for the current axis
201  IsTimeToApplyCM();
202 
203  if (mApplyCM == true) {
204 
205  // Update K if required
206  if (mAlternateAxisLoading == false) {
207  if(mUpdateStiffness == true) {
208  mStiffness = EstimateStiffness(ReactionStress,DeltaTime);
209  }
210  }
211  mReactionStressOld = ReactionStress;
212 
213  // Update velocity
214  const double NextTargetStress = pTargetStressTable->GetValue(CurrentTime+DeltaTime);
215  const double df_target = NextTargetStress - ReactionStress;
216  double delta_velocity = df_target/(mStiffness * DeltaTime) - mVelocity;
217 
218  if(std::abs(df_target) < mStressIncrementTolerance) {
219  delta_velocity = -mVelocity;
220  }
221 
222  mVelocity += mVelocityFactor * delta_velocity;
223 
224  if(std::abs(mVelocity) > std::abs(mLimitVelocity)) {
225  if(mVelocity >= 0.0) {
226  mVelocity = std::abs(mLimitVelocity);
227  } else {
228  mVelocity = - std::abs(mLimitVelocity);
229  }
230  }
231 
232  // Update Imposed displacement
233  if (mImposedDirection == 0) { // X direction
234  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_X_VALUE");
235  mrDemModelPart[DemVelocityVar] = mVelocity;
236 
237  #pragma omp parallel for
238  for(int i = 0; i<NNodes; i++) {
239  ModelPart::NodesContainerType::iterator it = it_begin + i;
240  it->FastGetSolutionStepValue(DISPLACEMENT_X) += mVelocity * DeltaTime;
241  // Save calculated velocity and reaction for print (only at FEM nodes)
242  it->GetValue(TARGET_STRESS_X) = pTargetStressTable->GetValue(CurrentTime);
243  it->GetValue(REACTION_STRESS_X) = ReactionStress;
244  it->GetValue(LOADING_VELOCITY_X) = mVelocity;
245  }
246  } else if (mImposedDirection == 1) { // Y direction
247  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Y_VALUE");
248  mrDemModelPart[DemVelocityVar] = mVelocity;
249 
250  #pragma omp parallel for
251  for(int i = 0; i<NNodes; i++) {
252  ModelPart::NodesContainerType::iterator it = it_begin + i;
253  it->FastGetSolutionStepValue(DISPLACEMENT_Y) += mVelocity * DeltaTime;
254  // Save calculated velocity and reaction for print (only at FEM nodes)
255  it->GetValue(TARGET_STRESS_Y) = pTargetStressTable->GetValue(CurrentTime);
256  it->GetValue(REACTION_STRESS_Y) = ReactionStress;
257  it->GetValue(LOADING_VELOCITY_Y) = mVelocity;
258  }
259  } else if (mImposedDirection == 2) { // Z direction
260  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Z_VALUE");
261  mrDemModelPart[DemVelocityVar] = mVelocity;
262 
263  #pragma omp parallel for
264  for(int i = 0; i<NNodes; i++) {
265  ModelPart::NodesContainerType::iterator it = it_begin + i;
266  it->FastGetSolutionStepValue(DISPLACEMENT_Z) += mVelocity * DeltaTime;
267  // Save calculated velocity and reaction for print (only at FEM nodes)
268  it->GetValue(TARGET_STRESS_Z) = pTargetStressTable->GetValue(CurrentTime);
269  it->GetValue(REACTION_STRESS_Z) = ReactionStress;
270  it->GetValue(LOADING_VELOCITY_Z) = mVelocity;
271  }
272  mrDemModelPart.GetProcessInfo()[TARGET_STRESS_Z] = std::abs(pTargetStressTable->GetValue(CurrentTime));
273  }
274  } else {
275  // Save calculated velocity and reaction for print (only at FEM nodes)
276  if (mImposedDirection == 0) { // X direction
277  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_X_VALUE");
278  mrDemModelPart[DemVelocityVar] = 0.0;
279 
280  #pragma omp parallel for
281  for(int i = 0; i<NNodes; i++) {
282  ModelPart::NodesContainerType::iterator it = it_begin + i;
283  it->GetValue(TARGET_STRESS_X) = pTargetStressTable->GetValue(CurrentTime);
284  it->GetValue(REACTION_STRESS_X) = ReactionStress;
285  it->GetValue(LOADING_VELOCITY_X) = 0.0;
286  }
287  } else if (mImposedDirection == 1) { // Y direction
288  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Y_VALUE");
289  mrDemModelPart[DemVelocityVar] = 0.0;
290 
291  #pragma omp parallel for
292  for(int i = 0; i<NNodes; i++) {
293  ModelPart::NodesContainerType::iterator it = it_begin + i;
294  it->GetValue(TARGET_STRESS_Y) = pTargetStressTable->GetValue(CurrentTime);
295  it->GetValue(REACTION_STRESS_Y) = ReactionStress;
296  it->GetValue(LOADING_VELOCITY_Y) = 0.0;
297  }
298  } else if (mImposedDirection == 2) { // Z direction
299  const Variable<double>& DemVelocityVar = KratosComponents< Variable<double> >::Get("IMPOSED_VELOCITY_Z_VALUE");
300  mrDemModelPart[DemVelocityVar] = 0.0;
301 
302  #pragma omp parallel for
303  for(int i = 0; i<NNodes; i++) {
304  ModelPart::NodesContainerType::iterator it = it_begin + i;
305  it->GetValue(TARGET_STRESS_Z) = pTargetStressTable->GetValue(CurrentTime);
306  it->GetValue(REACTION_STRESS_Z) = ReactionStress;
307  it->GetValue(LOADING_VELOCITY_Z) = 0.0;
308  }
309  mrDemModelPart.GetProcessInfo()[TARGET_STRESS_Z] = std::abs(pTargetStressTable->GetValue(CurrentTime));
310  }
311  }
312 }
313 
314 // After FEM and DEM solution
316 {
317  // Update K with latest ReactionStress after the axis has been loaded
318  if (mApplyCM == true) {
319  if (mAlternateAxisLoading == true) {
320  const double delta_time = mrFemModelPart.GetProcessInfo()[DELTA_TIME];
321  double ReactionStress = CalculateReactionStress();
322  if(mUpdateStiffness == true) {
323  mStiffness = EstimateStiffness(ReactionStress,delta_time);
324  }
325  }
326  }
327 }
328 
329 //***************************************************************************************************************
330 //***************************************************************************************************************
331 
335 
336 
340 
342 
343 virtual std::string Info() const
344 {
345  return "";
346 }
347 
349 
350 virtual void PrintInfo(std::ostream& rOStream) const
351 {
352 }
353 
355 
356 virtual void PrintData(std::ostream& rOStream) const
357 {
358 }
359 
360 
364 
366 
367 protected:
370 
373  unsigned int mImposedDirection;
374  unsigned int mTargetStressTableId;
375  double mVelocity;
378  double mStartTime;
381  double mStiffness;
383  std::vector<double> mVectorOfLastStresses;
386  unsigned int mXCounter;
387  unsigned int mYCounter;
388  unsigned int mZCounter;
389  bool mApplyCM;
390 
394 
395 
399 
400 
404 
405 
409 
413 
414 
418 
419 
421 
422 private:
423 
426 
427 
434 
438 
439 double UpdateVectorOfHistoricalStressesAndComputeNewAverage(const double& last_reaction) {
440  KRATOS_TRY;
441  int length_of_vector = mVectorOfLastStresses.size();
442  if (length_of_vector == 0) { //only the first time
443  int number_of_steps_for_stress_averaging = (int) (mStressAveragingTime / mrFemModelPart.GetProcessInfo()[DELTA_TIME]);
444  if(number_of_steps_for_stress_averaging < 1) number_of_steps_for_stress_averaging = 1;
445  mVectorOfLastStresses.resize(number_of_steps_for_stress_averaging);
446  KRATOS_INFO("DEM") << " 'number_of_steps_for_stress_averaging' is "<< number_of_steps_for_stress_averaging << std::endl;
447  }
448 
449  length_of_vector = mVectorOfLastStresses.size();
450 
451  if(length_of_vector > 1) {
452  for(int i=1; i<length_of_vector; i++) {
454  }
455  }
456  mVectorOfLastStresses[length_of_vector-1] = last_reaction;
457 
458  double average = 0.0;
459  for(int i=0; i<length_of_vector; i++) {
460  average += mVectorOfLastStresses[i];
461  }
462  average /= (double) length_of_vector;
463  return average;
464 
465  KRATOS_CATCH("");
466 }
467 
468 void IsTimeToApplyCM(){
469  const double current_time = mrFemModelPart.GetProcessInfo()[TIME];
470  mApplyCM = false;
471 
472  if(current_time >= mStartTime) {
473  if (mAlternateAxisLoading == true) {
474  const unsigned int step = mrFemModelPart.GetProcessInfo()[STEP];
475  if (mImposedDirection == 0) {
476  if(step == mXCounter){
477  mApplyCM = true;
478  mXCounter += 3;
479  }
480  } else if (mImposedDirection == 1) {
481  if(step == mYCounter){
482  mApplyCM = true;
483  mYCounter += 3;
484  }
485  } else if (mImposedDirection == 2) {
486  if(step == mZCounter){
487  mApplyCM = true;
488  mZCounter += 3;
489  }
490  }
491  } else {
492  mApplyCM = true;
493  }
494  }
495 }
496 
497 double CalculateReactionStress() {
498 
499  // DEM variables
501  // FEM variables
502  const int NNodes = static_cast<int>(mrFemModelPart.Nodes().size());
503  ModelPart::NodesContainerType::iterator it_begin = mrFemModelPart.NodesBegin();
504 
505  // Calculate face_area
506  double face_area = 0.0;
507  // DEM modelpart
508  #pragma omp parallel for reduction(+:face_area)
509  for (int i = 0; i < (int)rElements.size(); i++) {
510  ModelPart::ElementsContainerType::ptr_iterator ptr_itElem = rElements.ptr_begin() + i;
511  Element* p_element = ptr_itElem->get();
512  SphericContinuumParticle* pDemElem = dynamic_cast<SphericContinuumParticle*>(p_element);
513  const double radius = pDemElem->GetRadius();
514  face_area += Globals::Pi*radius*radius;
515  }
516  // FEM modelpart
517  const int NCons = static_cast<int>(mrFemModelPart.Conditions().size());
518  ModelPart::ConditionsContainerType::iterator con_begin = mrFemModelPart.ConditionsBegin();
519  #pragma omp parallel for reduction(+:face_area)
520  for(int i = 0; i < NCons; i++)
521  {
522  ModelPart::ConditionsContainerType::iterator itCond = con_begin + i;
523  face_area += itCond->GetGeometry().Area();
524  }
525 
526  // Calculate ReactionStress
527  double FaceReaction = 0.0;
528 
529  if (mImposedDirection == 0) { // X direction
530  #pragma omp parallel for reduction(+:FaceReaction)
531  for(int i = 0; i<NNodes; i++){
532  ModelPart::NodesContainerType::iterator it = it_begin + i;
533  FaceReaction += it->FastGetSolutionStepValue(REACTION_X);
534  }
535  } else if (mImposedDirection == 1) { // Y direction
536  #pragma omp parallel for reduction(+:FaceReaction)
537  for(int i = 0; i<NNodes; i++){
538  ModelPart::NodesContainerType::iterator it = it_begin + i;
539  FaceReaction += it->FastGetSolutionStepValue(REACTION_Y);
540  }
541  } else if (mImposedDirection == 2) { // Z direction
542  #pragma omp parallel for reduction(+:FaceReaction)
543  for(int i = 0; i<NNodes; i++){
544  ModelPart::NodesContainerType::iterator it = it_begin + i;
545  FaceReaction += it->FastGetSolutionStepValue(REACTION_Z);
546  }
547  }
548 
549  const int NDemNodes = static_cast<int>(mrDemModelPart.Nodes().size());
550  ModelPart::NodesContainerType::iterator it_dem_begin = mrDemModelPart.NodesBegin();
551 
552  // The sign of DEM TOTAL_FORCES is opposed to the sign of FEM REACTION
553  if (mImposedDirection == 0) { // X direction
554  #pragma omp parallel for reduction(-:FaceReaction)
555  for(int i = 0; i<NDemNodes; i++) {
556  ModelPart::NodesContainerType::iterator it = it_dem_begin + i;
557  FaceReaction -= it->FastGetSolutionStepValue(TOTAL_FORCES_X);
558  }
559  } else if (mImposedDirection == 1) { // Y direction
560  #pragma omp parallel for reduction(-:FaceReaction)
561  for(int i = 0; i<NDemNodes; i++) {
562  ModelPart::NodesContainerType::iterator it = it_dem_begin + i;
563  FaceReaction -= it->FastGetSolutionStepValue(TOTAL_FORCES_Y);
564  }
565  } else if (mImposedDirection == 2) { // Z direction
566  #pragma omp parallel for reduction(-:FaceReaction)
567  for(int i = 0; i<NDemNodes; i++) {
568  ModelPart::NodesContainerType::iterator it = it_dem_begin + i;
569  FaceReaction -= it->FastGetSolutionStepValue(TOTAL_FORCES_Z);
570  }
571  }
572 
573  double reaction_stress;
574  if (std::abs(face_area) > 1.0e-12) {
575  reaction_stress = FaceReaction / face_area;
576  } else {
577  reaction_stress = 0.0;
578  }
579 
580  return reaction_stress;
581 }
582 
583 double EstimateStiffness(const double& rReactionStress, const double& rDeltaTime) {
584  double K_estimated = mStiffness;
585  if(std::abs(mVelocity) > 1.0e-12 && std::abs(rReactionStress-mReactionStressOld) > mStressIncrementTolerance) {
586  K_estimated = std::abs((rReactionStress-mReactionStressOld)/(mVelocity * rDeltaTime));
587  }
588  return K_estimated;
589 }
590 
594 
595 
599 
600 
604 
607 
608 
610 
611 }; // Class ControlModuleFemDemUtilities
612 
613 } // namespace Kratos
614 #endif // KRATOS_CONTROL_MODULE_FEM_DEM_UTILITIES
MeshType & LocalMesh()
Returns the reference to the mesh storing all local entities.
Definition: communicator.cpp:245
Definition: control_module_fem_dem_utilities.hpp:51
double mStiffness
Definition: control_module_fem_dem_utilities.hpp:381
void ExecuteInitialize()
Definition: control_module_fem_dem_utilities.hpp:152
KRATOS_CLASS_POINTER_DEFINITION(ControlModuleFemDemUtilities)
bool mApplyCM
Definition: control_module_fem_dem_utilities.hpp:389
virtual ~ControlModuleFemDemUtilities()
Destructor.
Definition: control_module_fem_dem_utilities.hpp:146
ModelPart & mrFemModelPart
Definition: control_module_fem_dem_utilities.hpp:371
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: control_module_fem_dem_utilities.hpp:350
unsigned int mXCounter
Definition: control_module_fem_dem_utilities.hpp:386
bool mUpdateStiffness
Definition: control_module_fem_dem_utilities.hpp:382
double mStressAveragingTime
Definition: control_module_fem_dem_utilities.hpp:384
bool mAlternateAxisLoading
Definition: control_module_fem_dem_utilities.hpp:385
double mReactionStressOld
Definition: control_module_fem_dem_utilities.hpp:379
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: control_module_fem_dem_utilities.hpp:356
void ExecuteFinalizeSolutionStep()
Definition: control_module_fem_dem_utilities.hpp:315
void ExecuteInitializeSolutionStep()
Definition: control_module_fem_dem_utilities.hpp:189
unsigned int mYCounter
Definition: control_module_fem_dem_utilities.hpp:387
ControlModuleFemDemUtilities(ModelPart &rFemModelPart, ModelPart &rDemModelPart, Parameters &rParameters)
Default constructor.
Definition: control_module_fem_dem_utilities.hpp:61
double mStartTime
Definition: control_module_fem_dem_utilities.hpp:378
double mLimitVelocity
Definition: control_module_fem_dem_utilities.hpp:376
ModelPart & mrDemModelPart
Definition: control_module_fem_dem_utilities.hpp:372
double mStressIncrementTolerance
Definition: control_module_fem_dem_utilities.hpp:380
unsigned int mImposedDirection
Definition: control_module_fem_dem_utilities.hpp:373
double mVelocity
Definition: control_module_fem_dem_utilities.hpp:375
double mVelocityFactor
Definition: control_module_fem_dem_utilities.hpp:377
std::vector< double > mVectorOfLastStresses
Definition: control_module_fem_dem_utilities.hpp:383
unsigned int mZCounter
Definition: control_module_fem_dem_utilities.hpp:388
Table< double, double > TableType
Defining a table with double argument and result type as table type.
Definition: control_module_fem_dem_utilities.hpp:57
unsigned int mTargetStressTableId
Definition: control_module_fem_dem_utilities.hpp:374
virtual std::string Info() const
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: control_module_fem_dem_utilities.hpp:343
void SetValue(const Variable< TDataType > &rThisVariable, TDataType const &rValue)
Sets the value for a given variable.
Definition: data_value_container.h:320
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
ElementsContainerType & Elements()
Definition: mesh.h:568
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
Communicator & GetCommunicator()
Definition: model_part.h:1821
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
TableType::Pointer pGetTable(IndexType TableId)
Definition: model_part.h:595
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
Definition: table.h:435
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_INFO(label)
Definition: logger.h:250
constexpr double Pi
Definition: global_variables.h:25
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
int step
Definition: face_heat.py:88
delta_time
Definition: generate_frictional_mortar_condition.py:130
float radius
Definition: mesh_to_mdpa_converter.py:18
integer i
Definition: TensorModule.f:17