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_3d.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_3D_ELEM_H_INCLUDED )
41 #define KRATOS_MONOLITHIC_NONEWTONIAN_PFEM2_3D_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  NoNewtonianMonolithicPFEM23D(IndexType NewId, const NodesArrayType& ThisNodes) : MonolithicPFEM23D(NewId, ThisNodes)
83  {
84  }
85 
86  NoNewtonianMonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry) : MonolithicPFEM23D(NewId, pGeometry)
87  {
88  }
89 
90  NoNewtonianMonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) : MonolithicPFEM23D(NewId, pGeometry, pProperties)
91  {
92  }
93 
96  {
97  }
98 
106 
113  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override
114  {
115  return Element::Pointer(new NoNewtonianMonolithicPFEM23D(NewId, GetGeometry().Create(ThisNodes), pProperties));
116  }
117 
118 
119 
120 protected:
123 
127 
131  virtual void AddViscousTerm(MatrixType& rDampMatrix,
132  const BoundedMatrix<double, 4, 3>& rShapeDeriv,
133  double& Viscosity,const double Area) override;
137 
141 
145 
147 
148 private:
151  double EffectiveViscosity(double DynamicViscosity,
152  double YieldStress,
153  const BoundedMatrix<double, 3+1, 3> &rDN_DX);
154 
155  double EquivalentStrainRate(const BoundedMatrix<double, 3+1, 3> &rDN_DX); // TDim+1,TDim
156 
163  friend class Serializer;
164 
165  virtual void save(Serializer& rSerializer) const override
166  {
168  }
169 
170  virtual void load(Serializer& rSerializer) override
171  {
173  }
174 
176 
182 
186 
190 
194 
196 
197 }; // Class NoNewtonianMonolithicPFEM23D
203 } // namespace Kratos.
204 #endif // NoNewtonianMonolithicPFEM23D 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_3d.h:29
Definition: nonewtonian_2fluid_3d.h:58
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: nonewtonian_2fluid_3d.h:74
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Definition: nonewtonian_2fluid_3d.h:113
std::vector< std::size_t > EquationIdVectorType
Definition: nonewtonian_2fluid_3d.h:72
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: nonewtonian_2fluid_3d.h:73
NoNewtonianMonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: nonewtonian_2fluid_3d.h:90
virtual void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 4, 3 > &rShapeDeriv, double &Viscosity, const double Area) override
Definition: nonewtonian_2fluid_3d.cpp:30
NoNewtonianMonolithicPFEM23D(IndexType NewId=0)
Default constructor.
Definition: nonewtonian_2fluid_3d.h:78
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: nonewtonian_2fluid_3d.h:67
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: nonewtonian_2fluid_3d.h:65
Properties PropertiesType
Definition: nonewtonian_2fluid_3d.h:63
Vector VectorType
Definition: nonewtonian_2fluid_3d.h:68
NoNewtonianMonolithicPFEM23D(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: nonewtonian_2fluid_3d.h:82
NoNewtonianMonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: nonewtonian_2fluid_3d.h:86
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(NoNewtonianMonolithicPFEM23D)
std::size_t IndexType
Definition: nonewtonian_2fluid_3d.h:70
virtual ~ NoNewtonianMonolithicPFEM23D()
Destructor.
Definition: nonewtonian_2fluid_3d.h:95
std::size_t SizeType
Definition: nonewtonian_2fluid_3d.h:71
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