![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <specific_heat_model.h>
Public Member Functions | |
| PhaseChangeSpecificHeat (const Parameters::PhaseChange p_phase_change_parameters) | |
| 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 | enthalpy (const double T) |
| 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 Attributes | |
| const Parameters::PhaseChange | param |
| double | liquid_fraction |
Additional Inherited Members | |
| Public Types inherited from PhysicalPropertyModel | |
| enum class | ComplexComponent : std::int8_t { real , imag } |
| Static Public Member Functions inherited from SpecificHeatModel | |
| static std::shared_ptr< SpecificHeatModel > | model_cast (const Parameters::Material &material_properties) |
| Protected Member Functions inherited from PhysicalPropertyModel | |
| std::shared_ptr< SimulationControl > & | get_simulation_control () |
| Protected Attributes inherited from PhysicalPropertyModel | |
| std::map< field, bool > | model_depends_on |
Phase change specific heat model.
The phase change specific heat \((c^{*}_\mathrm{p})\) model takes into account the phase change of a material by considering the latent heat into the specific heat over a phase change temperature interval determined by \(\left[T_\mathrm{s},T_\mathrm{l}\right]\) where \(T_\mathrm{s}\) is the solidus temperature and \(T_\mathrm{l}\) is the liquidus temperature.
The specific heat is evaluated as: \( c^{*}_\mathrm{p}(T) = \begin{cases} C_\mathrm{p,s} & \text{if} \; T<T_\mathrm{s}\\ \frac{C_\mathrm{p,s}+C_\mathrm{p,l}}{2}+\frac{h_\mathrm{l}} {T_\mathrm{l}-T_\mathrm{s}} & \text{if} \; T\in[T_\mathrm{s},T_\mathrm{l}]\\ C_\mathrm{p,l} & \text{if} \; T>T_\mathrm{l} \end{cases} \)
where \(C_\mathrm{p,s}\) and \(C_\mathrm{p,l}\) are the solid and liquid specific heat, respectively, and \(h_\mathrm{l}\) is the latent enthalpy (enthalpy related to the phase change).
Definition at line 169 of file specific_heat_model.h.
|
inline |
Constructor of the phase change specific heat model.
| [in] | p_phase_change_parameters | Set of parameters of the phase change model. |
Definition at line 178 of file specific_heat_model.h.
References PhysicalPropertyModel::model_depends_on, param, temperature, temperature_p1, and temperature_p2.
|
inline |
Compute the enthalpy of a phase change material for a temperature \(T\).
The enthalpy \((H)\) is defined:
| [in] | T | temperature at which the enthalpy is computed. |
Definition at line 454 of file specific_heat_model.h.
References calculate_liquid_fraction(), liquid_fraction, and param.
|
inlineoverridevirtual |
Compute the jacobian (the partial derivative) of the specific heat with respect to a specified field.
| [in] | field_values | Values of the various fields on which the specific heat may depend. The map stores a single value per field. |
| [in] | id | Indicator of the field with respect to which the jacobian should be computed. |
Implements PhysicalPropertyModel.
Definition at line 390 of file specific_heat_model.h.
References PhysicalPropertyModel::numerical_jacobian(), and temperature.
|
inlineoverridevirtual |
Compute the specific heat of the isothermal ideal gas.
| [in] | field_values | Values of the various fields on which the property may depend. In this case, the specific heat depends on temperature. The map stores a single value per field. |
field_values. Implements PhysicalPropertyModel.
Definition at line 197 of file specific_heat_model.h.
References Parameters::SimulationControl::bdf1, Parameters::SimulationControl::bdf2, enthalpy(), PhysicalPropertyModel::get_simulation_control(), PhysicalPropertyModel::simulation_control, temperature, temperature_p1, and temperature_p2.
|
inlineoverridevirtual |
Compute the derivative of the specific heat with respect to a field for an isothermal ideal gas.
| [in] | field_vectors | Vector of values of the fields used to evaluate the specific heat. The map stores a vector of values per field. |
| [in] | id | Identifier of the field with respect to which a derivative should be computed. |
| [out] | jacobian | Vector of computed derivative values of the specific heat with respect to the field of the specified id. |
Implements PhysicalPropertyModel.
Definition at line 417 of file specific_heat_model.h.
References temperature, and PhysicalPropertyModel::vector_numerical_jacobian().
|
inlineoverridevirtual |
Compute a vector of specific heat values for an isothermal ideal gas.
| [in] | field_vectors | Vectors of the fields on which the specific heat may depend. In this case, the specific heat depends on temperature. The map stores a vector of values per field. |
| [out] | property_vector | Vectors of computed specific heat values. |
Implements PhysicalPropertyModel.
Definition at line 279 of file specific_heat_model.h.
References Parameters::SimulationControl::bdf1, Parameters::SimulationControl::bdf2, enthalpy(), PhysicalPropertyModel::get_simulation_control(), PhysicalPropertyModel::simulation_control, temperature, temperature_p1, and temperature_p2.
|
private |
Definition at line 474 of file specific_heat_model.h.
|
private |
Definition at line 473 of file specific_heat_model.h.