4#ifndef lethe_surface_tension_model_h
5#define lethe_surface_tension_model_h
26 static std::shared_ptr<SurfaceTensionModel>
69 value(
const std::map<field, double> & )
override
82 std::vector<double> &property_vector)
override
116 const std::map<
field, std::vector<double>> & ,
118 std::vector<double> &jacobian_vector)
override
120 std::ranges::fill(jacobian_vector, 0);
144 ,
T_0(p_surface_tension_parameters.
T_0)
158 value(
const std::map<field, double> &fields_value)
override
161 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionLinear",
176 std::vector<double> &property_vector)
override
179 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionLinear",
183 for (
unsigned int i = 0; i < property_vector.size(); ++i)
219 const std::map<
field, std::vector<double>> & ,
221 std::vector<double> &jacobian_vector)
override
226 std::ranges::fill(jacobian_vector, 0);
265 value(
const std::map<field, double> &fields_value)
override
268 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionPhaseChange",
272 double surface_tension;
275 surface_tension = 0.0;
281 const double l_frac =
288 return surface_tension;
299 std::vector<double> &property_vector)
override
302 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionPhaseChange",
306 for (
unsigned int i = 0; i < property_vector.size(); ++i)
308 property_vector[i] = 0.0;
314 const double l_frac =
340 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionPhaseChange",
349 const double l_frac =
371 std::vector<double> &jacobian_vector)
override
376 PhysicialPropertyModelFieldUndefined(
"SurfaceTensionPhaseChange",
380 for (
unsigned int i = 0; i < jacobian_vector.size(); ++i)
382 jacobian_vector[i] = 0.0;
394 std::ranges::fill(jacobian_vector, 0);
InterfacePropertyModel()
class Default constructor. Set the model_depends_on to false for all variables.
std::map< field, bool > model_depends_on
MaterialInteractions - Class that defines physical properties due to interactions between two differe...
const double surface_tension_coefficient
void vector_value(const std::map< field, std::vector< double > > &, std::vector< double > &property_vector) override
vector_value Calculates the vector of surface tension coefficient.
double jacobian(const std::map< field, double > &, field) override
jacobian Calculates the jacobian (the partial derivative) of the surface tension coefficient with res...
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 surface tension coefficient with respect to a field.
double value(const std::map< field, double > &) override
value Calculates the surface tension coefficient
SurfaceTensionConstant(const double p_surface_tension_coefficient)
Default constructor.
void vector_jacobian(const std::map< field, std::vector< double > > &, const field id, std::vector< double > &jacobian_vector) override
vector_jacobian Calculates the derivative of the surface tension coefficient with respect to a field.
const double surface_tension_coefficient
double value(const std::map< field, double > &fields_value) override
value Calculates the surface tension coefficient
double jacobian(const std::map< field, double > &, field id) override
jacobian Calculates the jacobian (the partial derivative) of the surface tension coefficient with res...
const double surface_tension_gradient
SurfaceTensionLinear(const Parameters::SurfaceTensionParameters &p_surface_tension_parameters)
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 of surface tension coefficient.
Abstract class that allows to calculate the surface tension coefficient.
static std::shared_ptr< SurfaceTensionModel > model_cast(const Parameters::MaterialInteractions &material_interaction_parameters)
Instantiates and returns a pointer to a SurfaceTensionModel object by casting it to the proper child ...
bool surface_tension_is_constant
bool is_constant_surface_tension_model()
is_constant_surface_tension_model Returns a boolean indicating if the model is a constant surface ten...
void vector_value(const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
vector_value Calculates the vector of surface tension coefficient.
void vector_jacobian(const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
vector_jacobian Calculates the derivative of the surface tension coefficient with respect to a field.
double jacobian(const std::map< field, double > &field_values, field id) override
jacobian Calculates the jacobian (the partial derivative) of the surface tension coefficient with res...
SurfaceTensionPhaseChange(const Parameters::SurfaceTensionParameters &p_surface_tension_parameters)
Default constructor.
double value(const std::map< field, double > &fields_value) override
value Calculates the surface tension coefficient.
@ temperature
Temperature scalar field from heat transfer.
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 ...
SurfaceTensionParameters - Defines parameters for surface tension models.