4#ifndef lethe_thermal_expansion_model_h
5#define lethe_thermal_expansion_model_h
25 static std::shared_ptr<ThermalExpansionModel>
49 value(
const std::map<field, double> & )
override
61 std::vector<double> &property_vector)
override
90 const std::map<
field, std::vector<double>> & ,
92 std::vector<double> &jacobian_vector)
override
94 std::ranges::fill(jacobian_vector, 0);
122 value(
const std::map<field, double> &fields_value)
override
125 PhysicialPropertyModelFieldUndefined(
"ThermalExpansionPhaseChange",
140 std::vector<double> &property_vector)
override
143 PhysicialPropertyModelFieldUndefined(
"ThermalExpansionPhaseChange",
146 for (
unsigned int i = 0; i < property_vector.size(); ++i)
171 PhysicialPropertyModelFieldUndefined(
172 "ThermalExpansionPhaseChange",
"temperature"));
189 std::vector<double> &jacobian_vector)
override
192 PhysicialPropertyModelFieldUndefined(
"ThermalExpansionPhaseChange",
const double thermal_expansion
ConstantThermalExpansion(const double p_thermal_expansion)
Default constructor.
double jacobian(const std::map< field, double > &, field) override
jacobian Calculates the jacobian (the partial derivative) of the thermal expansion with respect to a ...
double value(const std::map< field, double > &) override
value Calculates the thermale expansion
void vector_value(const std::map< field, std::vector< double > > &, std::vector< double > &property_vector) override
vector_value Calculates the vector of thermal expansion.
void vector_jacobian(const std::map< field, std::vector< double > > &, const field, std::vector< double > &jacobian_vector) override
vector_jacobian Calculates the derivative of the thermal expansion 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
Abstract class that allows to calculate the thermal expansion coefficient (with unit of inverse tempe...
static std::shared_ptr< ThermalExpansionModel > model_cast(const Parameters::Material &material_properties)
Instantiates and returns a pointer to a ThermalExpansionModel object by casting it to the proper chil...
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the thermal expansion with respect to a ...
Parameters::PhaseChange p_phase_change_params
ThermalExpansionPhaseChange(const Parameters::PhaseChange phase_change_params)
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 expansion coefficients
double value(const std::map< field, double > &fields_value) override
value Calculates the value of the thermal expansion coefficient
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 expansion with respect to a field
Phase change model for melting/freezing liquids The model assumes that the phase change occurs betwee...