mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-22 20:38:01 -05:00
format fractions to string properly; closes #584
This commit is contained in:
@@ -273,7 +273,7 @@ std::string CoolProp::TabularBackend::path_to_tables(void){
|
||||
std::vector<CoolPropDbl> fractions = AS->get_mole_fractions();
|
||||
std::vector<std::string> components;
|
||||
for (std::size_t i = 0; i < fluids.size(); ++i){
|
||||
components.push_back(format("%s[%0.10f]", fluids[i].c_str(), fractions[i]));
|
||||
components.push_back(format("%s[%0.10Lf]", fluids[i].c_str(), fractions[i]));
|
||||
}
|
||||
return get_home_dir() + "/.CoolProp/Tables/" + AS->backend_name() + "(" + strjoin(components, "&") + ")";
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ class TabularBackend : public AbstractState
|
||||
void update(CoolProp::input_pairs input_pair, double Value1, double Value2){};
|
||||
void set_mole_fractions(const std::vector<CoolPropDbl> &mole_fractions){this->AS->set_mole_fractions(mole_fractions);};
|
||||
void set_mass_fractions(const std::vector<CoolPropDbl> &mass_fractions){};
|
||||
const std::vector<long double> & get_mole_fractions(){throw NotImplementedError("get_mole_fractions not implemented for TTSE");};
|
||||
const std::vector<long double> & get_mole_fractions(){return AS->get_mole_fractions();};
|
||||
CoolPropDbl calc_molar_mass(void){return AS->molar_mass();};
|
||||
virtual double evaluate_single_phase_phmolar(parameters output, std::size_t i, std::size_t j) = 0;
|
||||
virtual double evaluate_single_phase_pT(parameters output, std::size_t i, std::size_t j) = 0;
|
||||
|
||||
Reference in New Issue
Block a user