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.
fs_werner_wengle_wall_condition.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3  Kratos Fluid Dynamics Application
4  Kratos
5  A General Purpose Software for Multi-Physics Finite Element Analysis
6  Version 1.0 (Released on march 05, 2007).
7 
8  Copyright 2007
9  Pooyan Dadvand, Riccardo Rossi
10  pooyan@cimne.upc.edu
11  rrossi@cimne.upc.edu
12  CIMNE (International Center for Numerical Methods in Engineering),
13  Gran Capita' s/n, 08034 Barcelona, Spain
14 
15  Permission is hereby granted, free of charge, to any person obtaining
16  a copy of this software and associated documentation files (the
17  "Software"), to deal in the Software without restriction, including
18  without limitation the rights to use, copy, modify, merge, publish,
19  distribute, sublicense and/or sell copies of the Software, and to
20  permit persons to whom the Software is furnished to do so, subject to
21  the following condition:
22 
23  Distribution of this code for any commercial purpose is permissible
24  ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNER.
25 
26  The above copyright notice and this permission notice shall be
27  included in all copies or substantial portions of the Software.
28 
29  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
32  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
33  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
34  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
35  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 
37  ==============================================================================
38  */
39 
40 #ifndef KRATOS_FS_WERNER_WENGLE_WALL_CONDITION_H
41 #define KRATOS_FS_WERNER_WENGLE_WALL_CONDITION_H
42 
43 // System includes
44 #include <iostream>
45 
46 // External includes
47 
48 // Project includes
49 #include "includes/define.h"
50 #include "includes/serializer.h"
51 #include "includes/condition.h"
52 #include "includes/process_info.h"
53 #include "includes/kratos_flags.h"
55 #include "includes/cfd_variables.h"
56 
57 
58 // Application includes
60 
61 namespace Kratos {
64 
67 
71 
75 
79 
83 
85 
100 template<unsigned int TDim, unsigned int TNumNodes = TDim>
102 {
103 public:
106 
109 
110  typedef Node NodeType;
111 
113 
115 
117 
119 
121 
122  typedef Element::WeakPointer ElementWeakPointerType;
123 
124  typedef Element::Pointer ElementPointerType;
125 
127 
129 
131 
132  typedef std::size_t IndexType;
133 
134  typedef std::size_t SizeType;
135 
136  typedef std::vector<std::size_t> EquationIdVectorType;
137 
138  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
139 
141 
145 
147 
150  FSWernerWengleWallCondition(IndexType NewId = 0) : Condition(NewId), mInitializeWasPerformed(false), mpElement()
151  {
152  }
153 
155 
160  : Condition(NewId, ThisNodes), mInitializeWasPerformed(false), mpElement()
161  {
162  }
163 
165 
169  FSWernerWengleWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
170  : Condition(NewId, pGeometry), mInitializeWasPerformed(false), mpElement()
171  {
172  }
173 
175 
180  FSWernerWengleWallCondition(IndexType NewId, GeometryType::Pointer pGeometry,
181  PropertiesType::Pointer pProperties)
182  : Condition(NewId, pGeometry, pProperties), mInitializeWasPerformed(false), mpElement()
183  {
184  }
185 
188  mInitializeWasPerformed(rOther.mInitializeWasPerformed), mpElement(rOther.mpElement)
189  {
190  }
191 
194  {}
195 
199 
202  {
203  Condition::operator=(rOther);
204  mInitializeWasPerformed = rOther.mInitializeWasPerformed;
205  mpElement = rOther.mpElement;
206  return *this;
207  }
208 
212 
214 
219  Condition::Pointer Create(IndexType NewId,
220  NodesArrayType const& ThisNodes,
221  PropertiesType::Pointer pProperties) const override
222  {
223  return Kratos::make_intrusive<FSWernerWengleWallCondition>(NewId,GetGeometry().Create(ThisNodes), pProperties);
224  }
225 
227 
232  Condition::Pointer Create(
233  IndexType NewId,
234  GeometryType::Pointer pGeom,
235  PropertiesType::Pointer pProperties) const override
236  {
237  return Kratos::make_intrusive<FSWernerWengleWallCondition>(NewId, pGeom, pProperties);
238  }
239 
241  void Initialize(const ProcessInfo &rCurrentProcessInfo) override
242  {
243  KRATOS_TRY;
244 
245  if (this->Is(SLIP))
246  {
247  const array_1d<double, 3> &rNormal = this->GetValue(NORMAL);
248  KRATOS_ERROR_IF(norm_2(rNormal) == 0.0) << "NORMAL must be calculated before using this " << this->Info() << "\n";
249  }
250 
251  if (mInitializeWasPerformed)
252  {
253  return;
254  }
255 
256  mInitializeWasPerformed = true;
257 
258  KRATOS_ERROR_IF(this->GetValue(NEIGHBOUR_ELEMENTS).size() == 0) << this->Info() << " cannot find parent element\n";
259 
260  double EdgeLength;
261  array_1d<double, 3> Edge;
262 
263  mpElement = this->GetValue(NEIGHBOUR_ELEMENTS)(0);
264  GeometryType &rElemGeom = mpElement->GetGeometry();
265 
266  Edge = rElemGeom[1].Coordinates() - rElemGeom[0].Coordinates();
267  mMinEdgeLength = Edge[0] * Edge[0];
268  for (SizeType d = 1; d < TDim; d++)
269  {
270  mMinEdgeLength += Edge[d] * Edge[d];
271  }
272 
273  for (SizeType j = 2; j < rElemGeom.PointsNumber(); j++)
274  {
275  for (SizeType k = 0; k < j; k++)
276  {
277  Edge = rElemGeom[j].Coordinates() - rElemGeom[k].Coordinates();
278  EdgeLength = Edge[0] * Edge[0];
279 
280  for (SizeType d = 1; d < TDim; d++)
281  {
282  EdgeLength += Edge[d] * Edge[d];
283  }
284 
285  mMinEdgeLength = (EdgeLength < mMinEdgeLength) ? EdgeLength : mMinEdgeLength;
286  }
287  }
288  mMinEdgeLength = sqrt(mMinEdgeLength);
289  return;
290 
291  KRATOS_CATCH("");
292  }
293 
295  MatrixType& rLeftHandSideMatrix,
296  const ProcessInfo& rCurrentProcessInfo) override
297  {
298  VectorType RHS;
299  this->CalculateLocalSystem(rLeftHandSideMatrix, RHS, rCurrentProcessInfo);
300  }
301 
303 
308  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
309  VectorType& rRightHandSideVector,
310  const ProcessInfo& rCurrentProcessInfo) override
311  {
312  KRATOS_TRY;
313 
314  if (mInitializeWasPerformed == false)
315  {
316  Initialize(rCurrentProcessInfo);
317  }
318 
319  if (rCurrentProcessInfo[FRACTIONAL_STEP] == 1)
320  {
321  // Initialize local contributions
322  const SizeType LocalSize = TDim * TNumNodes;
323 
324  if (rLeftHandSideMatrix.size1() != LocalSize)
325  {
326  rLeftHandSideMatrix.resize(LocalSize, LocalSize);
327  }
328  if (rRightHandSideVector.size() != LocalSize)
329  {
330  rRightHandSideVector.resize(LocalSize);
331  }
332 
333  noalias(rLeftHandSideMatrix) = ZeroMatrix(LocalSize, LocalSize);
334  noalias(rRightHandSideVector) = ZeroVector(LocalSize);
335 
336  if (this->Is(SLIP))
337  this->ApplyWallLaw(rLeftHandSideMatrix, rRightHandSideVector);
338  }
339  else if (rCurrentProcessInfo[FRACTIONAL_STEP] == 5)
340  {
341  // add IAC penalty to local pressure system
342  const SizeType LocalSize = TNumNodes;
343 
344  if (rLeftHandSideMatrix.size1() != LocalSize)
345  {
346  rLeftHandSideMatrix.resize(LocalSize, LocalSize);
347  }
348  if (rRightHandSideVector.size() != LocalSize)
349  {
350  rRightHandSideVector.resize(LocalSize);
351  }
352 
353  noalias(rLeftHandSideMatrix) = ZeroMatrix(LocalSize, LocalSize);
354  noalias(rRightHandSideVector) = ZeroVector(LocalSize);
355 
356  if (this->Is(INTERFACE))
357  this->ApplyIACPenalty(rLeftHandSideMatrix, rRightHandSideVector, rCurrentProcessInfo);
358  }
359  else
360  {
361  if (rLeftHandSideMatrix.size1() != 0)
362  {
363  rLeftHandSideMatrix.resize(0,0,false);
364  }
365 
366  if (rRightHandSideVector.size() != 0)
367  {
368  rRightHandSideVector.resize(0,false);
369  }
370  }
371 
372  KRATOS_CATCH("");
373  }
374 
376  int Check(const ProcessInfo& rCurrentProcessInfo) const override
377  {
378  KRATOS_TRY;
379 
380  int Check = Condition::Check(rCurrentProcessInfo); // Checks id > 0 and area >= 0
381 
382  if (Check != 0)
383  {
384  return Check;
385  }
386  else
387  {
388  // Check that the element's nodes contain all required SolutionStepData and Degrees of freedom
389  for(unsigned int i=0; i<this->GetGeometry().size(); ++i)
390  {
391  if(this->GetGeometry()[i].SolutionStepsDataHas(VELOCITY) == false)
392  KRATOS_THROW_ERROR(std::invalid_argument,"missing VELOCITY variable on solution step data for node ",this->GetGeometry()[i].Id());
393  if(this->GetGeometry()[i].SolutionStepsDataHas(MESH_VELOCITY) == false)
394  KRATOS_THROW_ERROR(std::invalid_argument,"missing MESH_VELOCITY variable on solution step data for node ",this->GetGeometry()[i].Id());
395  if(this->GetGeometry()[i].SolutionStepsDataHas(DENSITY) == false)
396  KRATOS_THROW_ERROR(std::invalid_argument,"missing DENSITY variable on solution step data for node ",this->GetGeometry()[i].Id());
397  if(this->GetGeometry()[i].SolutionStepsDataHas(VISCOSITY) == false)
398  KRATOS_THROW_ERROR(std::invalid_argument,"missing VISCOSITY variable on solution step data for node ",this->GetGeometry()[i].Id());
399  if(this->GetGeometry()[i].SolutionStepsDataHas(NORMAL) == false)
400  KRATOS_THROW_ERROR(std::invalid_argument,"missing NORMAL variable on solution step data for node ",this->GetGeometry()[i].Id());
401  if(this->GetGeometry()[i].HasDofFor(VELOCITY_X) == false ||
402  this->GetGeometry()[i].HasDofFor(VELOCITY_Y) == false ||
403  this->GetGeometry()[i].HasDofFor(VELOCITY_Z) == false)
404  KRATOS_THROW_ERROR(std::invalid_argument,"missing VELOCITY component degree of freedom on node ",this->GetGeometry()[i].Id());
405  if(this->GetGeometry()[i].HasDofFor(PRESSURE) == false)
406  KRATOS_THROW_ERROR(std::invalid_argument,"missing PRESSURE degree of freedom on node ",this->GetGeometry()[i].Id());
407  }
408 
409  return Check;
410  }
411 
412  KRATOS_CATCH("");
413  }
414 
416 
420  void EquationIdVector(EquationIdVectorType& rResult,
421  const ProcessInfo& rCurrentProcessInfo) const override;
422 
424 
428  void GetDofList(DofsVectorType& rConditionDofList,
429  const ProcessInfo& rCurrentProcessInfo) const override;
430 
432 
436  void GetValuesVector(Vector& Values, int Step = 0) const override
437  {
438  const SizeType LocalSize = TDim * TNumNodes;
439  unsigned int LocalIndex = 0;
440 
441  if (Values.size() != LocalSize)
442  {
443  Values.resize(LocalSize, false);
444  }
445 
446  for (unsigned int i = 0; i < TNumNodes; ++i)
447  {
448  const array_1d<double,3>& rVelocity = this->GetGeometry()[i].FastGetSolutionStepValue(VELOCITY, Step);
449  for (unsigned int d = 0; d < TDim; ++d)
450  {
451  Values[LocalIndex++] = rVelocity[d];
452  }
453  }
454  }
455 
459 
461  const Variable<array_1d<double, 3 > >& rVariable,
462  std::vector<array_1d<double, 3 > >& rValues,
463  const ProcessInfo& rCurrentProcessInfo) override;
464 
465 
467  const Variable<double>& rVariable,
468  std::vector<double>& rValues,
469  const ProcessInfo& rCurrentProcessInfo) override;
470 
471 
473  const Variable<array_1d<double, 6 > >& rVariable,
474  std::vector<array_1d<double, 6 > >& rValues,
475  const ProcessInfo& rCurrentProcessInfo) override;
476 
478  const Variable<Vector>& rVariable,
479  std::vector<Vector>& rValues,
480  const ProcessInfo& rCurrentProcessInfo) override;
481 
482 
484  const Variable<Matrix>& rVariable,
485  std::vector<Matrix>& rValues,
486  const ProcessInfo& rCurrentProcessInfo) override;
487 
491 
495 
497  std::string Info() const override
498  {
499  std::stringstream buffer;
500  buffer << "FSWernerWengleWallCondition" << TDim << "D";
501  return buffer.str();
502  }
503 
505  void PrintInfo(std::ostream& rOStream) const override
506  { rOStream << "FSWernerWengleWallCondition";}
507 
509  void PrintData(std::ostream& rOStream) const override
510  {}
511 
515 
517 
518 protected:
521 
525 
529 
533 
535  {
536  return mpElement->shared_from_this();
537  }
538 
539  template< class TVariableType >
540  void EvaluateInPoint(TVariableType& rResult,
542  const ShapeFunctionsType& rShapeFunc)
543  {
544  GeometryType& rGeom = this->GetGeometry();
545 
546  rResult = rShapeFunc[0] * rGeom[0].FastGetSolutionStepValue(Var);
547 
548  for(SizeType i = 1; i < TNumNodes; i++)
549  {
550  rResult += rShapeFunc[i] * rGeom[i].FastGetSolutionStepValue(Var);
551  }
552  }
553 
555 
560  void CalculateWallParameters(double& rWallHeight, array_1d<double,3>& rWallVel, double& rArea);
561 
563 
567  void ApplyWallLaw(MatrixType& rLocalMatrix, VectorType& rLocalVector)
568  {
569  const double A = 8.3;
570  const double Alpha = 1.0 / 7.0;
571  const double Small = 1.0e-12;
572  const unsigned int BlockSize = TDim;
573  double WallHeight, Area, rho, nu, WallVelMag, WallVelCut, tmp, WallStress, WallForce;
574 
575  array_1d<double,3> WallVel;
576  GeometryType& rGeometry = this->GetGeometry();
577  CalculateWallParameters(WallHeight, WallVel, Area);
578  WallHeight = (WallHeight > Small * mMinEdgeLength) ? WallHeight : Small * mMinEdgeLength;
579  WallVelMag = norm_2(WallVel);
580 
581  if (WallVelMag > Small)
582  {
583  const ShapeFunctionsType& N = row(this->GetGeometry().ShapeFunctionsValues(GeometryData::IntegrationMethod::GI_GAUSS_1),0);
584  EvaluateInPoint(rho, DENSITY, N);
585  EvaluateInPoint(nu, VISCOSITY, N);
586 
587  WallVelCut = nu * pow(A, 2.0/(1.0-Alpha)) / (2.0 * WallHeight);
588 
589  // linear region
590  if (WallVelMag <= WallVelCut)
591  {
592  WallStress = 2.0 * rho * nu * WallVelMag / WallHeight;
593  }
594  else
595  { // log region
596  tmp = (1.0 - Alpha) / 2.0 * pow(A, (1.0 + Alpha) / (1.0 - Alpha)) * pow(nu / WallHeight, 1.0 + Alpha);
597  tmp += (1.0 + Alpha) / A * pow(nu / WallHeight, Alpha) * WallVelMag;
598  WallStress = rho * pow(tmp, 2.0 / (1.0 + Alpha));
599  }
600 
601  //this->SetValue(Y_WALL,WallStress);
602  WallForce = (Area / static_cast<double>(TNumNodes)) * WallStress;
603 
604  for(SizeType i=0; i < rGeometry.PointsNumber(); ++i)
605  {
606  const NodeType& rNode = rGeometry[i];
607  if(rNode.GetValue(Y_WALL) != 0.0 && rNode.Is(SLIP))
608  {
609  WallVel = rNode.FastGetSolutionStepValue(VELOCITY,1) - rNode.FastGetSolutionStepValue(MESH_VELOCITY,1);
610  tmp = norm_2(WallVel);
611  WallVel /= (tmp > Small) ? tmp : 1.0;
612 
613  for (unsigned int d=0; d < TDim; d++)
614  {
615  unsigned int k = i * BlockSize + d;
616  rLocalVector[k] -= WallVel[d] * WallForce;
617  }
618  }
619  }
620  }
621  }
622 
624 
629  void ApplyIACPenalty(MatrixType& rLeftHandSideMatrix,
630  VectorType& rRightHandSideVector,
631  const ProcessInfo& rCurrentProcessInfo)
632  {
633  GeometryType& rGeometry = this->GetGeometry();
634  const array_1d<double,3>& rNormal = this->GetValue(NORMAL);
635  const double Area = norm_2(rNormal);
636  const double DiagonalTerm = Area / static_cast<double>(TNumNodes)
637  / (rCurrentProcessInfo[DENSITY] * rCurrentProcessInfo[BDF_COEFFICIENTS][0]);
638 
639  for(SizeType iNode=0; iNode < rGeometry.PointsNumber(); ++iNode)
640  {
641  rLeftHandSideMatrix(iNode,iNode) += DiagonalTerm;
642  }
643  }
644 
655 private:
658 
662  bool mInitializeWasPerformed;
663  double mMinEdgeLength;
664  ElementWeakPointerType mpElement;
665 
669 
670  friend class Serializer;
671 
672  void save(Serializer& rSerializer) const override
673  {
675  rSerializer.save("mInitializeWasPerformed",mInitializeWasPerformed);
676  rSerializer.save("mMinEdgeLength",mMinEdgeLength);
677  rSerializer.save("mpElement",mpElement);
678  }
679 
680  void load(Serializer& rSerializer) override
681  {
683  rSerializer.load("mInitializeWasPerformed",mInitializeWasPerformed);
684  rSerializer.load("mMinEdgeLength",mMinEdgeLength);
685  rSerializer.load("mpElement",mpElement);
686  }
687 
691 
695 
699 
703 
707 
709 
710 }; // Class FSWernerWengleWallCondition
711 
713 
716 
720 
722 template<unsigned int TDim, unsigned int TNumNodes>
723 inline std::istream& operator >>(std::istream& rIStream,
725 {
726  return rIStream;
727 }
728 
730 template<unsigned int TDim, unsigned int TNumNodes>
731 inline std::ostream& operator <<(std::ostream& rOStream,
733 {
734  rThis.PrintInfo(rOStream);
735  rOStream << std::endl;
736  rThis.PrintData(rOStream);
737 
738  return rOStream;
739 }
740 
742 
744 
745 }// namespace Kratos.
746 
747 #endif // KRATOS_FS_WERNER_WENGLE_WALL_CONDITION_H
Base class for all Conditions.
Definition: condition.h:59
std::size_t SizeType
Definition: condition.h:94
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
Implements a power-law wall model.
Definition: fs_werner_wengle_wall_condition.h:102
Properties PropertiesType
Definition: fs_werner_wengle_wall_condition.h:112
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate wall stress term for all nodes with SLIP set.
Definition: fs_werner_wengle_wall_condition.h:308
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: fs_werner_wengle_wall_condition.h:138
Geometry< NodeType >::GeometriesArrayType GeometriesArrayType
Definition: fs_werner_wengle_wall_condition.h:120
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Definition: fs_werner_wengle_wall_condition.h:130
Kratos::Vector ShapeFunctionsType
Definition: fs_werner_wengle_wall_condition.h:140
FSWernerWengleWallCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: fs_werner_wengle_wall_condition.h:169
Geometry< NodeType >::PointType PointType
Definition: fs_werner_wengle_wall_condition.h:116
Geometry< NodeType > GeometryType
Definition: fs_werner_wengle_wall_condition.h:114
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fs_werner_wengle_wall_condition.h:505
void GetValuesVector(Vector &Values, int Step=0) const override
Returns VELOCITY_X, VELOCITY_Y, (VELOCITY_Z) for each node.
Definition: fs_werner_wengle_wall_condition.h:436
ElementPointerType pGetElement()
Definition: fs_werner_wengle_wall_condition.h:534
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this condition's local rows.
std::size_t SizeType
Definition: fs_werner_wengle_wall_condition.h:134
Matrix MatrixType
Definition: fs_werner_wengle_wall_condition.h:128
FSWernerWengleWallCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: fs_werner_wengle_wall_condition.h:180
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition: fs_werner_wengle_wall_condition.h:118
Element::WeakPointer ElementWeakPointerType
Definition: fs_werner_wengle_wall_condition.h:122
std::string Info() const override
Turn back information as a string.
Definition: fs_werner_wengle_wall_condition.h:497
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fs_werner_wengle_wall_condition.h:509
void GetDofList(DofsVectorType &rConditionDofList, const ProcessInfo &rCurrentProcessInfo) const override
Returns a list of the condition's Dofs.
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: fs_werner_wengle_wall_condition.h:294
Condition::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new FSWernerWengleWallCondition object.
Definition: fs_werner_wengle_wall_condition.h:232
FSWernerWengleWallCondition(FSWernerWengleWallCondition const &rOther)
Copy constructor.
Definition: fs_werner_wengle_wall_condition.h:187
Node NodeType
Definition: fs_werner_wengle_wall_condition.h:110
std::vector< std::size_t > EquationIdVectorType
Definition: fs_werner_wengle_wall_condition.h:136
void CalculateWallParameters(double &rWallHeight, array_1d< double, 3 > &rWallVel, double &rArea)
Calculate input parameters to wall model.
void EvaluateInPoint(TVariableType &rResult, const Kratos::Variable< TVariableType > &Var, const ShapeFunctionsType &rShapeFunc)
Definition: fs_werner_wengle_wall_condition.h:540
void ApplyIACPenalty(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Apply an IAC penalty term.
Definition: fs_werner_wengle_wall_condition.h:629
void ApplyWallLaw(MatrixType &rLocalMatrix, VectorType &rLocalVector)
Compute the wall stress and add corresponding terms to the system contributions.
Definition: fs_werner_wengle_wall_condition.h:567
~FSWernerWengleWallCondition() override
Destructor.
Definition: fs_werner_wengle_wall_condition.h:193
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new FSWernerWengleWallCondition object.
Definition: fs_werner_wengle_wall_condition.h:219
std::size_t IndexType
Definition: fs_werner_wengle_wall_condition.h:132
Element::Pointer ElementPointerType
Definition: fs_werner_wengle_wall_condition.h:124
FSWernerWengleWallCondition(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: fs_werner_wengle_wall_condition.h:159
FSWernerWengleWallCondition(IndexType NewId=0)
Default constructor.
Definition: fs_werner_wengle_wall_condition.h:150
void CalculateOnIntegrationPoints(const Variable< array_1d< double, 3 > > &rVariable, std::vector< array_1d< double, 3 > > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fs_werner_wengle_wall_condition.cpp:199
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FSWernerWengleWallCondition)
Pointer definition of FSWernerWengleWallCondition.
Vector VectorType
Definition: fs_werner_wengle_wall_condition.h:126
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Check that all data required by this condition is available and reasonable.
Definition: fs_werner_wengle_wall_condition.h:376
FSWernerWengleWallCondition & operator=(FSWernerWengleWallCondition const &rOther)
Copy constructor.
Definition: fs_werner_wengle_wall_condition.h:201
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Find the condition's parent element.
Definition: fs_werner_wengle_wall_condition.h:241
std::size_t IndexType
Definition: flags.h:74
bool Is(Flags const &rOther) const
Definition: flags.h:274
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
SizeType size() const
Definition: geometry.h:518
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
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
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: node.h:466
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
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
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
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
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
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
rho
Definition: generate_droplet_dynamics.py:86
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
nu
Definition: isotropic_damage_automatic_differentiation.py:135
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
def Alpha(n, j)
Definition: quadrature.py:93
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
A
Definition: sensitivityMatrix.py:70
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17