6std::shared_ptr<RheologicalModel>
14 return std::make_shared<PowerLaw>(
21 return std::make_shared<Carreau>(
32 return std::make_shared<PhaseChangeRheology>(
46 PhysicialPropertyModelFieldUndefined(
"PowerLaw",
"shear_rate"));
54 const std::map<
field, std::vector<double>> &field_vectors,
55 std::vector<double> &property_vector)
58 PhysicialPropertyModelFieldUndefined(
"PowerLaw",
"shear_rate"));
61 for (
unsigned int i = 0; i < shear_rate_magnitude.size(); ++i)
72 PhysicialPropertyModelFieldUndefined(
"PowerLaw",
"shear_rate"));
81 const std::map<
field, std::vector<double>> &field_vectors,
83 std::vector<double> &jacobian_vector)
86 PhysicialPropertyModelFieldUndefined(
"PowerLaw",
"shear_rate"));
90 for (
unsigned int i = 0; i < shear_rate_magnitude.size(); ++i)
93 std::ranges::fill(jacobian_vector, 0);
100 PhysicialPropertyModelFieldUndefined(
"Carreau",
"shear_rate"));
108 std::vector<double> &property_vector)
111 PhysicialPropertyModelFieldUndefined(
"Carreau",
"shear_rate"));
114 for (
unsigned int i = 0; i < shear_rate_magnitude.size(); ++i)
127 PhysicialPropertyModelFieldUndefined(
"Carreau",
"shear_rate"));
136 const std::map<
field, std::vector<double>> &field_vectors,
138 std::vector<double> &jacobian_vector)
143 PhysicialPropertyModelFieldUndefined(
"Carreau",
"shear_rate"));
149 std::ranges::fill(jacobian_vector, 0);
158 PhysicialPropertyModelFieldUndefined(
"PhaseChangeRheology",
167 const std::map<
field, std::vector<double>> &field_vectors,
168 std::vector<double> &property_vector)
171 PhysicialPropertyModelFieldUndefined(
"PhaseChangeRheology",
173 const std::vector<double> &temperature_vec =
176 for (
unsigned int i = 0; i < temperature_vec.size(); ++i)
189 PhysicialPropertyModelFieldUndefined(
"PhaseChangeRheology",
199 const std::map<
field, std::vector<double>> &field_vectors,
201 std::vector<double> &jacobian_vector)
204 PhysicialPropertyModelFieldUndefined(
"PhaseChangeRheology",
216 [[maybe_unused]]
const std::map<field, double> &field_values)
218 return param.kinematic_viscosity_l;
229 [[maybe_unused]]
const std::map<
field, std::vector<double>> &field_vectors,
230 std::vector<double> &property_vector)
232 std::ranges::fill(property_vector,
param.kinematic_viscosity_l);
243 const double &p_density_ref,
244 [[maybe_unused]]
const std::map<field, double> &field_values)
246 return param.kinematic_viscosity_l * p_density_ref;
258 const double &p_density_ref,
259 [[maybe_unused]]
const std::map<
field, std::vector<double>> &field_vectors,
260 std::vector<double> &property_vector)
262 std::ranges::fill(property_vector,
263 param.kinematic_viscosity_l * p_density_ref);
void vector_jacobian(const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
vector_jacobian Calculate the derivative of the with respect to a field
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector values of the viscosity.
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the viscosity with respect to a field
double value(const std::map< field, double > &field_values) override
Returns the non-Newtonian viscosity.
double calculate_kinematic_viscosity(const double shear_rate_magnitude) const
double value(const std::map< field, double > &field_values) override
Returns the kinematic viscosity.
double kinematic_viscosity
Material - Class that defines the physical property of a material. Generally a material will be a flu...
enum Parameters::Material::RheologicalModel rheological_model
PhaseChange phase_change_parameters
double kinematic_viscosity
NonNewtonian non_newtonian_parameters
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the kinematic viscosity with respect to ...
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) override
Calculates the vector values of the dynamic viscosity used in PSPG and SUPG stabilization terms.
Parameters::PhaseChange param
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector values of the kinematic viscosity.
double kinematic_viscosity(const double T) const
kinematic_viscosity Calculates the kinematic viscosity from the temperature using the liquid fraction
double get_kinematic_viscosity_for_stabilization(const std::map< field, double > &field_values) override
Calculates the kinematic viscosity used in PSPG and SUPG stabilization terms.
void vector_jacobian(const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
vector_jacobian Calculate the derivative of the with respect to a field
void get_kinematic_viscosity_for_stabilization_vector(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
Calculates the vector values of the kinematic viscosity used in PSPG and SUPG stabilization terms.
virtual double get_dynamic_viscosity_for_stabilization(const double &p_density_ref, const std::map< field, double > &field_values) override
Calculates the dynamic viscosity used in PSPG and SUPG stabilization terms.
double value(const std::map< field, double > &field_values) override
Returns the kinematic viscosity.
void vector_numerical_jacobian(const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)
vector_numerical_jacobian Calculates the vector of jacobian through forward finite difference (Euler)...
double numerical_jacobian(const std::map< field, double > &field_values, const field id)
numerical_jacobian Calculates the jacobian through a forward finite difference (Euler) approximation....
double calculate_kinematic_viscosity(const double shear_rate_magnitude) const
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector values of the kinematic viscosity.
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the kinematic viscosity with respect to ...
double calculate_derivative(const double shear_rate_magnitude) const
double value(const std::map< field, double > &field_values) override
Returns the non-Newtonian kinematic viscosity.
void vector_jacobian(const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
vector_jacobian Calculate the derivative of the with respect to a field
static std::shared_ptr< RheologicalModel > model_cast(const Parameters::Material &material_properties)
Instantiates and returns a pointer to a RheologicalModel object by casting it to the proper child cla...
@ temperature
Temperature scalar field from heat transfer.
double kinematic_viscosity_inf
double kinematic_viscosity_0
PowerLawParameters powerlaw_parameters
CarreauParameters carreau_parameters