Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
thermal_conductivity_model.cc
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2022-2023 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
5
6std::shared_ptr<ThermalConductivityModel>
8 const Parameters::Material &material_properties)
9{
10 if (material_properties.thermal_conductivity_model ==
12 return std::make_shared<ThermalConductivityLinear>(
13 material_properties.k_A0, material_properties.k_A1);
14 else if (material_properties.thermal_conductivity_model ==
16 return std::make_shared<ThermalConductivityPhaseChange>(
17 material_properties.phase_change_parameters);
18 else
19 return std::make_shared<ConstantThermalConductivity>(
20 material_properties.thermal_conductivity);
21}
Material - Class that defines the physical property of a material. Generally a material will be a flu...
Definition parameters.h:594
enum Parameters::Material::ThermalConductivityModel thermal_conductivity_model
PhaseChange phase_change_parameters
Definition parameters.h:649
static std::shared_ptr< ThermalConductivityModel > model_cast(const Parameters::Material &material_properties)
Instantiates and returns a pointer to a ThermalConductivityModel object by casting it to the proper c...