OGS
IdealGasLaw.h
Go to the documentation of this file.
1
13#pragma once
14
17
18namespace MaterialPropertyLib
19{
20class Medium;
21class Phase;
22class Component;
29class IdealGasLaw final : public Property
30{
31public:
32 explicit IdealGasLaw(std::string name);
33
34 void checkScale() const override
35 {
36 if (!(std::holds_alternative<Phase*>(scale_) ||
37 std::holds_alternative<Component*>(scale_)))
38 {
40 "The property 'IdealGasLaw' is implemented on the "
41 "'phase' and 'component' scales only.");
42 }
43 }
44
47 PropertyDataType value(VariableArray const& variable_array,
48 ParameterLib::SpatialPosition const& /*pos*/,
49 double const /*t*/,
50 double const /*dt*/) const override;
51 PropertyDataType dValue(VariableArray const& variable_array,
52 Variable const variable,
53 ParameterLib::SpatialPosition const& /*pos*/,
54 double const /*t*/,
55 double const /*dt*/) const override;
56 PropertyDataType d2Value(VariableArray const& variable_array,
57 Variable const variable1, Variable const variable2,
58 ParameterLib::SpatialPosition const& /*pos*/,
59 double const /*t*/,
60 double const /*dt*/) const override;
61};
62
63} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
Density function for ideal gases.
Definition IdealGasLaw.h:30
void checkScale() const override
Definition IdealGasLaw.h:34
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &, double const, double const) const override
Default implementation: 2nd derivative of any constant property is zero.
virtual PropertyDataType value() const
Definition Property.cpp:76
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Definition Property.h:31