OGS
FluidProperties.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <array>
16#include <memory>
17
20
21namespace MaterialLib
22{
23namespace Fluid
24{
27{
28 Density = 0,
29 Viscosity = 1,
30 HeatCapacity = 2,
32 Concentration = 4,
34};
35
38
41{
42public:
43 using ArrayType = std::array<double, PropertyVariableNumber>;
44
46 std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& density,
47 std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& viscosity,
48 std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& heat_capacity,
49 std::unique_ptr<MaterialLib::Fluid::FluidProperty>&&
50 thermal_conductivity)
51 : _property_models{{std::move(density), std::move(viscosity),
52 std::move(heat_capacity),
53 std::move(thermal_conductivity)}}
54 {
55 }
56
57 virtual ~FluidProperties() = default;
58
67 virtual double getValue(const FluidPropertyType property_type,
68 const ArrayType& variable_values) const = 0;
69
79 virtual double getdValue(
80 const FluidPropertyType property_type,
81 const ArrayType& variable_values,
82 const PropertyVariableType variable_type) const = 0;
83
84protected:
93 const std::array<std::unique_ptr<FluidProperty>, FluidPropertyTypeNumber>
95};
96
97} // namespace Fluid
98} // namespace MaterialLib
Base class of fluid properties.
virtual double getValue(const FluidPropertyType property_type, const ArrayType &variable_values) const =0
std::array< double, PropertyVariableNumber > ArrayType
const std::array< std::unique_ptr< FluidProperty >, FluidPropertyTypeNumber > _property_models
virtual double getdValue(const FluidPropertyType property_type, const ArrayType &variable_values, const PropertyVariableType variable_type) const =0
FluidProperties(std::unique_ptr< MaterialLib::Fluid::FluidProperty > &&density, std::unique_ptr< MaterialLib::Fluid::FluidProperty > &&viscosity, std::unique_ptr< MaterialLib::Fluid::FluidProperty > &&heat_capacity, std::unique_ptr< MaterialLib::Fluid::FluidProperty > &&thermal_conductivity)
PropertyVariableType
Variable that determine the property.
const unsigned FluidPropertyTypeNumber
FluidPropertyType
Fluid property type.
@ number_of_property_types
Number of property types.