mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Mathias copeman (#1116)
* Add ability to set Mathias-Copeman constants in cubic backends * Add some docs
This commit is contained in:
@@ -358,3 +358,19 @@ void CoolProp::AbstractCubicBackend::copy_k(AbstractCubicBackend *donor){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CoolProp::AbstractCubicBackend::set_C_MC(double c1, double c2, double c3)
|
||||
{
|
||||
get_cubic()->set_C_MC(c1, c2, c3);
|
||||
|
||||
if (SatL.get() != NULL){
|
||||
/// Cast to this type so that we can access its internal methods
|
||||
CoolProp::AbstractCubicBackend* _SatL = static_cast<CoolProp::AbstractCubicBackend*>(this->SatL.get());
|
||||
_SatL->get_cubic()->set_C_MC(c1, c2, c3);
|
||||
}
|
||||
if (SatV.get() != NULL){
|
||||
/// Cast to this type so that we can access its internal methods
|
||||
CoolProp::AbstractCubicBackend* _SatV = static_cast<CoolProp::AbstractCubicBackend*>(this->SatV.get());
|
||||
_SatV->get_cubic()->set_C_MC(c1, c2, c3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,10 @@ public:
|
||||
|
||||
// Copy the entire kij matrix from another instance in one shot
|
||||
void copy_k(AbstractCubicBackend *donor);
|
||||
|
||||
// Set the Mathias-Copeman constants c1,c2,c3 for a pure fluid
|
||||
void set_C_MC(double c1, double c2, double c3);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ public:
|
||||
void set_C_MC(double c1, double c2, double c3){
|
||||
C1.resize(1); C2.resize(1); C3.resize(1);
|
||||
C1[0] = c1, C2[0] = c2; C3[0] = c3;
|
||||
simple_aii = false;
|
||||
}
|
||||
|
||||
/// Get the leading constant in the expression for the pure fluid attractive energy term
|
||||
|
||||
Reference in New Issue
Block a user