mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-30 08:18:18 -05:00
Implemented generalized second derivative, seems to work, implemented at PropsSI level too
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -405,10 +405,16 @@ double _PropsSI(const std::string &Output, const std::string &Name1, double Prop
|
||||
// Return the value
|
||||
return val;
|
||||
}
|
||||
else{// if is_valid_second_derivative(Output, iOf1, iWrt1, iConstant1, iWrt2, iConstant2){
|
||||
return _HUGE;
|
||||
};
|
||||
|
||||
else if (is_valid_second_derivative(Output, iOf1, iWrt1, iConstant1, iWrt2, iConstant2)){
|
||||
// Return the desired output
|
||||
double val = State->second_partial_deriv(iOf1, iWrt1, iConstant1, iWrt2, iConstant2);
|
||||
|
||||
// Return the value
|
||||
return val;
|
||||
}
|
||||
else{
|
||||
throw ValueError(format("Output [%s] is not a parameter or a string representation of a derivative",Output.c_str()).c_str());
|
||||
}
|
||||
}
|
||||
double PropsSI(const std::string &Output, const std::string &Name1, double Prop1, const std::string &Name2, double Prop2, const std::string &Ref, const std::vector<double> &z)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user