| 1026 | } |
| 1027 | } |
| 1028 | void set_reference_stateD(const std::string& FluidName, double T, double rhomolar, double hmolar0, double smolar0) { |
| 1029 | std::vector<std::string> _comps(1, FluidName); |
| 1030 | CoolProp::HelmholtzEOSMixtureBackend HEOS(_comps); |
| 1031 | |
| 1032 | HEOS.update(DmolarT_INPUTS, rhomolar, T); |
| 1033 | |
| 1034 | // Get current values for the enthalpy and entropy |
| 1035 | double deltah = HEOS.hmolar() - hmolar0; // offset from specified enthalpy in J/mol |
| 1036 | double deltas = HEOS.smolar() - smolar0; // offset from specified entropy in J/mol/K |
| 1037 | double delta_a1 = deltas / (HEOS.gas_constant()); |
| 1038 | double delta_a2 = -deltah / (HEOS.gas_constant() * HEOS.get_reducing_state().T); |
| 1039 | set_fluid_enthalpy_entropy_offset(FluidName, delta_a1, delta_a2, "custom"); |
| 1040 | } |
| 1041 | |
| 1042 | std::string get_global_param_string(const std::string& ParamName) { |
| 1043 | if (ParamName == "version") { |
no test coverage detected