oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM > Class Template Reference

#include <generalised_newtonian_constitutive_models.h>

+ Inheritance diagram for oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >:

Public Member Functions

 HerschelBulkleyBerEngRegConstitutiveEquation (double *yield_stress_pt, double *flow_index_pt, double *regularisation_parameter_pt)
 
double viscosity (const double &second_invariant_of_rate_of_strain_tensor)
 
double dviscosity_dinvariant (const double &second_invariant_of_rate_of_strain_tensor)
 
- Public Member Functions inherited from oomph::GeneralisedNewtonianConstitutiveEquation< DIM >
 GeneralisedNewtonianConstitutiveEquation ()
 Empty constructor. More...
 
virtual ~GeneralisedNewtonianConstitutiveEquation ()
 Empty virtual destructor. More...
 

Private Attributes

doubleYield_stress_pt
 yield stress tau_y More...
 
doubleFlow_index_pt
 power law index n More...
 
doubleRegularisation_parameter_pt
 regularisation parameter e << 1 More...
 

Detailed Description

template<unsigned DIM>
class oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >

A GeneralisedNewtonianConstitutiveEquation class defining a Herschel-Bulkley fluid using Bercovier and Engelman's (1980) regularisation

Constructor & Destructor Documentation

◆ HerschelBulkleyBerEngRegConstitutiveEquation()

template<unsigned DIM>
oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::HerschelBulkleyBerEngRegConstitutiveEquation ( double yield_stress_pt,
double flow_index_pt,
double regularisation_parameter_pt 
)
inline
170  : GeneralisedNewtonianConstitutiveEquation<DIM>(),
171  Yield_stress_pt(yield_stress_pt),
172  Flow_index_pt(flow_index_pt),
173  Regularisation_parameter_pt(regularisation_parameter_pt)
174  {
175  }
double * Yield_stress_pt
yield stress tau_y
Definition: generalised_newtonian_constitutive_models.h:156
double * Flow_index_pt
power law index n
Definition: generalised_newtonian_constitutive_models.h:159
double * Regularisation_parameter_pt
regularisation parameter e << 1
Definition: generalised_newtonian_constitutive_models.h:162

Member Function Documentation

◆ dviscosity_dinvariant()

template<unsigned DIM>
double oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::dviscosity_dinvariant ( const double second_invariant_of_rate_of_strain_tensor)
inlinevirtual

Function returning the derivative of the viscosity w.r.t. the second invariant of the rate of strain tensor For Newtonian behaviour this returns 0.0

Implements oomph::GeneralisedNewtonianConstitutiveEquation< DIM >.

200  {
201  // Pre-multiply the second invariant with +/-1 depending on whether it's
202  // positive or not
203  double sign = -1.0;
204  if (second_invariant_of_rate_of_strain_tensor >= 0.0)
205  {
206  sign = 1.0;
207  }
208 
209  // std::ostringstream error_stream;
210  // error_stream << "This has not been implemented yet!";
211  // throw OomphLibError(
212  // error_stream.str(),
213  // OOMPH_CURRENT_FUNCTION,
214  // OOMPH_EXCEPTION_LOCATION);
215 
216  return sign * pow(2.0, (*Flow_index_pt) - 2.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 +
224  3.0 / 2.0));
225  }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
T sign(T x)
Definition: cxx11_tensor_builtins_sycl.cpp:172

References oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Flow_index_pt, Eigen::bfloat16_impl::pow(), oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Regularisation_parameter_pt, and SYCL::sign().

◆ viscosity()

template<unsigned DIM>
double oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::viscosity ( const double second_invariant_of_rate_of_strain_tensor)
inlinevirtual

Function implementing the constitutive model Input: second invariant of the rate of strain Output: the viscosity For Newtonian behaviour this returns 1

Implements oomph::GeneralisedNewtonianConstitutiveEquation< DIM >.

178  {
179  // Pre-multiply the second invariant with +/-1 depending on whether it's
180  // positive or not
181  double sign = -1.0;
182  if (second_invariant_of_rate_of_strain_tensor >= 0.0)
183  {
184  sign = 1.0;
185  }
186 
187  // Calculate the square root of the absolute value of the
188  // second invariant of the rate of strain tensor
189  double measure_of_rate_of_strain =
190  sqrt(sign * second_invariant_of_rate_of_strain_tensor +
192 
193  return (*Yield_stress_pt) / (2.0 * measure_of_rate_of_strain) +
194  pow(2.0 * measure_of_rate_of_strain, *Flow_index_pt - 1.0);
195  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134

References oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Flow_index_pt, Eigen::bfloat16_impl::pow(), oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Regularisation_parameter_pt, SYCL::sign(), sqrt(), and oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Yield_stress_pt.

Member Data Documentation

◆ Flow_index_pt

◆ Regularisation_parameter_pt

◆ Yield_stress_pt

template<unsigned DIM>
double* oomph::HerschelBulkleyBerEngRegConstitutiveEquation< DIM >::Yield_stress_pt
private

The documentation for this class was generated from the following file: