teqp 0.22.0
Loading...
Searching...
No Matches
teqpcpp.hpp File Reference
#include <memory>
#include <typeindex>
#include <optional>
#include <Eigen/Dense>
#include "nlohmann/json.hpp"
#include "teqp/algorithms/critical_tracing_types.hpp"
#include "teqp/algorithms/VLE_types.hpp"
#include "teqp/algorithms/VLLE_types.hpp"

Go to the source code of this file.

Classes

class  teqp::cppinterface::AbstractModel
 

Namespaces

namespace  teqp
 
namespace  teqp::cppinterface
 

Macros

#define ARXY_args
 
#define AR0N_args
 
#define ARN0_args
 
#define ISOCHORIC_double_args
 
#define ISOCHORIC_array_args
 
#define ISOCHORIC_matrix_args
 
#define ISOCHORIC_multimatrix_args    X(build_Psir_fgradHessian_autodiff)
 
#define X(i, j)   virtual double get_Ar ## i ## j(const double T, const double rho, const REArrayd& molefrac) const = 0;
 
#define X(i)   virtual EArrayd get_Ar0 ## i ## n(const double T, const double rho, const REArrayd& molefrac) const = 0;
 
#define X(i)   virtual EArrayd get_Ar ## i ## 0n(const double T, const double rho, const REArrayd& molefrac) const = 0;
 
#define X(f)   virtual double f(const double T, const EArrayd& rhovec) const = 0;
 
#define X(f)   virtual EArrayd f(const double T, const EArrayd& rhovec) const = 0;
 
#define X(f)   virtual EMatrixd f(const double T, const EArrayd& rhovec) const = 0;
 
#define X(f)   virtual std::tuple<double, Eigen::ArrayXd, Eigen::MatrixXd> f(const double T, const EArrayd& rhovec) const = 0;
 

Typedefs

using EArray2 = Eigen::Array<double, 2, 1>
 
using EArrayd = Eigen::ArrayX<double>
 
using EArray33d = Eigen::Array<double, 3, 3>
 
using REArrayd = Eigen::Ref<const EArrayd>
 
using EMatrixd = Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic>
 
using REMatrixd = Eigen::Ref<const Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic>>
 
using teqp::cppinterface::ModelPointerFactoryFunction = std::function<std::unique_ptr<teqp::cppinterface::AbstractModel>(const nlohmann::json &j)>
 

Functions

std::unique_ptr< AbstractModelteqp::cppinterface::make_model (const nlohmann::json &, bool validate=true)
 
std::unique_ptr< AbstractModelteqp::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={})
 
std::unique_ptr< AbstractModelteqp::cppinterface::build_model_ptr (const nlohmann::json &json, bool validate=true)
 
nlohmann::json teqp::cppinterface::get_model_schema (const std::string &kind)
 Return the schema for the given model kind.
 
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.
 

Macro Definition Documentation

◆ AR0N_args

#define AR0N_args
Value:
X(1) \
X(2) \
X(3) \
X(4) \
X(5) \
X(6)
#define X(i, j)
Definition teqpcpp.hpp:107

Definition at line 39 of file teqpcpp.hpp.

◆ ARN0_args

#define ARN0_args
Value:
X(1) \
X(2) \
X(3) \
X(4)

Definition at line 49 of file teqpcpp.hpp.

◆ ARXY_args

#define ARXY_args
Value:
X(0,0) \
X(0,1) \
X(0,2) \
X(0,3) \
X(0,4) \
X(1,0) \
X(1,1) \
X(1,2) \
X(1,3) \
X(1,4) \
X(2,0) \
X(2,1) \
X(2,2) \
X(2,3) \
X(2,4)

Definition at line 22 of file teqpcpp.hpp.

◆ ISOCHORIC_array_args

#define ISOCHORIC_array_args
Value:
X(build_Psir_gradient_autodiff) \
X(get_chempotVLE_autodiff) \
X(get_dchempotdT_autodiff) \
X(get_fugacity_coefficients) \
X(get_partial_molar_volumes) \
X(build_d2PsirdTdrhoi_autodiff) \
X(get_dpdrhovec_constT)

Definition at line 61 of file teqpcpp.hpp.

◆ ISOCHORIC_double_args

#define ISOCHORIC_double_args
Value:
X(get_pr) \
X(get_splus) \
X(get_dpdT_constrhovec)

Definition at line 56 of file teqpcpp.hpp.

◆ ISOCHORIC_matrix_args

#define ISOCHORIC_matrix_args
Value:
X(build_Psir_Hessian_autodiff) \
X(build_Psi_Hessian_autodiff)

Definition at line 70 of file teqpcpp.hpp.

◆ ISOCHORIC_multimatrix_args

#define ISOCHORIC_multimatrix_args    X(build_Psir_fgradHessian_autodiff)

Definition at line 74 of file teqpcpp.hpp.

◆ X [1/7]

#define X ( f)    virtual double f(const double T, const EArrayd& rhovec) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [2/7]

#define X ( f)    virtual EArrayd f(const double T, const EArrayd& rhovec) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [3/7]

#define X ( f)    virtual EMatrixd f(const double T, const EArrayd& rhovec) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [4/7]

#define X ( f)    virtual std::tuple<double, Eigen::ArrayXd, Eigen::MatrixXd> f(const double T, const EArrayd& rhovec) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [5/7]

#define X ( i)    virtual EArrayd get_Ar0 ## i ## n(const double T, const double rho, const REArrayd& molefrac) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [6/7]

#define X ( i)    virtual EArrayd get_Ar ## i ## 0n(const double T, const double rho, const REArrayd& molefrac) const = 0;

Definition at line 107 of file teqpcpp.hpp.

◆ X [7/7]

#define X ( i,
j )   virtual double get_Ar ## i ## j(const double T, const double rho, const REArrayd& molefrac) const = 0;

Definition at line 107 of file teqpcpp.hpp.

Typedef Documentation

◆ EArray2

using EArray2 = Eigen::Array<double, 2, 1>

Definition at line 15 of file teqpcpp.hpp.

◆ EArray33d

using EArray33d = Eigen::Array<double, 3, 3>

Definition at line 17 of file teqpcpp.hpp.

◆ EArrayd

using EArrayd = Eigen::ArrayX<double>

Definition at line 16 of file teqpcpp.hpp.

◆ EMatrixd

using EMatrixd = Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 19 of file teqpcpp.hpp.

◆ REArrayd

using REArrayd = Eigen::Ref<const EArrayd>

Definition at line 18 of file teqpcpp.hpp.

◆ REMatrixd

using REMatrixd = Eigen::Ref<const Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic>>

Definition at line 20 of file teqpcpp.hpp.