| 2754 | }; |
| 2755 | |
| 2756 | THERM0dllOutputs REFPROPMixtureBackend::call_THERM0dll(double T, double rho_mol_dm3, const std::vector<double>& mole_fractions) { |
| 2757 | /* |
| 2758 | subroutineTHERM0dll(T, D, z, P0, e0, h0, s0, Cv0, Cp00, w0, a0, g0) |
| 2759 | Compute ideal-gas thermal quantities as a function of temperature, density, and composition from core functions. |
| 2760 | |
| 2761 | This routine is the same as THERM, except it only calculates ideal gas properties (Z=1) at any temperature and density. |
| 2762 | |
| 2763 | Parameters: |
| 2764 | T [double ,in] :: Temperature [K] |
| 2765 | D [double ,in] :: Molar density [mol/L] |
| 2766 | z (20) [double ,in] :: Composition (array of mole fractions) |
| 2767 | P0 [double ,out] :: Pressure [kPa] |
| 2768 | e0 [double ,out] :: Internal energy [J/mol] |
| 2769 | h0 [double ,out] :: Enthalpy [J/mol] |
| 2770 | s0 [double ,out] :: Entropy [J/mol-K] |
| 2771 | Cv0 [double ,out] :: Isochoric heat capacity [J/mol-K] |
| 2772 | Cp00 [double ,out] :: Isobaric heat capacity [J/mol-K] |
| 2773 | w0 [double ,out] :: Speed of sound [m/s] |
| 2774 | a0 [double ,out] :: Helmholtz energy [J/mol] |
| 2775 | g0 [double ,out] :: Gibbs free energy [J/mol] |
| 2776 | */ |
| 2777 | THERM0dllOutputs o; |
| 2778 | if (mole_fractions.size() != 20) { |
| 2779 | throw ValueError("mole fractions must be of size 20"); |
| 2780 | } |
| 2781 | std::vector<double> mf = mole_fractions; |
| 2782 | |
| 2783 | THERM0dll(&T, &rho_mol_dm3, &(mf[0]), &o.p_kPa, &o.umol_Jmol, &o.hmol_Jmol, &o.smol_JmolK, &o.cvmol_JmolK, &o.cpmol_JmolK, &o.w_ms, &o.amol_Jmol, |
| 2784 | &o.gmol_Jmol); |
| 2785 | return o; |
| 2786 | } |
| 2787 | |
| 2788 | bool force_load_REFPROP() { |
| 2789 | std::string err; |