![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <physical_properties_manager.h>
Public Member Functions | |
| PhysicalPropertiesManager () | |
| PhysicalPropertiesManager (Parameters::PhysicalProperties physical_properties) | |
| void | initialize (Parameters::PhysicalProperties physical_properties) |
| void | provide_simulation_control (std::shared_ptr< SimulationControl > &simulation_control) |
| unsigned int | get_number_of_fluids () const |
| unsigned int | get_number_of_solids () const |
| unsigned int | get_number_of_material_interactions () const |
| std::shared_ptr< DensityModel > | get_density (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< SpecificHeatModel > | get_specific_heat (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< ThermalConductivityModel > | get_thermal_conductivity (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< RheologicalModel > | get_rheology (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< ThermalExpansionModel > | get_thermal_expansion (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< TracerDiffusivityModel > | get_tracer_diffusivity (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< TracerReactionPrefactorModel > | get_tracer_reaction_prefactor (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< SurfaceTensionModel > | get_surface_tension (const unsigned int material_interaction_id=0) const |
| std::shared_ptr< MobilityCahnHilliardModel > | get_mobility_cahn_hilliard (const unsigned int material_interaction_id=0) const |
| std::shared_ptr< ElectricConductivityModel > | get_electric_conductivity (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< ElectricPermittivityModel > | get_electric_permittivity_real (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< ElectricPermittivityModel > | get_electric_permittivity_imag (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< MagneticPermeabilityModel > | get_magnetic_permeability_real (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::shared_ptr< MagneticPermeabilityModel > | get_magnetic_permeability_imag (const unsigned int fluid_id=0, const unsigned int material_id=0) const |
| std::vector< std::shared_ptr< DensityModel > > | get_density_vector () const |
| std::vector< std::shared_ptr< SpecificHeatModel > > | get_specific_heat_vector () const |
| std::vector< std::shared_ptr< ThermalConductivityModel > > | get_thermal_conductivity_vector () const |
| std::vector< std::shared_ptr< RheologicalModel > > | get_rheology_vector () const |
| std::vector< std::shared_ptr< ThermalExpansionModel > > | get_thermal_expansion_vector () const |
| std::vector< Parameters::PhaseChange > | get_phase_change_parameters_vector () const |
| std::vector< std::shared_ptr< TracerDiffusivityModel > > | get_tracer_diffusivity_vector () const |
| std::vector< std::shared_ptr< SurfaceTensionModel > > | get_surface_tension_vector () const |
| std::vector< std::shared_ptr< MobilityCahnHilliardModel > > | get_mobility_cahn_hilliard_vector () const |
| std::vector< std::shared_ptr< ElectricConductivityModel > > | get_electric_conductivity_vector () const |
| std::vector< std::shared_ptr< ElectricPermittivityModel > > | get_electric_permittivity_real_vector () const |
| std::vector< std::shared_ptr< ElectricPermittivityModel > > | get_electric_permittivity_imag_vector () const |
| std::vector< std::shared_ptr< MagneticPermeabilityModel > > | get_magnetic_permeability_real_vector () const |
| std::vector< std::shared_ptr< MagneticPermeabilityModel > > | get_magnetic_permeability_imag_vector () const |
| std::shared_ptr< EffectiveMediumModel > | get_effective_electric_permittivity_real (const unsigned int material_interaction_id) const |
| std::shared_ptr< EffectiveMediumModel > | get_effective_electric_permittivity_imag (const unsigned int material_interaction_id) const |
| std::shared_ptr< EffectiveMediumModel > | get_effective_magnetic_permeability_real (const unsigned int material_interaction_id) const |
| std::shared_ptr< EffectiveMediumModel > | get_effective_magnetic_permeability_imag (const unsigned int material_interaction_id) const |
| double | get_kinematic_viscosity_scale () const |
| double | get_density_scale () const |
| void | set_rheology (std::shared_ptr< RheologicalModel > p_rheology, const unsigned int fluid_id=0) |
| bool | is_non_newtonian () const |
| bool | field_is_required (const field id) const |
| bool | density_is_constant () const |
| Parameters::PhysicalProperties | get_physical_properties_parameters () const |
| bool | has_phase_change () const |
| bool | surface_tension_is_constant () const |
| unsigned int | get_material_interaction_id (const material_interactions_type material_interaction_type, const unsigned int material_0_id, const unsigned int material_1_id) const |
| double | get_reference_temperature () const |
| bool | is_effective_medium (const unsigned int fluid_id, const unsigned int material_id) const |
Public Attributes | |
| bool | is_initialized |
Private Member Functions | |
| void | establish_fields_required_by_model (PhysicalPropertyModel &model) |
| void | establish_fields_required_by_model (InterfacePropertyModel &model) |
| unsigned int | calculate_global_id (const unsigned int fluid_id, const unsigned int material_id) const |
Class that manages the physical properties model which are required to calculate the various physical properties This centralizes the place where the models are created. The class can be constructed empty and initialized from parameters or it can be constructed directly with a Parameters section. The architecture of the PhysicalPropertiesManager is made to ensure that it can store as many physical properties models as required. It first stores the physical properties of the fluids, which are always assumed to lie in material_id=0, and then stores the physical properties of the solid, which may be in cells for which material_id>0.
Definition at line 70 of file physical_properties_manager.h.
|
inline |
Default constructor that initialized none of the physical properties.
Definition at line 76 of file physical_properties_manager.h.
References is_initialized.
| PhysicalPropertiesManager::PhysicalPropertiesManager | ( | Parameters::PhysicalProperties | physical_properties | ) |
PhysicalPropertiesManager Constructor that initializes the class.
| physical_properties | Parameters for the physical properties |
|
inlineprivate |
Calculates the global id of the physical property. By default. Lethe stores all the properties of the fluids, then the properties of the solid. Fluids need to have a material id of 0, then solids are consequential.
| fluid_id | the id of the fluid (0 for single phase simulations, 0 or 1 for CLS simulations) |
| material_id | the material id of the cell. Cells with material_id=0 are fluid cells (0 or 1) and cells with material_id>0 are solid cells |
Definition at line 591 of file physical_properties_manager.h.
References number_of_fluids.
|
inline |
Definition at line 492 of file physical_properties_manager.h.
References constant_density.
|
private |
Definition at line 19 of file physical_properties_manager.cc.
References InterfacePropertyModel::depends_on(), and required_fields.
|
private |
Definition at line 7 of file physical_properties_manager.cc.
References PhysicalPropertyModel::depends_on(), and required_fields.
|
inline |
Definition at line 486 of file physical_properties_manager.h.
References required_fields.
|
inline |
Definition at line 130 of file physical_properties_manager.h.
References calculate_global_id(), and density.
|
inline |
Definition at line 467 of file physical_properties_manager.h.
References density.
|
inline |
Definition at line 275 of file physical_properties_manager.h.
References density.
|
inline |
Returns the effective medium model of the imaginary part of the electric permittivity of the mixture defined by a material interaction.
| material_interaction_id | Index of the material interaction. It must be a fluid-dispersed phase interaction. |
Definition at line 414 of file physical_properties_manager.h.
References effective_electric_permittivity_imag.
|
inline |
Returns the effective medium model of the real part of the electric permittivity of the mixture defined by a material interaction.
| material_interaction_id | Index of the material interaction. It must be a fluid-dispersed phase interaction. |
Definition at line 396 of file physical_properties_manager.h.
References effective_electric_permittivity_real.
|
inline |
Returns the effective medium model of the imaginary part of the magnetic permeability of the mixture defined by a material interaction.
| material_interaction_id | Index of the material interaction. It must be a fluid-dispersed phase interaction. |
Definition at line 450 of file physical_properties_manager.h.
References effective_magnetic_permeability_imag.
|
inline |
Returns the effective medium model of the real part of the magnetic permeability of the mixture defined by a material interaction.
| material_interaction_id | Index of the material interaction. It must be a fluid-dispersed phase interaction. |
Definition at line 432 of file physical_properties_manager.h.
References effective_magnetic_permeability_real.
|
inline |
Returns the electric conductivity model for a given fluid_id and material_id.
| fluid_id | |
| material_id |
Definition at line 207 of file physical_properties_manager.h.
References calculate_global_id(), and electric_conductivity.
|
inline |
Returns the vector of all electric conductivity models defined in the problem.
Definition at line 339 of file physical_properties_manager.h.
References electric_conductivity.
|
inline |
Returns the electric permittivity model of the imaginary part for a given fluid_id and material_id.
| fluid_id | |
| material_id |
Definition at line 236 of file physical_properties_manager.h.
References calculate_global_id(), and electric_permittivity_imag.
|
inline |
Returns the vector of all imaginary part electric permittivity models defined in the problem.
Definition at line 361 of file physical_properties_manager.h.
References electric_permittivity_imag.
|
inline |
Returns the electric permittivity model of the real part for a given fluid_id and material_id.
| fluid_id | |
| material_id |
Definition at line 221 of file physical_properties_manager.h.
References calculate_global_id(), and electric_permittivity_real.
|
inline |
Returns the vector of all real part electric permittivity models defined in the problem.
Definition at line 350 of file physical_properties_manager.h.
References electric_permittivity_real.
|
inline |
Definition at line 461 of file physical_properties_manager.h.
References rheology.
|
inline |
Returns the magnetic permeability model of the imaginary part for a given fluid_id and material_id.
| fluid_id | |
| material_id |
Definition at line 266 of file physical_properties_manager.h.
References calculate_global_id(), and magnetic_permeability_imag.
|
inline |
Returns the vector of all imaginary part magnetic permeability models defined in the problem.
Definition at line 383 of file physical_properties_manager.h.
References magnetic_permeability_imag.
|
inline |
Returns the magnetic permeability model of the real part for a given fluid_id and material_id.
| fluid_id | |
| material_id |
Definition at line 251 of file physical_properties_manager.h.
References calculate_global_id(), and magnetic_permeability_real.
|
inline |
Returns the vector of all real part magnetic permeability models defined in the problem.
Definition at line 372 of file physical_properties_manager.h.
References magnetic_permeability_real.
|
inline |
Definition at line 516 of file physical_properties_manager.h.
References fluid_dispersed_phase, fluid_dispersed_phase_interactions_with_material_interaction_ids, fluid_fluid, fluid_fluid_interactions_with_material_interaction_ids, fluid_solid, and fluid_solid_interactions_with_material_interaction_ids.
|
inline |
Returns the mobility model for a given material_interaction_id (integer).
| material_interaction_id |
Definition at line 193 of file physical_properties_manager.h.
References mobility_cahn_hilliard.
|
inline |
Returns the vector of all mobility models defined in the problem.
Definition at line 328 of file physical_properties_manager.h.
References mobility_cahn_hilliard.
|
inline |
Definition at line 111 of file physical_properties_manager.h.
References number_of_fluids.
|
inline |
Definition at line 123 of file physical_properties_manager.h.
References number_of_material_interactions.
|
inline |
Definition at line 117 of file physical_properties_manager.h.
References number_of_solids.
|
inline |
Definition at line 305 of file physical_properties_manager.h.
References phase_change_parameters.
|
inline |
Definition at line 498 of file physical_properties_manager.h.
References physical_properties_parameters.
|
inline |
Definition at line 554 of file physical_properties_manager.h.
References reference_temperature.
|
inline |
Definition at line 151 of file physical_properties_manager.h.
References calculate_global_id(), and rheology.
|
inline |
Definition at line 293 of file physical_properties_manager.h.
References rheology.
|
inline |
Definition at line 137 of file physical_properties_manager.h.
References calculate_global_id(), and specific_heat.
|
inline |
Definition at line 281 of file physical_properties_manager.h.
References specific_heat.
|
inline |
Definition at line 180 of file physical_properties_manager.h.
References surface_tension.
|
inline |
Definition at line 317 of file physical_properties_manager.h.
References surface_tension.
|
inline |
Definition at line 144 of file physical_properties_manager.h.
References calculate_global_id(), and thermal_conductivity.
|
inline |
Definition at line 287 of file physical_properties_manager.h.
References thermal_conductivity.
|
inline |
Definition at line 158 of file physical_properties_manager.h.
References calculate_global_id(), and thermal_expansion.
|
inline |
Definition at line 299 of file physical_properties_manager.h.
References thermal_expansion.
|
inline |
Definition at line 165 of file physical_properties_manager.h.
References calculate_global_id(), and tracer_diffusivity.
|
inline |
Definition at line 311 of file physical_properties_manager.h.
References tracer_diffusivity.
|
inline |
Definition at line 172 of file physical_properties_manager.h.
References calculate_global_id(), and tracer_reaction_prefactor.
|
inline |
Definition at line 504 of file physical_properties_manager.h.
References phase_change.
| void PhysicalPropertiesManager::initialize | ( | Parameters::PhysicalProperties | physical_properties | ) |
initialize Initializes the physical properties using the parameters
| physical_properties | Parameters for the physical properties |
Definition at line 31 of file physical_properties_manager.cc.
References constant_density, constant_surface_tension, density, effective_electric_permittivity_imag, effective_electric_permittivity_real, effective_magnetic_permeability_imag, effective_magnetic_permeability_real, electric_conductivity, electric_permittivity, electric_permittivity_imag, electric_permittivity_real, establish_fields_required_by_model(), fluid_dispersed_phase, Parameters::PhysicalProperties::fluid_dispersed_phase_interactions_with_material_interaction_ids, fluid_dispersed_phase_interactions_with_material_interaction_ids, Parameters::PhysicalProperties::fluid_fluid_interactions_with_material_interaction_ids, fluid_fluid_interactions_with_material_interaction_ids, Parameters::PhysicalProperties::fluid_solid_interactions_with_material_interaction_ids, fluid_solid_interactions_with_material_interaction_ids, Parameters::PhysicalProperties::fluids, PhysicalPropertyModel::imag, is_initialized, levelset, magnetic_permeability, magnetic_permeability_imag, magnetic_permeability_real, Parameters::PhysicalProperties::material_interactions, material_is_effective_medium, mobility_cahn_hilliard, DensityModel::model_cast(), EffectiveMediumModel::model_cast(), ElectricConductivityModel::model_cast(), MobilityCahnHilliardModel::model_cast(), RheologicalModel::model_cast(), SpecificHeatModel::model_cast(), SurfaceTensionModel::model_cast(), ThermalConductivityModel::model_cast(), ThermalExpansionModel::model_cast(), TracerDiffusivityModel::model_cast(), TracerReactionPrefactorModel::model_cast(), ElectricPermittivityModel::model_cast_imag(), MagneticPermeabilityModel::model_cast_imag(), ElectricPermittivityModel::model_cast_real(), MagneticPermeabilityModel::model_cast_real(), non_newtonian_flow, Parameters::PhysicalProperties::number_of_fluids, number_of_fluids, Parameters::PhysicalProperties::number_of_material_interactions, number_of_material_interactions, Parameters::PhysicalProperties::number_of_solids, number_of_solids, Parameters::Material::phase_change, phase_change, phase_change_parameters, phase_order_cahn_hilliard, physical_properties_parameters, pressure, PhysicalPropertyModel::real, Parameters::PhysicalProperties::reference_temperature, reference_temperature, required_fields, rheology, shear_rate, Parameters::PhysicalProperties::solids, specific_heat, surface_tension, temperature, temperature_p1, temperature_p2, thermal_conductivity, thermal_expansion, tracer_concentration, tracer_diffusivity, tracer_reaction_order, tracer_reaction_prefactor, and void_fraction.
|
inline |
Returns true if the material with the given fluid_id and material_id is defined by an effective medium model, false otherwise.
| fluid_id | The id of the fluid (0 for single phase simulations, 0 or 1 for CLS simulations) |
| material_id | The material id of the cell. Cells with material_id=0 are fluid cells (0 or 1) and cells with material_id>0 are solid cells |
Definition at line 568 of file physical_properties_manager.h.
References calculate_global_id(), and material_is_effective_medium.
|
inline |
Definition at line 480 of file physical_properties_manager.h.
References non_newtonian_flow.
|
inline |
Definition at line 97 of file physical_properties_manager.h.
References number_of_fluids, number_of_solids, provide_simulation_control(), and specific_heat.
|
inline |
Definition at line 473 of file physical_properties_manager.h.
References rheology.
|
inline |
Definition at line 510 of file physical_properties_manager.h.
References constant_surface_tension.
|
private |
Definition at line 640 of file physical_properties_manager.h.
|
private |
Definition at line 641 of file physical_properties_manager.h.
|
private |
Definition at line 606 of file physical_properties_manager.h.
|
private |
Definition at line 631 of file physical_properties_manager.h.
|
private |
Definition at line 629 of file physical_properties_manager.h.
|
private |
Definition at line 635 of file physical_properties_manager.h.
|
private |
Definition at line 633 of file physical_properties_manager.h.
|
private |
Definition at line 619 of file physical_properties_manager.h.
|
private |
Definition at line 623 of file physical_properties_manager.h.
|
private |
Definition at line 621 of file physical_properties_manager.h.
|
private |
Definition at line 663 of file physical_properties_manager.h.
|
private |
Definition at line 659 of file physical_properties_manager.h.
|
private |
Definition at line 661 of file physical_properties_manager.h.
| bool PhysicalPropertiesManager::is_initialized |
Definition at line 603 of file physical_properties_manager.h.
|
private |
Definition at line 627 of file physical_properties_manager.h.
|
private |
Definition at line 625 of file physical_properties_manager.h.
|
private |
Definition at line 667 of file physical_properties_manager.h.
|
private |
Definition at line 617 of file physical_properties_manager.h.
|
private |
Definition at line 639 of file physical_properties_manager.h.
|
private |
Definition at line 653 of file physical_properties_manager.h.
|
private |
Definition at line 655 of file physical_properties_manager.h.
|
private |
Definition at line 654 of file physical_properties_manager.h.
|
private |
Definition at line 642 of file physical_properties_manager.h.
|
private |
Definition at line 618 of file physical_properties_manager.h.
|
private |
Definition at line 651 of file physical_properties_manager.h.
|
private |
Definition at line 648 of file physical_properties_manager.h.
|
private |
Definition at line 637 of file physical_properties_manager.h.
|
private |
Definition at line 609 of file physical_properties_manager.h.
|
private |
Definition at line 607 of file physical_properties_manager.h.
|
private |
Definition at line 615 of file physical_properties_manager.h.
|
private |
Definition at line 608 of file physical_properties_manager.h.
|
private |
Definition at line 610 of file physical_properties_manager.h.
|
private |
Definition at line 611 of file physical_properties_manager.h.
|
private |
Definition at line 614 of file physical_properties_manager.h.
|
private |
Definition at line 613 of file physical_properties_manager.h.