Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
Carreau Class Reference

#include <rheological_model.h>

Inheritance diagram for Carreau:
[legend]

Public Member Functions

 Carreau (const double p_kinematic_viscosity_0, const double p_kinematic_viscosity_inf, const double p_lambda, const double p_a, const double p_n)
double value (const std::map< field, double > &field_values) override
void vector_value (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
double jacobian (const std::map< field, double > &field_values, field id) override
void vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
double get_n () const override
void set_n (const double &p_n) override
double get_kinematic_viscosity () const override
double get_kinematic_viscosity_scale () const override
void set_kinematic_viscosity (const double &p_kinematic_viscosity) override
double get_dynamic_viscosity (const double &p_density_ref, const std::map< field, double > &field_values) const override
void get_dynamic_viscosity_vector (const double &p_density_ref, const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
Public Member Functions inherited from RheologicalModel
 RheologicalModel ()=default
virtual void set_dynamic_viscosity (const double &p_density_ref)
virtual double get_kinematic_viscosity_for_stabilization (const std::map< field, double > &field_values)
virtual void get_kinematic_viscosity_for_stabilization_vector (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)
virtual double get_dynamic_viscosity_for_stabilization (const double &p_density_ref, const std::map< field, double > &field_values)
virtual void get_dynamic_viscosity_for_stabilization_vector (const double &p_density_ref, const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)
bool is_non_newtonian_rheological_model () const
bool is_phase_change_rheological_model () const
Public Member Functions inherited from PhysicalPropertyModel
 PhysicalPropertyModel ()
virtual ~PhysicalPropertyModel ()=default
bool depends_on (const field &id)
void provide_simulation_control (std::shared_ptr< SimulationControl > &p_simulation_control)
double numerical_jacobian (const std::map< field, double > &field_values, const field id)
void vector_numerical_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)

Private Member Functions

double calculate_kinematic_viscosity (const double shear_rate_magnitude) const

Private Attributes

double kinematic_viscosity_0
double kinematic_viscosity_inf
double lambda
double a
double n

Additional Inherited Members

Public Types inherited from PhysicalPropertyModel
enum class  ComplexComponent : std::int8_t { real , imag }
Static Public Member Functions inherited from RheologicalModel
static std::shared_ptr< RheologicalModel > model_cast (const Parameters::Material &material_properties)
Protected Member Functions inherited from PhysicalPropertyModel
std::shared_ptr< SimulationControl > & get_simulation_control ()
Protected Attributes inherited from RheologicalModel
bool non_newtonian_rheological_model = false
bool phase_change_rheological_model = false
Protected Attributes inherited from PhysicalPropertyModel
std::map< field, bool > model_depends_on

Detailed Description

Definition at line 520 of file rheological_model.h.

Constructor & Destructor Documentation

◆ Carreau()

Carreau::Carreau ( const double p_kinematic_viscosity_0,
const double p_kinematic_viscosity_inf,
const double p_lambda,
const double p_a,
const double p_n )
inline

Parameter constructor.

Parameters
p_kinematic_viscosity_0
p_kinematic_viscosity_inf
p_lambda
p_a
p_n

Definition at line 532 of file rheological_model.h.

References a, kinematic_viscosity_0, kinematic_viscosity_inf, lambda, PhysicalPropertyModel::model_depends_on, n, RheologicalModel::non_newtonian_rheological_model, and shear_rate.

Member Function Documentation

◆ calculate_kinematic_viscosity()

double Carreau::calculate_kinematic_viscosity ( const double shear_rate_magnitude) const
inlineprivate

Definition at line 668 of file rheological_model.h.

References a, kinematic_viscosity_0, kinematic_viscosity_inf, lambda, and n.

◆ get_dynamic_viscosity()

double Carreau::get_dynamic_viscosity ( const double & p_density_ref,
const std::map< field, double > & field_values ) const
inlineoverridevirtual

Calculates the dynamic viscosity, if a kinematic viscosity and a reference density value is specified.

Parameters
p_density_refThe density of the fluid at the reference state
field_valuesValue of the various fields on which the property may depend.

Implements RheologicalModel.

Definition at line 633 of file rheological_model.h.

References calculate_kinematic_viscosity(), and shear_rate.

◆ get_dynamic_viscosity_vector()

void Carreau::get_dynamic_viscosity_vector ( const double & p_density_ref,
const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
inlineoverridevirtual

Calculates the vector values of the dynamic viscosity.

Parameters
p_density_refThe density of the fluid at the reference state
field_vectorsValues of the field on which the dynamic viscosity may depend on.
property_vector

Implements RheologicalModel.

Definition at line 651 of file rheological_model.h.

References calculate_kinematic_viscosity(), and shear_rate.

◆ get_kinematic_viscosity()

double Carreau::get_kinematic_viscosity ( ) const
inlineoverridevirtual

Returns the value of the kinematic viscosity, if the model has one.

Reimplemented from RheologicalModel.

Definition at line 613 of file rheological_model.h.

References kinematic_viscosity_0.

◆ get_kinematic_viscosity_scale()

double Carreau::get_kinematic_viscosity_scale ( ) const
inlineoverridevirtual

Returns the kinematic viscosity scale. This is used to get the kinematic viscosity scale in the problem when it's not constant. This is useful for weak boundary conditions.

Reimplemented from RheologicalModel.

Definition at line 619 of file rheological_model.h.

References a, kinematic_viscosity_0, kinematic_viscosity_inf, lambda, and n.

◆ get_n()

double Carreau::get_n ( ) const
inlineoverridevirtual

Returns the value of the n parameters of the model, if the model has one.

Reimplemented from RheologicalModel.

Definition at line 601 of file rheological_model.h.

References n.

◆ jacobian()

double Carreau::jacobian ( const std::map< field, double > & field_values,
field id )
overridevirtual

jacobian Calculates the jacobian (the partial derivative) of the viscosity with respect to a field

Parameters
field_valuesValue of the various fields on which the property may depend. The constant viscosity does not depend on anything
idIndicator of the field with respect to which the jacobian should be calculated
Returns
value of the partial derivative of the viscosity with respect to the field.

Implements PhysicalPropertyModel.

Definition at line 122 of file rheological_model.cc.

References PhysicalPropertyModel::numerical_jacobian(), and shear_rate.

◆ set_kinematic_viscosity()

void Carreau::set_kinematic_viscosity ( const double & p_kinematic_viscosity)
inlineoverridevirtual

Sets a new kinematic viscosity value, if the models has one.

Parameters
p_kinematic_viscosityThe kinematic viscosity value

Reimplemented from RheologicalModel.

Definition at line 627 of file rheological_model.h.

References kinematic_viscosity_0.

◆ set_n()

void Carreau::set_n ( const double & )
inlineoverridevirtual

Sets a new value to the n parameter, if the models has one.

Reimplemented from RheologicalModel.

Definition at line 607 of file rheological_model.h.

References n.

◆ value()

double Carreau::value ( const std::map< field, double > & field_values)
overridevirtual

Returns the non-Newtonian viscosity.

Parameters
field_valuesThe values of the field on which the viscosity may depend on. For this model, it only depends on the magnitude of the shear rate tensor.

Source : Morrison, F. A. (2001). No Memory: Generalized Newtonian Fluids. Understanding Rheology. Raymond F. Boyer Library Collection, Oxford University Press.

Implements PhysicalPropertyModel.

Definition at line 97 of file rheological_model.cc.

References calculate_kinematic_viscosity(), and shear_rate.

◆ vector_jacobian()

void Carreau::vector_jacobian ( const std::map< field, std::vector< double > > & field_vectors,
const field id,
std::vector< double > & jacobian_vector )
overridevirtual

vector_jacobian Calculate the derivative of the with respect to a field

Parameters
field_vectorsVector for the values of the fields used to evaluate the property
idIdentifier of the field with respect to which a derivative should be calculated
jacobian_vectorVector of the value of the derivative of the viscosity with respect to the field id

Implements PhysicalPropertyModel.

Definition at line 135 of file rheological_model.cc.

References shear_rate, and PhysicalPropertyModel::vector_numerical_jacobian().

◆ vector_value()

void Carreau::vector_value ( const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
overridevirtual

vector_value Calculates the vector values of the viscosity.

Parameters
field_vectorsValues of the field on which the viscosity may depend on. The power-law viscosity depends on the shear rate.
property_vector

Implements PhysicalPropertyModel.

Definition at line 107 of file rheological_model.cc.

References calculate_kinematic_viscosity(), and shear_rate.

Member Data Documentation

◆ a

double Carreau::a
private

Definition at line 679 of file rheological_model.h.

◆ kinematic_viscosity_0

double Carreau::kinematic_viscosity_0
private

Definition at line 676 of file rheological_model.h.

◆ kinematic_viscosity_inf

double Carreau::kinematic_viscosity_inf
private

Definition at line 677 of file rheological_model.h.

◆ lambda

double Carreau::lambda
private

Definition at line 678 of file rheological_model.h.

◆ n

double Carreau::n
private

Definition at line 680 of file rheological_model.h.


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