1 #ifndef KRATOS_BINGHAM_FLUID_H
2 #define KRATOS_BINGHAM_FLUID_H
32 template<
class TBaseElement,
33 class TShapeFunctionValues =
typename TBaseElement::ShapeFunctionsType,
34 class TShapeFunctionGradients =
typename TBaseElement::ShapeFunctionDerivativesType >
99 TBaseElement(NewId, ThisNodes)
108 TBaseElement(NewId, pGeometry)
118 TBaseElement(NewId, pGeometry, pProperties)
145 PropertiesType::Pointer pProperties)
const override
147 return Kratos::make_intrusive< BinghamFluid<TBaseElement> >(NewId, this->GetGeometry().Create(ThisNodes), pProperties);
158 GeometryType::Pointer pGeom,
159 PropertiesType::Pointer pProperties)
const override
161 return Kratos::make_intrusive< BinghamFluid<TBaseElement> >(NewId,pGeom,pProperties);
179 std::string
Info()
const override
181 std::stringstream buffer;
182 buffer <<
"BinghamFluid " ;
190 rOStream <<
"BinghamFluid ";
191 TBaseElement::PrintInfo(rOStream);
195 void PrintData(std::ostream& rOStream)
const override {}
252 const TShapeFunctionValues &rN,
253 const TShapeFunctionGradients &rDN_DX,
259 double DynamicViscosity;
260 this->EvaluateInPoint(DynamicViscosity,VISCOSITY,rN);
261 DynamicViscosity *= Density;
263 double GammaDot = this->EquivalentStrainRate(rDN_DX);
265 double YieldStress = rProcessInfo[YIELD_STRESS];
267 double m = rProcessInfo[REGULARIZATION_COEFFICIENT];
269 if (GammaDot > 1
e-12)
271 double Regularization = 1.0 - std::exp(-
m*GammaDot);
272 DynamicViscosity += Regularization * YieldStress / GammaDot;
278 DynamicViscosity +=
m*YieldStress;
281 return DynamicViscosity;
318 void save(
Serializer& rSerializer)
const override
375 template<
class TBaseElement >
383 template<
class TBaseElement >
388 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: bingham_fluid.h:36
Properties PropertiesType
Definition: bingham_fluid.h:54
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: bingham_fluid.h:60
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: bingham_fluid.h:70
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: bingham_fluid.h:73
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: bingham_fluid.h:195
double EffectiveViscosity(double Density, const TShapeFunctionValues &rN, const TShapeFunctionGradients &rDN_DX, double ElemSize, const ProcessInfo &rProcessInfo) override
EffectiveViscosity Calculate the effective viscosity at given integration point using the Bingham con...
Definition: bingham_fluid.h:251
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: bingham_fluid.h:49
std::string Info() const override
Turn back information as a string.
Definition: bingham_fluid.h:179
~BinghamFluid() override
Destructor.
Definition: bingham_fluid.h:122
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(BinghamFluid)
Vector VectorType
Vector type for local contributions to the linear system.
Definition: bingham_fluid.h:57
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: bingham_fluid.h:79
Node NodeType
Node type (default is: Node)
Definition: bingham_fluid.h:46
std::size_t SizeType
Definition: bingham_fluid.h:64
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: bingham_fluid.h:188
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: bingham_fluid.h:156
BinghamFluid(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: bingham_fluid.h:98
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: bingham_fluid.h:143
BinghamFluid(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: bingham_fluid.h:117
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: bingham_fluid.h:68
BinghamFluid(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: bingham_fluid.h:107
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: bingham_fluid.h:52
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: bingham_fluid.h:76
BinghamFluid(IndexType NewId=0)
Default constuctor.
Definition: bingham_fluid.h:89
std::size_t IndexType
Definition: bingham_fluid.h:62
std::vector< std::size_t > EquationIdVectorType
Definition: bingham_fluid.h:66
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
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
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
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
int m
Definition: run_marine_rain_substepping.py:8
e
Definition: run_cpp_mpi_tests.py:31