28template <MeanType MeanType>
30 double const ) =
delete;
32template <MeanType MeanType>
34 double const ) =
delete;
42 return k_dry * (1.0 - S) + k_wet * S;
58 return k_dry + std::sqrt(S) * (k_wet - k_dry);
66 return 0.5 * (k_wet - k_dry) / std::sqrt(S);
73 return k_dry * std::pow(k_wet / k_dry, S);
80 return k_dry * std::pow(k_wet / k_dry, S) * std::log(k_wet / k_dry);
83template <MeanType MeanType,
int GlobalDimension>
89 : dry_thermal_conductivity_(dry_thermal_conductivity),
90 wet_thermal_conductivity_(wet_thermal_conductivity)
95 double const t = std::numeric_limits<double>::quiet_NaN();
100 if (lambda_dry.size() != lambda_wet.size())
103 "In 'SaturationWeightedThermalConductivity' input data, the data "
105 "dry_thermal_conductivity of '{:d}' is different from that of "
106 "dry_thermal_conductivity of '{:d}'.",
107 lambda_dry.size(), lambda_wet.size());
110 for (std::size_t i = 0; i < lambda_dry.size(); i++)
112 if (lambda_dry[i] > lambda_wet[i])
115 "In 'SaturationWeightedThermalConductivity', "
116 "dry_thermal_conductivity of '{:g}' is larger than "
117 "wet_thermal_conductivity of '{:g}'.",
118 lambda_dry[i], lambda_wet[i]);
123 if (lambda_dry.size() != 1 && lambda_dry.size() != GlobalDimension)
126 "The saturation weighted geometric mean"
127 "is not implemented for arbitrary anisotropic thermal "
128 "conductivities and requires to be in diagonal shape.");
133template <MeanType MeanType,
int GlobalDimension>
143 std::vector<double> lambda_data = dry_thermal_conductivity_(t, pos);
147 lambda_data = wet_thermal_conductivity_(t, pos);
150 else if (S_L > 0.0 && S_L <= 1.0)
152 for (std::size_t i = 0; i < lambda_data.size(); i++)
155 S_L, lambda_data[i], wet_thermal_conductivity_(t, pos)[i]);
162template <MeanType MeanType,
int GlobalDimension>
172 "SaturationWeightedThermalConductivity::dValue is implemented for "
173 "derivatives with respect to liquid saturation only.");
178 auto const lambda_dry_data = dry_thermal_conductivity_(t, pos);
180 std::vector<double> derivative_data(lambda_dry_data.size(), 0.0);
181 if (S_L <= 0.0 || S_L > 1.0)
185 for (std::size_t i = 0; i < lambda_dry_data.size(); i++)
188 S_L, lambda_dry_data[i], wet_thermal_conductivity_(t, pos)[i]);
virtual PropertyDataType value() const
Saturation dependent thermal conductivity model for soil.
SaturationWeightedThermalConductivity(std::string name, ParameterLib::Parameter< double > const &dry_thermal_conductivity, ParameterLib::Parameter< double > const &wet_thermal_conductivity)
ParameterLib::Parameter< double > const & wet_thermal_conductivity_
Thermal conductivity of soil at the fully water saturated state.
ParameterLib::Parameter< double > const & dry_thermal_conductivity_
Thermal conductivity of soil at the dry state.
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
double computeAverage< MeanType::GEOMETRIC >(const double S, double const k_dry, double const k_wet)
double computeAverage< MeanType::ARITHMETIC_LINEAR >(const double S, double const k_dry, double const k_wet)
PropertyDataType fromVector(std::vector< double > const &values)
double computeDAverage< MeanType::GEOMETRIC >(const double S, double const k_dry, double const k_wet)
double computeDAverage< MeanType::ARITHMETIC_LINEAR >(const double, double const k_dry, double const k_wet)
double computeDAverage< MeanType::ARITHMETIC_SQUAREROOT >(const double S, double const k_dry, double const k_wet)
double computeDAverage(const double, double const, double const)=delete
double computeAverage< MeanType::ARITHMETIC_SQUAREROOT >(const double S, double const k_dry, double const k_wet)
double computeAverage(const double, double const, double const)=delete
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