![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <effective_medium_model.h>
Classes | |
| struct | PhaseModels |
Public Member Functions | |
| EffectiveMediumModel (const Parameters::PhysicalProperties &physical_properties, const unsigned int material_interaction_id, const EffectiveMediumProperty &property, const ComplexComponent &complex_component) | |
| 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, const field id) override |
| void | vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override |
| virtual std::complex< double > | apply_mixing_law (const std::map< field, double > &field_values, const std::complex< double > phase_1_property, const std::complex< double > phase_2_property) const =0 |
| virtual void | vector_apply_mixing_law (const std::map< field, std::vector< double > > &field_vectors, const std::vector< std::complex< double > > &phase_1_property, const std::vector< std::complex< double > > &phase_2_property, std::vector< std::complex< double > > &mixture_property) const =0 |
| 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) |
Static Public Member Functions | |
| static std::shared_ptr< EffectiveMediumModel > | model_cast (const Parameters::PhysicalProperties &physical_properties, const unsigned int material_interaction_id, const EffectiveMediumProperty &property, const ComplexComponent &complex_component) |
Protected Member Functions | |
| void | add_phase_dependencies (const PhaseModels &phase_models) |
| Protected Member Functions inherited from PhysicalPropertyModel | |
| std::shared_ptr< SimulationControl > & | get_simulation_control () |
Protected Attributes | |
| PhaseModels | phase_1_models |
| PhaseModels | phase_2_models |
| Protected Attributes inherited from PhysicalPropertyModel | |
| std::map< field, bool > | model_depends_on |
Private Member Functions | |
| std::complex< double > | phase_value (const PhaseModels &phase_models, const std::map< field, double > &field_values) const |
| void | phase_vector_value (const PhaseModels &phase_models, const std::map< field, std::vector< double > > &field_vectors, std::vector< std::complex< double > > &phase_property) const |
| double | get_complex_component (const std::complex< double > mixture_property) const |
Static Private Member Functions | |
| static PhaseModels | create_phase_models (const Parameters::Material &material_properties, const EffectiveMediumProperty property) |
| static Parameters::MaterialInteractions::EffectiveMediumModelType | get_model_type (const Parameters::MaterialInteractions &interaction, const EffectiveMediumProperty property) |
Private Attributes | |
| const ComplexComponent | complex_component |
Additional Inherited Members | |
| Public Types inherited from PhysicalPropertyModel | |
| enum class | ComplexComponent : std::int8_t { real , imag } |
Effective medium model for the calculation of a physical property of a mixture of two phases. The mixture and its two phases are defined by a material interaction. The property of each phase is calculated with the physical property models of its material. The mixing is done with complex values to allow for the calculation of complex properties, such as the complex permittivity or permeability. The mixture property depends on the fields on which the models of the phases used by the mixing law depend, and on the fields required by the mixing law itself (e.g., the void fraction).
Definition at line 48 of file effective_medium_model.h.
| EffectiveMediumModel::EffectiveMediumModel | ( | const Parameters::PhysicalProperties & | physical_properties, |
| const unsigned int | material_interaction_id, | ||
| const EffectiveMediumProperty & | property, | ||
| const ComplexComponent & | complex_component ) |
Constructor. Gets the materials of the two phases from the material interaction, creates the models of their property and sets the fields on which these models depend.
| [in] | physical_properties | Physical properties parameters. |
| [in] | material_interaction_id | Index of the material interaction that defines the mixture. |
| [in] | property | Mixture property calculated by the model. |
| [in] | complex_component | Part of the mixture property returned by the model. |
Definition at line 12 of file effective_medium_model.cc.
References add_phase_dependencies(), complex_component, create_phase_models(), fluid_dispersed_phase, Parameters::MaterialInteractions::fluid_dispersed_phase_interaction_with_material_interaction_id, Parameters::PhysicalProperties::fluids, Parameters::MaterialInteractions::material_interaction_type, Parameters::PhysicalProperties::material_interactions, Parameters::PhysicalProperties::number_of_fluids, Parameters::PhysicalProperties::number_of_material_interactions, Parameters::PhysicalProperties::number_of_unresolved_dispersed_phases, phase_1_models, phase_2_models, and Parameters::PhysicalProperties::unresolved_dispersed_phases.
|
protected |
Adds the fields on which the models of a phase depend to the fields on which the mixture property depends.
| [in] | phase_models | Models of the property of the phase. |
Definition at line 145 of file effective_medium_model.cc.
References EffectiveMediumModel::PhaseModels::imaginary_part_terms, PhysicalPropertyModel::model_depends_on, and EffectiveMediumModel::PhaseModels::real_part_terms.
|
pure virtual |
Mixing law of the effective medium model.
| [in] | field_values | Values of the fields on which the mixing law depends. |
| [in] | phase_1_property | Property of phase 1. |
| [in] | phase_2_property | Property of phase 2. |
Implemented in BruggemanEffectiveMediumModel, and NoEffectiveMediumModel.
|
staticprivate |
Creates the models needed to calculate a property of the material of a phase.
| [in] | material_properties | Parameters of the material. |
| [in] | property | Property described by the models. |
Definition at line 162 of file effective_medium_model.cc.
References electric_permittivity, EffectiveMediumModel::PhaseModels::imaginary_part_terms, magnetic_permeability, ElectricConductivityModel::model_cast(), ElectricPermittivityModel::model_cast_imag(), MagneticPermeabilityModel::model_cast_imag(), ElectricPermittivityModel::model_cast_real(), MagneticPermeabilityModel::model_cast_real(), and EffectiveMediumModel::PhaseModels::real_part_terms.
|
private |
Returns the selected part (real or imaginary) of a mixture property.
| [in] | mixture_property | Property of the mixture. |
Definition at line 237 of file effective_medium_model.cc.
References complex_component, and PhysicalPropertyModel::real.
|
staticprivate |
Returns the effective medium model chosen in a material interaction for a mixture property.
| [in] | interaction | Parameters of the material interaction. |
| [in] | property | Mixture property calculated by the model. |
Definition at line 246 of file effective_medium_model.cc.
References electric_permittivity, Parameters::MaterialInteractions::electric_permittivity_effective_medium_model, magnetic_permeability, Parameters::MaterialInteractions::magnetic_permeability_effective_medium_model, and Parameters::MaterialInteractions::none.
|
overridevirtual |
Calculates the derivative of the selected part of the mixture property with respect to a field using a finite difference.
| [in] | field_values | Values of the fields on which the property depends. |
| [in] | id | Field with respect to which the derivative is calculated. |
Implements PhysicalPropertyModel.
Definition at line 129 of file effective_medium_model.cc.
References PhysicalPropertyModel::numerical_jacobian().
|
static |
Creates the model of a mixture property, with the mixing law given by the material interaction.
| [in] | physical_properties | Physical properties parameters. |
| [in] | material_interaction_id | Index of the material interaction that defines the mixture. |
| [in] | property | Mixture property calculated by the model. |
| [in] | complex_component | Part of the mixture property returned by the model. |
Definition at line 62 of file effective_medium_model.cc.
|
private |
Calculates the complex property of a phase from its models.
| [in] | phase_models | Models of the property of the phase. |
| [in] | field_values | Values of the fields. |
Definition at line 192 of file effective_medium_model.cc.
References EffectiveMediumModel::PhaseModels::imaginary_part_terms, and EffectiveMediumModel::PhaseModels::real_part_terms.
|
private |
Calculates the complex property of a phase at multiple points from its models.
| [in] | phase_models | Models of the property of the phase. |
| [in] | field_vectors | Values of the fields at each point. |
| [in,out] | phase_property | Property of the phase at each point. Its size sets the number of points. |
Definition at line 208 of file effective_medium_model.cc.
References EffectiveMediumModel::PhaseModels::imaginary_part_terms, and EffectiveMediumModel::PhaseModels::real_part_terms.
|
overridevirtual |
Calculates the selected part of the mixture property.
| [in] | field_values | Values of the fields on which the property depends. |
Implements PhysicalPropertyModel.
Definition at line 92 of file effective_medium_model.cc.
References apply_mixing_law(), get_complex_component(), phase_1_models, phase_2_models, and phase_value().
|
pure virtual |
Mixing law of the effective medium model at multiple points.
| [in] | field_vectors | Values of the fields on which the mixing law depends at each point. |
| [in] | phase_1_property | Property of phase 1 at each point. |
| [in] | phase_2_property | Property of phase 2 at each point. |
| [in,out] | mixture_property | Property of the mixture at each point. |
Implemented in BruggemanEffectiveMediumModel, and NoEffectiveMediumModel.
|
overridevirtual |
Calculates the derivative of the selected part of the mixture property with respect to a field at multiple points using a finite difference.
| [in] | field_vectors | Values of the fields on which the property depends at each point. |
| [in] | id | Field with respect to which the derivative is calculated. |
| [in,out] | jacobian_vector | Derivative of the property at each point. |
Implements PhysicalPropertyModel.
Definition at line 136 of file effective_medium_model.cc.
References PhysicalPropertyModel::vector_numerical_jacobian().
|
overridevirtual |
Calculates the selected part of the mixture property at multiple points.
| [in] | field_vectors | Values of the fields on which the property depends at each point. |
| [in,out] | property_vector | Real or imaginary part of the mixture property at each point. Its size sets the number of points. |
Implements PhysicalPropertyModel.
Definition at line 104 of file effective_medium_model.cc.
References get_complex_component(), phase_1_models, phase_2_models, phase_vector_value(), and vector_apply_mixing_law().
|
private |
Part of the mixture property returned by the model.
Definition at line 265 of file effective_medium_model.h.
|
protected |
Models of the property of phase 1.
Definition at line 196 of file effective_medium_model.h.
|
protected |
Models of the property of phase 2.
Definition at line 199 of file effective_medium_model.h.