OGS
PrimaryVariableDependentFluidProperties.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include "FluidProperties.h"
17 
18 namespace MaterialLib
19 {
20 namespace Fluid
21 {
22 class FluidProperty;
23 
27 {
28 public:
30  std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& density,
31  std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& viscosity,
32  std::unique_ptr<MaterialLib::Fluid::FluidProperty>&& heat_capacity,
33  std::unique_ptr<MaterialLib::Fluid::FluidProperty>&&
35  : FluidProperties(std::move(density), std::move(viscosity),
36  std::move(heat_capacity),
37  std::move(thermal_conductivity))
38  {
39  }
40 
49  double getValue(const FluidPropertyType property_type,
50  const ArrayType& variable_values) const override
51  {
52  return _property_models[static_cast<unsigned>(property_type)]->getValue(
53  variable_values);
54  }
55 
65  double getdValue(const FluidPropertyType property_type,
66  const ArrayType& variable_values,
67  const PropertyVariableType variable_type) const override
68  {
69  return _property_models[static_cast<unsigned>(property_type)]
70  ->getdValue(variable_values, variable_type);
71  }
72 };
73 
74 } // namespace Fluid
75 } // namespace MaterialLib
Base class of fluid properties.
std::array< double, PropertyVariableNumber > ArrayType
const std::array< std::unique_ptr< FluidProperty >, FluidPropertyTypeNumber > _property_models
double getdValue(const FluidPropertyType property_type, const ArrayType &variable_values, const PropertyVariableType variable_type) const override
double getValue(const FluidPropertyType property_type, const ArrayType &variable_values) const override
PrimaryVariableDependentFluidProperties(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.
FluidPropertyType
Fluid property type.