mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
40
dev/Tickets/1611.cpp
Normal file
40
dev/Tickets/1611.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include "CoolProp.h"
|
||||
#include "AbstractState.h"
|
||||
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
|
||||
CoolProp::set_debug_level(1000);
|
||||
std::shared_ptr<CoolProp::AbstractState> ptr;
|
||||
|
||||
std::string backend;
|
||||
std::vector<std::string> fluids;
|
||||
double Q, T, p, s, h;
|
||||
|
||||
// Test as described in https://github.com/CoolProp/CoolProp/issues/1611
|
||||
backend = "HEOS";
|
||||
fluids = {"R407C"};
|
||||
ptr.reset(CoolProp::AbstractState::factory(backend, fluids));
|
||||
p = 4863285.0;
|
||||
Q = 0;
|
||||
ptr->update(CoolProp::PQ_INPUTS, p, Q);
|
||||
|
||||
// test as described in https://github.com/CoolProp/CoolProp/issues/1678
|
||||
backend = "HEOS";
|
||||
fluids = {"Water"};
|
||||
ptr.reset(CoolProp::AbstractState::factory(backend, fluids));
|
||||
p = ptr->p_critical();
|
||||
Q = 0;
|
||||
ptr->update(CoolProp::PQ_INPUTS, p, Q);
|
||||
s = 4000;
|
||||
ptr->update(CoolProp::PSmass_INPUTS, p, s);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user