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.
nonewtonian_2fluid_2d.h
Go to the documentation of this file.
1 //verification
2 /*
3 ==============================================================================
4 Kratos
5 A General Purpose Software for Multi-Physics Finite Element Analysis
6 Version 1.0 (Released on march 05, 2007).
7 Copyright 2007
8 Pooyan Dadvand, Riccardo Rossi
9 pooyan@cimne.upc.edu
10 rrossi@cimne.upc.edu
11 CIMNE (International Center for Numerical Methods in Engineering),
12 Gran Capita' s/n, 08034 Barcelona, Spain
13 Permission is hereby granted, free of charge, to any person obtaining
14 a copy of this software and associated documentation files (the
15 "Software"), to deal in the Software without restriction, including
16 without limitation the rights to use, copy, modify, merge, publish,
17 distribute, sublicense and/or sell copies of the Software, and to
18 permit persons to whom the Software is furnished to do so, subject to
19 the following condition:
20 Distribution of this code for any commercial purpose is permissible
21 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNER.
22 The above copyright notice and this permission notice shall be
23 included in all copies or substantial portions of the Software.
24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 ==============================================================================
32  */
33 //
34 // Project Name: Kratos
35 // Last Modified by: $Author: jcotela $
36 // Date: $Date: 2010-10-09 10:34:00 $
37 // Revision: $Revision: 0.1 $
38 //
39 //
40 #if !defined(KRATOS_MONOLITHIC_NONEWTONIAN_PFEM2_2D_ELEM_H_INCLUDED )
41 #define KRATOS_MONOLITHIC_NONEWTONIAN_PFEM2_2D_ELEM_H_INCLUDED
42 
43 // External includes
44 #include "boost/smart_ptr.hpp"
45 
46 
47 // Project includes
48 #include "includes/define.h"
49 #include "includes/element.h"
52 
53 
54 namespace Kratos
55 {
56 
58 {
59 public:
60 
62 
68  typedef Vector VectorType;
69  //typedef typename ElementBaseType::MatrixType MatrixType;
70  typedef std::size_t IndexType;
71  typedef std::size_t SizeType;
72  typedef std::vector<std::size_t> EquationIdVectorType;
73  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
75 
77 
79  {
80  }
81 
82  NoNewtonianMonolithicPFEM22D(IndexType NewId, const NodesArrayType& ThisNodes) : MonolithicPFEM22D(NewId, ThisNodes)
83  {
84  }
85 
86  NoNewtonianMonolithicPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry) : MonolithicPFEM22D(NewId, pGeometry)
87  {
88  }
89 
90  NoNewtonianMonolithicPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) : MonolithicPFEM22D(NewId, pGeometry, pProperties)
91  {
92  }
93 
95  virtual ~ NoNewtonianMonolithicPFEM22D() override
96  {
97  }
98 
106 
113  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override
114  {
115  return Element::Pointer(new NoNewtonianMonolithicPFEM22D(NewId, GetGeometry().Create(ThisNodes), pProperties));
116  }
117 
118 
119 
120 protected:
129  virtual void AddViscousTerm(MatrixType& rDampMatrix,
130  const BoundedMatrix<double, 3, 2>& rShapeDeriv,
131  double& Viscosity,const double Area) override;
142 private:
145  double EffectiveViscosity(double DynamicViscosity,
146  double YieldStress,
147  const BoundedMatrix<double, 2+1, 2> &rDN_DX);
148 
149  double EquivalentStrainRate(const BoundedMatrix<double, 2+1, 2> &rDN_DX); // TDim+1,TDim
150 
157  friend class Serializer;
158 
159  virtual void save(Serializer& rSerializer) const override
160  {
162  }
163 
164  virtual void load(Serializer& rSerializer) override
165  {
167  }
168 
170 
186 
187 }; // Class NoNewtonianMonolithicPFEM22D
193 } // namespace Kratos.
194 #endif // NoNewtonianMonolithicPFEM22D defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
Matrix MatrixType
Definition: element.h:90
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Definition: monolithic_2fluid_2d.h:31
Definition: nonewtonian_2fluid_2d.h:58
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: nonewtonian_2fluid_2d.h:67
NoNewtonianMonolithicPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: nonewtonian_2fluid_2d.h:86
virtual ~ NoNewtonianMonolithicPFEM22D() override
Destructor.
Definition: nonewtonian_2fluid_2d.h:95
NoNewtonianMonolithicPFEM22D(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: nonewtonian_2fluid_2d.h:82
Properties PropertiesType
Definition: nonewtonian_2fluid_2d.h:63
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Definition: nonewtonian_2fluid_2d.h:113
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: nonewtonian_2fluid_2d.h:65
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: nonewtonian_2fluid_2d.h:74
NoNewtonianMonolithicPFEM22D(IndexType NewId=0)
Default constructor.
Definition: nonewtonian_2fluid_2d.h:78
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: nonewtonian_2fluid_2d.h:73
virtual void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 3, 2 > &rShapeDeriv, double &Viscosity, const double Area) override
Definition: nonewtonian_2fluid_2d.cpp:30
NoNewtonianMonolithicPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: nonewtonian_2fluid_2d.h:90
std::size_t IndexType
Definition: nonewtonian_2fluid_2d.h:70
Vector VectorType
Definition: nonewtonian_2fluid_2d.h:68
std::vector< std::size_t > EquationIdVectorType
Definition: nonewtonian_2fluid_2d.h:72
std::size_t SizeType
Definition: nonewtonian_2fluid_2d.h:71
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(NoNewtonianMonolithicPFEM22D)
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
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
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307