teqp 0.19.1
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
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 > &Ar, const Eigen::Array< double, 3, 3 > &Aig, 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_SAFTVRMie (const nlohmann::json &j)
 

Typedef Documentation

◆ makefunc

Definition at line 14 of file teqp_impl_factory.cpp.

◆ ModelPointerFactoryFunction

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

Definition at line 194 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 93 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 > & Ar,
const Eigen::Array< double, 3, 3 > & Aig,
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'
ArThe matrix of derivatives of \(\alpha^{\rm r}\), perhaps obtained from teqp::DerivativeHolderSquare, or via get_deriv_mat2 of the AbstractModel
AigThe matrix of derivatives of \(\alpha^{\rm ig}\), 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 27 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 58 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 17 of file teqp_impl_factory.cpp.

◆ make_model()

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

Definition at line 89 of file teqp_impl_factory.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 85 of file teqp_impl_factory.cpp.

◆ make_SAFTVRMie()

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

Definition at line 7 of file model_factories.cpp.