Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
density_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<DensityModel>
8{
9 if (material_properties.density_model ==
11 {
12 return std::make_shared<DensityIsothermalIdealGas>(
15 material_properties.isothermal_ideal_gas_density_parameters.T);
16 }
17
18 return std::make_shared<DensityConstant>(material_properties.density);
19}
static std::shared_ptr< DensityModel > model_cast(const Parameters::Material &material_properties)
Instantiate and return a pointer to a DensityModel object by casting it to the proper child class.
Material - Class that defines the physical property of a material. Generally a material will be a flu...
Definition parameters.h:594
enum Parameters::Material::DensityModel density_model
IsothermalIdealGasDensityParameters isothermal_ideal_gas_density_parameters
Definition parameters.h:666
double density_ref
Reference state density of the gas in kg/m^3.
Definition parameters.h:491
double R
Specific gas constant in J/kg/K.
Definition parameters.h:493
double T
Absolute temperature of the ideal gas in K.
Definition parameters.h:495