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.
fractional_step_k_based_wall_condition.h
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: Suneth Warnakulasuriya
11 //
12 
13 #ifndef KRATOS_FS_HIGH_RE_K_WALL_CONDITION_H
14 #define KRATOS_FS_HIGH_RE_K_WALL_CONDITION_H
15 
16 // System includes
17 #include <iostream>
18 #include <string>
19 
21 #include "includes/kratos_flags.h"
22 
23 // External includes
24 
25 // Project includes
26 #include "includes/cfd_variables.h"
27 #include "includes/condition.h"
28 #include "includes/define.h"
29 #include "includes/process_info.h"
30 #include "includes/serializer.h"
31 #include "includes/variables.h"
32 
33 // Application includes
37 
38 namespace Kratos
39 {
43 
45 
53 template <unsigned int TDim, unsigned int TNumNodes = TDim>
55 {
56 public:
59 
62 
63  using NodeType = Node;
64 
66 
68 
70 
71  using VectorType = Vector;
72 
73  using MatrixType = Matrix;
74 
75  using IndexType = std::size_t;
76 
77  using SizeType = std::size_t;
78 
79  using EquationIdVectorType = std::vector<std::size_t>;
80 
81  using DofsVectorType = std::vector<Dof<double>::Pointer>;
82 
84 
88 
90 
94  IndexType NewId = 0)
95  : Condition(NewId)
96  {
97  }
98 
100 
105  IndexType NewId,
106  const NodesArrayType& ThisNodes)
107  : Condition(NewId, ThisNodes)
108  {
109  }
110 
112 
117  IndexType NewId,
118  GeometryType::Pointer pGeometry)
119  : Condition(NewId, pGeometry)
120  {
121  }
122 
124 
130  IndexType NewId,
131  GeometryType::Pointer pGeometry,
132  PropertiesType::Pointer pProperties)
133  : Condition(NewId, pGeometry, pProperties)
134  {
135  }
136 
139  FractionalStepKBasedWallCondition const& rOther)
140  : Condition(rOther)
141  {
142  }
143 
146 
150 
153  FractionalStepKBasedWallCondition const& rOther)
154  {
155  Condition::operator=(rOther);
156  return *this;
157  }
158 
162 
164 
169  Condition::Pointer Create(
170  IndexType NewId,
171  NodesArrayType const& ThisNodes,
172  PropertiesType::Pointer pProperties) const override
173  {
174  return Kratos::make_intrusive<FractionalStepKBasedWallCondition>(
175  NewId, GetGeometry().Create(ThisNodes), pProperties);
176  }
177 
178  Condition::Pointer Create(
179  IndexType NewId,
180  Condition::GeometryType::Pointer pGeom,
181  PropertiesType::Pointer pProperties) const override
182  {
183  return Kratos::make_intrusive<FractionalStepKBasedWallCondition>(
184  NewId, pGeom, pProperties);
185  }
186 
195  Condition::Pointer Clone(
196  IndexType NewId,
197  NodesArrayType const& rThisNodes) const override
198  {
199  Condition::Pointer p_new_condition =
200  Create(NewId, GetGeometry().Create(rThisNodes), pGetProperties());
201 
202  p_new_condition->SetData(this->GetData());
203  p_new_condition->SetFlags(this->GetFlags());
204 
205  return p_new_condition;
206  }
207 
209  MatrixType& rLeftHandSideMatrix,
210  const ProcessInfo& rCurrentProcessInfo) override
211  {
212  VectorType RHS;
213  this->CalculateLocalSystem(rLeftHandSideMatrix, RHS, rCurrentProcessInfo);
214  }
215 
217 
223  MatrixType& rLeftHandSideMatrix,
224  VectorType& rRightHandSideVector,
225  const ProcessInfo& rCurrentProcessInfo) override
226  {
227  const unsigned int step = rCurrentProcessInfo[FRACTIONAL_STEP];
228  if (step == 1) {
229  // Initialize local contributions
230  const SizeType local_size = TDim * TNumNodes;
231 
232  if (rLeftHandSideMatrix.size1() != local_size) {
233  rLeftHandSideMatrix.resize(local_size, local_size, false);
234  }
235 
236  if (rRightHandSideVector.size() != local_size) {
237  rRightHandSideVector.resize(local_size, false);
238  }
239 
240  noalias(rLeftHandSideMatrix) = ZeroMatrix(local_size, local_size);
241  noalias(rRightHandSideVector) = ZeroVector(local_size);
242 
243  this->ApplyNeumannCondition(rLeftHandSideMatrix, rRightHandSideVector);
244 
245  this->ApplyWallLaw(rLeftHandSideMatrix, rRightHandSideVector, rCurrentProcessInfo);
246  } else {
247  if (this->Is(INTERFACE) && step == 5) {
248  // add here a mass matrix in the form Dt/rho_equivalent_structure to the lhs alone
249  const double N = 1.0 / static_cast<double>(TNumNodes);
250  array_1d<double, 3> r_normal;
251  this->CalculateNormal(r_normal); // this already contains the area
252  const double Area = norm_2(r_normal);
253 
254  if (rLeftHandSideMatrix.size1() != TNumNodes) {
255  rLeftHandSideMatrix.resize(TNumNodes, TNumNodes, false);
256  }
257 
258  if (rRightHandSideVector.size() != TNumNodes) {
259  rRightHandSideVector.resize(TNumNodes, false);
260  }
261 
262  noalias(rLeftHandSideMatrix) = ZeroMatrix(TNumNodes, TNumNodes);
263  noalias(rRightHandSideVector) = ZeroVector(TNumNodes);
264 
265  const double dt = rCurrentProcessInfo[DELTA_TIME];
266  const double equivalent_structural_density = rCurrentProcessInfo[DENSITY];
267  const double diag_term = dt * Area * N / (equivalent_structural_density);
268 
269  for (unsigned int iNode = 0; iNode < TNumNodes; ++iNode) {
270  rLeftHandSideMatrix(iNode, iNode) = diag_term;
271  }
272  } else {
273  if (rLeftHandSideMatrix.size1() != 0) {
274  rLeftHandSideMatrix.resize(0, 0, false);
275  }
276 
277  if (rRightHandSideVector.size() != 0) {
278  rRightHandSideVector.resize(0, false);
279  }
280  }
281  }
282  }
283 
285  int Check(const ProcessInfo& rCurrentProcessInfo) const override
286  {
287  KRATOS_TRY;
288 
289  int Check = Condition::Check(rCurrentProcessInfo); // Checks id > 0 and area > 0
290 
291  if (Check != 0) {
292  return Check;
293  } else {
294  // Checks on nodes
295 
296  // Check that the element's nodes contain all required SolutionStepData and Degrees of freedom
297  for (unsigned int i = 0; i < this->GetGeometry().size(); ++i) {
298  if (this->GetGeometry()[i].SolutionStepsDataHas(VELOCITY) == false)
299  KRATOS_THROW_ERROR(std::invalid_argument,
300  "missing VELOCITY variable on solution "
301  "step data for node ",
302  this->GetGeometry()[i].Id());
303  if (this->GetGeometry()[i].SolutionStepsDataHas(MESH_VELOCITY) == false)
304  KRATOS_THROW_ERROR(std::invalid_argument,
305  "missing MESH_VELOCITY variable on "
306  "solution step data for node ",
307  this->GetGeometry()[i].Id());
308  if (this->GetGeometry()[i].SolutionStepsDataHas(NORMAL) == false)
309  KRATOS_THROW_ERROR(std::invalid_argument,
310  "missing NORMAL variable on solution "
311  "step data for node ",
312  this->GetGeometry()[i].Id());
313  if (this->GetGeometry()[i].HasDofFor(VELOCITY_X) == false ||
314  this->GetGeometry()[i].HasDofFor(VELOCITY_Y) == false ||
315  this->GetGeometry()[i].HasDofFor(VELOCITY_Z) == false)
317  std::invalid_argument,
318  "missing VELOCITY component degree of freedom on node ",
319  this->GetGeometry()[i].Id());
320  }
321 
322  return Check;
323  }
324 
325  KRATOS_CATCH("");
326  }
327 
328  void Initialize(const ProcessInfo& rCurrentProcessInfo) override
329  {
330  KRATOS_TRY;
331 
333  const array_1d<double, 3>& r_normal = this->GetValue(NORMAL);
334  KRATOS_ERROR_IF(norm_2(r_normal) == 0.0)
335  << "NORMAL must be calculated before using this "
336  << this->Info() << "\n";
337 
338  KRATOS_ERROR_IF(this->GetValue(NEIGHBOUR_ELEMENTS).size() == 0)
339  << this->Info() << " cannot find parent element\n";
340 
341  mWallHeight = RansCalculationUtilities::CalculateWallHeight(*this, r_normal);
342  }
343 
344  KRATOS_CATCH("");
345  }
346 
348 
353  EquationIdVectorType& rResult,
354  const ProcessInfo& rCurrentProcessInfo) const override;
355 
357 
362  DofsVectorType& ConditionDofList,
363  const ProcessInfo& CurrentProcessInfo) const override;
364 
366 
371  Vector& Values,
372  int Step = 0) const override
373  {
374  const SizeType local_size = TDim * TNumNodes;
375  unsigned int LocalIndex = 0;
376 
377  if (Values.size() != local_size) {
378  Values.resize(local_size, false);
379  }
380 
381  for (unsigned int iNode = 0; iNode < TNumNodes; ++iNode) {
382  const array_1d<double, 3>& rVelocity =
383  this->GetGeometry()[iNode].FastGetSolutionStepValue(VELOCITY, Step);
384  for (unsigned int d = 0; d < TDim; ++d) {
385  Values[LocalIndex++] = rVelocity[d];
386  }
387  }
388  }
389 
391  const Variable<array_1d<double, 3>>& rVariable,
392  std::vector<array_1d<double, 3>>& rValues,
393  const ProcessInfo& rCurrentProcessInfo) override
394  {
395  rValues.resize(1);
396  if (rVariable == NORMAL) {
397  this->CalculateNormal(rValues[0]);
398  } else {
399  /*
400  The cast is done to avoid modification of the element's data. Data
401  modification would happen if rVariable is not stored now (would
402  initialize a pointer to &rVariable with associated value of 0.0).
403  This is catastrophic if the variable referenced goes out of scope.
404  */
405  const FractionalStepKBasedWallCondition* const_this =
406  static_cast<const FractionalStepKBasedWallCondition*>(this);
407  rValues[0] = const_this->GetValue(rVariable);
408  }
409  }
410 
412  const Variable<double>& rVariable,
413  std::vector<double>& rValues,
414  const ProcessInfo& rCurrentProcessInfo) override
415  {
416  rValues.resize(1);
417  /*
418  The cast is done to avoid modification of the element's data. Data
419  modification would happen if rVariable is not stored now (would
420  initialize a pointer to &rVariable with associated value of 0.0). This
421  is catastrophic if the variable referenced goes out of scope.
422  */
423  const FractionalStepKBasedWallCondition* const_this =
424  static_cast<const FractionalStepKBasedWallCondition*>(this);
425  rValues[0] = const_this->GetValue(rVariable);
426  }
427 
429  const Variable<array_1d<double, 6>>& rVariable,
430  std::vector<array_1d<double, 6>>& rValues,
431  const ProcessInfo& rCurrentProcessInfo) override
432  {
433  rValues.resize(1);
434  const FractionalStepKBasedWallCondition* const_this =
435  static_cast<const FractionalStepKBasedWallCondition*>(this);
436  rValues[0] = const_this->GetValue(rVariable);
437  }
438 
440  const Variable<Vector>& rVariable,
441  std::vector<Vector>& rValues,
442  const ProcessInfo& rCurrentProcessInfo) override
443  {
444  rValues.resize(1);
445  const FractionalStepKBasedWallCondition* const_this =
446  static_cast<const FractionalStepKBasedWallCondition*>(this);
447  rValues[0] = const_this->GetValue(rVariable);
448  }
449 
451  const Variable<Matrix>& rVariable,
452  std::vector<Matrix>& rValues,
453  const ProcessInfo& rCurrentProcessInfo) override
454  {
455  rValues.resize(1);
456  const FractionalStepKBasedWallCondition* const_this =
457  static_cast<const FractionalStepKBasedWallCondition*>(this);
458  rValues[0] = const_this->GetValue(rVariable);
459  }
460 
464 
466  std::string Info() const override
467  {
468  std::stringstream buffer;
469  this->PrintInfo(buffer);
470  return buffer.str();
471  }
472 
474  void PrintInfo(std::ostream& rOStream) const override
475  {
476  rOStream << "FractionalStepKBasedWallCondition" << TDim << "D #" << this->Id();
477  }
478 
480  void PrintData(std::ostream& rOStream) const override
481  {
482  this->pGetGeometry()->PrintData(rOStream);
483  }
484 
486 
487 protected:
490 
492 
494 
499  MatrixType& rLocalMatrix,
500  VectorType& rLocalVector,
501  const ProcessInfo& rCurrentProcessInfo)
502  {
503  using namespace RansCalculationUtilities;
504 
505  if (IsWallFunctionActive(*this)) {
506  const auto& r_geometry = this->GetGeometry();
507  // Get Shape function data
508  Vector gauss_weights;
509  Matrix shape_functions;
511  gauss_weights, shape_functions);
512  const IndexType num_gauss_points = gauss_weights.size();
513  const double eps = std::numeric_limits<double>::epsilon();
514  const double c_mu_25 = std::pow(rCurrentProcessInfo[TURBULENCE_RANS_C_MU], 0.25);
515  const double kappa = rCurrentProcessInfo[VON_KARMAN];
516 
517  // get parent element
518  auto& r_parent_element = this->GetValue(NEIGHBOUR_ELEMENTS)[0];
519  auto p_constitutive_law = r_parent_element.GetValue(CONSTITUTIVE_LAW);
520 
521  // get fluid properties from parent element
522  const auto& r_elem_properties = r_parent_element.GetProperties();
523  const double rho = r_elem_properties[DENSITY];
524  ConstitutiveLaw::Parameters cl_parameters(r_geometry, r_elem_properties, rCurrentProcessInfo);
525 
526  // get surface properties from condition
527  const PropertiesType& r_cond_properties = this->GetProperties();
528  const double beta = r_cond_properties.GetValue(WALL_SMOOTHNESS_BETA);
529  const double y_plus_limit = r_cond_properties.GetValue(RANS_LINEAR_LOG_LAW_Y_PLUS_LIMIT);
530  const double inv_kappa = 1.0 / kappa;
531 
532  double tke, nu;
533  array_1d<double, 3> wall_velocity;
534 
535  for (size_t g = 0; g < num_gauss_points; ++g)
536  {
537  const Vector& gauss_shape_functions = row(shape_functions, g);
538 
539  cl_parameters.SetShapeFunctionsValues(gauss_shape_functions);
540  p_constitutive_law->CalculateValue(cl_parameters, EFFECTIVE_VISCOSITY, nu);
541  nu /= rho;
542 
544  r_geometry, gauss_shape_functions,
545  std::tie(tke, TURBULENT_KINETIC_ENERGY),
546  std::tie(wall_velocity, VELOCITY));
547 
548  const double wall_velocity_magnitude = norm_2(wall_velocity);
549 
550  double y_plus{0.0}, u_tau{0.0};
551  CalculateYPlusAndUtau(y_plus, u_tau, wall_velocity_magnitude,
552  mWallHeight, nu, kappa, beta);
553  y_plus = std::max(y_plus, y_plus_limit);
554 
555  u_tau = std::max(c_mu_25 * std::sqrt(std::max(tke, 0.0)),
556  wall_velocity_magnitude /
557  (inv_kappa * std::log(y_plus) + beta));
558 
559  if (wall_velocity_magnitude > eps) {
560  const double value = rho * std::pow(u_tau, 2) *
561  gauss_weights[g] / wall_velocity_magnitude;
562  for (size_t a = 0; a < r_geometry.PointsNumber(); ++a) {
563  for (size_t dim = 0; dim < TDim; ++dim) {
564  for (size_t b = 0; b < r_geometry.PointsNumber(); ++b) {
565  rLocalMatrix(a * TDim + dim, b * TDim + dim) +=
566  gauss_shape_functions[a] *
567  gauss_shape_functions[b] * value;
568  }
569  rLocalVector[a * TDim + dim] -=
570  gauss_shape_functions[a] * value * wall_velocity[dim];
571  }
572  }
573  }
574  }
575  }
576  }
577 
579 
585  MatrixType& rLocalMatrix,
586  VectorType& rLocalVector);
587 
589 
590 private:
593 
594  double mWallHeight;
595 
599 
600  friend class Serializer;
601 
602  void save(Serializer& rSerializer) const override
603  {
604  KRATOS_TRY
605 
607 
608  KRATOS_CATCH("");
609  }
610  void load(Serializer& rSerializer) override
611  {
612  KRATOS_TRY
613 
615 
616  KRATOS_CATCH("");
617  }
618 
620 
621 }; // Class FractionalStepKBasedWallCondition
622 
626 
628 template <unsigned int TDim, unsigned int TNumNodes>
629 inline std::istream& operator>>(
630  std::istream& rIStream,
632 {
633  return rIStream;
634 }
635 
637 template <unsigned int TDim, unsigned int TNumNodes>
638 inline std::ostream& operator<<(
639  std::ostream& rOStream,
641 {
642  rThis.PrintInfo(rOStream);
643  rOStream << std::endl;
644  rThis.PrintData(rOStream);
645 
646  return rOStream;
647 }
648 
650 
652 
653 } // namespace Kratos.
654 
655 #endif // KRATOS_FS_HIGH_RE_K_WALL_CONDITION_H
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
PropertiesType & GetProperties()
Definition: condition.h:974
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
Definition: condition.h:854
Condition & operator=(Condition const &rOther)
Assignment operator.
Definition: condition.h:181
PropertiesType::Pointer pGetProperties()
returns the pointer to the property of the condition. Does not throw an error, to allow copying of co...
Definition: condition.h:964
virtual IntegrationMethod GetIntegrationMethod() const
Definition: condition.h:288
std::size_t IndexType
Definition: flags.h:74
bool Is(Flags const &rOther) const
Definition: flags.h:274
Implements a wall condition for the monolithic formulation.
Definition: fractional_step_k_based_wall_condition.h:55
Condition::Pointer Create(IndexType NewId, Condition::GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Definition: fractional_step_k_based_wall_condition.h:178
void CalculateOnIntegrationPoints(const Variable< Vector > &rVariable, std::vector< Vector > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:439
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fractional_step_k_based_wall_condition.h:474
FractionalStepKBasedWallCondition(IndexType NewId=0)
Default constructor.
Definition: fractional_step_k_based_wall_condition.h:93
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Check that all data required by this condition is available and reasonable.
Definition: fractional_step_k_based_wall_condition.h:285
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fractional_step_k_based_wall_condition.h:480
Condition::Pointer Clone(IndexType NewId, NodesArrayType const &rThisNodes) const override
Definition: fractional_step_k_based_wall_condition.h:195
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:208
FractionalStepKBasedWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: fractional_step_k_based_wall_condition.h:116
void GetValuesVector(Vector &Values, int Step=0) const override
Returns VELOCITY_X, VELOCITY_Y, (VELOCITY_Z,) for each node.
Definition: fractional_step_k_based_wall_condition.h:370
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new FractionalStepKBasedWallCondition object.
Definition: fractional_step_k_based_wall_condition.h:169
FractionalStepKBasedWallCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: fractional_step_k_based_wall_condition.h:129
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate wall stress term for all nodes with SLIP set.
Definition: fractional_step_k_based_wall_condition.h:222
Matrix MatrixType
Definition: fractional_step_k_based_wall_condition.h:73
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 >> &rVariable, std::vector< array_1d< double, 3 >> &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:390
~FractionalStepKBasedWallCondition() override=default
Destructor.
FractionalStepKBasedWallCondition(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: fractional_step_k_based_wall_condition.h:104
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FractionalStepKBasedWallCondition)
Pointer definition of FractionalStepKBasedWallCondition.
void ApplyWallLaw(MatrixType &rLocalMatrix, VectorType &rLocalVector, const ProcessInfo &rCurrentProcessInfo)
Commpute the wall stress and add corresponding terms to the system contributions.
Definition: fractional_step_k_based_wall_condition.h:498
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 6 >> &rVariable, std::vector< array_1d< double, 6 >> &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:428
void ApplyNeumannCondition(MatrixType &rLocalMatrix, VectorType &rLocalVector)
Apply boundary terms to allow imposing a pressure (normal stress), with a correction to prevent inflo...
Definition: fractional_step_k_based_wall_condition.cpp:224
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:411
void CalculateNormal(array_1d< double, 3 > &An) const
void CalculateOnIntegrationPoints(const Variable< Matrix > &rVariable, std::vector< Matrix > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:450
std::string Info() const override
Turn back information as a string.
Definition: fractional_step_k_based_wall_condition.h:466
FractionalStepKBasedWallCondition & operator=(FractionalStepKBasedWallCondition const &rOther)
Copy constructor.
Definition: fractional_step_k_based_wall_condition.h:152
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_k_based_wall_condition.h:328
void GetDofList(DofsVectorType &ConditionDofList, const ProcessInfo &CurrentProcessInfo) const override
Returns a list of the element's Dofs.
FractionalStepKBasedWallCondition(FractionalStepKBasedWallCondition const &rOther)
Copy constructor.
Definition: fractional_step_k_based_wall_condition.h:138
GeometryType::Pointer pGetGeometry()
Returns the pointer to the geometry.
Definition: geometrical_object.h:140
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
Flags & GetFlags()
Returns the flags of the object.
Definition: geometrical_object.h:176
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
DataValueContainer & GetData()
Definition: geometrical_object.h:212
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
This object defines an indexed object.
Definition: indexed_object.h:54
IndexType Id() const
Definition: indexed_object.h:107
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.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
TVariableType::Type & GetValue(const TVariableType &rVariable)
Definition: properties.h:228
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
static void EvaluateInPoint(const GeometryType &rGeometry, const Vector &rShapeFunction, const int Step, const TRefVariableValuePairArgs &... rValueVariablePairs)
Evaluates given list of variable pairs at gauss point locations at step.
Definition: fluid_calculation_utilities.h:75
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
dt
Definition: DEM_benchmarks.py:173
static double max(double a, double b)
Definition: GeometryFunctions.h:79
bool IsWallFunctionActive(const ConditionType &rCondition)
Definition: rans_calculation_utilities.cpp:292
void CalculateConditionGeometryData(const GeometryType &rGeometry, const GeometryData::IntegrationMethod &rIntegrationMethod, Vector &rGaussWeights, Matrix &rNContainer)
Definition: rans_calculation_utilities.cpp:62
double CalculateWallHeight(const ConditionType &rCondition, const array_1d< double, 3 > &rNormal)
Definition: rans_calculation_utilities.cpp:195
void CalculateYPlusAndUtau(double &rYPlus, double &rUTau, const double WallVelocity, const double WallHeight, const double KinematicViscosity, const double Kappa, const double Beta, const int MaxIterations, const double Tolerance)
Definition: rans_calculation_utilities.cpp:247
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int step
Definition: face_heat.py:88
rho
Definition: generate_droplet_dynamics.py:86
a
Definition: generate_stokes_twofluid_element.py:77
int local_size
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:17
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
nu
Definition: isotropic_damage_automatic_differentiation.py:135
def load(f)
Definition: ode_solve.py:307
kappa
Definition: ode_solve.py:416
int d
Definition: ode_solve.py:397
N
Definition: sensitivityMatrix.py:29
int dim
Definition: sensitivityMatrix.py:25
integer i
Definition: TensorModule.f:17
Definition: constitutive_law.h:189
void SetShapeFunctionsValues(const Vector &rShapeFunctionsValues)
Definition: constitutive_law.h:396