teqp 0.23.1
Loading...
Searching...
No Matches
teqp::cppinterface Namespace Reference

Namespaces

namespace  adapter
 

Classes

class  AbstractModel
 
struct  IterationMatrices
 

Typedefs

using ModelPointerFactoryFunction = std::function<std::unique_ptr<teqp::cppinterface::AbstractModel>(const nlohmann::json &j)>
 
using makefunc = ModelPointerFactoryFunction
 

Functions

template<typename Array>
auto build_iteration_Jv (const std::vector< char > &vars, const Eigen::Array< double, 3, 3 > &A, const double R, const double T, const double rho, const Array &z)
 A convenience function for calculation of Jacobian terms of the form \( J_{i0} = \frac{\partial y}{\partial T} \) and \( J_{i1} = \frac{\partial y}{\partial \rho} \) where \(y\) is one of the thermodynamic variables in vars.
 
std::unique_ptr< AbstractModelmake_model (const nlohmann::json &, bool validate=true)
 
std::unique_ptr< AbstractModelmake_multifluid_model (const std::vector< std::string > &components, const std::string &coolprop_root, const std::string &BIPcollectionpath={}, const nlohmann::json &flags={}, const std::string &departurepath={})
 
std::unique_ptr< AbstractModelbuild_model_ptr (const nlohmann::json &json, bool validate=true)
 
nlohmann::json get_model_schema (const std::string &kind)
 Return the schema for the given model kind.
 
void add_model_pointer_factory_function (const std::string &key, ModelPointerFactoryFunction &func)
 This function allows you to inject your own model factory function into the set of factory functions implemented in teqp. This allows you to add your own model at runtime. As an example of how to do this, see src/test_runtime_model_inclusion.cpp.
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_advancedPRaEres (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_CPA (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_genericSAFT (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_GERG2004resid (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_GERG2008resid (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_GERG2004idealgas (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_GERG2008idealgas (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_IdealHelmholtz (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_LKP (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_SW_EspindolaHeredia2009 (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_EXP6_Kataoka1992 (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_Mie_Pohl2023 (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_Mie_Chaparro2023 (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_2CLJF (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_2CLJF_Dipole (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_2CLJF_Quadrupole (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_multifluid (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_multifluid_ECS_HuberEly1994 (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_AmmoniaWaterTillnerRoth ()
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_LJ126_TholJPCRD2016 ()
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_LJ126_KolafaNezbeda1994 ()
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_LJ126_Johnson1993 ()
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_multifluid_activity (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_multifluid_association (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_PCSAFT (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_PCSAFTPureGrossSadowski2001 (const nlohmann::json &spec)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_SAFTVRMie (const nlohmann::json &j)
 
std::unique_ptr< teqp::cppinterface::AbstractModelmake_SOFTSAFT (const nlohmann::json &spec)
 
template<typename TemplatedModel>
auto make_owned (const TemplatedModel &tmodel)
 
template<typename TemplatedModel>
auto make_owned (const TemplatedModel &tmodel)
 
template<typename TemplatedModel>
auto make_owned (const TemplatedModel &tmodel)
 

Typedef Documentation

◆ makefunc

◆ ModelPointerFactoryFunction

using teqp::cppinterface::ModelPointerFactoryFunction = std::function<std::unique_ptr<teqp::cppinterface::AbstractModel>(const nlohmann::json &j)>

Definition at line 214 of file teqpcpp.hpp.

Function Documentation

◆ add_model_pointer_factory_function()

void teqp::cppinterface::add_model_pointer_factory_function ( const std::string & key,
ModelPointerFactoryFunction & func )

This function allows you to inject your own model factory function into the set of factory functions implemented in teqp. This allows you to add your own model at runtime. As an example of how to do this, see src/test_runtime_model_inclusion.cpp.

Parameters
keyThe key used to define the model
funcThe ModelPointerFactoryFunction factory function used to generate the wrapped model

Definition at line 140 of file teqp_impl_factory.cpp.

◆ build_iteration_Jv()

template<typename Array>
auto teqp::cppinterface::build_iteration_Jv ( const std::vector< char > & vars,
const Eigen::Array< double, 3, 3 > & A,
const double R,
const double T,
const double rho,
const Array & z )

A convenience function for calculation of Jacobian terms of the form \( J_{i0} = \frac{\partial y}{\partial T} \) and \( J_{i1} = \frac{\partial y}{\partial \rho} \) where \(y\) is one of the thermodynamic variables in vars.

Parameters
varsA set of chars, allowed are 'H','S','U','P','T','D'
AThe matrix of derivatives of \(\alpha^{\rm ig} + \alpha^{\rm r}\), perhaps obtained from teqp::DerivativeHolderSquare, or via get_deriv_mat2 of the AbstractModel
RThe molar gas constant
TTemperature
rhoMolar density
zMole fractions

Definition at line 26 of file derivs.hpp.

◆ build_model_ptr()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::build_model_ptr ( const nlohmann::json & json,
bool validate = true )

Definition at line 104 of file teqp_impl_factory.cpp.

◆ get_model_schema()

nlohmann::json teqp::cppinterface::get_model_schema ( const std::string & kind)

Return the schema for the given model kind.

Definition at line 50 of file teqp_impl_factory.cpp.

◆ make_2CLJF()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_2CLJF ( const nlohmann::json & spec)

Definition at line 60 of file model_factory_model_potentials.cpp.

◆ make_2CLJF_Dipole()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_2CLJF_Dipole ( const nlohmann::json & spec)

Definition at line 63 of file model_factory_model_potentials.cpp.

◆ make_2CLJF_Quadrupole()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_2CLJF_Quadrupole ( const nlohmann::json & spec)

Definition at line 66 of file model_factory_model_potentials.cpp.

◆ make_advancedPRaEres()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_advancedPRaEres ( const nlohmann::json & j)

Definition at line 13 of file model_factory_advancedmixcubic.cpp.

◆ make_AmmoniaWaterTillnerRoth()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_AmmoniaWaterTillnerRoth ( )

Definition at line 36 of file model_factory_multifluid.cpp.

◆ make_CPA()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_CPA ( const nlohmann::json & spec)

Definition at line 14 of file model_factory_CPA.cpp.

◆ make_EXP6_Kataoka1992()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_EXP6_Kataoka1992 ( const nlohmann::json & spec)

Definition at line 34 of file model_factory_model_potentials.cpp.

◆ make_genericSAFT()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_genericSAFT ( const nlohmann::json & spec)

Definition at line 13 of file model_factory_genericsaft.cpp.

◆ make_GERG2004idealgas()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_GERG2004idealgas ( const nlohmann::json & spec)

Definition at line 19 of file model_factory_GERG.cpp.

◆ make_GERG2004resid()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_GERG2004resid ( const nlohmann::json & spec)

Definition at line 13 of file model_factory_GERG.cpp.

◆ make_GERG2008idealgas()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_GERG2008idealgas ( const nlohmann::json & spec)

Definition at line 22 of file model_factory_GERG.cpp.

◆ make_GERG2008resid()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_GERG2008resid ( const nlohmann::json & spec)

Definition at line 16 of file model_factory_GERG.cpp.

◆ make_IdealHelmholtz()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_IdealHelmholtz ( const nlohmann::json & spec)

Definition at line 9 of file model_factory_IdealHelmholtz.cpp.

◆ make_LJ126_Johnson1993()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_LJ126_Johnson1993 ( )

Definition at line 52 of file model_factory_multifluid.cpp.

◆ make_LJ126_KolafaNezbeda1994()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_LJ126_KolafaNezbeda1994 ( )

Definition at line 49 of file model_factory_multifluid.cpp.

◆ make_LJ126_TholJPCRD2016()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_LJ126_TholJPCRD2016 ( )

Definition at line 46 of file model_factory_multifluid.cpp.

◆ make_LKP()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_LKP ( const nlohmann::json & j)

Definition at line 13 of file model_factory_LKP.cpp.

◆ make_Mie_Chaparro2023()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_Mie_Chaparro2023 ( const nlohmann::json & spec)

Definition at line 47 of file model_factory_model_potentials.cpp.

◆ make_Mie_Pohl2023()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_Mie_Pohl2023 ( const nlohmann::json & spec)

Definition at line 44 of file model_factory_model_potentials.cpp.

◆ make_model()

std::unique_ptr< AbstractModel > teqp::cppinterface::make_model ( const nlohmann::json & j,
bool validate = true )

Definition at line 136 of file teqp_impl_factory.cpp.

◆ make_multifluid()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_multifluid ( const nlohmann::json & j)

Definition at line 22 of file model_factory_multifluid.cpp.

◆ make_multifluid_activity()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_multifluid_activity ( const nlohmann::json & j)

Definition at line 13 of file model_factory_multifluid_activity.cpp.

◆ make_multifluid_association()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_multifluid_association ( const nlohmann::json & j)

Definition at line 13 of file model_factory_multifluid_association.cpp.

◆ make_multifluid_ECS_HuberEly1994()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_multifluid_ECS_HuberEly1994 ( const nlohmann::json & j)

Definition at line 26 of file model_factory_multifluid.cpp.

◆ make_multifluid_model()

std::unique_ptr< AbstractModel > teqp::cppinterface::make_multifluid_model ( const std::vector< std::string > & components,
const std::string & coolprop_root,
const std::string & BIPcollectionpath = {},
const nlohmann::json & flags = {},
const std::string & departurepath = {} )

Definition at line 132 of file teqp_impl_factory.cpp.

◆ make_owned() [1/3]

template<typename TemplatedModel>
auto teqp::cppinterface::adapter::make_owned ( const TemplatedModel & tmodel)

Definition at line 259 of file deriv_adapter.hpp.

◆ make_owned() [2/3]

template<typename TemplatedModel>
auto teqp::cppinterface::adapter::make_owned ( const TemplatedModel & tmodel)

Definition at line 259 of file deriv_adapter.hpp.

◆ make_owned() [3/3]

template<typename TemplatedModel>
auto teqp::cppinterface::adapter::make_owned ( const TemplatedModel & tmodel)

Definition at line 259 of file deriv_adapter.hpp.

◆ make_PCSAFT()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_PCSAFT ( const nlohmann::json & spec)

Definition at line 13 of file model_factory_pcsaft.cpp.

◆ make_PCSAFTPureGrossSadowski2001()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_PCSAFTPureGrossSadowski2001 ( const nlohmann::json & spec)

Definition at line 16 of file model_factory_pcsaft.cpp.

◆ make_SAFTVRMie()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_SAFTVRMie ( const nlohmann::json & j)

Definition at line 17 of file model_factory_SAFTVRMie.cpp.

◆ make_SOFTSAFT()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_SOFTSAFT ( const nlohmann::json & spec)

Definition at line 13 of file model_factory_softsaft.cpp.

◆ make_SW_EspindolaHeredia2009()

std::unique_ptr< teqp::cppinterface::AbstractModel > teqp::cppinterface::make_SW_EspindolaHeredia2009 ( const nlohmann::json & spec)

Definition at line 24 of file model_factory_model_potentials.cpp.