mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Fix Coverity CID 38614
This commit is contained in:
@@ -639,7 +639,7 @@ void FlashRoutines::HSU_D_flash_twophase(HelmholtzEOSMixtureBackend &HEOS, CoolP
|
||||
|
||||
public:
|
||||
HelmholtzEOSMixtureBackend &HEOS;
|
||||
CoolPropDbl rhomolar_spec, Qd, Qo;
|
||||
CoolPropDbl rhomolar_spec;
|
||||
parameters other;
|
||||
CoolPropDbl value;
|
||||
Residual(HelmholtzEOSMixtureBackend &HEOS, CoolPropDbl rhomolar_spec, parameters other, CoolPropDbl value) : HEOS(HEOS), rhomolar_spec(rhomolar_spec), other(other), value(value){};
|
||||
@@ -648,9 +648,9 @@ void FlashRoutines::HSU_D_flash_twophase(HelmholtzEOSMixtureBackend &HEOS, CoolP
|
||||
HelmholtzEOSMixtureBackend &SatL = HEOS.get_SatL(),
|
||||
&SatV = HEOS.get_SatV();
|
||||
// Quality from density
|
||||
Qd = (1/HEOS.rhomolar()-1/SatL.rhomolar())/(1/SatV.rhomolar()-1/SatL.rhomolar());
|
||||
CoolPropDbl Qd = (1 / HEOS.rhomolar() - 1 / SatL.rhomolar()) / (1 / SatV.rhomolar() - 1 / SatL.rhomolar());
|
||||
// Quality from other parameter (H,S,U)
|
||||
Qo = (value-SatL.keyed_output(other))/(SatV.keyed_output(other)-SatL.keyed_output(other));
|
||||
CoolPropDbl Qo = (value - SatL.keyed_output(other)) / (SatV.keyed_output(other) - SatL.keyed_output(other));
|
||||
// Residual is the difference between the two
|
||||
return Qo-Qd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user