1 #ifndef KRATOS_HERSCHEL_BULKLEY_FLUID_H
2 #define KRATOS_HERSCHEL_BULKLEY_FLUID_H
33 template<
class TBaseElement,
34 class TShapeFunctionValues =
typename TBaseElement::ShapeFunctionsType,
35 class TShapeFunctionGradients =
typename TBaseElement::ShapeFunctionDerivativesType >
100 TBaseElement(NewId, ThisNodes)
109 TBaseElement(NewId, pGeometry)
119 TBaseElement(NewId, pGeometry, pProperties)
146 PropertiesType::Pointer pProperties)
const override
148 return Kratos::make_intrusive<HerschelBulkleyFluid<TBaseElement> >(NewId, this->GetGeometry().Create(ThisNodes), pProperties);
159 GeometryType::Pointer pGeom,
160 PropertiesType::Pointer pProperties)
const override
162 return Kratos::make_intrusive< HerschelBulkleyFluid<TBaseElement> >(NewId,pGeom,pProperties);
180 std::string
Info()
const override
182 std::stringstream buffer;
183 buffer <<
"HerschelBulkleyFluid " ;
191 rOStream <<
"HerschelBulkleyFluid ";
192 TBaseElement::PrintInfo(rOStream);
196 void PrintData(std::ostream& rOStream)
const override {}
242 const TShapeFunctionValues &rN,
243 const TShapeFunctionGradients &rDN_DX,
247 double GammaDot = this->EquivalentStrainRate(rDN_DX);
249 double YieldStress = rProcessInfo[YIELD_STRESS];
250 double m = rProcessInfo[REGULARIZATION_COEFFICIENT];
251 double k = rProcessInfo[POWER_LAW_K];
252 double n = rProcessInfo[POWER_LAW_N];
254 double DynamicViscosity;
256 if (GammaDot > 1
e-12)
258 DynamicViscosity =
k*std::pow(GammaDot,
n-1);
259 double Regularization = 1.0 - std::exp(-
m*GammaDot);
260 DynamicViscosity += Regularization * YieldStress / GammaDot;
265 DynamicViscosity =
k;
268 return DynamicViscosity;
305 void save(
Serializer& rSerializer)
const override
362 template<
class TBaseElement >
370 template<
class TBaseElement >
375 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
Geometry base class.
Definition: geometry.h:71
Definition: herschel_bulkley_fluid.h:37
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: herschel_bulkley_fluid.h:189
Node NodeType
Node type (default is: Node)
Definition: herschel_bulkley_fluid.h:47
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: herschel_bulkley_fluid.h:157
std::size_t IndexType
Definition: herschel_bulkley_fluid.h:63
std::size_t SizeType
Definition: herschel_bulkley_fluid.h:65
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: herschel_bulkley_fluid.h:77
HerschelBulkleyFluid(IndexType NewId=0)
Default constuctor.
Definition: herschel_bulkley_fluid.h:90
HerschelBulkleyFluid(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: herschel_bulkley_fluid.h:108
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Create a new element of this type.
Definition: herschel_bulkley_fluid.h:144
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: herschel_bulkley_fluid.h:74
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: herschel_bulkley_fluid.h:69
Properties PropertiesType
Definition: herschel_bulkley_fluid.h:55
~HerschelBulkleyFluid() override
Destructor.
Definition: herschel_bulkley_fluid.h:123
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 Herschel-Bu...
Definition: herschel_bulkley_fluid.h:241
Vector VectorType
Vector type for local contributions to the linear system.
Definition: herschel_bulkley_fluid.h:58
HerschelBulkleyFluid(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constuctor using geometry and properties.
Definition: herschel_bulkley_fluid.h:118
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: herschel_bulkley_fluid.h:50
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(HerschelBulkleyFluid)
std::string Info() const override
Turn back information as a string.
Definition: herschel_bulkley_fluid.h:180
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: herschel_bulkley_fluid.h:53
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: herschel_bulkley_fluid.h:71
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: herschel_bulkley_fluid.h:80
std::vector< std::size_t > EquationIdVectorType
Definition: herschel_bulkley_fluid.h:67
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: herschel_bulkley_fluid.h:196
HerschelBulkleyFluid(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: herschel_bulkley_fluid.h:99
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: herschel_bulkley_fluid.h:61
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 n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int m
Definition: run_marine_rain_substepping.py:8
e
Definition: run_cpp_mpi_tests.py:31