1#ifndef POWERLAW_DEF_hpp
2#define POWERLAW_DEF_hpp
6template <
class SC,
class LO,
class GO,
class NO>
12 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
13 powerlaw_constant_K = this->params_->sublist(
"Material").get(
"PowerLawParameter K",0.);
14 powerlaw_index_n = this->params_->sublist(
"Material").get(
"PowerLaw index n",1.);
15 nu_zero = this->params_->sublist(
"Material").get(
"Numerical_ZeroShearRateViscosity",1.);
16 nu_infty = this->params_->sublist(
"Material").get(
"Numerical_InftyShearRateViscosity",1.);
17 shear_rate_limitZero= this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate",1e-8);
27template <
class SC,
class LO,
class GO,
class NO>
31 viscosity = this->powerlaw_constant_K*std::pow(shearRate, this->powerlaw_index_n-1.0);
34 if (viscosity < nu_infty)
38 else if (std::abs(viscosity) > nu_zero)
44 this-> viscosity_ = viscosity;
48template <
class SC,
class LO,
class GO,
class NO>
55if ( std::abs(shearRate) <= shear_rate_limitZero)
57 shearRate = shear_rate_limitZero;
60res = (-2.0)*this->powerlaw_constant_K*(this->powerlaw_index_n-1.0)*std::pow(shearRate, this->powerlaw_index_n-3.0);
66template <
class SC,
class LO,
class GO,
class NO>
70 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
71 powerlaw_constant_K = this->params_->sublist(
"Material").get(
"PowerLawParameter K",0.);
72 powerlaw_index_n = this->params_->sublist(
"Material").get(
"PowerLaw index n",1.);
73 nu_zero = this->params_->sublist(
"Material").get(
"Numerical_ZeroShearRateViscosity",1.);
74 nu_infty = this->params_->sublist(
"Material").get(
"Numerical_InftyShearRateViscosity",1.);
75 shear_rate_limitZero= this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate",1e-8);
82template <
class SC,
class LO,
class GO,
class NO>
84 std::cout <<
"************************************************************ " <<std::endl;
85 std::cout <<
"-- Chosen material model ..." << this->shearThinningModel_ <<
" --- " <<std::endl;
86 std::cout <<
"-- Specified material parameters:" <<std::endl;
87 std::cout <<
"-- PowerLaw index n:" << this->powerlaw_index_n << std::endl;
88 std::cout <<
"-- PowerLaw constant K:" << this->powerlaw_constant_K <<std::endl;
89 std::cout <<
"************************************************************ " <<std::endl;
DifferentiableFuncClass(ParameterListPtr_Type parameters)
Definition DifferentiableFuncClass_def.hpp:8
PowerLaw(ParameterListPtr_Type parameters)
Constructor for CarreauYasuda.
Definition PowerLaw_def.hpp:7
void evaluateMapping(ParameterListPtr_Type params, double shearRate, double &viscosity) override
Update the viscosity according to a chosen shear thinning generalized newtonian constitutive equation...
Definition PowerLaw_def.hpp:28
void echoInformationMapping() override
Print parameter values used in model at runtime.
Definition PowerLaw_def.hpp:83
void setParams(ParameterListPtr_Type params) override
Each constitutive model includes different material parameters which will be specified in parametersP...
Definition PowerLaw_def.hpp:67
void evaluateDerivative(ParameterListPtr_Type params, double shearRate, double &res) override
For Newton method and NOX we need additional term in Jacobian considering directional derivative of o...
Definition PowerLaw_def.hpp:49
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36