teqp
0.23.1
Toggle main menu visibility
Loading...
Searching...
No Matches
interface
CPP
model_factory_pcsaft.cpp
Go to the documentation of this file.
1
#include "
teqp/cpp/teqpcpp.hpp
"
2
#include "
teqp/cpp/deriv_adapter.hpp
"
3
4
#include "model_flags.hpp"
// Contains (optionally) macros to disable various models
5
6
#ifndef DISABLE_PCSAFT
7
#include "
teqp/models/pcsaft.hpp
"
8
#endif
9
10
namespace
teqp
{
11
namespace
cppinterface
{
12
#ifndef DISABLE_PCSAFT
13
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_PCSAFT
(
const
nlohmann::json &spec){
14
return
teqp::cppinterface::adapter::make_owned
(
PCSAFT::PCSAFTfactory
(spec));
15
}
16
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_PCSAFTPureGrossSadowski2001
(
const
nlohmann::json &spec){
17
return
teqp::cppinterface::adapter::make_owned
(
PCSAFT::PCSAFTPureGrossSadowski2001
(spec));
18
}
19
#else
20
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_PCSAFT
(
const
nlohmann::json &){
21
throw
teqp::NotImplementedError
(
"The PC-SAFT model has been disabled"
);
22
}
23
std::unique_ptr<teqp::cppinterface::AbstractModel>
make_PCSAFTPureGrossSadowski2001
(
const
nlohmann::json &){
24
throw
teqp::NotImplementedError
(
"The PC-SAFT model for pure fluids has been disabled"
);
25
}
26
#endif
27
}
28
}
teqp::NotImplementedError
Definition
exceptions.hpp:45
teqp::saft::PCSAFT::PCSAFTPureGrossSadowski2001
Definition
pcsaftpure.hpp:8
deriv_adapter.hpp
teqp::cppinterface::adapter::make_owned
auto make_owned(const TemplatedModel &tmodel)
Definition
deriv_adapter.hpp:259
teqp::cppinterface
Definition
deriv_adapter.hpp:15
teqp::cppinterface::make_PCSAFTPureGrossSadowski2001
std::unique_ptr< teqp::cppinterface::AbstractModel > make_PCSAFTPureGrossSadowski2001(const nlohmann::json &spec)
Definition
model_factory_pcsaft.cpp:16
teqp::cppinterface::make_PCSAFT
std::unique_ptr< teqp::cppinterface::AbstractModel > make_PCSAFT(const nlohmann::json &spec)
Definition
model_factory_pcsaft.cpp:13
teqp::saft::pcsaft::PCSAFTfactory
auto PCSAFTfactory(const nlohmann::json &spec)
A JSON-based factory function for the PC-SAFT model.
Definition
pcsaft.hpp:455
teqp
Definition
ancillary_builder.hpp:8
pcsaft.hpp
teqpcpp.hpp
Generated by
1.17.0