28 #ifndef OOMPH_GENERALISED_NEWTONIAN_CONSTITUTIVE_MODELS_HEADER
29 #define OOMPH_GENERALISED_NEWTONIAN_CONSTITUTIVE_MODELS_HEADER
40 template<
unsigned DIM>
56 const double& second_invariant_of_rate_of_strain_tensor) = 0;
62 const double& second_invariant_of_rate_of_strain_tensor) = 0;
69 template<
unsigned DIM>
81 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
88 const double& second_invariant_of_rate_of_strain_tensor)
104 template<
unsigned DIM>
124 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
129 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
136 double measure_of_rate_of_strain =
137 sqrt(sign * second_invariant_of_rate_of_strain_tensor);
150 template<
unsigned DIM>
167 double* yield_stress_pt,
168 double* flow_index_pt,
169 double* regularisation_parameter_pt)
177 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
182 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
189 double measure_of_rate_of_strain =
190 sqrt(sign * second_invariant_of_rate_of_strain_tensor +
199 const double& second_invariant_of_rate_of_strain_tensor)
204 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
217 ((*Flow_index_pt) - 1.0) *
218 pow(sign * second_invariant_of_rate_of_strain_tensor +
220 ((*Flow_index_pt) - 1.0) / 2.0 - 1.0) -
221 sign * (*Yield_stress_pt) /
222 (4.0 * pow(sign * second_invariant_of_rate_of_strain_tensor +
233 template<
unsigned DIM>
251 double* yield_stress_pt,
252 double* flow_index_pt,
253 double* critical_second_invariant_pt)
263 oomph_info <<
"HerschelBulkleyTanMilRegConstitutiveEquation: "
264 <<
" cutoff viscosity = " << cut_off_viscosity << std::endl;
282 double& cut_off_viscosity)
290 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
295 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
304 if (sign * second_invariant_of_rate_of_strain_tensor <
313 double measure_of_rate_of_strain =
314 sqrt(sign * second_invariant_of_rate_of_strain_tensor);
317 pow((2.0 * measure_of_rate_of_strain), *
Flow_index_pt - 1.0);
323 const double& second_invariant_of_rate_of_strain_tensor)
328 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
333 if (sign * second_invariant_of_rate_of_strain_tensor <
341 ((*Flow_index_pt) - 1.0) *
342 pow(sign * second_invariant_of_rate_of_strain_tensor,
345 (4.0 * pow(sign * second_invariant_of_rate_of_strain_tensor,
357 template<
unsigned DIM>
389 double* yield_stress_pt,
390 double* flow_index_pt,
391 double* critical_second_invariant_pt)
413 c = (*Yield_stress_pt) /
427 oomph_info <<
"HerschelBulkleyTanMilRegWithBlendingConstitutiveEquation: "
428 <<
" zero shear viscosity = " << zero_shear_viscosity
431 oomph_info <<
"HerschelBulkleyTanMilRegWithBlendingConstitutiveEquation: "
432 <<
" cut off viscosity = " << cut_off_viscosity << std::endl;
458 return std::max(
a * pow(
alpha, 2.0) *
466 double& cut_off_viscosity,
467 double& zero_shear_viscosity)
475 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
477 if (fabs(second_invariant_of_rate_of_strain_tensor) <
482 else if (fabs(second_invariant_of_rate_of_strain_tensor) <
485 return a * pow(fabs(second_invariant_of_rate_of_strain_tensor), 2.0) +
486 b * fabs(second_invariant_of_rate_of_strain_tensor) +
c;
490 (2.0 * sqrt(fabs(second_invariant_of_rate_of_strain_tensor))) +
491 pow(2.0 * sqrt(fabs(second_invariant_of_rate_of_strain_tensor)),
497 const double& second_invariant_of_rate_of_strain_tensor)
499 if (fabs(second_invariant_of_rate_of_strain_tensor) <
504 else if (fabs(second_invariant_of_rate_of_strain_tensor) <
507 return 2.0 *
a * fabs(second_invariant_of_rate_of_strain_tensor) +
b;
511 pow(fabs(second_invariant_of_rate_of_strain_tensor),
514 (4.0 * pow(fabs(second_invariant_of_rate_of_strain_tensor),
525 template<
unsigned DIM>
542 double* flow_index_pt,
543 double* exponential_parameter_pt)
551 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
554 double measure_of_rate_of_strain =
555 sqrt(std::fabs(second_invariant_of_rate_of_strain_tensor));
558 measure_of_rate_of_strain)) /
561 measure_of_rate_of_strain)) /
562 (2.0 * measure_of_rate_of_strain) *
572 template<
unsigned DIM>
589 double* yield_stress_pt,
590 double* flow_index_pt,
591 double* zero_shear_viscosity_pt)
600 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
608 if (second_invariant_of_rate_of_strain_tensor == 0.0)
613 else if (second_invariant_of_rate_of_strain_tensor > 0.0)
620 double measure_of_rate_of_strain =
621 sqrt(sign * (second_invariant_of_rate_of_strain_tensor +
eps));
625 ((*Yield_stress_pt) / (2.0 * measure_of_rate_of_strain) +
626 pow((2.0 * measure_of_rate_of_strain), *
Flow_index_pt - 1.0));
631 const double& second_invariant_of_rate_of_strain_tensor)
639 if (second_invariant_of_rate_of_strain_tensor == 0.0)
644 else if (second_invariant_of_rate_of_strain_tensor > 0.0)
651 double measure_of_rate_of_strain =
652 sqrt(sign * (second_invariant_of_rate_of_strain_tensor +
eps));
657 ((*Flow_index_pt) - 1.0) *
658 pow(sign * (second_invariant_of_rate_of_strain_tensor +
eps),
659 ((*Flow_index_pt) - 1.0) / 2.0 - 1.0) -
660 sign * (*Yield_stress_pt) /
662 pow(sign * (second_invariant_of_rate_of_strain_tensor +
eps),
665 (((*Zero_shear_viscosity_pt) *
670 pow(sign * (second_invariant_of_rate_of_strain_tensor +
eps),
672 (*Yield_stress_pt) / (2.0 * measure_of_rate_of_strain));
682 template<
unsigned DIM>
702 double* flow_index_pt,
703 double* critical_second_invariant_pt)
715 oomph_info <<
"SiskoTanMilRegWithBlendingConstitutiveEquation: "
716 <<
" zero shear viscosity = " << zero_shear_viscosity
719 oomph_info <<
"SiskoTanMilRegWithBlendingConstitutiveEquation: "
720 <<
" cut off viscosity = " << cut_off_viscosity << std::endl;
743 return cut_off_viscosity / 5.0;
757 return cut_off_viscosity + epsilon;
762 double& cut_off_viscosity,
763 double& zero_shear_viscosity)
784 (8.0 * (Cut_off_viscosity + epsilon - 1.0) *
796 (-12.0 * (Cut_off_viscosity + epsilon - 1.0) *
807 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
820 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
827 if (sign * second_invariant_of_rate_of_strain_tensor <
830 return a * pow(sign * second_invariant_of_rate_of_strain_tensor, 3.0) +
831 b * pow(sign * second_invariant_of_rate_of_strain_tensor, 2.0) +
832 zero_shear_viscosity;
838 double measure_of_rate_of_strain =
839 sqrt(sign * second_invariant_of_rate_of_strain_tensor);
841 return 1.0 + (*Alpha_pt) * pow((2.0 * measure_of_rate_of_strain),
848 const double& second_invariant_of_rate_of_strain_tensor)
859 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
864 if (sign * second_invariant_of_rate_of_strain_tensor <
867 return sign * 3.0 * a *
868 pow(sign * second_invariant_of_rate_of_strain_tensor, 2.0) +
869 2.0 * b * second_invariant_of_rate_of_strain_tensor;
874 ((*Flow_index_pt) - 1.0) *
875 second_invariant_of_rate_of_strain_tensor *
876 pow(sign * second_invariant_of_rate_of_strain_tensor,
888 template<
unsigned DIM>
904 double* yield_stress_pt,
double* critical_second_invariant_pt)
915 oomph_info <<
"CassonTanMilRegWithBlendingConstitutiveEquation: "
916 <<
" zero shear viscosity = " << zero_shear_viscosity
919 oomph_info <<
"CassonTanMilRegWithBlendingConstitutiveEquation: "
920 <<
" cut off viscosity = " << cut_off_viscosity << std::endl;
944 return cut_off_viscosity / 5.0;
958 return cut_off_viscosity + epsilon;
963 double& cut_off_viscosity,
964 double& zero_shear_viscosity)
983 (2.0 * (Cut_off_viscosity + epsilon) -
994 (-3.0 * (Cut_off_viscosity + epsilon) +
1006 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
1019 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
1026 if (sign * second_invariant_of_rate_of_strain_tensor <
1029 return a * pow(sign * second_invariant_of_rate_of_strain_tensor, 3.0) +
1030 b * pow(sign * second_invariant_of_rate_of_strain_tensor, 2.0) +
1031 zero_shear_viscosity;
1037 double measure_of_rate_of_strain =
1038 sqrt(sign * second_invariant_of_rate_of_strain_tensor);
1049 const double& second_invariant_of_rate_of_strain_tensor)
1060 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
1065 if (sign * second_invariant_of_rate_of_strain_tensor <
1068 return sign * 3.0 * a *
1069 pow(sign * second_invariant_of_rate_of_strain_tensor, 2.0) +
1070 2.0 * b * second_invariant_of_rate_of_strain_tensor;
1075 second_invariant_of_rate_of_strain_tensor /
1077 pow(sign * second_invariant_of_rate_of_strain_tensor,
1080 (4.0 * pow(sign * second_invariant_of_rate_of_strain_tensor,
1090 template<
unsigned DIM>
1116 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
1119 ((*Mu_0_pt) - (*Mu_inf_pt)) *
1120 exp(-(*
Alpha_pt) * second_invariant_of_rate_of_strain_tensor);
1124 const double& second_invariant_of_rate_of_strain_tensor)
1135 return (*
Alpha_pt) * ((*Mu_inf_pt) - (*Mu_0_pt)) *
1136 exp(-(*
Alpha_pt) * second_invariant_of_rate_of_strain_tensor);
1144 template<
unsigned DIM>
1167 double* critical_second_invariant_pt)
1176 double viscosity(
const double& second_invariant_of_rate_of_strain_tensor)
1181 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
1188 sign * second_invariant_of_rate_of_strain_tensor) *
1190 ((*Mu_0_pt) - (*Mu_inf_pt)) / 2.0 + (*
Mu_0_pt);
1194 const double& second_invariant_of_rate_of_strain_tensor)
1199 if (second_invariant_of_rate_of_strain_tensor >= 0.0)
1204 return -sign * ((*Mu_0_pt) - (*Mu_inf_pt)) * 10.0 /
1207 sign * second_invariant_of_rate_of_strain_tensor) *
1211 sign * second_invariant_of_rate_of_strain_tensor) *
A GeneralisedNewtonianConstitutiveEquation class defining a Casson model fluid using Tanner and Milth...
double * Yield_stress_pt
Yield stress.
double calculate_cutoff_viscosity()
Function that calculates the viscosity at the cutoff invariant Note: this is NOT the viscosity at zer...
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Viscosity ratio as a fct of strain rate invariant.
CassonTanMilRegWithBlendingConstitutiveEquation(double *yield_stress_pt, double *critical_second_invariant_pt)
"Cutoff regularised" Casson constitutive equation
void report_cut_off_values(double &cut_off_invariant, double &cut_off_viscosity, double &zero_shear_viscosity)
Report cutoff values.
void calculate_fitting_parameters_of_cubic(double &a, double &b)
double * Critical_second_invariant_pt
value of the second invariant below which we have constant (Newtonian) viscosity – assumed to be alwa...
double calculate_zero_shear_viscosity()
Function that calculates the viscosity at zero I2.
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Deriv of viscosity w.r.t. strain rate invariant.
double calculate_viscosity_offset_at_zero_shear(double &cut_off_viscosity)
Offset by how much the zero shear rate viscosity lies above the viscosity at I2_cutoff Hard-coded to ...
A Base class defining the generalise Newtonian constitutive relation.
virtual double viscosity(const double &second_invariant_of_rate_of_strain_tensor)=0
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
GeneralisedNewtonianConstitutiveEquation()
Empty constructor.
virtual double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)=0
Function returning the derivative of the viscosity w.r.t. the second invariant of the rate of strain ...
virtual ~GeneralisedNewtonianConstitutiveEquation()
Empty virtual destructor.
A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Bercovier an...
double * Yield_stress_pt
yield stress tau_y
HerschelBulkleyBerEngRegConstitutiveEquation(double *yield_stress_pt, double *flow_index_pt, double *regularisation_parameter_pt)
double * Flow_index_pt
power law index n
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
double * Regularisation_parameter_pt
regularisation parameter e << 1
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Function returning the derivative of the viscosity w.r.t. the second invariant of the rate of strain ...
A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Mendes and D...
HerschelBulkleyMenDutRegConstitutiveEquation(double *yield_stress_pt, double *flow_index_pt, double *zero_shear_viscosity_pt)
"Exponentially regularised" Herschel Bulkley constitutive equation
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Deriv of viscosity w.r.t. strain rate invariant.
double * Yield_stress_pt
yield stress tau_y
double * Zero_shear_viscosity_pt
the viscosity at zero shear rate
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Viscosity ratio as a fct of strain rate invariant.
double * Flow_index_pt
power law index n
A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Papanastasio...
HerschelBulkleyPapRegConstitutiveEquation(double *yield_stress_pt, double *flow_index_pt, double *exponential_parameter_pt)
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
double * Flow_index_pt
Power law index n.
double * Exponential_parameter_pt
Regularisation parameter m >> 1.
double * Yield_stress_pt
Yield stress tau_y.
A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Tanner and M...
void report_cut_off_values(double &cut_off_invariant, double &cut_off_viscosity)
Report cutoff values.
double calculate_cut_off_viscosity()
Function that calculates the cut off viscosity.
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Deriv of viscosity w.r.t. strain rate invariant.
HerschelBulkleyTanMilRegConstitutiveEquation(double *yield_stress_pt, double *flow_index_pt, double *critical_second_invariant_pt)
"Cutoff regularised" Herschel Bulkley constitutive equation
double * Yield_stress_pt
yield stress tau_y
double * Critical_second_invariant_pt
value of the second invariant below which we have constant (Newtonian) viscosity – assumed to be alwa...
double * Flow_index_pt
power law index n
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Viscosity ratio as a fct of strain rate invariant.
A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Tanner and M...
HerschelBulkleyTanMilRegWithBlendingConstitutiveEquation(double *yield_stress_pt, double *flow_index_pt, double *critical_second_invariant_pt)
"Cutoff regularised" Herschel Bulkley constitutive equation
double * Flow_index_pt
power law index n
double * Critical_second_invariant_pt
value of the second invariant below which we have constant (Newtonian) viscosity – assumed to be alwa...
double calculate_cutoff_viscosity()
Function that calculates the viscosity at the cutoff invariant Note: this is NOT the viscosity at zer...
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Deriv of viscosity w.r.t. strain rate invariant.
double a
We use a quadratic function to smoothly blend from the Herschel Bulkley model at the cut-off to a con...
double alpha
Fraction of the cut-off strain rate below which the viscosity is constant 0 <= \alpha < 1.
void report_cut_off_values(double &cut_off_invariant, double &cut_off_viscosity, double &zero_shear_viscosity)
Report cutoff values.
double calculate_zero_shear_viscosity()
Function that calculates the viscosity at zero I2.
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Viscosity ratio as a fct of strain rate invariant.
double * Yield_stress_pt
yield stress tau_y
A GeneralisedNewtonianConstitutiveEquation class defining a Newtonian fluid.
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
in the Newtonian case the viscosity is constant
double Viscosity_ratio
Viscosity ratio.
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
the derivative w.r.t. I2 is zero
NewtonianConstitutiveEquation(const double &viscosity_ratio=1.0)
Constructor: specify viscosity ratio (defaults to one)
A GeneralisedNewtonianConstitutiveEquation class defining an arbitrary shear-thinning fluid.
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Function returning the derivative of the viscosity w.r.t. the second invariant of the rate of strain ...
double * Mu_0_pt
zero shear rate viscosity
NicosConstitutiveEquation(double *mu_inf_pt, double *mu_0_pt, double *alpha_pt)
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
double * Alpha_pt
parameter that controls the steepness of the curve
double * Mu_inf_pt
high shear rate viscosity
A GeneralisedNewtonianConstitutiveEquation class defining a power-law fluid regularised according to ...
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
double * Power_pt
power law index n
PowerLawBerEngRegConstitutiveEquation(double *power_pt, double *reg_par_pt)
double * Regularisation_parameter_pt
regularisation parameter e << 1
A GeneralisedNewtonianConstitutiveEquation class defining a Sisko fluid using Tanner and Milthorpe's ...
void calculate_fitting_parameters_of_cubic(double &a, double &b)
double * Flow_index_pt
power law index n
SiskoTanMilRegWithBlendingConstitutiveEquation(double *alpha_pt, double *flow_index_pt, double *critical_second_invariant_pt)
"Cutoff regularised" Sisko constitutive equation
double * Alpha_pt
pre-factor alpha
double calculate_viscosity_offset_at_zero_shear(double &cut_off_viscosity)
Offset by how much the zero shear rate viscosity lies above the viscosity at I2_cutoff Hard-coded to ...
double calculate_zero_shear_viscosity()
Function that calculates the viscosity at zero I2.
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Deriv of viscosity w.r.t. strain rate invariant.
double * Critical_second_invariant_pt
value of the second invariant below which we have constant (Newtonian) viscosity – assumed to be alwa...
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Viscosity ratio as a fct of strain rate invariant.
void report_cut_off_values(double &cut_off_invariant, double &cut_off_viscosity, double &zero_shear_viscosity)
Report cutoff values.
double calculate_cutoff_viscosity()
Function that calculates the viscosity at the cutoff invariant Note: this is NOT the viscosity at zer...
A GeneralisedNewtonianConstitutiveEquation class defining a fluid following a tanh-profile.
TanhProfileConstitutiveEquation(double *mu_inf_pt, double *mu_0_pt, double *alpha_pt, double *critical_second_invariant_pt)
double * Mu_inf_pt
high shear rate viscosity
double dviscosity_dinvariant(const double &second_invariant_of_rate_of_strain_tensor)
Function returning the derivative of the viscosity w.r.t. the second invariant of the rate of strain ...
double * Mu_0_pt
zero shear rate viscosity
double * Alpha_pt
parameter controlling the steepness of the step nb – I used 10.0/(*Critical_second_invariant_pt)
double viscosity(const double &second_invariant_of_rate_of_strain_tensor)
Function implementing the constitutive model Input: second invariant of the rate of strain Output: th...
double * Critical_second_invariant_pt
parameter that controls the location of the step – assumed to be always positive
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...