4#ifndef lethe_thermal_conductivity_model_h
5#define lethe_thermal_conductivity_model_h
27 static std::shared_ptr<ThermalConductivityModel>
51 value(
const std::map<field, double> & )
override
63 std::vector<double> &property_vector)
override
92 const std::map<
field, std::vector<double>> & ,
94 std::vector<double> &jacobian_vector)
override
96 std::ranges::fill(jacobian_vector, 0);
126 value(
const std::map<field, double> &fields_value)
override
129 PhysicialPropertyModelFieldUndefined(
"ThermalConductivityLinear",
141 std::vector<double> &property_vector)
override
144 PhysicialPropertyModelFieldUndefined(
"ThermalConductivityLinear",
147 for (
unsigned int i = 0; i < property_vector.size(); ++i)
148 property_vector[i] =
A +
B * T[i];
175 const std::map<
field, std::vector<double>> & ,
177 std::vector<double> &jacobian_vector)
override
179 std::ranges::fill(jacobian_vector,
B);
213 value(
const std::map<field, double> &fields_value)
override
216 PhysicialPropertyModelFieldUndefined(
217 "ThermalConductivityPhaseChange",
"temperature"));
218 double thermal_conductivity;
228 const double l_frac =
236 return thermal_conductivity;
246 std::vector<double> &property_vector)
override
249 PhysicialPropertyModelFieldUndefined(
250 "ThermalConductivityPhaseChange",
"temperature"));
252 for (
unsigned int i = 0; i < property_vector.size(); ++i)
262 const double l_frac =
285 PhysicialPropertyModelFieldUndefined(
286 "ThermalConductivityPhaseChange",
"temperature"));
303 std::vector<double> &jacobian_vector)
override
306 PhysicialPropertyModelFieldUndefined(
307 "ThermalConductivityPhaseChange",
"temperature"));
const double thermal_conductivity
double jacobian(const std::map< field, double > &, field) override
jacobian Calculates the jacobian (the partial derivative) of the thermal conductivity with respect to...
void vector_value(const std::map< field, std::vector< double > > &, std::vector< double > &property_vector) override
vector_value Calculates the vector value of thermal conductivities
ConstantThermalConductivity(const double p_thermal_conductivity)
Default constructor.
double value(const std::map< field, double > &) override
value Calculates the value the thermal conductivity
void vector_jacobian(const std::map< field, std::vector< double > > &, const field, std::vector< double > &jacobian_vector) override
vector_jacobian Calculate the derivative of the thermal conductivity with respect to a field
Material - Class that defines the physical property of a material. Generally a material will be a flu...
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....
PhysicalPropertyModel()
Default constructor. Set the model_depends_on to false for all variables.
std::map< field, bool > model_depends_on
double value(const std::map< field, double > &fields_value) override
value Calculates the value the thermal conductivity
ThermalConductivityLinear(const double A, const double B)
Default constructor.
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector value of thermal conductivities
void vector_jacobian(const std::map< field, std::vector< double > > &, const field, std::vector< double > &jacobian_vector) override
vector_jacobian Calculate the derivative of the thermal conductivity with respect to a field
double jacobian(const std::map< field, double > &, field) override
jacobian Calculates the jacobian (the partial derivative) of the thermal conductivity with respect to...
Abstract class that allows to calculate the thermal conductivity on each quadrature point using the t...
static std::shared_ptr< ThermalConductivityModel > model_cast(const Parameters::Material &material_properties)
Instantiates and returns a pointer to a ThermalConductivityModel object by casting it to the proper c...
double value(const std::map< field, double > &fields_value) override
value Calculates the value of the thermal conductivity
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector value of thermal conductivities
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the thermal conductivity with respect to...
const double thermal_conductivity_s
Parameters::PhaseChange p_phase_change_params
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 thermal conductivity with respect to a field
const double thermal_conductivity_l
ThermalConductivityPhaseChange(const Parameters::PhaseChange phase_change_params)
Default constructor.
double calculate_liquid_fraction(const double &T, const Parameters::PhaseChange &phase_change_parameters)
calculate_liquid_fraction Calculates the liquid fraction of a phase change material at a temperature ...
Phase change model for melting/freezing liquids The model assumes that the phase change occurs betwee...