1#ifndef POWERLAW_DEF_hpp
2#define POWERLAW_DEF_hpp
4#include "PowerLaw_decl.hpp"
8template <
class SC,
class LO,
class GO,
class NO>
14 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
15 powerlaw_constant_K = this->params_->sublist(
"Material").get(
"PowerLawParameter K",0.);
16 powerlaw_index_n = this->params_->sublist(
"Material").get(
"PowerLaw index n",1.);
17 nu_zero = this->params_->sublist(
"Material").get(
"Numerical_ZeroShearRateViscosity",1.);
18 nu_infty = this->params_->sublist(
"Material").get(
"Numerical_InftyShearRateViscosity",1.);
19 shear_rate_limitZero= this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate",1e-8);
29template <
class SC,
class LO,
class GO,
class NO>
33 viscosity = this->powerlaw_constant_K*std::pow(shearRate, this->powerlaw_index_n-1.0);
36 if (viscosity < nu_infty)
40 else if (std::abs(viscosity) > nu_zero)
46 this-> viscosity_ = viscosity;
50template <
class SC,
class LO,
class GO,
class NO>
57if ( std::abs(shearRate) <= shear_rate_limitZero)
59 shearRate = shear_rate_limitZero;
62res = (-2.0)*this->powerlaw_constant_K*(this->powerlaw_index_n-1.0)*std::pow(shearRate, this->powerlaw_index_n-3.0);
68template <
class SC,
class LO,
class GO,
class NO>
72 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
73 powerlaw_constant_K = this->params_->sublist(
"Material").get(
"PowerLawParameter K",0.);
74 powerlaw_index_n = this->params_->sublist(
"Material").get(
"PowerLaw index n",1.);
75 nu_zero = this->params_->sublist(
"Material").get(
"Numerical_ZeroShearRateViscosity",1.);
76 nu_infty = this->params_->sublist(
"Material").get(
"Numerical_InftyShearRateViscosity",1.);
77 shear_rate_limitZero= this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate",1e-8);
84template <
class SC,
class LO,
class GO,
class NO>
86 std::cout <<
"************************************************************ " <<std::endl;
87 std::cout <<
"-- Chosen material model ..." << this->shearThinningModel_ <<
" --- " <<std::endl;
88 std::cout <<
"-- Specified material parameters:" <<std::endl;
89 std::cout <<
"-- PowerLaw index n:" << this->powerlaw_index_n << std::endl;
90 std::cout <<
"-- PowerLaw constant K:" << this->powerlaw_constant_K <<std::endl;
91 std::cout <<
"************************************************************ " <<std::endl;
DifferentiableFuncClass(ParameterListPtr_Type parameters)
Definition DifferentiableFuncClass_def.hpp:10
PowerLaw(ParameterListPtr_Type parameters)
Constructor for CarreauYasuda.
Definition PowerLaw_def.hpp:9
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:30
void echoInformationMapping() override
Print parameter values used in model at runtime.
Definition PowerLaw_def.hpp:85
void setParams(ParameterListPtr_Type params) override
Each constitutive model includes different material parameters which will be specified in parametersP...
Definition PowerLaw_def.hpp:69
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:51
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement.cpp:5