1#ifndef CARREAUYASUDA_DEF_hpp
2#define CARREAUYASUDA_DEF_hpp
7 template <
class SC,
class LO,
class GO,
class NO>
10 this->params_ = params;
12 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
13 characteristicTime = this->params_->sublist(
"Material").get(
"CharacteristicTime_Lambda", 0.);
14 fluid_index_n = this->params_->sublist(
"Material").get(
"FluidIndex_n", 1.);
15 nu_0 = this->params_->sublist(
"Material").get(
"ZeroShearRateViscosity_eta0", 0.);
16 nu_infty = this->params_->sublist(
"Material").get(
"InftyShearRateViscosity_etaInfty", 0.);
17 inflectionPoint = this->params_->sublist(
"Material").get(
"InflectionPoint_a", 1.);
18 shear_rate_limitZero = this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate", 1e-8);
23 template <
class SC,
class LO,
class GO,
class NO>
27 viscosity = this->nu_infty + (this->nu_0 - this->nu_infty) * (std::pow(1.0 + std::pow(this->characteristicTime * shearRate, this->inflectionPoint), (this->fluid_index_n - 1.0) / this->inflectionPoint));
28 this->viscosity_ = viscosity;
37 template <
class SC,
class LO,
class GO,
class NO>
41 if (std::abs(this->inflectionPoint - 2.0) < std::numeric_limits<double>::epsilon())
44 res = (-2.0) * (this->nu_0 - this->nu_infty) * (this->fluid_index_n - 1.0) * std::pow(this->characteristicTime, this->inflectionPoint) * std::pow(1.0 + std::pow(this->characteristicTime * shearRate, this->inflectionPoint), ((this->fluid_index_n - 1.0 - this->inflectionPoint) / this->inflectionPoint));
48 if (std::abs(shearRate) <= shear_rate_limitZero)
50 shearRate = shear_rate_limitZero;
52 res = (-2.0) * (this->nu_0 - this->nu_infty) * (this->fluid_index_n - 1.0) * std::pow(this->characteristicTime, this->inflectionPoint) * std::pow(shearRate, this->inflectionPoint - 2.0) * std::pow(1.0 + std::pow(this->characteristicTime * shearRate, this->inflectionPoint), ((this->fluid_index_n - 1.0 - this->inflectionPoint) / this->inflectionPoint));
56 template <
class SC,
class LO,
class GO,
class NO>
59 this->params_ = params;
61 shearThinningModel_ = this->params_->sublist(
"Material").get(
"ShearThinningModel",
"");
62 characteristicTime = this->params_->sublist(
"Material").get(
"CharacteristicTime_Lambda", 0.);
63 fluid_index_n = this->params_->sublist(
"Material").get(
"FluidIndex_n", 1.);
64 nu_0 = this->params_->sublist(
"Material").get(
"ZeroShearRateViscosity_eta0", 0.);
65 nu_infty = this->params_->sublist(
"Material").get(
"InftyShearRateViscosity_etaInfty", 0.);
66 inflectionPoint = this->params_->sublist(
"Material").get(
"InflectionPoint_a", 1.);
67 shear_rate_limitZero = this->params_->sublist(
"Material").get(
"Numerical_ZeroValue_ShearRate", 1e-8);
70 template <
class SC,
class LO,
class GO,
class NO>
73 std::cout <<
"************************************************************ " << std::endl;
74 std::cout <<
"-- Chosen material model ..." << this->shearThinningModel_ <<
" --- " << std::endl;
75 std::cout <<
"-- Specified material parameters:" << std::endl;
76 std::cout <<
"-- eta_0:" << this->nu_0 << std::endl;
77 std::cout <<
"-- eta_Infty:" << this->nu_infty << std::endl;
78 std::cout <<
"-- Fluid index n:" << this->fluid_index_n << std::endl;
79 std::cout <<
"-- Inflection point a:" << this->inflectionPoint << std::endl;
80 std::cout <<
"-- Characteristic time lambda:" << this->characteristicTime << std::endl;
81 std::cout <<
"************************************************************ " << std::endl;
CarreauYasuda(ParameterListPtr_Type parameters)
Constructor for CarreauYasuda.
Definition CarreauYasuda_def.hpp:8
void evaluateMapping(ParameterListPtr_Type params, double shearRate, double &viscosity) override
Update the viscosity according to a chosen shear thinning generalized newtonian constitutive equation...
Definition CarreauYasuda_def.hpp:24
void setParams(ParameterListPtr_Type params) override
Each constitutive model includes different material parameters which will be specified in parametersP...
Definition CarreauYasuda_def.hpp:57
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 CarreauYasuda_def.hpp:38
void echoInformationMapping() override
Print parameter values used in model at runtime.
Definition CarreauYasuda_def.hpp:71
DifferentiableFuncClass(ParameterListPtr_Type parameters)
Definition DifferentiableFuncClass_def.hpp:8
Adaptive Mesh Refinement.
Definition AdaptiveMeshRefinement_decl.hpp:36